How to learn a programming language in just 20 hours
We should not panic when asked to work with a new language. We should be bold enough to answer to job openings requiring technologies we are not used to. In one word, we should not be afraid of new techs. Here is why : by scheduling 20 hours of Code Kata routine sessions, we can get a decent level of mastery on most topics.
How I learned some Haskell
Quite a few years ago, we used to do weekly Coding Dojos at Murex. Arnaud Bailly was among us, and as he is an Haskell fan, we ended up doing quite a lot of katas with Haskell. To my astonishment, after a few sessions, I understood of the fundamentals of the language. Without ever studying it !
💡 I learned a lot of Haskell by just going to Coding Dojos !
Many times afterwards, I learned new languages quickly by practicing them in the Dojo.
I started by defining a plan of 10 sessions of 2 hours long code katas :
- Roman Numeral - Mocha - JS 5
- Game of Life - Mocha - JS 5
- Mars Rover - Mocha - JS 5
- Bowling Score - Mocha - JS 5
- Median of a list of lists - Mocha - ES 6
- LCD Numbers - Jasmine - ES 6
- Kata Potter - Jasmine - ES 6
- T9 - Jasmine - Typescript
- Poker hand - Jasmine - Typescript
- Egg cooker with React - Jasmine - Typescript
The plan felt pretty ambitious at the beginning. The first session was a bit hectic as I struggled to find a quick setup I could use to code my kata in. After only 3 sessions though, I could feel I’d already made a lot of progress. I had become confident I would get most of the plan done in 20 hours.
How to start ?
A good thing about the 20 hours technique is that it’s pretty easy to start with ! There’s a catch though ! At the start, it’s puzzling to be on your own with no clear track on how to tackle the topic. Here is the fix : start anyway, stick through, and you’ll work it out 99% of the time.
Here is, in more details, how to use code kata with the 20 hours technique :
- Start by setting up a routine. It could be 2 hours at lunch time, 1 hour in the morning or 3 hours at night. Do whatever is best for you. It should be enough to finish in a few days or weeks.
- Use the first hours of your 20 hours to setup a code kata plan. It might be very fast if you already have an idea of your learning space. It will take longer if you are a complete newbie. Skim through the literature for the main concepts until you have a plan. Try to keep this phase under 6 hours, otherwise you won’t have any time left for actual learning.
- Test Driven Development plays a key role in fast learning ! Next step is to setup a development environment with TDD to use in your Code Kata sessions.
- Finally, do you code kata sessions. Time-box them for something less than 2 hours and run a mini-retrospective at the end of every session. Don’t hesitate to adapt your plan if it makes sense.
- When you reach 20 hours of learning, stop your sessions. It will be time to think a bit about what you accomplished.
💡 TDD plays a key role in fast learning.
If all went well, you should have learned quite a lot in only 20 hours. At that point, it’s up to you to decide what to do next. You can either decide to dig deeper. In this case, setup a new run of 20 hours of code katas ! It could also be a good time to read a bit of theory about what you just learned. Casting a different light on the topic will make it stick and deepen your understanding. Otherwise, you could stop there and start whatever is on your mind. I don’t recommend continuing on the same topic without rethinking a new plan though. That would kill your focus and be a less efficient use of your time.
To be continued
This was the first post in a series about applying the 20 hours technique and Code Katas to learn new programming languages. Here is the what to expect in the coming posts.
- How to learn a programming languages in just 20 hours
- Why 20 hours of code kata are so effective for learning new languages
- Frequently asked questions about the 20 hours of Code Katas
Leave a comment