Implement a new JStall Feature with Me

Or: How I use GitHub Copilot to go from feature to idea

A few weeks back, I introduced you to jstall (Quickly Inspect your Java Application with JStall), a tool that analyses what your JVM is currently doing. This week is the first time I’m bringing you in on the development and letting you peek behind the curtains to see how I go from idea to implemented feature. The feature I’ll implement the jvm-support analysis that checks that the JVM running your application is not outdated.

This is the first time I recorded my development process, so I hope you still liked it.

See you on another day for something command-line parser- or redaction-related.

This blog post is part of my work in the SapMachine team at SAP, making profiling easier for everyone.

The Java Version Quiz

Over the last 30 years, Java has added many features, including generics, lambdas, pattern matching, and records. You surely know that lambdas have been introduced in Java eight and records in Java 16, but can you distinguish the other Java versions?

I felt I couldn’t, so I created a tiny little Java game: The Java Version Quiz. In this quiz, you get a Java snippet and have to decide between five different Java versions. Pick the smallest Java version where the snippet is valid code (without using preview features).

The screenshot shows the alpha version of the game, which includes features introduced in Java 1.0alpha2 and 1.0alpha3, including bug fixes. A game version for only the nerdiest of Java connaisseurs. Source is a dump of the alpha2 and alpha3 packages on GitHub.

The game focuses on Java language differences and major runtime differences, which are easy to check without semantic analysis. It’s a by-product of another fun little project.

I hope you learn some new features of Java and discover that it is evolving over the years, while still keeping the syntax similar enough that it’s hard to spot the differences between versions. And if you’re unsure what a specific feature in the shown code snippet is, the quiz gives you a handy description.

If you find any issues or have new code examples, feel free to contribute to the quiz on GitHub.

See you in another week for another blog post on something JFR-related.