Using Code Katas to Gain Experience

How do you go about learning a new coding concept or language? Some people just pull out a book and follow the tutorial projects inside word for word. Others will watch videos doing the same, and still others will write code just following the language’s documentation until they strike gold. These are all good methods of learning and they should not be underestimated.

People are often left wondering what to do after they’ve gone through the material and methods mentioned above though. I think there is a period between beginner and advanced developer where developers are just not sure of their skills and aren’t sure where to get better. Certainly repetition is usually the best way, but repetition where?

I’ve found that for me, completing code katas is one answer. Code katas drive up my problem solving skills by introducing me to new problems I have never seen before. In turn, I usually end up learning something new about my coding language and some design strategy as well. So what exactly is a code kata?

According to the Wikipedia article on katas, “ A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.” This usually means you’re presented with a problem that needs to be solved in a specific way (hopefully with tests to verify your progress).

Think of code katas like those exercises at the end of a textbook chapter. Maybe you’ve put off doing them and now is a good time to go back. Just like textbook chapters, these problems can range from beginner to advanced (e.g. “Create an object that returns the sum of all numbers in an array”, or “Create an object that can accept one parameter or a hash of parameters”). In any case, when finding katas your job should be to find one that matches your skill level or is just one step above that.

There are many resources available the provide code katas. Codewars is my favorite. They have an extensive user-contributed database of katas. Many of these katas are available in different languages, so you can solve them in JavaScript after solving them in Ruby. In addition, once the kata is solved, you’re allowed to compare your solution with the solutions of others as well as rate and comment on them. There are plenty of other sites known for their code katas too. Exercism.io is another fan favorite. There is also Project Euler for those looking for mathematical problems.

The primary objective of a code kata is to prove your skills. Doing this increases your confidence, and puts you in a position to learn more. Because katas are fun, they can be addicting, thus making problem solving addicting. This is probably who you want to be if you’re in software development anyway. This is exactly the kind of person businesses want for their software development too. Happy coding!