Skip to main content


Showing posts from January, 2013

Object Calisthenics

Recently I ran a session on Object Calisthenics. I was first exposed to this challenge a few years ago and personally found it a fun, yet difficult experience. This is intentional as the challenge is designed to push the boundaries of best practices. The instructions are simple, there are nine rules to follow that must be obeyed during a traditional kata. We chose the Checkout Kata as the backdrop for this session. The teams feedback is as follows.Use only one level of indentation per methodThe team found this easy, and we discussed that following this to some degree in day to day development would be beneficial. Limiting the amount of nested code you have can improve readability quite substantially.Don't use the else keywordAt first this seemed a no brainier, until people realised it meant to favour polymorphism and not simply relying on an early return (implicit else).Wrap all primitives and stringsThe team managed well with this, one example w…