🥋 How to become a better developer with CodeKatas
Tags: learning, beginners, codenewbie, codekatas
Published: 2021-08-08 14:18:11

---
title: 🥋 How to become a better developer with CodeKatas
published: true
date: 2021-08-08 00:00:00 UTC
tags: learning,beginners,codenewbie,codekatas
canonical_url: https://www.codecraftr.nl/improving-with-codekatas/
cover_image: https://www.codecraftr.nl/assets/images/4-honing.jpg
---
 
_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.” – <cite>Sophocles</cite>

## 🎸 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…_

![instrument](https://www.codecraftr.nl/assets/images/5-instrument.jpg)_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[^1]. 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](https://www.olympicchannel.com/en/stories/features/detail/karate-kata-martial-arts-history-how-many-forms-meaning-rules-scoring/) is to perform rehearsed movements and perfect the technique.

The application of this concept, within software development, was [conceived](http://codekata.com/kata/codekata-how-it-started/) by _Pragmatic Programmer_ Dave Thomas.

![karate kata](https://www.codecraftr.nl/assets/images/6-karate-kata.jpg)_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](http://codekata.com/kata/codekata-intro/) 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:

- Apply [_Test Driven Development_](https://en.wikipedia.org/wiki/Test-driven_development)
- [_Refactor_](https://refactoring.com/) effectively
- Take baby steps
- Write [_Clean Code_](https://medium.com/s/story/reflections-on-clean-code-8c9b683277ca)
- Appreciate [_SOLID_](https://en.wikipedia.org/wiki/SOLID) principles
- Develop programming “Muscle Memory”

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

![improving](https://www.codecraftr.nl/assets/images/9-practice.jpg)_Without doing CodeKatas I would be worse developer_

What benefits me most is that I have developed a kind of “[Muscle Memory](https://www.merriam-webster.com/dictionary/muscle%20memory)” 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](https://codingdojo.org/kata/) or [here](http://codekata.com/).

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.](https://www.goodreads.com/book/show/3063393-pragmatic-thinking-and-learning)