Why 20 hours of code kata are so effective for learning new languages
In my previous post, I described how I’ve been using 20 hours of Code Katas to learn new languages. If you did not read it yet, have a look at it first. Let’s now look at why it works so well.
In The First 20 Hours Josh Kaufman explains how he learned Ruby in 20 hours. He did not become a Ruby expert, but he was able to build and maintain a static website generator. For my part, I have succeeded to learn a bit of machine learning using the 20 hours technique.
The effectiveness of the 20 hours of Code Katas relies a few key points.
Time-boxing
Time-boxing has 2 main benefits. First, it forces us to stick to what is the most important for us to learn. There is no time to waste slacking around in only 20 hours. Plus it’s a lot easier to focus for 20 hours than over a very long period of time.
There’s a second great thing about time-boxing. The further you go, the less remains to do, and the less likely you are to drop the effort ! We are a lot less likely to abandon when we know we only need a few hours to finish the goal we had set to ourselves.
💡 Time-boxing creates focus
A plan
Again, the plan helps us to focus. We’ll need to choose what gets in a 20 hours plan. Building the plan itself forces us to get a grasp of the learning space. This will help to pick the good stuff to practice.
Routine
Routine is a magic trick to get things done. Once we have a routine in place, we don’t have to think or do extra efforts to find time to learn. The time is already there, we just have to use it !
Deliberate practice
Some exemples from “The first 20 hours” highlight the benefits of deliberate practice. When learning the Colemak keyboard, the author went through typing exercices. When studying the game of Go, he did practices specific situation puzzles. In both cases, deliberate practice made him learn faster. Code katas are typical deliberate practice exercices for programmers.
Test Driven Development
Coding Dojos are the programmers’ deliberate practice. Coding Dojos traditionally rely on TDD. TDD sets up a fast feedback loop that is key to efficient learning. Think of all the time saved by not having to run and debug a full program every time ! Even dabbling around in the REPL cannot beat running 20 or so test cases every few seconds.
We are already programmers
One last and obvious little detail : we don’t have to learn it all ! When the author learned Ruby in 20 hours, he was starting from scratch ! Unlike us, who already know how to program, but want to extend our knowledge to a few more topics. Most of the times, we don’t need to relearn everything, but to transpose what we know in a new context.
For example, if we already know an object oriented language, learning a new one will be easier. It’s a bit like with foreign languages, the more you know, and the easier it is to learn the next one. In fact, the more languages, frameworks, patterns and paradigms you know, the more the 20 hours code katas will work for you.
💡 The more you know about software, the easier it will be to learn your next programming language.
You might have a look at this post for advices about evergreen concepts to learn.
Next part
This was the second post on this series about the 20 hours of Code Katas technique. The next, and last, post will be compilation of answers to frequently asked questions.
Leave a comment