• AI introduces many new terms, acronyms, and techniques you must understand to build a good AI-based system. That makes it hard for many Java developers to learn how to integrate AI into their applications using SpringAI, Langchain4J, or some other library. I ran into the same issue when I started learning about AI. In this…

  • Pagination is a common and easy approach to ensure that huge result sets don’t slow down your application. The idea is simple. Instead of fetching the entire result set, you only fetch the subset you want to show in the UI or process in your business code. When doing that, you can choose between 2…

  • Working with large language models often starts simple. You send a question and get a text response. That works fine if you show the answer to a user, but it becomes a problem when you want to process it in your business logic. Plain text is unstructured. Parsing it is an error-prone task, especially when…

  • Mapping enums with Jakarta Persistence looks simple at first. But the two traditional options, @Enumerated(EnumType.STRING) and @Enumerated(EnumType.ORDINAL), depend on internal enum details that can change over time. If you store the enum value as a String, you will have to migrate your data whenever you decide to rename a value. And if you store the…

  • Based on most discussions online and at conferences, there seem to be 2 kinds of projects that use Hibernate for their persistence layer: So, what’s the difference between these projects? Are the projects in the 2nd group more complex or have higher performance requirements? No, based on my consulting projects, that’s not the case. On…