Debugging as a Process of Isolating Assumptions

Debugging is an integral part of any software development process. It’s a systematic hunt for bugs and mistakes that may be hidden in the intricate lines of your code. Much like a hunter and its prey, it requires a precise method and a set of specific tools. Let’s delve deeper into the fascinating process of isolating assumptions to effectively debug …

Read More »

Introduction to the Tower Library

One of the components of my OpenTelemetry demo is a Rust application built with the Axum web framework. In its description, axum mentions: axum doesn’t have its own middleware system but instead uses tower::Service. This means axum gets timeouts, tracing, compression, authorization, and more, for free. It also enables you to share middleware with applications written using hyper or tonic. …

Read More »

Generate AI-based Images with Quarkus and OpenAI DALL.E

In this article, we explore how to integrate OpenAI API with Quarkus. We will create a Quarkus application using the new REST Client Reactive to invoke the OpenAI DALL.E API for images generation. OpenAI API Overview Before jumping into the code, let’s explore the OpenAI Create Image API and how it works. Create Image Request The body request is made …

Read More »

Testing and Local Development Made Simpler with Testcontainers Desktop App

Being able to release new features quickly is a must-have capability in today’s competitive world. In order to release your software quickly and often you should have CI/CD infrastructure that can automatically build, test, and release our software with minimal to no human intervention. A comprehensive automated test suite is the key to release your software with confidence. Testcontainers libraries …

Read More »

Is OpenJDK Just a Drop-In Replacement?

I don’t know anyone who is still using the Oracle JDK. It has been my recommendation for quite a while to just switch to an OpenJDK distribution as they are roughly drop-in replacements for Oracle’s official JDK. I’ve repeated that advice quite frequently but I guess I glossed over a lot of details that might be insignificant for hackers but …

Read More »

Taming the Bias: Unbiased Safepoint-Based Stack Walking

Walking only at safepoints has advantages. The main one is that you aren’t walking the stack in a signal handler but synchronously to the executed program. Therefore you can allocate memory, acquire locks and rematerialize virtual thread / Loom frames. The latter is significant because virtual threads are the new Java feature that cannot support using signal-handler-based APIs like AsyncGetCallTrace. …

Read More »

Thread-Safe Counter in Java: A Comprehensive Guide

In this tutorial, we will explore the concept of thread safety in Java, specifically focusing on a simple counter. We will start by understanding why a basic counter is not safe for multiple threads; then, we will progressively enhance its thread safety using different techniques such as synchronization, locks, Unsafe, VarHandle, and finally, AtomicInteger. We will be referencing the code …

Read More »

6 Considerations when Building High-Performance Java Microservices with EDA

Event-Driven Architecture (EDA) is a design principle focused on the creation, detection, and reaction to events. Renowned for its resilience and low latency, EDA is a reliable choice for developing robust, high-performing microservices. Moreover, this method can be helpful in improving productivity and making the process of cloud migration smoother. In this article we will outline 6 key considerations and …

Read More »

Pitest: Do You Test Your Tests?

What is Pitest? Pitest is a library that helps us do mutation testing. Mutation testing is a process in which random variations of the code under test are generated. Hence, our tests will run against variants of the code that we’re intending to test. If the test fails, the mutation is killed, if it still passes it lives. So in …

Read More »