Like my last post, this post introduces a code kata (coding exercise) that is designed to reinforce the Open/closed Principle.

The idea behind the Open/closed principle is that modules should be open for extension, but closed to modification. This seems counter-intuitive, but it might help to think of it like this: If you need to make a change, you should only need to write new code instead of changing old code.

You can find the code for the kata on github.