Code Katas: Can They Make You A Better Developer?

Published | 4 min read

They say “practice makes perfect”, although I much prefer “practice makes improvement”. Either way, how do you practice being a programmer?

If you are already working as a software developer then you will be getting some practice from working on large projects. There is a chance however that you are just repeating what you already know.

There is a quote from Peter Voogd’s book 6 Months to 6 Figures that come to mind:

You often hear people say “I have 20 years of experience, I should get paid more”, but in actuality, that person has 1 year of experience repeated 20 times.

On a day-to-day basis, are you actually learning new skills, or are just repeating the same thing over and over again?

Learning on the job isn’t always the best environment for learning new skills. There is often too much pressure to deliver to be able to take the time needed to learn a new skill. This is where coding katas come in.

What is meant by code katas?

Code Katas was first coined by Dave Thomas who co-wrote the book Pragmatic Programmer with Andrew Hunt. It is safe to say that Dave knows what he is talking about.

Code Katas gets its name from martial arts where Katas are described as:

kata /ˈkɑːtɑː/

a system of individual training exercises in karate and other martial arts.

Kata in martial arts involves practicing particular movements over and over again until you can do them automatically without thinking. A code kata can be thought of in a similar way.

A code kata is a small, self-contained exercise that can be used to practice particular programming techniques such as Test Driven Development (TDD) or Behaviour Driven Development (BDD). They are supposed to be a fun, low-pressure way for you to get some practice outside of work.

What are the benefits of doing code katas?

Even if you are an experienced programmer doing code katas still has a number of benefits.

Software developers are often working against tight deadlines which isn’t the best time to practice a new skill.

I often hear developers wanting to learn things such as TDD but doing so on the job is time-consuming and they haven’t got any personal projects to try it out on either.

Code Katas often have simple requirements and restrictions which is a perfect scenario for starting to write tests first.

Code katas are a great way of practicing a new skill without the pressure to deliver. You can take as long as you want on them, and if you make a mistake it’s not the end of the world.

Fancy learning a new programming language like Rust or Java? Why not try doing a code kata in that language?

I think that code katas are also a great way of forcing you to use good programming practices such as refactoring, modularity, and ensuring your code is easy to maintain.

Code Katas Examples

Coding Katas can be similar to exercises you see on LeetCode but with more focus on learning than gamification and competition.

You are free to pick whatever programming language you want to do a code kata, even a new one. If you are trying to improve on a particular language there are a few language-specific examples below as well.

BDD Katas

If you are looking at practicing behavior-driven development then this BDD coding kata is worth a try:

Refactoring Katas

To get better at refactoring you need an actual project to work on. These examples are from Emily Bache who has lots of coding katas on her GitHub profile to try out.


The SOLID principle can be difficult to get your head around especially, to begin with. Why not try it out with these Katas?

TDD Katas

You can try out test-driven development with any Code Kata but these are a good place to start.

More Coding Katas Examples

Looking for more code kata examples to try? There are some great resources here:

Are Code Katas Worth Doing?

I think CodeKatas can be a great way to improve your programming skills, but they need to be done regularly to get the most benefit from them. No matter what your skill level there are always benefits in practice.

Practice makes improvement

Have any more great Code Katas examples? Let me know in the comments.


Stack vs Heap Memory - What are the differences?

Stack vs Heap Memory - What are the differences?

  • 30 November 2022
In modern programming languages such as C# or Java, we tend to take memory management for granted. Gone are the days when we need to call malloc to request enough memory for our variables. Luckily a lot of that is done for us by the runtimes so we do...
Git Flow vs GitHub Flow

Git Flow vs GitHub Flow

  • 10 November 2022
Losing code that you have spent hours writing can be painful, which is why we use version control (or source control) to store our code and manage changes. Version control is even more important if you are working in a team, without it code, changes ...
I Posted on YouTube Consistently for 1 Month. This is What Happened!

I Posted on YouTube Consistently for 1 Month. This is What Happened!

  • 02 November 2022
As part of my creative sabbatical, I have been posting a new software development video on my YouTube channel every Monday and Friday. It takes a long time to grow on YouTube, and I knew this going in but I have been pleasantly surprised with my grow...
Bitwise Operators and WHY we use them

Bitwise Operators and WHY we use them

  • 26 October 2022
Bitwise operators are one of those concepts that a lot of programmers don’t understand. These are not used a great deal anymore so you can get away with not knowing them but they can still come in handy for a number of different scenarios. If you end...
8 Data Structures you NEED to Know

8 Data Structures you NEED to Know

  • 26 October 2022
You can get pretty far in programming without understanding Data Structures, but eventually, you are going to need to know them, understand how they work and when to use them. What is a data structure? A da...
Binary Numbers Explained for Programmers

Binary Numbers Explained for Programmers

  • 21 October 2022
Everyone knows that computers run on ones and zeros. This is because CPUs are made up of billions of transistors, which are basically just on-off switches. Any code you write needs to be processed by a computer and therefore has to be converted to b...
Beginners Guide to Programming

Beginners Guide to Programming

  • 12 October 2022
A lot of my articles are aimed at intermediate to advanced developers, but as part of my creative sabbatical, I am working on creating content for those just starting out. So in this post I will be covering some of the many questions that beginner pr...