Breadcrumb navigation, known to some as cookie crumb navigation or navigational path to others, where a path like structure is displayed, most commonly at the top of the current page, that typically shows you the path of pages that you as the user took to get to the page where you are now is a well known staple of many websites. And, when implemented properly, is a very helpful feature on many websites. But for every good implementation there is a bad one, and all the bad ones are there usually due to an age old mistake: trying to fix a problem by addressing the symptoms instead of solving the actual underlying problem. A problem that should not have been here in the first place. A problem that even the good implementations usually fail to address which in turn has created a much larger problem.
Continue reading →
Let me start off with saying I love functional programming.
Although.. A better way of saying it would be I love what functional programming brings me.
It reduces complexity, the code is nice and explicit and it eliminates certain bugs from occurring.
But there are a few things that I wanted to discuss regarding functional programming.
Continue reading →
There are a lot of how-tos on how to use OpenAPI to document the REST APIs of a Quarkus microservice.
However, none of them show you how to document the schema of your API response.
In this blog post I’ll show you two ways to add schema documentation to your OpenAPI spec.
Continue reading →
In this blog post, I want to clear up some fuzziness that seems to surround Reactive Streams.
It is all too easy to defeat the goals that can be achieved with Reactive Streams, especially where the application is part of an environment with both synchronous and asynchronous inputs and outputs.
Continue reading →
We’ll look at some examples of different kinds of exceptions and how we can deal with them in ZIO.
Continue reading →
Pattern matching got quite an update in Java 19 (although it does require turning on experimental features).
Continue reading →
The slurp
funtion in Clojure can be used to read the contents of a file and return it as a string value. We can use several types as argument for the function. For example a string argument is used as URI and if that is not valid as a file name of the file to read. A File
instance can be used directly as argument as well. But also Reader
, BufferedReader
, InputStream
, URI
, URL
, Socket
, byte[]
and char[]
. As an option we can specify the encoding used to read the file content using the :encoding
keyword. The default encoding is UTF-8 if we don’t specify the encoding option.
Continue reading →
I use a local Kubernetes cluster to help me develop microservices.
On my 2015 Macbook Pro, the cluster ran inside a Minikube VM using the Hyperkit driver.
Replicating this setup on my new 2021 Macbook Pro proved impractical.
This is how I made it work.
Continue reading →
A tool that helps with scanning for security vulnerabilities in dependencies can be a great addition to a CI/CD stack.
Using it poorly can leave you with a false sense of security.
Continue reading →
DataWeave has some very nice features to transform data objects. One of those nice features is the update
operator. With the update
operator we can change values of keys in an object using a very concise syntax. We don’t have to go through all keys and create a new object, but we can pinpoint the exact key and change the value. To get the correct key we use selectors. Once we have the key we can set a new value. We can define a variable to contain the current value if we want to use it to define a new value. Also is it possible to add a condition that needs to be true to change the value. Finally the update
operator supports upserting a value if the key might not exist yet.
Continue reading →
Because everyone should use Hexagonal architecture… except when they shouldn’t.
Continue reading →
One of the great features of Kotlin is its interoperability with Java code. This allows you to easily call
'traditional' Java code from your Kotlin code, but it also helps you the other way around:
calling Kotlin code from Java.
Sometimes, a little extra work is needed to make some shiny Kotlin feature work with Java code. For example,
Kotlin supports default parameter values, which are not supported in Java. In this case, the @JvmOverloads
annotation
can be used to generate overloads for functions that contain parameters with default values.
This annotation does not only work on functions, but can also be applied on constructors. In this post I will explain how
to use this feature on the primary constructor, as it might be confusing where to place the annotation.
Continue reading →