Possible Duplicate:
How Can I Know Whether I Am a Good Programmer?

I have a doubt about myself. I think I am not good enough in programming. I was really trying very very hard to learn programming and I am dedicated to it.

Can you give me advice on what are the things that I need to master to become a better programmer or the stuff that will help me to improve my programming skills? Do I really need to learn c/c++ or java? I'm a PHP Programmer and I want to master it before learning new language. How can would I know if my skills is enough?

  • Quick answer: You'll know if your skills are good enough when someone is willing to hire you, based on your current skill set, and pay you a good salary. Commented Jun 14, 2011 at 11:45

10 Answers 10


Stick to a few paradigms, especially in PHP where they're missing if you produce something from scratch.

Things that are important IMO:

  • Don't comment the obvious, but the complex
  • Don't repeat yourself. If there is similiar code that could be put into a separate function, do it!
  • Use descriptive function names
  • Watch your spaces and tabs. A bit of a clean order for readability helps a lot. If you look at your code and you think "that's a hell of a mess", clean it up. Your reputation will be thankful for not decreasing when another programmer needs to modify your project.
  • 1
    +1 code needs to be self-explanatory. Comments look ugly and are annoying when used too much, while a descriptive function name (e.g. createBookmark instead of bm_alloc) can avoid a lot of confusion.
    – user4595
    Commented Jun 14, 2011 at 21:33

Practice, practice and lots of practice that is what will always help you improve your skills, the more you are exposed the more you learn (most of the times from your mistake). Also it would be good to see if you have a buddy or mentor who will be able to devote a bit of their time in going through your work.

Also your passion to learn and improve also plays a good part which keeps you on the toes and increases the willingness to learn.

Also do remember that code is written once and read many a times so would suggest to go for readability of the code which at times(most of the time) will showcase how skilled you are.


What is good code?

  1. It meets the needs of your customers
  2. It is maintainable

If you want to know if your code is good:

  1. Ask your customers
  2. Ask other developers

I'm a PHP Programmer and I want to master it before learning new language. How can would I know if my skills is enough?

Usually, the two highest forms of understanding are:

  • you can explain the language to a inquisitive newbie, so that he understands well, and you can answer all of his questions with the underlying principles (a lot of understanding is usually only intuitively. In PHP, the type system is often not well-understood)

  • you can actually use the language to fullfill customer requests, with spending only little time with the 'accidental complexity' of the language, and much of the time with the inherent complexity of the problem

if this is the case, you mastered the language. That said: imho, you should learn other languages, even if you have not mastered PHP yet. Seeing things from a different perspective when learning the other language will (imho) improve your understanding of PHP as well.

Do I really need to learn c/c++ or java?

Imho, not neccesserily these, but you definitively need to learn some other languages besides the ones you know (which, i guess, are at least php, sql and some markup.), to see other concepts. Python and Ruby should be easy transitions, that can lead to more object oriented or functional languages.

Also, you should keep in mind, that a lot of skills you need as a programmer are not, in a strict sense, 'coding related'. Architecture, GUI-Design, Documentation etc are skills that are neccessary for beeing a good programmer, and are not bound to specific languages.


It's like asking how to be a good artist.

It's only what you interpret good is what is good (within reason...)

  • I can't agree. Beyond basic technical mastery, the value art is very much to do with the emotions and is typically in the eye of the beholder. On the other hand, code is good if it (1) meets the needs of the customer and (2) is maintainable. Whilst there is room for disagreement on what (1) and (2) mean, there are very clear guidelines for both these areas.
    – Kramii
    Commented Jun 14, 2011 at 12:56

You won't. You could probably save the world twice using your programming (also this) and it won't matter - there's no such thing as "enough" skill. Accept it. Live with it. Learn as much as you can and then some more. And a bit more still. Seriously, you just have to enjoy learning and you should never look back. I'd say it's just life, but imo in programming much more so.


As with any field where you try to define "good" and "bad" it can be useful to pick a role model as a compass point. That can either be a person, or a software product.

Back when I interviewed people I used to always start with a casual question about examples of what they thought was "good software" and "bad software". It was open-ended...I was more interested in why they thought the good was good and why the bad was bad.

About 50% of the recent CS college grads I spoke with came out with very strong passion that they thought Linux was a compelling example of good software. (What they thought was bad was a lot more personal; usually whatever program they'd been forced to use that had lost their data, or had some restriction that bugged them.)

Anyway, Linus Torvalds has lots of opinions and advice...if you feel strongly about Linux, start with him. If you really love Doom read interviews with Carmack on Slashdot etc. If Bjarne Stroustrup or Don Knuth are your cup of tea, they've got plenty to say.

I personally think that grokking the bare mathematical essence of computing is a big part of being a "good" programmer. I cached Alan Turing's Computability Thesis...in his own words...here:



To add to V4Vendetta's answer. He is right. Practice, practice and yet more practice is what makes you better.

There is no objective definition of good, there is only your personal feeling when you reach the that point yourself.

It is said that you master something by practicing it regularly for 10 years or 10,000 hours. Keep picking challenging projects, always try to push yourself beyond your current limits.

Of course the most important thing is that you should really love learning new things and of course you have to like the language you want to learn.


To my mind, PHP isn't a great language as programming languages go. It's good for web scripting, but if you want to be a good programmer it is worth learning to use another language that is more general purpose and consequently a little cleaner to work with. You don't have to completely master it, but understanding the paradigms and process of working with a regular programming language will give you a lot of useful expertise to take back to your PHP work. In terms of what language you use, I don't think it matters greatly - Python, Ruby, Java, C#, whatever - but you might as well learn something relatively popular because it could prove to be a useful thing to have on your CV later. I would avoid C/C++ because although you would learn a whole lot they are not - to my mind - the best place to learn the principles of programming, you have to spend too much time at first just learning how to write defensive C. Once you have a good understanding of the practice of programming, you can move on to them if you want or need to.

In terms of learning to be a programmer, rather than just a person who programs, one thing that may really help is reading Code Complete - that contains a lot of detailed and valuable information on the things that good programmers do and stands repeated reading.


If you love programming, spend every waking (and sleeping) moment thinking about it, constantly come up with new ideas, hacks and abstractions, breaking things, fixing thing tearing things apart and then putting them back together, and you have the patience and love to work through the real nasty of nastiness, then you're probably a good programmer.

Not the answer you're looking for? Browse other questions tagged or ask your own question.