In my 30 years plus as a computer programmer, I have developed some principles which I think are very important, and which are not taught anywhere. In fact, many people teach things contrary to these.

Consistency is the hallmark of the craftsman. A good programmer will always do the same thing the same way: he will always indent the same way, name methods of an object the same, etc. Your employer may have a style guide. If they do, follow it religiously. Never think it is "old-fashioned" or that you know better. Do what it says.

Comment abundantly. A good program should be understandable by reading the comments only. A good program should be at least 50% comments. In some interpreted languages this may have a negative performance impact, however. Try to avoid any use of such languages.

Names are important. It has been said that naming things is the closest humans come to creating them. It cannot be over-emphasized that naming things can be critical. The practice I suggest is to select 'mnemonic atoms', name-parts which can be used to construct names. In older systems, length of names was limited, and one might construct names of parts such as "WRT" for "write", etc. In newer systems, they can be whole words such as "write". Use either "humpy case" names, such as "writeOutputRecord", or "break character" names such as "write_output_record" - but not both. Always use the same words - see above about Consistency.

The KISS Principle: Keep It Simple, Stupid. 'Things should be as simple as possible, but no simpler.' - Albert Einstein. In programming, the real danger is making them more complex than they need to be. So many problems are caused by people thinking they're clever. Never be clever.

Be very cautious about new things. The industry constantly comes out with new ideas and products. Most of them become failures. That new scripting language - Drupal, Ruby or whatever: Will it become the new standard? Perhaps - or perhaps it will join PL/I, APL, Pascal and the rest of the industry's past languages of the future. (Pascal was the first language to use the "humpy-case" naming style. As a C programmer, I think it's ugly as hell, but consistency is more important than beauty.)

Listen to your inner voice. Intuition is your subconscious trying to draw attention to something it is seeing that you're not consciously seeing yet. If something "looks wrong" or "feels wrong", it's very likely that there is something wrong. A misplaced semicolon once brought down AT&T's entire network for hours. Consistency is a big help here.

For espousing the principles above, I became known as a curmudgeon. Yet, I produced hundreds of thousands of lines of relatively bug-free code in my career. The industry average for computer programmers is just ten lines a day; most programmers will never come close to a hundred thousand lines in their entire career. So, this is the voice of experience speaking. I may add more to this page later.