Because we always want to improve our coding skills and the Philips Hue team has been growing significantly in the last 3 months we decided it was time to flex our developer muscles and practice on our teamwork. A great way to do so is during a Coderetreat which i was glad to be able to facilitate for my team.
A coderetreat is a day-long, intensive practice event, focusing on the fundamentals of software development and design.
During a coderetreat multiple sessions will be held in which people form pairs and try to implement a problem, most times Conway’s game of life. Each session just takes 45 minutes and will enforce certain restrictions to get you really out of your comfort zone. And the best thing is that when the session ends you throw away the code to absolve you of your moral obligations to it. People tend to find this really hard during the first session but will get comfortable with it during the day. Then to wrap up a session we do a short retrospective to share our experiences, take a break for coffee and hack away at the next session!
Schedule of the day
Being it that most of my team had never done a coderetreat before i decided upon the following constraints per session:
- Getting to know the problem domain & TDD using Ping-Pong in which person A writes a test and person B implements it before switching roles;
- Force people to think small using Baby-Steps in which we restrict ourselves to create a test and implement its code in just 2 minutes or revert all changes to try again;
- Challenge ourselves to write very explicit tests using Mute Evil Coder where no speaking is allowed and the test may be implemented as evil as possible before writing the next test while still trying to get all business rules implemented;
- Experience legacy code by making the pairs implement as fast as possible without tests before reorganizing the pairs and making them fix everything.
And to wrap things up we did a group programming exercise called Mob Programming in which everybody works together with only one computer to implement the solution. We took a different coding kata about a LCD panel to have a fresh challenge:
While mobbing one person is the driver at the computer and only may write code as directed by the navigator. All other persons are co-navigators / researchers. Every few minutes switch roles.
Learnings
We had a blast doing the code retreat. Of all the things we learned the following were most noteworthy:
- We experienced that using a programming language we aspire to use (Go) was hindering our abilities to reach the sessions goals and thus we reverted towards NodeJs in which everybody is fluent;
- Restricting yourself to just 2 minutes is very frustrating at first; people really hated reverting their code. But still almost everybody found small enough steps to make progress;
- Most people were initially hesitant that they could get anything done within 2 minutes but found out that it was actually pretty easy;
- The Mute Evil Coder session ended up being a true game of chess for some in which all tests passed but nothing worked as expected;
- Randomisation of tests was a big solution to sidestep evil coding practices;
But above all: everybody learned a lot and got to know each other much better. Mission accomplished!