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
- In the 'Settings/Preferences' diolog, select 'Plugins'.
- In the plugins dialog, switch to the 'MarketPlace' tab.
- Search for 'EduTools' and click 'Install'.
- Click 'OK' and restart IntelliJ IDEA if prompted.
Opening the Koans Course
- Select file | Learn and Teach | Browse Courses, from the toolbar at the top.
- Select 'Kotlin Koans' and click the 'Join' button.
- Work through course.
Tasks in course
- Simple functions: make the function 'start' return the string "OK".
- Java to Kotlin conversion - Copy and paste Java code into the Kotlin file and agree to automatically convert it to Kotlin when prompted.
- 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.