Please turn JavaScript on

Randomthoughtsonjavaprogramming

Is this your feed? Claim it!

Publisher:  Unclaimed!
Message frequency:  0.62 / week

Message History

So, I had a discussion with my colleague about null safety and how it can be non-intuitive if you're not yet used to it.

So we had the following code:

In a lot of REST applications, an Exception may be thrown when a resource does not exist. But it's important to differentiate between "no resource" and "oh no! An exception occurred! We're in trouble!".

Th...


Read full story

So it's possible and quite convenient to use hardcode git commands to checkout Github repositories. It works fine, once you get the SSH keys sorted out and all that.

I tend to use IntelliJ to checkout new github repositories, as it is soo much easier to point and click.

This always happens to me, when I find myself having to do things I don't do often. Because o...


Read full story

Network File System (NFS) is used to mount external sources of files between Linux/Unix servers.

Nowadays, I think most people use SAMBA (SMB) as that also allows Windows to join the club, but I decided to try NFS (again).

I used to work with NFS back in the past, but it seems to still be viable.

On the server

We will be sharing the directory /mnt/raid.


Read full story

Just looking at old local branches. They tend to proliferate, especially if you have a release cadence.

To list the local branches (the default), or list the branches according to a pattern, see the two examples directly below.

git branch git branch --list "V2022*"

Small explanation of the output of the command:

existing branches are listed the current bran...


Read full story

So I've been trying to make a Map from a List in Kotlin, and as I have not much experience with Kotlin and not much experience with Maps, I turn to the Internet.

Funnily enough, after getting it working, my IDE keeps giving me subtle hints that it can be shorter and more concise.

I thought it would be nice to put the steps here.

val primaryKeys = listOf(12L,...


Read full story