Below are the top 2^3 rules which I try to follow while programming. Read them. Use them if you like. Tell me why I'm wrong. Enjoy!

  1. Avoid duplicate data.
  2. Avoid duplicate code.
  3. See if someone else already wrote it.
  4. Do not use every feature of the programming language in every program.
  5. Comment every function because you won't remember what it does later.
  6. Do not comment code so much that the lines of comments out number the lines of code (unless you really really have to).
  7. Keep functions small and managable.
  8. Test it.