Yesterday, Saturday December 8th, the Global Day of Coderetreat 2012 was finally there. As facilitator of the event in Haarlem (The Netherlands) I was quite excited about this event, and think we it was great and much fun.
Even though we had an event with only 5 people, we really had an awesome day. Throughout the day we did 5 implementations of Conway’s Game of Life, each with different constraints. The constraint for all session was that the universe is infinite (so two-dimensional arrays are probably not the best option).
The constraints in a coderetreat are extreme. This is the purpose of a coderetreat. By taking practices into the extreme you’ll learn when they can be useful and when to avoid them. On each coderetreat people are strongly suggested not to write code like that on the job.
Each session is 45 minutes. When a session ends the code must be deleted. After each session there’s a short retrospective.
To get everyone started the warming up didn’t have much constraints. The Game of Life must be implemented using clean code and TDD - like usual. This allowed people to get set and into the mood for the rest of the day.
After 40 minutes I communicated a little change in the requirements. The universe must be 3 dimensional rather than 2d. The remaining few minutes in the session were for each pair to figure out and discuss in how many places they would need to make a change.
The second session was constrained with taking baby steps. Each pair had to set a timer on 2 minutes, write a failing test and implement it (make it green) before the timer rings. Then they commit, reset the timer, and refactor their code before the timer rings. If they didn’t finish within the timer they had to roll back their changes and start over - taking a smaller step.
To be able to commit changes but still delete the code after the session ends each pair set up a local git repository. As it turned out the pairs struggled a little with git as they weren’t familiar with it. Next time I’ll give more introduction into git, if needed.
After a nice lunch, the third session focused on how you document your code using tests. Future-you may not fully understand your test while current-you think it’s fine.
As pairing with future-you is rather hard - or probably impossible if you don’t own a Delorean (and none of the attendees did) - we used the ping-pong pairing technique. One writes a test (tester) and the other implements it (implementer). As you cannot communicate with future-you other than through code, the pairs may only communicate through code in this session. To make the test suite a little more interesting the implementer had the role of evil coder (try to find loop-holes in the tests).
It’s interesting how the pairs had the same experience I had when I did this session on a coderetreat. You get really far without talking to each other. You won’t be discussing design. You just code. One drives the design, the other implements and refactors.
No return values
The fourth session constrains the use of return values: it’s lambda’s all the way down.
People were using Java all day long, which is really quite awful at this exercise because of Java’s lack of lambda’s. For those programming only in Java this really is a great exercise as it helps them understand what callbacks are about and when they can be useful.
On a side note: if you only know how program in Java, learn another language.
For the cooling down we did a fish-bowl session. One pair was programming on the big screen, the others were watching. Each 2 minutes one of the pair was replaced. No constraints were applied in this session.
This session was a really fun and interesting way to finish the day.
At the end of the day we all joined together in the closing circle to each tell briefly about their view on the day. For me it was really interesting to hear how people experienced the day, what they learned, what surprised them and what they’ll take with them.
Global Day 2012 was an awesome day that takes place in an amazing community. Special thanks goes out to Corey Haines and Jim Hurne for all their hard work on raising the bar for coderetreat events and making sure every location in the world could host an awesome event!
The most important thing I’ll take with me to next year is to get more people to attend. Even though coderetreat scales down well it is even better with more people.
That said, yes, I plan to facilitate Global Day 2013 too. Hope to see you next year!