report-stories

Code Katas and Coding Dojos

Software developers also need a little practice

from  Stefan Scheidt & Ansgar Himmel
29.10.2019

Software developers should practice their craft - just like a professional musician or a competitive athlete. At least, this is the opinion of those who regularly train their skills as programmers with so-called code katas.

In the Asian martial arts a “kata” is a precisely defined sequence of movements and a classical form of exercise in combat training. It is intended to record sequences of movements in the muscle memory so that they can then be recalled in real combat situations without loss of time. The purpose of training the sequences without a real opponent is to be able to concentrate on the correct execution of the movements and not to be distracted by the interaction with a real partner or opponent.

The concept of a Code Kata follows a similar idea. A code kata is a specifically selected programming exercise in which you train certain programming practices such as test-driven development and continuous refactoring. The term was coined by Dave Thomas in 2007 and since then found friends especially among followers of the software craftsmanship movement.

Structure of a Code Kata

A code kata is a relatively small programming task. The first step is to understand the problem and find a solution. With the next iteration of the Kata one can already concentrate on developing a qualitatively satisfying solution. Then, you can focus on the path to achieve this solution. From this point on, you can e.g. practice the implementation of the solution with test driven development, adhere to certain restrictions such as object calisthenics or functional calisthenics, or only use the keyboard and keyboard shortcuts of your IDE.

A popular variant is the refactoring kata, for example the Gilded Rose kata. In this case, one does not start from scratch, but has to add tests for existing code and refactor it before new requirements can be implemented.

Coding Dojos

Code Katas can be done very well on your own, but practicing together with others has its charm. To do this one meets at a so called Coding Dojo and can practice different forms of pair programming, try out mob programming in a larger group, or attempt a Randori Kata. The closing of a coding dojo should always be done with a short retrospective, in which you share what your experiences and achievements.

Just have a look if there is a local Softwerkskammer user group in your region. There, coding dojos are organized from time to time, in which one can usually simply participate. And if you want to learn more about this format of the joint programming exercise, we recommend the "Coding Dojo Handbook" by Emily Bache.

At REWE digital, a small group of developers meets every second Friday morning for two to three hours at a coding dojo. We practice pair- and mob-programming or try out different methods of test-driven development. At the end of the session, we discuss what we have learned. We also make experiments with programming languages, libraries or frameworks we do not know very well. Sometimes we "only" have fun together programming some coding games.

“Extended Practice”

If you can not get enough of code katas and coding dojos, then you should attend a code retreat. Here you repeat the Game Of Life Kata six times in the course of a day. It is always programmed in pairs and starting with the second repetition, as well as in a test-driven manner. Each run lasts 45 minutes and ends by deleting your result and meet for a short retrospective. After a short break the whole game starts again - with a new pairing partner and new or additional constraints. And there are also variants such as the Legacy Code Retreat. Code Retreats are run by software crafting communities and once a year the Global Day of Coderetreat takes place, where code retreats are held worldwide. 

As for many other things in life the following applies to software development and programming: Practice makes perfect! Code Katas, Coding Dojos and Code Retreats are an excellent opportunity for this. Just give it a try. With this in mind: Happy Coding!

Next Story from  Stefan Scheidt & Ansgar Himmel

Code Katas and Coding Dojos

Stefan Scheidt & Ansgar Himmel
Next Story in : report-stories

SHIFT Think Tank

Melanie Pöplau

Search here for Stories, Jobs and Categories…

question mark
Oops!
Sadly we couldn't find any results with your current query.