- Testing; in practice it is about Test Driven Development, where tests are written before the implementation.
- Minimizing code duplication.
- Maximizing clarity; it comes to down to meaningful naming.
- Removing unnecessary elements. That postulate usually is naturally met when previous two are done properly.
The event was free (thanks to sponsors) and attracted almost 50 passionate programmers. There were people not only from Berlin, but also other places in Germany, Poland, Sweden and Czech Republic. Our facilitator was Alex Bolboaca from Romania.
During a Retreat participants are given a practical programming problem to “implement”: Conway’s Game of Life. I put “implement” in quotes because the real goal is to work on the quality of the code and programming skills, not completing the solution. The day is divided into six 45-minute sessions. At the end of each session code has to be deleted and the whole group has short retrospective. Programming is done in pairs and you should switch your partner after each session. Usually sessions have particular focus, like working on more flexible implementation, better naming, shorter methods, etc.
The event started at 8am on Saturday (!) and it seems to be designed to work like a natural preselection. Only people truly enthusiastic about programming made the sacrifice. I was genuinely impressed by the atmosphere. All the people were really friendly, and since there was no pressure on finishing the project, everybody was relaxed.
I must admit that I fell in love with Code Retreat. The idea of pair programming with total strangers may look daunting (“Gosh, all these guys must be a thousand times better than me! I can’t possibly pair up with any of them!”), but the program is constructed in a way that lets one focus on the craft and co-operation, instead of competing for the solution. When you realize that it’s not about stitching together a functioning program with the help of duct tape, you can relax and focus on improving your craft. This realization reached me during the 3rd of 6 sessions :).
Getting the most out of it
Some practical advice from a one-time “veteran”:
- Bring your own computer and have your environment (editor, unit testing framework) ready. There’s really not enough time to setup everything during a session and you will loose precious time that could be better spent on writing the code.
I wouldn’t mind at all to participate in another Retreat, as there are things I would do a bit differently the second time.
- Switch pairs each time. The event attracts passionate people, so use the opportunity to pair up with as many of them as possible.
- Focus on some aspect of the problem instead of the complete solution. Me and my partner literally wasted one session when we tried to analyze the problem with pen and paper, instead of WRITING THE CODE. It would be perfectly reasonable in real work, but this event is about improving programming skills, not analysis. However, I think it is OK to think about the problem up-front and even have the solution in mind. Optimize for having as much time as possible to write the code during the event.
If you’re a programmer yourself, why not to organize Code Retreat in your city? It may turn out to be awesome. If you’re willing to try, Alex Bolboaca has some advice for future facilitators.