h1ghlevelb1ts

Code retreat notes

Yay! I finally got to attend a code retreat. The first public one held in Stockholm took place last saturday and it was possibly the best event this year. Peter Lind and Valtech hosted the event in their nice office at Kungsholmen and Emily Bache facilitated. Read more about the event format over here.

This kind of event is where you have the opportunity to really learn a lot. A room full of passionate and skilled developers wanting to pair up with you just for the sake of learning. All code is thrown away so there is no pressure of delivery and no schedules to meet. The problem - game of life - is deliberately chosen so that it is impossible to solve it with test driven development in 45 minutes. I managed to code in 4 languages during the day. The session with Mikael Sundberg where we used clojure was probably the one where I was most passive but it was fascinating to grow a solution in a purely functional language. Two ruby sessions, one in Java (my “native” language) and one in javascript made the day perfect. Pragmatic approaches to testing in the more obscure languages made it possible to get forward *despite* not using a testing framework. To top it off Emily introduced the cyber dojo for the last session. Instead of pairing with the same person for 45 minutes you work in 3 pairs and switch partner every 5 minutes so you basically work on the same code base for 10 minutes. With communicative developers it turned out to be really fun. The first minute in a new pair was spent communicating the code at hand and then on to coding. Actually we covered a surprising amount of ground on all 3 stations. A great last session of the day. The day ended with a longer retrospective where everyone got the chance to give feedback and share thoughts about the day.

Takeaways:

  • functional needs more studying - clojure, erlang and haskell are my prime candidates
  • it is amazing how different persons communicate in different ways. The first 10 minutes in each pair was typically spent getting a feel for the other person and agreeing on an approach.
  • I was a bit surprised by the bottom-up approach that some were inclined to take. I thought that a test for each “rule” in the game of life was pretty low level. I think it is hard to do the right thing when going too deep first. On the other hand zooming in on one part of the problem made it easier to actually accomplish something. The hardest part of the problem is probably counting the number of live neighbors of a cell. Some team just passed this value in to the cell class making it possible to code all the rules in 45 minutes but without having the full game running.
  • throwing away code felt really good.
  • pair progamming should be done more often.
  • infinity is infinite

In the middle of the night after the event Mårten Gustafsson tweeted this weird clip where the game of life is coded in ancient APL. It looks mostly like hieroglyphs.

 

Thanks to Peter Lind, Valtech for arranging this great event and Emily Bache for excellent moderation. I hope we will see more of this event type in the future.