The Ruby on Rails and ClojureScript experts

Feb 8, 2012

A great exercise to improve OO style coding:

  1. Use only one level of indentation per method.
  2. Don’t use the ‘else’ keyword.
  3. Wrap all primitives and strings.
  4. Use only one dot per line.
  5. Don’t abbreviate names.
  6. Keep entities small.
  7. Don’t use any classes with more than two instance variables.
  8. Use first-class collections.
  9. Don’t use setters, getters, or properties.

Link: Binstock on Software: Perfecting OO’s Small Classes and Short Methods