My experince learning Kotlin with Jetbrains Academy
I’m starting a new job soon at a company that uses Kotlin, a language I’d never used before so I decided while I had some downtime between jobs to learn the basics so I wouldn’t start and be completely out of my comfort zone.
I had used Scala previously and knew enough Java to be considered dangerous but my overall exposure and interest in JVM based languages was quite low. Being a primarily JS and Python dev I’d always looked at those languages as having too much overhead as everyone I know who worked with them used IntelliJ to not only write the code but also in order to run it because of how fiddly the configuration for the build system was.
With that mindset I wasn’t particularly looking forward to learning Kotlin, expecting to have to install IntelliJ, faff around trying to get a simple script to run and then start running some examples of code found on the Kotlin website.
Luckily, Jetbrains (who created both Kotlin and IntelliJ) offers a better approach to learning Kotlin — Jetbrains Academy, an interactive learning tool that uses a mix of textual information, quizzes and coding exercises to teach different programming concepts & topics and how Kotlin implements these.
Jetbrains Academy uses the topics structure to build up a set of projects at different proficiency levels that have users learn and show the application of the topics via building simple CLI based programs which after meeting a set of ‘core topics’ they can ‘graduate’.
The CLI program exercises can be coded within Jetbrains Academy using an embedded editor or within IntelliJ, which will be configured for running the project and show the excercise instructions in a side panel. Once the code is written there’s a remote test suite that is run to check the solution which is correct, then allows the user to progress to the next stage.
As projects are completed, Jetbrains Academy then suggests follow up topics and projects that help the user further their learning in a particular subject. Additionally, as you work through other projects the syllabus for that project is tailored based on your existing topics so you don’t have to repeat areas you already know.
My learning plan
Jetbrains Academy has 23 Kotlin projects available at the time of writing, covering subjects from a simple Tic-Tac-Toe game to creating a search engine.
Having been writing code for a while now, my plan was to tick off some of the easy projects in order to quickly learn the basics of Kotlin and then progress onto a harder one so I can learn some of the more interesting parts of the language.
My assumption, based on the topic list for the easy projects was that they’d explain concepts that I already knew so it’d be easy to skim the text, answer a few quizzes, write some basic code to complete the exercises and then build the project. That way I could do multiple in a day before sinking my teeth into that harder project.
My assumption was wrong however as Jetbrains Academy isn’t just teaching Kotlin concepts but also computer science concepts and they really like to over-complicate some of the exercises.
One example that stood out was an exercise on
modulo (returns the remainder from a division of two numbers) which required taking a timestamp and then using
modulo to get the current hour, minutes and seconds from it, sure it showed an application of
modulo but given how simple that concept is the exercise felt like complete overkill.
Another blocker for my ‘Jetbrains Academy speedrun’ was how bad the solution checking feedback is for the projects. Unless you open the project in IntelliJ there’s no way to really see what tests are being run to check the solution and even then there’s no easy way to run those tests locally so you end up running your program locally and entering the inputs to reproduce the failing tests.
This wouldn’t be as bad of an issue but on projects with more verbose output such as the pawn-only chess one (where you have to print a chessboard after each move) you can’t see the full list of inputs because they truncate the log.
I can see why they may not want to make the test information visible to prevent people gaming the system but I think there’s also a lesson here around how fast feedback loops make development easier that they are failing to teach people. If as part of the lesson plan, especially those regarding functions they were to show how to build a unit test suite then they could illustrate how much of a time saver this is.
After realising that progress would be slow I decided instead to work through the projects as if I was actually learning from scratch as each project ticks off a small amount of topics and given the time investment to complete one I was better off taking my time and doing a project a day.
I’ve completed 7 projects now and while I’ve not got to the topics that I’m interested in yet I’m enjoying the learning experience which I think is the most important aspect because if I didn’t have fun completing the projects then I’d drop off and not meet my learning goal.
Is Jetbrains Academy a good way to learn Kotlin?
Based on my experiences I would say yes. It’s not the quickest way to learn the language but it’s certainly the most thorough and all those exercises and projects help to get experience writing in the language which I think is very important.
It’s easy to read the language docs and map your existing knowledge from other languages to Kotlin and writing some basic programs but you’ll likely not use parts of the language you don’t see as important and that can lead to you not learning about obscure edgecases or maybe some of the nicer abstractions in the language.
The learning experience in Jetbrains Academy is great, understanding the topics being covered in a project and having the learning material tailored towards your current understanding so you can skip topics you already know is a real time saver and helps keep you interested.
As much as I think Jetbrains Academy is a great learning resource I am a little worried about the vertical integration that they’ve created with such a tool, especially with Kotlin. I’ve always felt that Java was a language you can only really use with an IDE and now there’s one company that owns the language, an IDE and a learning platform that basically teaches people that their IDE is the best way to learn how to use their language.