XOR for FreshMarker

While reviewing the mutation tests for FreshMarker, I noticed an implementation gap in the logical expression. So if something needs to be changed, why not quickly add something new.

Clamp and other new Java 21 methods

Java Bibliotheken

A Java developer always likes to look into the JDK, like a magician in his old tomes, to see if there is an unknown spell, er method, with which he can improve his source code. In fact, Java 21 has introduced a lot of new methods that make everyday life a little easier.

Consumer Contract Testing

Anyone who has ever worked with Web APIs, and who hasn’t, will be aware of the difficulties of testing in an API environment. When testing an API, there are two sides to consider, that of the producer and that of the consumer. If both do not work hand in hand, then problems are inevitable. Consumer contract tests are designed to avoid some of the difficulties in API testing.

From near misses on footpaths

If you have read this article, then you will know that I am a left-hander, or rather a left-turner. But you will also understand why we humans perceive some things completely differently and why simple math explains this.

Mutation Testing

Java Bibliotheken

When I first heard about mutation testing, I was – to put it kindly – very confused. The idea that we change our code to see which tests fail doesn’t look particularly promising at first glance. But if you take a closer look at the approach, you realize the potential it holds.

The Java String Template Processor

Java 22

With Java 22, string interpolation is fighting for its place in the Java ecosystem. What works in other languages and many frameworks should now also simplify the work of Java developers. Some wishes are fulfilled for the developers, others unfortunately not and some would never have been expressed. But more on that later.

Custom Temp Folders in JUnit 5

Java Bibliotheken

It is always instructive to look at well-known open source projects to learn from the implementation used. Sometimes you look at the unit tests and start to wonder. A serious problem with large and old frameworks is the time-consuming adaptation to changing environments. Modern features in libraries such as JUnit 5 simplify the code base immensely.

Records on the rise – Goodbye Lombok

Since the introduction of Java Records in Java 14 (JEP 359), their support in many frameworks has continued to grow. Support is now so great that we should consider banning Lombok from all our projects.

FreshMarker – Custom String Types

Some additions to a framework are so trivial that they don’t really deserve their own article. On the other hand, as a developer, you may ask yourself why this addition has taken so long. For unknown data types, FreshMarker uses the interpretation of the class as a Java Bean by default. This is a good solution for many POJO, DTO and Entity classes, but in some cases the class should be used as a primitive FreshMarker type.

Rocinante – repeated fields

The Rocinante library has now passed some important milestones. It can read and write messages and masters the scalar base types. The next step is now to support Repeated Fields. Repeated fields are the Protocol Buffer counterpart to lists and arrays in other protocols.