Java Optional and Kotlin Nullable

We are using Kotlin and Spring Boot in one of our projects. This includes Spring Boot Jpa Repositories. We are using a CrudRepository that provides basic functionalities like save(), delete(), findById() etc. This library is written in Java, hence method signatures look like this:

Optional<T> findById(ID var1); 

Using this API out of the box would force us to deal with cumbersome Java Optionals. Since we are implementing in Kotlin we would like to use Kotlin Nullables instead and as it turned out we can achieve this very easily.

Continue reading

Jacoco and Sonar with Kotlin

When we began a new project recently the team thought about using Kotlin over Java to implement the backend. The project lead had issues with this because there was no clear information on how Kotlin would be supported by tools like Sonar and Jacoco. Since these tools deliver important information about code quality and potential issues we decided to spend some time on evaluating how these tools would collaborate with Kotlin.

Continue reading

Measuring of Swift by looking at a simple web service

I ran across a colleague’s article recently and figured that the Swift programming language would be a nice addition to his comparison. In order to remedy this I implemented the admittedly very simple web service in Swift and measured both its performance and size. Then I followed the given structure of the article in terms of how to present my relevant results. You may find these subsequently.

Continue reading