Code Retreat is an all-day training event that focuses on the fundamentals of software development. There's a global code retreat day coming up, and I'm looking forward to it. That said, I've been to one before and have to say there was a huge amount of chaos... which is fine.One thing that I still don't get is why the Game of Life is a good problem for TDD, and what good and bad TDD for it feels like.Realize this is a pretty open ended question, so feel free to comment.
Why is Conway's Game of Life used for code retreats?
tdd
Originally, Conway's Game of Life was chosen because we had a java applet on hand to work on at the very first coderetreat in January of 2009. The goal of the day was to experiment with some ideas around time-boxed practice, and we just chose the GoL applet because we had it.After that, though, as a couple of active facilitators (notably me during my journeyman tour in 2009 and Alex Bolboaca in Bucharest) investigated the uses of GoL as a learning tool. At the same time we were evolving the coderetreat format to what it has become today. In 2009, Alex tried at least one other problem (poker hand scoring), but didn't find it as useful as GoL. You can find more about the history at http://coderetreat.org/historyCoderetreat focuses on improving our understanding of simple design (specifically the 4 rules of simple design), test-driven development and other fundamental aspects of software development. GoL has the benefit of being a very simple problem to understand while still being very rich from a structural perspective. It readily provides parts of the system that can be used as examples of all the topics we practice at coderetreat. For example, a common implementation that takes (x,y) parameters in multiple methods is a great opportunity to talk about the DRY principle (every piece of knowledge should have one and only one representation in your system) with regards to the topology of the system. There are a lot of other aspects which can be used as examples of building a design that minimizes the cost of change.There are quite a few people now who have done multiple coderetreats, and they still find interesting aspects of the problem to use as practice.