
Make Invalid Domain States Hard to Represent with Kotlin and Arrow
Using value classes, context parameters and typed errors to build a small functional domain model
Practical notes on software development for the JVM, from Cape Town. Mostly Kotlin and Spring Boot: coroutines and structured concurrency, virtual threads, reactive programming, and the occasional Git trick or experiment with local AI models. Every post starts with something I actually needed to build, debug, or measure — so expect working code, real numbers, and honest trade-offs rather than theory. I also cover some of this on YouTube. All views are my own.

Using value classes, context parameters and typed errors to build a small functional domain model
Keep everyday tests fast and dependable while running strict live integration tests only when you choose

Part 2: Add transaction pooling to the benchmark app, avoid prepared-statement traps, and see where connection pooling earns its keep

Part 1: Build a production-style Kotlin testbed with hexagonal architecture, PostgreSQL, Testcontainers, and a repeatable concurrency benchmark

Turn your coding standards into checks that both developers and AI agents must pass

Sometimes you need to start several pieces of work at the same time and handle each result as soon as it is available. The fan-in pattern is a good fit for this: many concurrent producers send their r

If you own a modern Mac with an Apple Silicon chip and Apple Intelligence enabled, then you already have access to a local foundation model. There is no separate model to download, no API key to creat

In looking at enabling virtual threads for a Spring Boot application, I began to wonder how many virtual threads I could spawn compared to platform threads. I knew the answer would be "many more", but

Sometimes you need to run work in the background of a Spring Boot application. This may be work that should not block the HTTP request that triggered it, or work that is started by a scheduled process
