GDCR11 in London

Posted by Chris Rice on Dec 5, 2011

Cross-posted from

This past Saturday was the 2011 Global Day of Code Retreat, a world-wide event during which over 2000 programmers in 90 cities came together to spend the day practicing the craft of software development. I was fortunate to be able to attend the London gathering which took place near Barbican station.

The format of the day was six sessions of pair programming to implement Conway’s Game of Life using TDD. Each session would have a different set of constraints upon it, such as observation of Object Calisthenics or zero communication between the pair (to encourage intent-revealing coding), and would last 45 minutes – at the end of which all code was to be immediately deleted before a retrospective discussion.

For me, the most surprising thing was the extent to which my approach to the problem changed during the course of the day. I started the morning considering the micro level, working from the inside out – in other words, starting with a Cell and building my way out from there.

By the end of the day, I was far more inclined to look at the problem from the outside in – starting from the Grid and implementing logic to satisfy the game rules. This led to far more expressive test cases and, ultimately, more concise and intention-revealing code.

The session that impacted my thinking the most was TDD as if you meant it - in which all code must be implemented within a test before being extracted to classes or methods when duplication occurs.

I paired with my former colleague Jason, and spent the first half hour struggling to work out how to cope without being able to create classes and methods to satisfy our pre-conceived design ideas (i.e. that we’d need to start with either a Grid class or a Cell class!). Eventually we realised that the purpose of the session was to encourage us to look at the problem from the macro level and trust that suitable design would emerge.

All in all it was a fantastic day – I really enjoyed working with everyone that I was lucky enough to pair with and meeting those that I wasn’t. Thanks to Sandro and Samir from the London Software Craftsmanship Community for their expert facilitation of the event and to the guys at Valtech for being brilliant hosts. I genuinely cannot wait for the next one!

P.S. On the train home from London I decided to attempt to take what I’d learnt during the day and fully implement Conway’s Game of Life.

I’m fairly confident that the code is far cleaner than I would have written beforehand – in particular the tests, which are a lot more expressive of the actual problem than any I might have previously come up with. Mission accomplished, I suppose!