Blog

Code Retreat

Last Saturday I participated in Code Retreat in Berlin. Code Retreats are small events where programmers practice together Four Elements of Simple Design, defined as:

  1. Testing; in practice it is about Test Driven Development, where tests are written before the implementation.
  2. Minimizing code duplication.
  3. Maximizing clarity; it comes to down to meaningful naming.
  4. 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.

Retrospective
Retrospective. Photo credit by Łukasz Bałamut.

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.
  • Pair up with different people, even if you don’t know the language they’re using. In Berlin we had people coding in Java, JavaScript, Scala, Python, Ruby, C# and I even heard Haskell being mentioned by somebody.
Hard at work
Hard at work. Photo credit by Łukasz Bałamut.

I wouldn’t mind at all to participate in another Retreat, as there are things I would do a bit differently the second time.

  • I had most fun when I tried to do things differently from my normal programming routine. For instance, writing Ruby instead of JavaScript. Pairing up with a total stranger. Trying to remove duplication from the code that already seemed clean.
  • 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.

Comments

  1. Sounded like fun, shame I couldn’t make it this time.

  2. There’s more events like this in many places. Apparently there was a Code Retreat in London not so long ago: coderetreatlondon.com. Or you can organize one yourself :).

Comments are now closed