Bootcamp Blues
Don’t get me wrong, learning on your own is great. You set the pace, you choose what you want to focuse on, you can stay in your pyjamas all day. The internet is overflowing with resources, so all you really need is the self-discipline to sit down and grind. But, and I’m sure anyone who’s ever tried following a tutorial has encountered such a scenario, sometimes you get stumped. The instructions tell you to click a button, but there is no button, or you click the button and it doesn’t do what the tutorial says it should. Cue Googling, frantic clicking on every button in sight, general confusion. If you’re lucky, you’ll find a StackOverflow thread about the exact same issue. If you’re not, this could very much be a rage quit moment, at least for me. It doesn’t help that these moments usually happen at a very basic step of whatever it is you’re doing - a python package installation, some initial environment setup or some such, so in addition to your problem being rare, it’s also embarrasing. You’re unsure whether it is a problem with your IDE, your environment, your own actions, you retrace your steps and re-read the instructions over and over, and that darned button is just. not. cooperating!
I am following the Kotlin Bootcamp for Developers, and so far it’s been great. Most of the exercises could be done using the Kotlin REPL in IntelliJ IDEA, or the web-based Kotlin Playground, and for an iPython-pilled girlie this feels like home. At various points in the bootcamp, there were small things to do in IDEA - installation, project setup, etc. Then there came the time to create a Main.
The instructions were very simple:
So I went and right-clicked, and…
That doesn’t seem right. So I tried creating a file and adding a .kt extension, thinking it will be enough. The file did register as a Kotlin file, had a Kotlin icon and all that, so I wrote a main function.
Again, it didn’t look right. The next step in the tutorial was to run main
using the “play” button next to the function, but - you’ve guessed it - there was no button!
I noticed there already was a Main.kt file in the project tree, probably autogenerated. As I suspected, that one had a play button, as well as some more syntax highlighting:
I tried creating a Kotlin Script instead, but that had a whole different extension and a big warning about it being Beta. Spooky.
The codelab was about running the main
function, so I didn’t waste any more time figuring it out. I had a working Main.kt file, why not use it?
A couple of codelabs later, I was again prompted to right-click on a directory in the project tree and select an option that just wasn’t there. Something was terribly wrong! Was it my IDE? Did I select something unsuitable during installation? Did I make a mistake configuring the project?
As someone with very limited focus time, I was really loathe to spend it on fiddling around. So, to TL;DR me some time, I turned to a friend who happens to be a Kotlin dev right now. After some screenshots, we saw that the IDE just underwent some changes since the codelab was written.
First of all, the project generation screen allows for a lot more fine-tuning. None of these configurations were mentioned in the codelab, and I’m sure most of them have no effect on the bootcamp tasks. For now I just went with the default options.
The next issue (the main issue actually) was the autogenerated project structure. So many folders! So many files! So many pretty colors, I wonder if they have any significance!
Well. It looks like every sub-directory in the project has a different set of options available under “New >”:
This will probably be important later, when I get to actually building an app. For now, I’ve learned to right-click on all subfolders till I find the menu option I want, and also not to trust tutorial screenshots from what seems to be 2019 (judging by the Kotlin version).