The Pragmatic Craftsman :: Simplicity from complexity : by Stanley Kubasek ::

What is Good Code?

I recently discovered a pretty good discussion on what “good code” is. The original author, Bill Carlson, specified quite a few good points. Points that according to him make the code good. Before I list the summary of the points, let me just say that if you are interesting in writing quality code, I think you should (you must) read Steve McConnell’s Code Complete. It will open your eyes. It opened mine. :-) (See my review in Books I Recommend.)

Attributes of “Good Code:”

  • High “signal to noise” ratio.
  • Minimal algorithmic complexity.
  • Lack of “cuteness”.
  • Use of most primitive technology required.
  • Appropriate optimization.
  • Architectural simplicity.
  • Specificity (avoiding over-generalization).
  • When vs. How comments. Knowing how to use a class: useful. Knowing when to use a class: priceless.
  • Appropriate quality bar.
  • 100% reachable code.
  • Lack of cut-n-paste.
  • Lack of redundency.
  • Visual clarity. Is the code easy to read?

Read the whole discussion on The Old Joel on Software Forum: “Good Code” – What is it?

Favorite Quote




Currently Reading


© 2001-2022 Stanley Kubasek About me :: Contact me

Me on Twitter

»see more

Recent Entries