Skip to content


Game Of Life

It was one year ago when the first coderetreat was organized at the office.

This is one of the initiatives of our tech exchange group and the best and most popular one by far.

Why go to coderetreat?

Coderetreat tries to solve the problem of lack of deliberate practice for programmers. The most common example given for that are musicians – why do they have to practice for hours before performance and we do not? We learn on the job and that is considered enough. But is it?

The unfortunate reality is that your job is not the best possible place to learn and get better at what you are doing. At work we are focused on delivery, not learning. Under deadlines you are always under some pressure and that leads to desire to follow that well known predictable path instead of exploring and trying new approaches and technologies. We want to get the work finished, but that does not mean finished well.  Refactoring, changing the design, maintaining the automated tests, learning new tools and libraries, who has time for that?

So if you want to improve your coding skills, learn a new language or framework and meet a lot of smart people with the same goal – coderetreat is for you.

What is the coderetreat format?

  • Many short code sessions – 5-6 sessions, 45 min each
  • Problem for each session is the same – Conway’s Game Of Life
  • Work in pairs. Each session with a new partner
  • Use of Test Driven Development
  • Code is deleted at the end of each session, so next session you start from scratch with a new partner
  • Different practices and constraints are introduced for sessions to keep things fun and force you think differently.

The most controversial point is the code deletion. It is also perhaps the most important one. 45 min is actually not enough time to finish the problem properly. This and removing the code are the way to remove the pressure of “you have to deliver” from participants. It is not easy and almost nobody get’s it from the start, but it’s a very liberating experience and one of the reasons I like coderetreat so much. When code is deleted you really can focus on experiments and doing things right.

Some people wonder why its always the same problem. The idea is not to solve it (time is not enough, remember?) and just to focus on the process. Using the same problem also makes it easier for you to experiment and try new things. After a few sessions you will know what you need to achieve. Now you can try with a new language, as you will know what needs to be implemented already, so can concentrate on the how.

Working in pairs is the best part. Different people use different approaches and different tools. This gives you the opportunity to see and learn from others. Not just how they approach the problem, but also simple things like IDE shortcuts, new text editors, different programming languages and coding techniques.

I like how the Game Of Life is suitable  for Test Driven Development. Coderetreat’s specific format also helps. We usually use ping-pong pairing – first person will write a test, second will implement it, than write a new test, so first one can implement and so on. There are constraints that are added during sessions to force participants to refactor more – my favorite one is the “Short methods – not more than 5 lines each (after refactoring)”. For scripting languages like Ruby, Python, Javascript constraint is 3 lines :)

Constraints are what keeps things fun and they get harder and harder as the day goes. It will start easy with “No constraints” on the first session, than perhaps “Short methods” and “No loops”, until you are asked to develop GameOfLife with “No If statements”. That one is crazy… The idea of all these is to get you to of your comfort zone and teach you new ways to approach and design the problem.

How can I participate?

Official coderetreat day is on 15 of November, but there are many events happening during the year as well. If you want to join one – just go and check them out at the coderetreat site.

Thank you for reading.