Macoun 2019 Code Retreat Workshop Postmortem
Yesterday, Oliver Böhm and I have conducted our Code Retreat Workshop at Macoun 2019.
Opposed to the passed-down spirit of Code Retreats, where throwing your code away at the end of each session, our workshop’s participants often wanted to see how the other teams attempted to solve the problem at hand. So we decided to prepare a public GitHub repository. As of now, there’s nothing to see, but I’m curious to find out if the functional programming language tag team will upload their OCAML- and Scheme-based implementations, and which names all the other folks have chosen during the sessions where they had to write tests first.
If you participated and want to share your code, open a Pull Request on GitHub or send me your stuff via email!
Our Workshop Agenda
If you want to organize a Code Retreat, here’s what we did, for reference:
Morning motto: “Clean Code”
- Introduction and get-together (30min)
- Introduce the Code Retreat format
- Introduce Pair Programming
- Introduce the Game of Life (the problem for today)
- Introduce principles of clean code (DRY, use expressive names, …)
- Participants introduce themselves and the programming languages they have on offer
- Morning sessions (each 45min pair programming, 15min retrospective and break)
- No constraints, just do the work together
- Limit method bodies to 4 lines of code
- Don’t use any loops
- 60min break
Evening motto: “TDD”
- Evening introduction for those who couldn’t make the morning (15min)
- Short recap of the format
- Introduce Game of Life
- Participants introduce themselves and the programming languages they have on offer
- Evening sessions (each 45min pair programming, 15min retrospective and break)
- “TDD as if you meant it”, write tests first
- Test first plus invent your own data types, don’t use “primitives” like String/Int/Array/… directly
- “Unconditional TDD”: test first and don’t use conditional statements
Takeaway
The morning worked out great, but the evening was a bit harder to get started. Test-first is hard if you’ve never practiced it. Here’s what I take away from the day:
- The TDD sessions could’ve been mixed into the morning, e.g. session 2 or 3, already.
- After a TDD session, one could try a non-TDD session to see if the approach changes. In my observation, Swift developers tended to start with broad strokes to model a
Board
orWorld
andCell
s without any behavior, until they had to write tests and start bottom-up with the really interesting part, the algorithm. Does this affect one’s coding style if the constraints are removed? - The second evening session, where you had to encapsulate Swift standard library types in your own structures, could’ve fit better in a non-TDD session, for example as the second or third constraint.
- Some participants enjoyed the challenge and stacked the constraints, ending up with code without loops, conditions, and less than 4 lines per function. We avoided that at first to reduce the stress, but apprarently some enjoy this. I think it’s nice to mention this option for an extra challenge.
- Virtually nobody was unhappy with the workshop. Some participants didn’t like particular constraints, a lot complained about TDD being weird, and sometimes you don’t get a partner you can work with effectively. But all that’s to be expected.
Next year, maybe we update the workshop or try a Legacy Code Retreat instead.
Remember: Nov 15th/16th is Global Day of Code Retreat! Look for an opportunity in your hometown to meet up with developers and hone your skills! It’s a truly fun and engaging experience.