As a software company, we are committed to supporting the developer community. We love hitting events, inviting groups to use our spaces and sharing our experiences with others. This weekend was no exception as we played host to the Global Day of Coderetreat. We have supported this global event in Wellington for the past four years. This year we hosted two events for the developer communities in Wellington and Auckland.
Coderetreat, a concept started by developer Corey Haines, encourages developers to look at problems in a different way by going back to the fundamentals of development. In its 5th year as a global day, over 140 cities around the world involved this year.
The idea is simple. Throughout the day we work on writing programs that implement Conway’s Game of Life, a simulation that shows how complexity can be formed out of a set of simple rules.
We run through five or six, 45-minute exercises throughout the day and each exercise adds a constraint on how we are allowed to solve the problem. Each event host decides their own constraints, and lets the participants know at the beginning of each session.
The activity was to be completed in pairs following pair-programming techniques such as driver-navigator – where one uses the keyboard and the other provides directions – or ping-pong pairing – where the keyboard is passed back and forward.
We join our crew in Wellington…
With 16 attendees, it was a great size to get people comfortable speaking to the group. As usual, this still proved difficult in the beginning. But by the end of the day everyone had participated in conversation. There was also a real sense of accomplishment in the group around the value they got out of the day.
We worked through a bunch of interesting constraints. Starting with the traditional first exercise, the goal was to attempt to write a solution to the game of life. This gave everyone a chance to figure out the basic idea of how the problem could be solved. As a twist in Wellington, we added a requirement change in the last 10 minutes. This was designed so people could look at their solution and see if they had made it flexible enough to change. In some cases, it showed they had made decisions that caused frustrations and made it hard to achieve the new functionality within a timely manner.
The rest of the day involved our constraints:
- restricting the use of conditionals (if, else, ternary, switch)
- restricting the use of loops (for, while, do, and foreach)
- an exercise called ping-pong evil coder
- no mutable state, also known as immutable objects only
The ping-pong evil coder is an interesting exercise that probably needs some explaining. One person writes tests, while the other writes the implementations to pass those tests. The part that makes it evil is that the implementation writer is fighting against the tester to write the wrong solution, but still make the tests pass.
This is designed to encourage thinking about coverage, useful test cases, and hunting for edge cases in a solution or implementation. As a final twist, we made the pairs swap roles halfway through so that they had to deal with their own earlier decisions.
Meanwhile in Auckland…
This year in Auckland there were at least three Global Day of Coderetreat events across the city. This is a testament to how much attendees value the opportunity to learn, practice and extend their development skills.
The exercises also challenged experienced developers to think about the problem in different ways. When constraints were introduced there was often initial confusion. Conversations and pairing helped teams to discover potential solutions.
None of the attendees in Auckland had been to a coderetreat before, so the first session was run without any constraints. This was just to allow the attendees to get familiar with the problem and to get used to working in pairs. We started the second session in the same way, but then as a surprise we broke up the pairs halfway through the exercise.
The surprise swap forced teams to clarify the naming choices and design decisions they had made within a very short time. Different constraints and different pairings suggested different solutions to the problem. It was great to see so much conversation, note taking and brainstorming on whiteboards as part of every exercise.
Everyone who attended one of the coderetreats learned something about themselves and their programming skills. We all took away something that we can start using in our careers. It was great to be involved in making this happen for another year, and we can’t wait to come back and do it all over again next year.