The festive season is that period of the year when they tempt you to indulge in those dear sweet, sugary treats. Personally, as an Italian, I do love me some panettone. And as much as I enjoy the bitter taste of Java coffee, I have been enjoying the sugar that has been introduced … | Continue reading
Java 8 gave us Optional, a mighty weapon against the most frequent Exception in Java: NullPointerException. Unfortunately, Java 8 also brought new headaches regarding exceptions, as the default functional interfaces in Java 8 don’t declare throwing any checked exceptions. So ever … | Continue reading
You may have heard of a compiler analysis phase called escape analysis. I find that people often have a misunderstanding of what this optimisation really does and an under-appreciation of what it's capable of. We can know it better by seeing it working in practice. | Continue reading
Bringing the Live Programming experience from Squeak/Smalltalk to Visual Studio Code with GraalVM and the Language Server Protocol. | Continue reading
Project Loom is one of the major “projects” in which Java is moved forward, alongside the perhaps better known projects Amber and Valhalla. It will bring “virtual” threads with low resource footprint and low cost of blocking to the Java plaform. Here is my annual advent season up … | Continue reading
Exploring the performance improvements of new Inline Types Project Valhalla is one of the most interesting projects regarding the future of Java and of all JVM. It is still in an experimental state, but in this post we will look at how to try it, and we will implement a small pro … | Continue reading
While Java beginners quickly learn typing public static void main to run their applications, even seasoned developers often do not know about the JVM’s support of two additional entry points to a Java process: the premain and the agentmain methods. Both methods allow so-called Ja … | Continue reading
Testing is an important and intrinsic component of software. Tests are required to ensure quality and maintainability of code. Consider the code below and the tests associated with it. The code is straightforward and the tests also cover 100% of the lines of the code. Now let us … | Continue reading
Learn how to get started with using GraalVM for your Java projects. GraalVM gives you great peak performance and native-image can give your code incredible startup time and smaller memory overhead. | Continue reading
In my talk about the Security Manager, I demo a hack that takes advantage of the Attach API. The later requires to know about the PID of the JVM one wants to attach to. Because my good friend Evgeny Mandrikov couldn’t attend my talk at a recent conference, I did a quick private d … | Continue reading
You do want to get better. Work on amazing projects. Solve larger problems, even make more money and improve the world! So you learn new things. You study. You read books. You read blogs and watch YouTube videos. You follow tutorials and online courses. It all takes a lot of time … | Continue reading
Project Loom is one of the major “projects” in which Java is moved forward, alongside the perhaps better known projects Amber and Valhalla. It promises to bring lightweight/userland/virtual threads with low resource footprint and low cost of blocking. If blocking is cheap, then y … | Continue reading
The JVM Programming Advent Calendar | Continue reading
Today on the 7th of December, we’re going back to the future and do some Smalltalk with the GraalVM. | Continue reading
Problem Statement Even the most basic problems become interesting when you dig deep enough. Today, I would like to do a deep dive into measuring time in Java. We will start with the very basics of the Java API and gradually move lower in our stack: through the OpenJDK source code … | Continue reading
One major event that reverberated across the entire tech ecosystem was the 2018 introduction of GDPR, the General Data Protection Regulation for European Citizens. While it remains to be seen I this will or will not impact British citizens, it offers a positive opportunity for Ja … | Continue reading
Some performance benchmark of Kotlin with the old C2 and the brand new Graal JIT. Graal seems faster with kotlin idiomatic code but C2 knows a trick or two. | Continue reading
Docker is the de facto standard solution to containerise applications/(micro)services. If you run Java application you need to be aware of a few gotchas and tricks. If you don’t this post should still help you. | Continue reading