Reflections on design and development by Naiyer Asif

Recently published
Detecting a connection leak with Hikari
If a developer fails to close a database connection, it may never be returned to the connection pool. This leads to a connection leak which can throttle an app to a standstill. Learn a way to detect it using Hikari.
Client Credentials flow with Ory Hydra
Ory Hydra is an open source OpenID Connect Provider. It implements OAuth 2.0 Authorization Framework and the OpenID Connect Core 1.0 framework. It can issue OAuth 2.0 Access, Refresh, and ID tokens. Learn how to setup Hydra using Docker, create a client and test a Client Credentials flow.
Introduction to Problem Details
Describing problems in the software engineering is just as hard as naming things. The Problem Details specification proposes a standard way to convey the details when something goes wrong.
Microflash: Version 2
Introducing the redesign of this website. Here, I document the changes done, some website metrics and comparison with the old version, and the notable ‘behind the scenes’ changes.
Customizing Microsoft Office installation
I wanted a way to cherry-pick only the Office apps that I really needed to use and exclude everything else from the installation. Turns out there is a way to accomplish this.
Working with AWS on local using LocalStack
LocalStack is a container-based technology which brings a comprehensive set of AWS services on your local machine. It plays well with the official AWS CLI and SDK. Learn about how to setup LocalStack and use it with the AWS CLI.
Weaving aspects at compile-time with AspectJ
AspectJ manipulates Java bytecode at compile-time or load-time. The process is called weaving. Learn how to use compile-time weaving to log method entry and exit in Java.
Creating deep copies in Java
There are no built-in mechanisms to create deep copies of an object in Java. You can implement the Cloneable interface in your class and override the clone() method. Or, you can use some ways to do this described in this post.
Converting TTF files to WOFF and WOFF2
I usually rely on woff2 and woff formats to load webfonts. However, a font was available only in TTF format. Learn how I converted the TTF files locally without uploading the original files.
Content negotiation in Spring Boot
You might be required to provide the response in different formats depending on the client. One might accept JSON while the other can only work with XML. Learn how to handle this with Spring Boot.
Java-based health check for Docker
When you launch a container, Docker maintains its status as it transitions between several states. These states are tracked through the server events. Learn how to customize this behavior to more accurately provide health status of a Java application running on Tomcat.
Browse more ⟶