Never miss a beat

Join my newsletter.

The Archives

Sequence: A Kotlin Type

Published: 11/3/2018

Kotlin, despite being an object oriented language, offers a ton of support for Functional paradigms. One of the most common functional paradigms involves using a combination of map , filter , and reduce on Iterable types. However, Kotlin uses extension functions on Java Collections to create these functions in their standard library. That means that when you call map on a list, you’ll return a new list. This is usually intended, however, it can become problematic when chaining multiple…

BDD Assertions with Expekt for Kotlin

Published: 10/26/2018

Behavior-Driven Development (BDD) has became quite a popular strategy for writing tests in the past ten or so years. BDD is a style of test-writing that focuses on test cases that flow like natural English sentences. Expekt is one such library for writing JUnit assertions in Kotlin. Combining JUnit and Expekt you can achieve results like this: Adding Expekt to Your Project As of writing, the current version of Expekt is 0.5.0 so that’s the one we’ll include in our project. If you’re using…

What is Scrum?

Published: 10/22/2018

Scrum is designed to be simple. It is a series of lightweight components that, when followed, have been show to improve team workflow. Scrum’s approach focuses on respect for people and self-organization to adapt to unpredictability and the difficulties that come with solving complex problems. The Values of Scrum Scrum focuses on a set of core values that should be used when working with your team. The core values are as follows: Courage Focus Commitment Respect Openness The ideas behind these…

Kotlin Sealed Classes

Published: 10/19/2018

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 class can not be instantiated directly The type can be represented as a type from a limited set, but not from any type outside of the set. Differences…

On the Merits of Side Projects

Published: 7/27/2018

After reading Spotify Lead Designer Tobias van Schneider’s outstanding post on side projects , I wanted to expand upon my feelings about them as well. Hopefully, if you’re not working on something outside of your normal day-to-day, you can find the motivation to start a side-project after reading this. There are really only four benefits I see to side projects. Enjoyment, Education, Accomplishment, Sanity. Let’s talk a bit about each. Enjoyment Enjoyment is simple. Whether you’re building a…

Static Methods, Companion Objects, and Testing

Published: 7/18/2018

A companion object sits inside a class definition and houses all the static methods which that class will own. Let's convert a piece of Java code to Kotlin so you can see what I mean.