Making Invalid States Unrepresentable in Kotlin

Kotlin sealed classes and Arrow’s Either can eliminate entire categories of bugs at compile time. This article shows how to apply them to a hexagonal architecture domain model to make invalid states unrepresentable and turn hidden exceptions into explicit method signatures.

Software Design

Hexagonal Architecture With Ktor and Exposed

The same hexagonal architecture patterns that work in Spring Boot translate directly to Ktor and Exposed. This article shows how, and where a lighter stack makes keeping business logic free from framework concerns more straightforward than it is with Spring Boot.

Software Design

Hexagonal Architecture With Spring Boot

A practical, hands-on guide to building a Spring Boot application with Hexagonal Architecture. The article walks through separating business logic and infrastructure into modules, implementing ports and adapters, and testing the system with fast acceptance, integration, and end-to-end tests.

Software Design

Hexagonal Architecture Explained

Hexagonal architecture, introduced by Alistair Cockburn, separates business logic from infrastructure using ports and adapters. This article explores the limitations of traditional layered architecture, explains how hexagonal architecture applies dependency inversion, and shows how to implement and test applications in isolation for better maintainability, flexibility, and long term code quality.

Software Design

Making Developer Interruptions Less Disruptive

Developers often see interruptions as the enemy of productivity, but this article challenges that assumption. It explores flow state, work in progress, and context switching, then explains how pair programming and mob programming can reduce disruption, improve collaboration, and increase overall team performance despite frequent interruptions.

Productivity

Testing Spring Security

This article explains how to test authentication and authorization in Spring Boot applications, covering both MVC and reactive WebFlux. It shows how to secure endpoints, simulate different user roles, handle CSRF protection, and verify access for authorized and unauthorized users. It also covers strategies for unit, integration, and end-to-end testing, along with tips for troubleshooting security issues.

Testing

Introduction to Testing Spring Boot Applications

This article provides an introduction to testing Spring Boot applications. It covers the basics of unit testing with JUnit and Mockito, testing slices of the application, and full integration tests. It offers a starting point for writing effective, maintainable tests and understanding the tools and strategies available in Spring Boot.

Testing

Spring Boot Testing Strategy

This article outlines a practical Spring Boot testing strategy, focusing on writing fast, reliable, and expressive tests. It covers using mocks wisely across architectural boundaries, writing narrow integration tests for external interactions, simulating dependencies locally, and keeping code maintainable through clear separation of logic and infrastructure. The approach balances unit, integration, and broader tests for effective coverage.

Testing

Spring Boot Integration Testing With @SpringBootTest

This article explores integration testing in Spring Boot, including testing in mock environments, running a real server for end-to-end tests, simulating external dependencies, managing test data, and configuring the test setup for speed and reliability.

Testing

Testing Spring Boot WebClient With MockWebServer

This article explains why mocking WebClient directly can be brittle and complex. It demonstrates how to write integration tests using a mock server to verify requests, responses, and error handling. The approach ensures reliable testing of request serialization, response deserialization, and behavior under errors.

Testing