In preparation for a presentation next week (which will go on for two days… brrr), I had my sights set on doing something about Extreme OOP or Object Calisthenics. I’m thinking of using that exercise to illustrate some OOP practices.
In the PDF file for the Extreme OOP above, you’ll find an excellent kata (the Commodore 64 kata) that will take you through all the rules of Object Calisthenics.
OK – but since I didn’t want to do that exercise all on my own, I hooked up with two Avega colleagues (David Blomberg and Magnus Forberg, great guys!) and we did some kind of coding dojo.
The findings were quite surprising.
- First – the rules of Object Calisthenics are not meant to be followed when you do ordinary code. It’s simply an exercise to get you to think about OOP in a very structured fashion.
- Secondly – the rules are very hard to follow… Very hard. We didn’t get quite there, I felt.
- Thirdly – the main takeaway for me was that you learn so very much by doing pair programming and TDD together. It’s simply the best way to code in my opinion. The amount of information that is transported back and forth for each code line is immense. I almost don’t dare to code on my own ;)
- Fourth – just by sitting next to another person coding is a great learning experience. Shortcuts, patterns, tricks, and structuring solutions – everything you can think of. And it sticks.
So – I still think the exercise was good, but it didn’t get to what I thought, and I learned a lot of stuff that I didn’t expect either. Thank you, guys.