Archive: 2021

A Developers Toolbox: part 3

Posted on by  
Deniz Turan

In my previous post I showed my git and vim configuration. This post will be about random small tools that I use, such as tooling for docker and kubernetes, or just some small utilities to make life a bit easier.

Continue reading →

A Developers Toolbox: part 2

Posted on by  
Deniz Turan

In my previous post I showed you my terminal and shell, with some of the configuration I like to use. This post of 'A Developers Toolbox' will be all about git and vim. I will show you the aliases I use, how you can set up git hooks, and a useful tool to view your git log. And I will share my vim configuration, with some tips and tricks on how to use it.

Continue reading →

A Developers Toolbox: part 1

Posted on by  
Deniz Turan

Personally I like to use the terminal as much as possible, and by doing so I have a few useful tools in my 'toolbox' for my day-to-day work as a developer. This blog is the first in a trilogy, covering all the tools that I use almost daily. This first part will be all about the terminal itself. Which terminal I use, which shell I use, and how I have customized its looks.

Continue reading →

Spocklight: Writing Assertions for Arguments Mock Methods

Posted on by  
Hubert Klein Ikkink

In Spock we can also get a hold on the arguments that are passed to method call of a mock and we can write assertions to check the parameters for certain conditions.

When we create a mock in Spock and invoke a method on the mock the arguments are matched using the equals() implementation of the argument type. If they are not equal Spock will tell us by showing a message that there are too few invocations of the method call. Let’s show this with an example. First we create some classes we want to test:

Continue reading →

Practical intro to Java LTS upgrade (11 to 17)

Posted on by  
Thomas de Groot

As of the release of Java 17 a new LTS has been available, but what is in it for me exactly and which features can I use during projects?
Most of the blogs I read only describe 1 version upgrade and also discuss a lot of features that are/were still in preview.
I decided to summarize which features are released from java 11 to 17 (one LTS to another) and in specific only those that I thought could be interesting during my everyday work as a Java developer.
So in this blog I wont be talking about the features that are in Preview or tools that came with the new JDK’s.

Helpful NullpointerExceptions

You love to hate them, NullpointerExceptions…​ But they got a little better because from now on the exception will tell which variable is the culprit. And I know, the best NullpointerException is no NullpointerException at all, but still once they occur they better tell what’s wrong.

This feature has been released since Java 14, in Java 15 they made the extra information about which file/line had caused the error as default.

Continue reading →

Clojure Goodness: Create All Parent Directories For A File

Posted on by  
Hubert Klein Ikkink

The Clojure namespace clojure.java.io contains useful functions to work with files. One of those functions is make-parents. We can pass a java.io.File instance as arguments or use the same arguments that can be passed to the file function that is also in this namespace. The function will create all parent directories for the file. The return result is true if the directories are created (they didn’t exist before) and false when the directories didn’t have to be created (already exist).

In the following example we see an example of usage of the make-parents function:

Continue reading →

Generate Swagger UI from Spring REST Docs

Posted on by  
Jorrit van der Ven

Spring REST docs and Swagger are great ways to document your API, but both have their strong and weak points. I prefer the test-driven way of documenting an API of Spring REST docs over the "Magic and Annotations" approach of Swagger, but on the other hand the output of Spring REST docs just doesn’t look as nice as the interactive UI of Swagger. Wouldn’t it be nice if we could combine both frameworks to create the most awesome API docs ever?

Continue reading →

Value of tests

Posted on by  
Tammo Sminia

Testing is an important part of writing an application. There are many decisions to make about what, how and when to test. It often helps me to think of the costs and values of (potential) tests to reason or talk about them.

This text will explain what these costs and values are and some of the guidelines I derived from this.

Continue reading →

shadow-left