17 Rules

  1. Build modular programs
  2. Write readable programs
  3. Use composition
  4. Separate mechanisms from policy
  5. Write simple programs
  6. Write small programs
  7. Write transparent programs
  8. Write robust programs
  9. Make data complicated when required, not the program
  10. Build on potential users’ expected knowledge
  11. Avoid unnecessary output
  12. Write programs which fail in a way that is easy to diagnose
  13. Value developer time over machine time
  14. Write abstract programs that generate code instead of writing code by hand
  15. Prototype software before polishing it
  16. Write flexible and open programs
  17. Make the program and protocols extensible.

From The Art of Unix Programming by Eric S. Raymond