DEV Community

Cover image for 🥋 How to become a better developer with CodeKatas
CodeCraftr
CodeCraftr

Posted on • Originally published at codecraftr.nl on

🥋 How to become a better developer with CodeKatas

Practice makes perfect, and we developers can hone our skills with the CodeKata.

“One learns by doing a thing; for though you think you know it, you have no certainty until you try.” – Sophocles

🎸 Why CodeKatas make you a better developer

Do you play a musical instrument?

I’ve been trying to learn to play the guitar for years and it’s quite a challenge. From developing a sense of rhythm, learning to play chords to literally growing calluses on your fingertips… it all comes down to one thing: practice.

Be honest. When was the last time you deliberately practiced your skills as a developer?

My guess is: a while ago…

instrumentIt all comes down to one thing: practice

As developers, we don’t practice the skills we need on the job, such as:

  • Variable naming
  • Coming up with effective abstractions
  • Solving problems with expressive code

Of course, you will learn as you work, but it’s not the most effective way to improve those skills.

Think about it.

Most of the time you are building new functionality. People are waiting for your work and you have to pull out all the stops to deliver it on time.

To learn under those conditions is like learning a new song on the guitar while on stage.

The combination of pressure and interest in the result means that we can learn less effectively1. We need a safe way to experiment and make mistakes.

Enter the CodeKata…

🥋 What is a CodeKata

The idea behind CodeKatas comes from martial arts. In a Kata, the aim is to perform rehearsed movements and perfect the technique.

The application of this concept, within software development, was conceived by Pragmatic Programmer Dave Thomas.

karate kataIt’s not about the result, but what you learned on your way there

CodeKatas are (simple) programming tasks that you can solve in a few hours. If we think back to the guitar, an equivalent of a Kata would be a scale.

The emphasis of a CodeKata is on improving your skills. You do this by deliberately practicing, challenging yourself and generating feedback about what you are doing. So constantly ask yourself questions like:

  • Does this solution work or not?
  • Does this make it better yes or no?
  • Can I do this differently?

Reflect on what you do and learn from your approach.

It is important to note that the resulting code is irrelevant. What does matter is what you learned while creating your solution.

So remember:

It’s not about the result, it’s about what you learned on your way there.

If you have this mindset, you put less pressure on yourself and that invites you to experiment and learn from mistakes. So above all look at it as a playground to practice and discover. That way you will learn more!

💁🏻‍♂️ Why CodeKatas are essential

It’s been several years since I solved my first CodeKata. I’ve done quite a few of them since. Some I solved on my own, but I have also paired and even mobbed (three or more devs) CodeKatas. I learned most from those sessions!

The great thing about CodeKatas is that you can set any learning goal and practice on it deliberately. You decide what you want to learn!

For example, doing CodeKatas taught me to:

The things I learned turned out to be very valuable during my work.

improvingWithout doing CodeKatas I would be worse developer

What benefits me most is that I have developed a kind of “Muscle Memory” for programming.

When learning to play the guitar, you have to practice a lot on playing different chords and the transition between them. If you’ve done this often enough, you don’t have to consciously think about it anymore and it comes naturally: Muscle Memory.

I now experience the same effect whilst programming. Previously I always had to think about how to express certain ideas in code. Nowadays I can do this much faster, and often the solution is better too.

One thing’s for sure: without doing CodeKata’s I would be a worse developer.

📝 Wrapping up

In this article I explained why a CodeKata is a good tool to hone your skills as a developer, especially if you use it for deliberate practice.

I am convinced that doing CodeKatas is a big part of the growth I have made so far, because it helps put the theory into practice.

Try it out, they are also a lot of fun! You can find some great CodeKatas here or here.

Hopefully I got you excited about doing a CodeKata too, I’m definitely looking forward to the next one. 🤓


  1. Hunt, A. (2008). Pragmatic Thinking and Learning. Pragmatic Bookshelf. 

Top comments (0)