Stretch your mind every morning with coding kata at HC

Yannick Gladow in Kata 9 minutes read July 10, 2017

A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition

wikipedia

Recently we started doing 45 minutes of coding kata every morning from 8:45 until 9:30 at HolidayCheck to strech our brains and get into working mode. For that we join up in pairs, mobs or work alone and start working on the Tennis kata.

The first big impact of the coding kata on my life was getting up half an hour earlier every morning to make it in time :). But that’s so worth it!

The first week of kata

Starting out with Scala was a bit bumpy, as the Tennis example for scala was not 100% up-to-date and just gave me:

No tests executed

But after some small changes and a quick PR all was setup for working mode.

Our goal for the first week was to refactor the code to small, readable methods and commit often and thereby improve our muscle memory for shortcuts and automated refactorings. The first two days we started out in small mobs or pairs, to discuss strategies of refactoring, working with Scala and Javascript.

After being done with the first refactoring you might feel like continuing and improving more, but no - it’s time to throw all progress away and start over again :).

Soon we decided to switch to everyone working on their own machine, as the goal was to get as fast as possible.
The improvement for me was astonishing, I could refactor the whole code 5 times in the 45 minutes on Friday - the same refactoring that took me 45 minutes to do once on Wednesday.
Focussing more on shortcuts (spamming command + p, command + m. command + v) and not using the mouse anymore pushed my speed greatly.

Besides all the fun and success we had in the first days, I got the impressions that there are different views on what the coding kata is all about, so I’ll try to list my opinion on that.

What I think the goals of the kata are

  • start from scratch every time
  • learn shortcuts and automate refactoring where possible
  • get faster
  • improve muscle memory
  • use unknown language, coding method, framework, IDE or setup
  • bring element of practice to software development
  • discuss the results
  • repeat, repeat repeat
  • and throw away

What I think the goals of the kata are not

  • solving the given problem (can happen, must not)
  • reaching perfection
  • continuing with were you stopped yesterday
  • finding the optimal architecture
  • being done when the kata is solved
  • having a deadline or constraints

What’s next (week)

After strengthening our refactoring speed in the first week we will continue with an empty Tennis project every morning and build it up as far as we can get, TDD style! Possible variations we might try this week:

  • only OOP style
  • FP style: only pure functions and no mutable state
  • switching writing tests and implementation without talking while pairing

Concluding the first week..

From the first week of kata I got the impression that it’s a fun way to learn lots of new stuff. You are confronted with problems that might be outside of your every day work and your comfort zone. It gives you explicit time to explore new concepts without any pressure. And this kind of exploring is one of the reasons why I started coding after all. I am looking forward to a lot more weeks of coding kata!