Object calisthenics: Change the way you code

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:

  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.
  6. Keep all entities small.
  7. Don’use any classes with more than two instance variables.
  8. Use first-class collections.
  9. Don’t use any getters/setters/properties.

Read more – and see object calisthenics in action – on Schneide Blog ...

This story, "Object calisthenics: Change the way you code" was originally published by JavaWorld.

Copyright © 2013 IDG Communications, Inc.

InfoWorld Technology of the Year Awards 2023. Now open for entries!