Please turn JavaScript on

Randomthoughtsonjavaprogramming

Is this your feed? Claim it!

Publisher:  Unclaimed!
Message frequency:  0.1 / day

Message History

I've been playing around with AutoCloseableSoftAssertions, as I don't want to have to remind myself to call .assertAll()

But I also wanted to see if I can replace entire rows of assertThat statements in a simple manner, without many changes.

And I think I have found a way in Kotlin.

Let's start with the basics:

Let's try some SoftAssertions, so we...


Read full story

Yeah, so I turned my old workstation into a server and no longer have access using a graphical interface.

Normally, this is fine, as I am using it as a server.

But I forgot to export my Firefox bookmarks.

Hopefully I can examine the sqllite database using reference [1] to retrieve my bookmarks.

I open the file /home/mrbear/.mozilla/firefox/xvosm5y9...


Read full story

Sometimes, our IDE can make a mess of things (mostly because we did something wrong, though).

And in order to fix it, sometimes we have to get rid of all unversioned files, so that we have a clean git repository and then create a new Project in our IDE.

This helps as it forces the IDE to recreate its config files from scratch.

This blog is just a small no...


Read full story

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