Hacker News new | comments | show | ask | jobs | submit login
Poll: I'm a noob programmer - What should I focus on to become better?
10 points by DrorY 1596 days ago | hide | past | web | 7 comments | favorite
Following ScotterC thread about what makes one a good programmer (http://news.ycombinator.com/item?id=4759510) it got me thinking.

I am a starting programer, programming mostly for iPhone and Web. When I work as a freelance with customers they'd say I'm the best. When I work with fellow programmers on the other hand they'd say I am the worse.Trying to get better, It would be great if you could help me understand what makes one a good web or mobile developer?

Could you please help me rank these?

1. Simplicity

2. Readability

3. Abstracting a problem

4. Encapsulation

5. Code efficiency

6. Speed \ Quantity

Am I missing any other parameter?


1. Encapsulation

Learning to encapsulate code is very easy. It basically comes down to templating your code. Everywhere you might put a comment like:

// Do database authentication

That should instead be a function:

var db = do_database_authentication();

Learning to write functions into your code before you write the actual function is an important skill and will make you a better programmer.

2. Simplicity

Simplicity is relatively easy as a concept. Don't ever nest logic more than 3 levels deep (and try and keep it to 2 or less), don't ever pass more than ~6 parameters to a function (unless the limitations of your language dictate as such), and don't ever have a method more than ~50 lines or a single file more than ~500.

3. Readability

I think if you follow the rules of simplicity, readability comes down to indentation, code organization, and naming conventions. Follow what your language idioms are, not what you prefer (in most cases).

4. Abstracting a problem

This is probably the biggest and hardest beast to tackle, but it's also probably the least important when you're starting out. If you focus on this now, you'll never ship anything. The biggest thing to know is that if you've got a class with more than ~10 public-facing methods, or an object that has a constructor with ~10 parameters, you probably have something in place that could be refactored into a more abstract solution.

5. Speed / Quantity

Writing code quickly is important. If you follow what I've said above and you're relatively competent, you'll produce good code quickly.

6. Code efficiency

Never worry about this until it's an issue. When it is, use a profiler or debugger to isolate issues, and fix them one at a time. Optimization needs to be surgical.

Don't get hassled by opinions of other people but keep improving. Here is how I would rank the things that makes a good programmer in a real world:

1. Abstracting a problem - Understanding/analyzing problems and finding solutions. You first need to be able to solve it before anything else.

2. Coding Efficiency - How quickly you can code it? In most scenarios (at job/freelancing/etc), the ability to deliver a working solution on time matters most. You can always improve the code if it is not perfect but it is hard to make up for a lost customer/time.

3. Code Efficiency i.e. How fast the program runs? If your solution works the next thing to ensure is that the performance is good.

4. Simplicity/Readability/Maintainability - After that you can refactor the code to make it more simple, readable, and maintainable.

5. Enacpsulation and everything else comes later.

"When I work as a freelance with customers they'd say I'm the best"

Great. This means you are delivering to your customers which is what they care about. Whether the code is efficient or not, they probably dont care about that.So keep going there. You are doing great.

"When I work with fellow programmers on the other hand they'd say I am the worse"

To make a good programmer especially within other programmers, your items from 1-6 are good but i would not rank them necessarily in a specific sequence. They are all good to have.

Google "Programmer Competency Matrix" for more ideas how to improve ;)

1. Abstracting a problem

2. Encapsulation

3. Code efficiency

4. Speed \ Quantity

5. Simplicity

6. Readability

ajshroff has got it right - Abstracting the problem is job #1. Programming languages are tools and everything else on the list varies depending on the programming language. Abstracting the problem is the key to all programming and computer science.

Try Project Euler as a casual way to improve you skills in this area, it's been a good mental exercise for using programming to solve math problems with your favorite language. Solving the problem is the primary objective, but you can always go back and make your code better after the fact, learn new functions and techniques, etc.


Agree with this ordering. I would start tackling abstraction. Eventually, it will come naturally when you program. Encapsulation is also another important point.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact