Lambda-Map Performance in Kotlin

Kotlin Bytecode

Working on an enterprise application written in Kotlin, I’ve recently noticed something that felt “off” to me. Perhaps you’ve seen it, perhaps you’ve written it — maybe even recently!  It looks something like this (I call this a Lambda-Map): object Demo { fun main() { listOf(1,2,3,4).map { plusOne(it) } } private fun plusOne(i: Int): Int […]

Introducing KotlinToday.com

When I was learning Clojure for the first time, I had two references that I found myself reading every single day. The first resource is a fantastic guide by Daniel Higginbotham called Clojure for the Brave and True. The second resource that I found myself using allowed me to immerse myself into the Clojure community and […]

Kotlin Sealed Classes

A small envelope sealed with a red wax.

Kotlin has a concept known as sealed hierarchies (several other languages implement this feature as well). In Kotlin, we can generate a sealed hierarchy through the use of sealed classes. What are Sealed Classes? Sealed classes are basically an extension to an enum class. They offer similar functionality with a few key differences. Similarly: The […]

Using ButterKnife with Kotlin

Butterknife is a simple but fantastic tool for Android development. When this was introduced, it really simplified my thought process regarding view bindings in my activities, fragments, or view holders. As Kotlin adoption grew, Jake Wharton (creator of ButterKnife) also created KotterKnife, for kotlin-esque view bindings. KotterKnife isn’t bad, but I prefer the annotation syntax of […]