šŸ„‹ How to become a better developer with CodeKatas

CodeCraftr
4 min readAug 8, 2021

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ā€¦

It 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 effectively. 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.

Itā€™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.

Without 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. šŸ¤“

šŸ“š Bibliography

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

Originally published at https://www.codecraftr.nl on August 8, 2021.

--

--

CodeCraftr

Software Engineer @ Xebia. Passionate about Software Craftsmanship. Happily coding since 2010. Find my latest content on www.codecraftr.nl