Recently, I attended the Kotlin programming language conference, aptly named KotlinConf, to learn about the latest developments in the language. Naturally, my first idea for this blog was to list the top takeaways of the talks I attended. However, I thought it could be more useful for those who aren’t familiar with Kotlin yet to […]
Parallel Short-Circuiting With Reactive Programming
Dealing with asynchronous and parallel validation There are scenarios in Reactive Programming when the outcome of a code block is depends on several separate independent expressions (jobs). If any of them goes wrong (or right depending on the problem), you can already decide about final result and you don’t need to wait for the outcome […]
Verifying Coding Standards Using Static Code Analysis Techniques
In a previous blog we described how we used JUnit and Reflection to verify correct implementation of coding standards addressing Axon Upcaster consistency. We concluded that, although possible, it felt a bit like a hack because we had to change modifiers of Java variables defined as “private static final” resulting in Java security manager warnings. […]
Unit Testing Source Code: Verifying Axon Event Upcaster Consistency
In our last project we used a JUnit test to check consistency of all code concerned with Axon event upcasting. We think this is interesting as we basically unit test source code rather than class behavior. In this blog we describe how we implemented it and conclude with a short evaluation and we list alternative […]
Leaving a Java legacy behind
As with a house, software applications require maintenance too. Otherwise, you risk the digital equivalent of rot: bit-rot. Often, the maintenance is done like with a house: Superficially to make it look nice again with a new look-and-feel, a new colour scheme (a paint job) and a few new stock photos. But every once in a […]
Dockerising your legacy integration tests
As most of you will know, every now and then you can expect the question ‘Can you help fix something on this ancient project?’ According to the Universal Software Ageing table, that means anything from last month to much, much older. I got such a question recently, being in-between projects, and this project fell squarely into […]
Spring Data Native Queries and Projections in Kotlin
This blog describes the solution to mapping native queries to objects. This is useful because sometimes you want to use a feature of the underlying database implementation (such as PostgreSQL) that is not part of the JPQL standard. By the end of this blog you should be able to confidently use native queries and use […]
Refactoring from Elasticsearch version 1 with Java Transport client to version 6 with High Level REST client
Every long running project accrues technical debt. It may be that the requirements today have evolved in a different direction from what was foreseen when the project was designed, or it may be that difficult infrastructure tasks have been put off in favor of new functionality. From time to time, you need to refactor your […]
How to send your Spring Batch Job log messages to a separate file
In one of my current projects we’re developing a web application which also has a couple of dozen batch jobs that perform all sort of tasks at particular times. These jobs produce quite a bit of logging output when they’re run, which is important to see what has happened during a job exactly. What we […]
Writing less code
Have you had that feeling that you have to write too much code to build simple functionality? Some things just feel repetitive, they feel you should be not have to write them yourself, instead a framework should make your life easier. Recently I’ve been building a project in Java/Spring, and after some time I started wondering […]