Code Soapbox Posts

March 10, 2023 / Spring
August 19, 2022 / Clean code

Introduced by Alistair Cockburn in 2005 as an alternative to the traditional layered architecture, the Ports & Adapters architecture clearly separates core logic from the input and output infrastructure, dividing the system into loosely-coupled interchangeable components. Throughout the years, it grew in popularity to become one of the most widely recognized types of software architecture.

June 15, 2022 / Clean code

A low code coverage indicates that code is not well tested and therefore unsafe to work with. Unfortunately, a high code coverage does not give certainty that the tests are well written. Mutation testing promises to give us some of that certainty, by checking how well our tests hold up to changes in code behavior.

June 8, 2022 / Java
February 26, 2021 / Java

While Java is praised for taking much of the burden of managing memory off software developers’ backs, it is not immediately obvious how it works under the hood. This post aims to explain the various technicalities of Java’s memory management in a concise way.

February 26, 2021 / Clean code

The Interface Segregation Principle represents the “I” in SOLID and states that no client should be forced to depend on methods it does not use. The easiest way to achieve compliance is to to split large interfaces which are not specific to a single client into smaller, more specific ones and let the clients choose which ones to depend on.

March 19, 2020 / Java

Proper monitoring is vital to an application’s success. With the Elastic Stack you can consolidate several application’s logs in one place, be able to easily search and filter them, create data visualizations out of them and more. What’s more, integrating that functionality into your application can be done within minutes.

February 23, 2020 / Java
February 4, 2020 / Java

Sometimes you might not be able to add @Schema annotations to a class you are using in your public API (e.g. when the class is coming from an external dependency). Other times you might not want to (e.g. when the class is a value object from your domain). In this article you will learn how to define OpenAPI 3.0 class schema separately from your model, without having to touch the class you are documenting.

January 9, 2020 / Java

Generating client code from an OpenAPI specification can save a lot of development time and reduce risk of that code being outdated. However, it is not immediately obvious how to generate that code from a Spring Boot application. This article explains how to generate Angular code from a Java Spring Boot project using Springdoc Swagger and Maven (though you can easily swap out Angular for any other language).