Book Review: Deep Work

The author, Cal Newport, in the book Deep Work throws light on two types of work anyone can do: The whole book is about the importance of allocating more time from one’s work schedule to deep work and the strategies one can follow to increase their time allocation to deep work. He also discusses the … Read more

Unveiling the Magic of Java ServiceLoader API: Building Modular and Extensible Applications

In the vast realm of Java programming, developers are often faced with the challenge of creating modular, extensible, and maintainable applications. As software systems grow in complexity, the need to decouple components and facilitate dynamic plugin loading becomes paramount. This is where the Java ServiceLoader API shines, offering a robust and elegant solution for achieving … Read more

Gotcha: Using Apache Commons StringUtils.isNumeric

StringUtils java class in Apache commons library provides a method isNumeric to check if given sequence of characters contains digits only. But this is not a sure shot way to check for numbers because for a string containing decimal the StringUtils.isNumeric returns false as shown below: A better approach is to use NumberUtils.isCreatable which adopts … Read more

The correct way to do @Async in Java Spring based applications

Spring provides an annotation @Async to run tasks in a separate thread. In Spring boot applications we can enable asynchronous tasks by adding the annotation @EnableAsync to any of the Spring configuration class as shown below: Now that we have the application setup to support asynchronous tasks, let us go ahead and create a simple … Read more

Setting value of XSL parameter xsl:param in Saxon Java API

In one of my previous posts I showed you how to generate HTML from XML data using XSLT. At times you would need to pass certain parameters to the XSLT and use the value of that parameter in generating your content. In this post we will exactly do that. This will be our sample XML … Read more

Integrate with OpenAI(ChatGPT) Chat Completion API in Java using Webclient

In my previous post I showed how you can integrate with Completion API. The completion API doesnt support the ChatpGPT model. The ChatGPT model is supported in the Chat completion API. In this post we will look at integrating with this new API using WebClient. Below are the POJOs we will be using for parsing … Read more

Integrate with OpenAI(ChatGPT) Completion API in Java using WebClient

By now you all would have heard about OpenAI and played with its famous product ChatGPT. OpenAI also provides APIs which can be used to integrate features like text completion, code generation, image generation and chat completion in your applications. In this post I will show you how to make use of the Text completion … Read more

Book Review: Rework

Rework, authored by David Heinemeier Hansson(DHH) and Jason Fried, is a collection of business principles providing guidance at the individual as well as at the organizational level. The book has lots of advice for startups, those with an idea and still reluctant to implement it, and managers and individual contributors. The advice in the book … Read more

Book Review: Make Time

Make Time is a collection of tactics for getting the most important work done daily. It’s not about making your schedule super busy. It’s not about tactics for getting a lot of work done in a day. Instead, the authors stress on choosing 1 important work and giving that work uninterrupted time. I would say … Read more