Java Articles by Foojay.io

July, 2024

  • 25 July

    Advanced URL Rewriting with Apache APISIX

    I spoke at Swiss PgDay in Switzerland in late June. The talk was about how to create a no-code API with the famous PostgreSQL database, the related PostgREST, and Apache APISIX, of course. I already wrote about the idea in a previous post. However, I wanted to improve it, if only slightly. PostgREST offers a powerful SELECT mechanism. To list …

    Read More »
  • 24 July

    Creating a Command Line Tool with JBang and PicoCLI to Generate Release Notes

    Lately, I have been playing with JBang and PicoCLI, and I am pretty amazed at what we can do with these tools. I needed to create a script that would go to a specified repository on GitHub, check the commit range, and verify if any tickets were associated with them. Additionally, I wanted to check if the ticket is accepted …

    Read More »
  • 22 July

    Effective Java Logging

    Effective Logging is an essential aspect of any Java application, providing insights into its operational state. It is especially crucial in production environments, where it aids in debugging, monitoring, and incident response. In this comprehensive guide, we will explore the effective practices for using SLF4J with Logback, ensuring a reliable and maintainable logging strategy. By following these best practices, developers …

    Read More »
  • 18 July

    Continuous Feedback Free Udemy Course: Additional Coupons Available

    We’ve added extra coupons for our free Continuous Feedback Udemy course! We’re glad to see it’s been valuable for some of you. Introduction to Continuous Feedback What do you know about the code changes that were just introduced into the codebase? When will you notice if something goes wrong? Continuous Feedback focuses on analyzing observability data, namely logs, traces, and …

    Read More »
  • 16 July

    New video series “JavaFX In Action”, Part 1

    JavaFX is a powerful user interface framework, often overlooked in the world of desktop applications development. With this new series of video interviews, I want to take you behind-the-scenes of some applications built using JavaFX. JavaFX combines the best features of a modern user interface toolkit with the unparalleled strength of the Java platform. This approach enables you to perform …

    Read More »
  • 11 July

    Structured Concurrency is More Than ShutdownOnFailure

    Since Java 21, structured concurrency has been added as a preview feature. Structured concurrency is a way to manage sub-tasks that are run in parallel within a given scope. If you’ve ever seen a presentation about structured concurrency, you’ve probably seen the use of the ShutdownOnSuccess or ShutdownOnFailure classes.These classes will stop the scope and the still running sub-tasks within …

    Read More »
  • 11 July

    Unsafe is Finally Going Away: Embracing Safer Memory Access with JEP 471

    Java, being a safe language, doesn’t usually allow direct low-level access. Memory is primarily managed on the heap, so developers don’t typically deal with memory directly. However, library developers are occasionally required to manipulate memory outside the heap for performance or specific use cases. This is where the controversial sun.misc.Unsafe comes in.  While undeniably powerful, sun.misc.Unsafe is a double-edged sword. …

    Read More »
  • 10 July

    Dynamic watermarking with imgproxy and Apache APISIX

    I described how to add a dynamic watermark to your images on the JVM. I didn’t find any library, so I had to develop the feature, or, more precisely, an embryo of a feature, by myself. Depending on your tech stack, you must search for an existing library or roll up your sleeves. For example, Rust offers such an out-of-the-box …

    Read More »
  • 10 July

    9 Best Java Profilers to Use in 2024

    In this article, I will share why my team decided to start a Java profiler, the list of profilers we found that are suited for profiling Java apps, and how to analyze the data from the profiler to draw conclusions faster. Recently, one of our team members was working on a third-party Linux application, and started encountering instances where he …

    Read More »
  • 9 July

    Dynamic watermarking on the JVM

    Displaying images on your website makes for an interesting problem: on one side, you want to make them publicly available; on the other, you want to protect them against undue use. The age-long method to achieve it is watermarking: A digital watermark is a kind of marker covertly embedded in a noise-tolerant signal such as audio, video or image data. …

    Read More »