Posts about Kotlin
Quarkus uses Hibernate Validator for validation. This means that the correct way to do custom field validation is to create a custom constraint. The steps to do this are well documented. However, since I am still learning Kotlin, it was not trivial for me to convert the sample code to Kotlin, especially the annotation part.
The null safety feature in Kotlin is great for preventing NullPointerExceptions that are thrown at runtime. Unfortunately, it can sometimes cause problems when interacting with Java code or libraries. I recently ran into such a problem when trying to mock a dependency with Mockito.
It's December again and for the third year in a row I've spent a significant amount of time solving Advent of Code programming challenges. To make it even more interesting, I decided to write the solutions in Kotlin - a programming language I heard a lot of good things about, but had no prior experience in.