foojay

Ensuring the right usage of Java 21 new features

Last September 2023 a new version of Java was released as the latest LTS (Long Time Support). This 21st version brought lots of new features that will improve performance and clarity in our code base. But taking advantage of these changes and new features, which we are not used to including in our code, can be a tough task. Also, …

Read More »

Calling Gemma with Ollama, TestContainers, and LangChain4j

Lately, for my Generative AI powered Java apps, I’ve used the Gemini multimodal large language model from Google. But there’s also Gemma, its little sister model. Gemma is a family of lightweight, state-of-the-art open models built from the same research and technology used to create the Gemini models. Gemma is available in two sizes: 2B and 7B. Its weights are …

Read More »

Effective cloud-native Java app development with Open Liberty in IntelliJ IDEA

See how you can use Liberty Tools for IntelliJ IDEA to enable rapid, easy, and efficient development of cloud-native Java applications with Open Liberty and WebSphere Liberty When it comes to integrated development environments, within the Java community, IntelliJ IDEA is the most popular IDE amongst professional developers. It is the preferred IDE of choice by two-fifths of developers, making …

Read More »

Search in Documentation with a JavaFX Chat LangChain4j Application

At the Fosdem conference in Brussels on February 3rd, I gave a presentation about using an existing documentation set as the data for a ChatGPT-like application, created with JavaFX and LangChain4J. The video and links of that presentation are available here, and this post is a more detailed explanation of that application. What is LangChain4j The goal of LangChain4j is …

Read More »

12 Text Tools For Developers

As developer, you would think we would spend all our time in an IDE doing development. The reality is a bit different. We may need to analyze logs, test our web services, generate test data, do security tests, analyze data in the database, and so on. Text processing os also part of a developer job. Let’s see a few free …

Read More »

Java on Raspberry Pi 5 with Pi4J

In October 2023, Raspberry Pi announced version 5 of its affordable single-board computer with 4GB (60$) or 8GB (80$) of memory. Soon after the first boards were delivered, it turned out the Pi4J library wasn’t compatible with this new board. Pi4J is a library to create Java applications for the Raspberry Pi that can interact with electronic components through the …

Read More »

Debugging Streams with Peek

Table of Contents Understanding Java Streams A Simple Stream Example What is the peek() Method? Debugging with peek() Uncovering Common Bugs with peek() Filtering Issues Large Data Sets Addressing Side Effects Limitations and Pitfalls Potential for Misuse in Production Code Performance Overhead Side Effects and Functional Purity The Right Tool for the Job Navigating the Pitfalls Final Thoughts I blogged …

Read More »

How to Detect Cache Misses Using Observability

All of us know about caching in system design and software architecture, It is applicable everywhere in the computer industry, even in hardware. Caching is a quick and shortcut solution to improve performance, of course, we need to be careful of using the cache, misusing the cache can directly affect the system’s consistency. In this article, we will learn about …

Read More »

Changes Included in Release 24.02 of Azul Zing Builds of OpenJDK

Azul Platform Prime is a Java platform with a modern, TCK-compliant JVM, Azul Zing, based on OpenJDK. Zing provides low, consistent response latency of your Java workloads, higher total throughput and carrying capacity, faster warm-up, and infrastructure savings, achieved thanks to the C4 pauseless garbage collector, Falcon JIT compiler and other technologies created by Azul. Zing Builds are available in …

Read More »

Records for Cleaner and More Expressive Parameterized Tests in JUnit 5

Introduction:  Parameterized testing in JUnit 5 is a potent technique for executing the same test logic with various inputs. While you can use a variety of data structures, such as custom classes, arrays, or collections, Java records offer a compelling advantage in readability, type safety, and expressiveness. Let’s examine how to leverage Java records for parameterized tests through a concrete …

Read More »