Apparently the starterkit for getting started with Jakarta has been updated to Jakarta 11 and can be found at https://start.jakarta.ee/.
Thursday, 13 August 2026
Thursday, 30 July 2026
Adding snippets of code in JavaDoc
Recently saw a short of the always impressive [1] José Paumard.
It shows how to add snippets of code to your javadoc, and also add those snippets of code to your test suite.
I didn't know how to add them in Maven, but the reference [2] was be helpful.
So, first of all, we need, like, "production code" that refers to code snippets in the JavaDoc. In the example below there are both an inline snippet as well as a reference to a snippet elsewhere.
Then we have to define our external snippet for getAddress() as referred to above, inside AddressTest with appropriate zones.
Now this AddressTest is part of a Maven project, and is available in the src/test/java directory, as you would expect. So we need to provide this directory in the pom.xml via --snippet-path, as follows:
In the javadoc, when you generate it using "mvn javadoc:javadoc" it will look as follows:
The great part is that the Unit test also is regularly run.
I like it a lot!
P.S. the @snippet and assorted JavaDoc tags have a plethora of different options. For example for highlighting code.
References
- [1] How can you add a snippet of code in your JavaDoc? - Cracking the Java Coding Interview
- https://www.youtube.com/shorts/ZNe_-Z1qxp8
- [2] Configuring Maven For Compiled And Tested Code In Javadoc
- https://nipafx.dev/javadoc-snippets-maven/
- [3] Oracle Java - 3 Programmer's Guide to Snippets
- https://docs.oracle.com/en/java/javase/22/javadoc/programmers-guide-snippets.html
- Baeldung - Code Snippets in Java API Documentation
- https://www.baeldung.com/java-doc-code-snippets
Tuesday, 21 July 2026
GraalVM 25.1 Innovation
In short for those of us who want to stay on the lts, there's GraalVM 25.
And for those who want new things in incremental releases for testing, there's GraalVM 25.1 Innovation.
References
- Medium.com - GraalVM 25.1 is here! 🎉
- https://medium.com/graalvm/graalvm-25-1-is-here-13829606982e
Thursday, 4 June 2026
Angular Signals
Angular introduced Signals1 in Angular 17. You can find a mention of it in the release notes3 along with other fantastic goodies. From what I hear it's a big thing that solves some of the problems with updating two-way data-bindings without having to go through the entire tree of components and examining all the state (wich zone.js used to do.)
However, it's not a one-size-fits-all. Observables are still highly relevant, it's just that sometimes you use Signals and sometimes you use Observables2.
From what I gather, Signals can be used for highly synchronous code and one of those is to use them in the UI. Where Observables are convenient if the value is not immediately available (so time-based) like with REST calls.
You can learn about it all and try it out at [4], apparently.
There's plenty of youtube videos out there that introduce the concept too, apparently.
References
- [1] Angular - Angular Signals
- https://angular.dev/guide/signals
- [2] Medium - Angular Signals: Best Practices
- https://medium.com/@eugeniyoz/angular-signals-best-practices-9ac837ab1cec
- [3] Angular Blog - Introducing Angular v17
- https://blog.angular.dev/introducing-angular-v17-4d7033312e4b
- [4] Angular Home
- https://angular.dev/
Monday, 25 May 2026
Azul completed its acquisition of Payara in December 2025
Azul, the guys from the Zulu JDK, has aquired Payara.
I thought I'd mention it here, as I am using Payara in my hobby project.
There's a message on what it means for the Community version of Payara at [1] on https://foojay.io.
References
- [1] foojay.io - A New Chapter for the Payara Community
- https://foojay.io/today/a-new-chapter-for-the-payara-community/
Saturday, 11 April 2026
Desktop Icons on GNOME
GNOME has traditionally always been one to prefer the benefits of a clean Desktop.
But I'm not one for traditions.
GNOME Extensions
There's an GNOME extention available called Desktop Icons NG (DIN)1.
If you have installed it, you can see if you properly have it by "gnome-extensions show ding@rastersoft.com".
Once you install it, you can query to see if it is enabled using "gnome-extensions list --enabled", it should contain at least ding@rastersoft.com
Enabling it would probably help: "gnome-extensions enable ding@rastersoft.com" if it's not there.
You're likely to have to logout and log back in, to load extensions.
Extra steps
What I needed to do was:
- copy the application file (thingy.desktop) from /usr/share/applications somewhere and then drag it onto my Desktop.
- Make it Executable
- Set it to "Allow launching"
References
- [1] Desktop Icons NG (DING) by rastersoft
- https://extensions.gnome.org/extension/2087/desktop-icons-ng-ding/
Wednesday, 8 April 2026
VoxxedDays 2026
So, I went to VoxxedDays on April 1st and 2nd.1
Some of it was very interesting, and I've retained some notes and links written below.
- Spec-driven development2
- It seems to be a way to specify the wanted behaviour of your software in such a way that AI can successfully create your software based on your spec. Not entirely convinced of this.
- Lion3
- Lion is a set of highly performant, accessible and flexible Web Components.
- PicNic4
PicNic is a online greengrocer/supermarket which is running a Blog on the challenges on scaling up. Quite interesting.
Some interesting things for example are providing fresh products (bread for instance) within a certain timeframe.
- Programming Rules your IDE can tell you about.
- https://github.com/jborgers/PMD-jPinpoint-rules
- Compressed OOPs in the JVM
- https://www.baeldung.com/jvm-compressed-oops
- A good explanation of generics
- https://bramjanssens.nl/generics/
- Reduce Object Header Size and Save Memory in Java 25
- https://www.baeldung.com/java-object-header-reduced-size-save-memory
The sessions are online now at YouTube. See [5].
References
- [1] VoxxedDays Amsterdam
- https://amsterdam.voxxeddays.com/
- [2] What Is Spec-Driven Development? A Complete Guide
- https://www.augmentcode.com/guides/what-is-spec-driven-development
- [3] Github - Ing/Lion
- https://github.com/ing-bank/lion
- [4] PicNic - Blog
- https://blog.picnic.nl/
- [5] YouTube - VoxxedDays 2026 Sessions
- https://youtube.com/playlist?list=PLRsbF2sD7JVoK114W2u9HTK4ftHn_taT1&si=WmiCtfuhEyTtu0lg
Monday, 16 March 2026
Kotlin: lots of functions
I like Kotlin (sometimes) as it has a large and rich number of convenient functions to use.
In Java, we tend to reach for our Guava1 or Apache Commons Lang2 to get the same functionality.
But it does tend to make it a bit hard to decide which to use, especially as I (as most people I hope) do not know the entire dictionary of available functions in Kotlin.
Luckily there's of course colleagues who can help, and my IDE also does a pretty good task of suggesting better ways.
Case in point:
val coupon: Coupon? = items.map { it.coupon }.filter { it != null }.firstOrNull()
I do know the code above can be made simpler.
val coupon: Coupon? = items.mapNotNull { it.coupon }.firstOrNull()
There, the mapNotNull() is a very convenient function that I use all the time.
But this time my IDE complained again and told me to use .firstNotNullOfOrNull
val coupon: Coupon? = items.firstNotNullOfOrNull { it.coupon }
It's fine by me, to use this, but I didn't know this function exists.
Also, the name seems a bit long and it took a minute to understand the meaning.
References
- [1] GitHub - Google Guava
- https://github.com/google/guava
- [2] Maven Repository - Apache Commons Lang (3)
- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
Thursday, 12 February 2026
AssertJ + AutoCloseableSoftAssertions + Kotlin
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 can have many asserts that are all evaluated, instead of the Test stopping upon the first failed assert.
Okay, now AutoCloseableSoftAssertions is a convenient class that calls the .assertAll() as part of the final block in a try-with-resources:
Now, in the case above, we have to prefix our assertThat() calls with "it.". There's one more step that we can use to remove this.
Wrapping all this in a function for easy use will end up in:
Now, a stack of assertThat() statements can be encompassed with assertAll{} without any other changes to get the full advantages of SoftAssertions.
Might be overkill, but this was a fun example in Kotlin.
Try-with-resources
So you might have noticed that AutoClosableSoftAssertions is used in a try-with-resources block.
The small advantage you have, is that if there is an unexpected Exception thrown during your asserts, the ".assertAll()" will still be called, because it's part of the "AutoCloseable.close()".
I don't know how much this advantage is, as the unexpected Exception breaks the test anyways, but there it is.
Thursday, 5 February 2026
Retrieving Bookmarks from your Firefox - The Hard Way
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.default/places.sqlite and selecting the tab "Browse data" found the table moz_bookmarks.
It contains all bookmarks and folders and contains references to the moz_places table (using the moz_bookmarks.fk).
The moz_places table contains the actual urls.
References
- [1] DB Browser for SQLLite
- https://sqlitebrowser.org
Monday, 26 January 2026
Git: Cleaning up
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 note on how to clean your git repository of all unversioned files.
A dry run would look like this:
A proper clean would look like this:
Options:
- -n
- dry run
- -d
- also recursively delete unversioned directories.
- -x
- ignore .git-ignore rules (convenient for cleaning up buildproducts and IDE config files)
Output of a dry run would look something like this:
Would remove .DS_Store
Would remove .idea/
Would remove mrbear-parent/mrbear-app/target/
Would remove mrbear-stubs/.gradle/
Would remove mrbear-stubs/.kotlin/
Would remove mrbear-stubs/build/
See also "git restore" or "git reset".
References
- git-clean - Remove untracked files from the working tree
- https://git-scm.com/docs/git-clean
Thursday, 15 January 2026
Kotlin : NullSafety + Defaults
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!".
That's what this example code does.
So, what did the "getStatus" method do exactly?
This causes the test to fail.
The code should have been "?: false", but doing that does look weird.
A clearer solution would be:
The problem with Kotlin might be that there's alot of "?." and "?:" and "!!" and quite frankly it makes it hard to read.
What do you think?
Sunday, 11 January 2026
Trying out the Github Command Line
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 once you have a repo checked out, that's basically the end of all the complicated stuff and you just get to work.
Checking out using Git
I still prefer using Git to checkout a new repository for now4.
The way this works is just do "git clone git@github.com:username/repo.git". You can find this url in the repository on the GitHub website.
However, an ssh key must be available on your GitHub account for the computer/client you're using.
First generate such an ssh key on your computer, using reference [5].
For example: "ssh-keygen -t ed25519 -C "mrbear@mrbear.com"".
Add your ssh key to the ssh-useragent, using "ssh-add ~/.ssh/id_ed25519".
You should see:
Enter passphrase for /home/mmrbear/.ssh/id_ed25519:
Identity added: /home/mrbear/.ssh/id_ed25519 (mrbear@mrbear.com)
Then you can add the generated key to your Github account using the website, using reference [6].
After that, you can finally just clone your repo as mentioned above.
Installation
GitHub has a command line interface nowadays1. It's easy to install2.I'm using Fedora, so all it takes on my end is to "sudo dnf install gh".
There used to be a tool called "hub", apparently, which is basically a git wrapper for GitHub. It was an unofficial tool. You can find the differences discusses in [3].
Using the CLI
Logging in using "gh auth login".
? Where do you use GitHub? GitHub.com
? What is your preferred protocol for Git operations on this host? SSH
? Upload your SSH public key to your GitHub account? Skip
? How would you like to authenticate GitHub CLI? Login with a web browser
! First copy your one-time code: DFGF-JFDB
Press Enter to open https://github.com/login/device in your browser...
✓ Authentication complete.
- gh config set -h github.com git_protocol ssh
✓ Configured git protocol
✓ Logged in as mrbear
Then the command "gh issue list" shows me open issues.
Works! Quite nice!
References
- [1] GitHub - Take GitHub to the command line
- https://cli.github.com/
- [2] Installing gh on Linux and BSD
- https://github.com/cli/cli/blob/trunk/docs/install_linux.md
- [3] GitHub - GitHub CLI & hub
- https://github.com/cli/cli/blob/trunk/docs/gh-vs-hub.md
- [4] GitHub - Cloning a repository
- https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
- [5] GitHub - Generating a new SSH key and adding it to the ssh-agent
- https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
- [6] GitHub - Adding a new SSH key to your account
- https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
