If you want to sharpen your programming skills and train your brain to come up with new solutions, there's a workout program for that. Originally proposed by Jeff Bay in the ThoughtWorks Anthology (which is unfortunately out of print) object calisthenics lays out the rules of the game, and then lets you have at it with the programming problem of your choice. The rules are:
- 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.
- Keep all entities small.
- Don’use any classes with more than two instance variables.
- Use first-class collections.
- Don’t use any getters/setters/properties.
Read more – and see object calisthenics in action – on Schneide Blog ...