This list actually came from another blog, but I did not see where I could leave a comment so I thought I would jot my thoughts down here. The blog implies that these are essentially in order of importance with the first being “Does it work.”

  • Does it work?
  • Is it easy to understand?
  • Is it efficient?
  • Short functions
  • Good naming
  • Clear division of responsibility
  • High cohesion
  • Low coupling
  • Appropriate use of OO and other techniques
  • Minimal code

However, I thought I would point out a simple observation. Short functions, good naming, clear division of responsibility, and appropriate use of OO are all efforts to make something easier to understand. I really don't like efficient code I can't understand. And finally, efforts to write minimal code often result in code that is not easy to understand. So, I might reorganize this list like so…

  • Does it work as requested? (Adding “as requested.")
  • Is it easy to understand?
    • Has clear division of responsibility
      • Leads to High Cohesion
    • (adding) Has useful exception handling. Good exception handling makes bugs easy to understand.
    • Appropriate use of OO and other techniques
    • Good Naming
    • Short Functions
  • Is it easy to extend and maintain?
    • Easier if it is easy to understand in the first place
    • Low Coupling
  • Is it efficient?
    • Yes, how few wasted cycles there are is last on my list
    • And 'Minimal Code' did not make the list