- Do The Right Thing, even if you don't want to.
- Assume the person who'll need to maintain your code owns an axe and isn't afraid to use it
- If you think something's terribly clever that's a good sign you shouldn't do it.
- Don't take shortcuts to be cute or lazy.
- Names are important! You're not called "x", so why should your variables
- Pick a coding style and stick with it, even if you don't like it. If the program exists, use its style.
- Things are only optional if it's painfully obvious what's going on without them. Parenthesis, generally speaking, aren't optional. Neither are meaningful comments.
Here are some more words of wisdom:Alain Gravel
When you find a bug be happy. Squash it right away because it is likely to run away and make babies. ...This guy had lots of experience. He didn't just produce code. He made real products work. Worship its words...Unknown source
The intelligent man learns from its mistakes while the wise man learns from other's mistakes. ...Nothing to add to this... Divide and conquer. ...This is one of the most powerful debugging tool. Test your modifications as often as possible on small pieces of the code. If you can cut in half then cut agait until you isolate the problem...Conclusion:
Read the all the above once more and live by it! M.T.
Another good resource are various books by Brian Kernighan, one of my favorite authors to read. For example, "The Elements of Programming Style". (Listed as out of print at amazon.com .)
I recently gave one of our interns Kernighan and Plauger's "Software Tools"  with the comment "This may be the best book ever on software engineering." -- CLN