Binstock on Software: Perfecting OO's Small Classes and Short Methods
Feb 8, 2012
A great exercise to improve OO style coding:
- Use only one level of indentation per method.
- Don’t use the ‘else’ keyword.
- Wrap all primitives and strings.
- Use only one dot per line.
- Don’t abbreviate names.
- Keep entities small.
- Don’t use any classes with more than two instance variables.
- Use first-class collections.
- Don’t use setters, getters, or properties.
Link: Binstock on Software: Perfecting OO’s Small Classes and Short Methods