Lovis Möller

On Software Development.

Mock? What, When, How? (codecentric Blog)

Mocking frameworks are powerful tools for testing and test driven development (TDD) in particular.
What are the rules to write good tests with mock objects?

Read More

Gang of Four Patterns in Kotlin - Slight Return (dev.to)

Implementing the Decorator pattern with function composition and how would the Visitor pattern look like in Kotlin? From dev.to(), the DEV community.

Read More

Gang of Four Patterns in Kotlin (dev.to)

Kotlin is getting more and more relevant. How would common design patterns implemented in Kotlin look like?
From dev.to(), the DEV community.

Read More

Kotlin Basics: Inline Functions

In Kotlin, using a function as a parameter of another function (so called higher-order functions) feels more natural than in Java.
Using lambdas has some disadvantages, though. Since they’re anonymous classes (and therefore, objects), they need memory (and might even add to the overall method count of your app).
To avoid this, we can inline our methods.

Read More

Kotlin Basics: Standard Extension Functions

Kotlin’s most powerful feature (compared to Java) are probably Extension Functions.
They allow you to add new functionality to an existing class, without using inheritance or reflection. You can define your own extension functions and Kotlin ships with a lot of pre-defined ones.
There are e.g. a lot extensions for collections, but also those that extend every class in your program. That’s right - every single class is extended by the functions in Standard.kt.
When I started with Kotlin, I found them quite confusing. With this post, I hope to un-confuse them a little bit.

Read More

Kotlin Basics: Properties

If you just started with Kotlin, there’s a good chance that you are overwhelmed with the new possibilities. This is especially true if you originally came from Java, where concepts like Properties or Function Types simply do not exist.
In this post, I will address some of the questions concerning Properties a beginner might have when starting with Kotlin.

Read More

Increase the Java compiler's error-limit in Gradle.

When updating a library or doing a big refactoring it quickly happens that we run against a massive wall of compiler errors. The Java compiler only displays around 100, so you never quite know how much progress you already made.

Read More

Notes on Rx Tests

While trying to test-drive a RxJava app in Kotlin, I ran into some problems. Here are my notes on that topic.

Read More

We have no Idea what we're doing

We as a field don’t know what we are doing. We need to discover new ways of thinking. We need to get back to inventing things that matter.

Here are three videos that I recommend to everyone in the software industry:

Read More