Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After reading this and seeing some Jetbrains blog posts about Kotlin before, I decided to try it out.

I downloaded Intellij IDEA Community Edition, and with Java 7 already installed on my machine (OS X 10.10 - I use Java for RubyMine support), I went through the tutorial here: Getting Started with IntelliJ IDEA - http://kotlinlang.org/docs/tutorials/getting-started.html

I started at about 12:55 (download time in Firefox d/l mgr says Intellij d/l completed at 12:58). It's currently 2:13. So ~1h 20m later.

Some notes:

- First thing I did was install IDEA and then install the Kotlin plugin in IDEA.

- Next was creating my first project.

- Had to let IDEA know that I have a JDK when creating the project. Took me some time to understand. Once I added this I was able to create a Java project.

- The tutorial references creating a Java Module but I didn't know what that meant (still don't really, just know that I had to pick Java from the lefthand-side of the New Project window, and nowhere on my screen is Java Module mentioned). I checked off Kotlin in the Additional Libraries and Frameworks box and off I went.

- Also in creating a project, I get an error message that the library I'm specifying doesn't exist, but this doesn't seem to break anything so I ignore it.

- Every time I open a project in Intellij I get an error message: "IDE Internal Error occurred. Click to see details and submit a bug report." I click to see the details but the error message just disappears and it seems like there's no actual error at this point, stuff just continues to work.

- screenshots are out of date or else different for Community Edition. The wizard doesn't have the "Create Kotlin Library" popups, but some balloons pop up on the top righthand-side and allow me to do the same thing, I think, copying some jars into my project's `lib` directory.

- personally I find it slightly confusing that the tutorial asks for the file to be named `app` (as in `app.kt`), and would have preferred if it was called `hello.kt`, but maybe this is some kind of Kotlin convention, so I went with it.

- having created the project and the `app` Kotlin source code file, creating the Hello World program was easy and ran as shown in the tutorial.

- I did one bit of cleanup in here: I accidentally named my module folder "HellowWorld" instead of "HelloWorld" (though I think the tutorial screenshots reference plain-old "kotlin") and I poked around in IDEA for a few minutes trying to rename it. I couldn't see how, without possibly screwing things up or having to change a few path names. Being worried I'd miss some, I closed the project and renamed the directory in Terminal, and was able to open it up successfully again in IDEA.

So now I was finished the Getting Started with IntelliJ IDEA tutorial. I decided to proceed but it was a little bit unclear where I was supposed to go. I would have liked to see a suggested next page link on the bottom of the tutorial, but after clicking around I ended up on the Kotlin Koans page - http://kotlinlang.org/docs/tutorials/koans.html .

So I followed the Koan tutorial and it asked me to do a git clone of the Koan repo. I did that and opened the directory as a project in IDEA. `ls -l` shows me that the modified time on the koans dir is `25 Jul 01:21`. I believe that's actually the creation time (which is what I want, anyway, so you can see how my progress is going) since I have been modifying stuff up to the point that I wrote this post. (It's now 2:33, btw.)

The basic concept of the Koan tutorial is that a bunch of pre-written tests fail and you have to make them pass, one by one.

- I was able to run the tests and I find it a bit confusing where I can accidentally switch between running a single test or a whole test file, but I guess that's my inexperience with IDEA showing.

- the git repo dir is named `workshop-jb` -- I don't know what this means, but I'd prefer it to be named `koans`

- I've finished up-to-and-including `_4_String_Templates` so far, i.e. 4 directories worth of tests.

- I haven't yet referenced the `resolutions` branch of the repo, which the tutorial page tells me contains solutions to making all the tests pass. I figured I'd learn more by solving them on my own first. Maybe at some point I'll go back and take a look at the reference solutions.

- Running the tests and seeing them fail prints out some help messages about how to make the tests pass. I have found it a little bit confusing navigating back and forth between the reference code they show you at the top of the Koan file that the test executes, the example Java code they sometimes tell you to reference/convert to Kotlin, and the test. In the first, second, and third case, I found the reference code to be confusing -- I couldn't quite tell how it was supposed to help me pass the tests. In all four cases I found making the tests pass to actually end up being quite simple, but I was intimidated by the blob of reference code at the top of the `.kt` file and wasn't always sure what exactly I was to take away from it. I think it is definitely possible to trim these reference bits down and make them very specifically relevant to fixing the tests. I think they are trying to introduce a lot of features of the language at the same time as giving you what you need to pass the tests, and I find it a bit overwhelming.

- I've made a few attempts to read through the Reference documentation (http://kotlinlang.org/docs/reference/) and it looks interesting, but ultimately I don't think it helped me to make the test pass at all. I am not sure when/where I'd use it, but it did help me understand one of the labelled break/return comments that is posted somewhere in this comment thread. (Personally, I think that's a cool feature. I first encountered it in uC++ - http://plg.uwaterloo.ca/usystem/uC++.html .)

- Last thought: build times are IMO quite slow. I'm changing exactly one short file and it takes several seconds to run the new code, most of the IDEA status seeming to be in the "make" step of the process.

Ok, I guess those are my full thoughts for now, I am sorry if this brain dump was too long but I figured someone might get some benefit out of it. For reference, I've been programming for ~20 years now and I was only able to really get started when I first read one of my all-time favorite programming books, C for Dummies :) I was a DOS-fluent 13-year old at the time, and I'd tried reading some others and found them impenetrable. I think the ease of reading and trying shit out and the humor that I found in that book shaped my tastes for learning considerably, and while I don't think every programming tutorial has to be as gentle an introduction as that book was, I think it has a lot to be learned from in terms of programming writing. It's now 2:46. I am tired and going to bed!



Your brain dump is fantastic feedback for us. Can really help us improve the getting started and docs. Thanks for this!


I certainly recognize some of these pain points :) the need to register JDKs is not presented in a manner that's easy to understand.

Then there's the warning about unregistered VCS roots. I confess that rather than looking into the meaning of this warning and trying to fix it, I just uninstall the VCS plugin (git in my case) and do revision control outside of IDEA (TortoiseGit).


You're welcome :) Glad to be of service.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: