Kotlin Native and Raspberry Pi pt.1: build script
Kotlin is not only a JVM programming language. JetBrains also actively develops official Kotlin compilers that target JavaScript and native executables. Today we’re going to take a deep dive at the latter. Over the course of three articles, we will build a Kotlin Native application for Raspberry Pi that uses a small, monochrome SSD1306 OLED […]
Building a Kotlin DSL for your automatic tests
Two weeks ago, we entered the world of building domain specific languages in Kotlin. The previous article was rather theoretical. Now it’s time to put the theory into practice. We are going to build a Kotlin DSL for automated tests. The goal is better describing business use cases in the ‘given’ section. Also, why not […]
Build a successful Kotlin DSL for your business domain
Kotlin is a great language for building custom Domain Specific Languages (DSL). Thanks to many features, building a DSL in Kotlin is a piece of cake… is it? The language is just a tool, and it is not the only tool needed to build a successful DSL. In this introductory article, I’d like to show […]
How to share Gradle version catalogs between projects
Gradle version catalogs are a new feature of Gradle build system. They help managing dependency versions in the projects. In the previous article, we explored how to use them locally. This time, we are going to learn, how to share a single version catalog between many projects. This may be useful for teams that own […]
Kotlin ‘immutability’ is just an illusion
When I tried Kotlin for the first time, I quickly noticed the distinction between List<T> and MutableList<T> types in Kotlin collections API. I really liked it, until I discovered how it works. Then I tried to use some defensive programming techniques to prevent using certain implementations. It turned out that they also don’t fully work […]
Efficient test startup: Kotest + Micronaut + Testcontainers
A couple of months ago I published an article, where I showed how to bind Micronaut, Testcontainers and JUnit together. Recently, a new version of Micronaut arrived (3.5) that added the support for Kotest 5 framework. It targets Kotlin language. This is a great opportunity to get back to the topic and try out another […]
Update operators in MongoDB
MongoDB is a popular database choice for projects that need flexibility and good horizontal scaling. While newer versions support transactions, MongoDB still works the best without them. To achieve data consistency, we can use MongoDB update operators. They can make our writes much smarter, especially if we learn a couple of patterns. In this article, […]