Courtesy of KotlinLang.org

Kotlin Koans

So now we’re at the business end of this article. I want a better way for learning Kotlin. Fortunately there’s a great resource available to us courtesy of the JetBrains Academy. Kotlin Koans are a series of puzzles that will drill the procedural memory in the way we need. If you’ve read my article on “Learning Tests“, you’ll see this is a very similar concept, which I know for a fact will work. I’ve tried it myself!

‘Koans’ are a series of puzzles that you can use to get progressively better at a given skill, by building on the lessons before. What a great way to build up gradually! Not only that, JetBrains provide free resources to do just this. I’ve installed the EduTools plugin, and from that, I’ve loaded up the Kotlin Koans course.

Kotlin Koans via the EduTools plugin

Within the course, I can navigate my progress. I’ve finished all the intro/class and convention lessons but I’m half way through learning about Collections.

Navigation of my current progress within. the Koans

Within the Collections lessons, I’m about to start learning about “Compound Tasks”.

An incomplete task, my next Koan.

This is great for actually drilling the procedural memory. If this were sports training, a single Koan would be like going to training and narrowing your focus down to just kicking the ball with the correct technique. And the groups of lessons would be a bit like kicking the ball, with the correct technique, from a variety of angles.

Depending on your personal learning goals, just doing the Koans may meet your needs. But to continue the sports analogy, I want to recognise an opportunity in a match, then make the kick under pressure. For that, I need to able to recall the drill the instant I recognise that I need it.

I’ll cover how we put it all together next – by building links between the declarative and procedural memory.