Golden Rules of Programming

Posted by Ravikiran K.S. on January 1, 2006
  • Even best programmers make mistakes.

  • The most important single aspect of software development is to be clear about what you are trying to build. First understand and then be understood.

  • If you make a fool-proof program, the world will create a bigger fool.

  • Attention to details is essential for better code.

  • Focus is secret sauce of successful problem solving.

  • The line never tested is the line with the potential bug.

  • There is no shortcut to success.

  • Incorrect documentation is often worse than no documentation.

  • Measuring programming progress by lines of code is like measuring aircraft building progress by weight.

  • Simplicity is the ultimate sophistication.

  • Just shut up and hack.

Good Programming Practice:

  • Keep code as concise as you can.

  • Always compare constants (i.e. #defines) against variables. This avoids null pointer dereferences. ex: if (ABC == var) instead of if (var == ABC)