On Java, Agile, Open Source, Architecture and anything in between

Exploring Kotlin, writing a simple spell checker

In my last blog I talked about exploring Kotlin, a JVM language in development by JetBrains. In this blog I’ll walk through a larger piece of Kotlin code.

Spell checker
The program we’re talking about is a simple spell checker. It reads a dictionary of words from a file (/usr/share/dict/words) into a set. Then it reads a sentence from stdin and checks if every word is in the dictionary. Finally it informs the user whether or not the sentence is spelled correctly, i.e. every word is known in the dictionary.

The spell checker is available on my GitHub. Take a moment to study the Java version, we’ll discuss the Kotlin version next.

Read More

Exploring Kotlin

I’ve been exploring Kotlin recently. Kotlin is a new statically typed JVM language and was announced about half a year ago. This month JetBrains released its first milestone candidate which I decided to have a closer look at.

First of Kotlin is still in its early stages. A lot of things work pretty well (I’m especially impressed by the IDE support) but there are still numerous issues. I’ve hit a couple of bugs so far.

Read More