Compiler Hinting with Kotlin Contracts

Kotlin’s built-in null-safety makes it easy for us to write code that’s less error-prone and less susceptible to the unwanted and unexpected NullpointerException at runtime. We can do a lot to make …

Optional Kotlin

Last week I was working on a code base which had been partially converted from Java to Kotlin. The converted Java code base was making extensive use of java.util.Optional. The …

JMockit extensions for Kotlin

Sometimes you have to deal with existing libraries… also libraries that do not provide out-of-the-box support for Kotlin (bastards!). What do you do in such a scenario? Write your own …

Kotlin DSL Development

As all of us who write Java on a daily basis have experienced, we tend to spend a considerable amount of time writing boilerplate code. We can sometimes refactor that …