A Live Developer Journal

Getting started with kotlin koans offline

There is a Kotlin koans course that is designed to get us familiar with Kotlin. Instead of doing the online version, I wanted to get them set up in my IntelliJ developer environment. This is so that I can look through the tests and see how they have been set up.

The first step is installing a plugin that includes the Kotlin Koans course.

Installing EduTools plugin

Opening the Koans Course

Tasks in course

  1. Simple functions: make the function 'start' return the string "OK".
  2. Java to Kotlin conversion - Copy and paste Java code into the Kotlin file and agree to automatically convert it to Kotlin when prompted.
  3. Named Arguments: specifying only two arguments, make the function 'joinOptions() return the list in a JSON format (e.g. "[a, b, c]").

This introductory course is definitely not an introductory course, it assumes way too much prior knowledge of Java, which Kotlin is based on. It doesn't work for total beginners.