Formatting Java Instant for resolutions

I have had to look up how to format Java’s Instant with a given resolution - for example in microseconds or nanoseconds. After fiddling with various formatters, I was happy to finally get this right.

FreeBuilder plugin for IntelliJ

My work uses FreeBuilder extensively to generate the Builder pattern for Java classes. In addition to this, we use the generated Builder classes to deserialize the data calsses using Jackson. After a while it became tiresome to type @FreeBuilder and class Builder extends ... everywhere. So I decided to write and IntelliJ IDEA plugin that does it for me.

Command line clients for gRPC - polyglot

Polyglot was the second gRPC client that I looked at. One of the things that I liked about it is the fact that it does not need users to generate protoset files. It generates the protoset files in flight every time it runs. This, combined with the fact that it is written in Java does have a disadvantage - every time the client makes a call, it has to fire up a JVM, generate protosets and make the request.

Command line clients for gRPC - grpcurl

We are in the middle of considering replacing JSON over HTTP with gRPC for communication between our internal services. One of my concerns about this was how we would be able to debug and poke around things in a world where we will no longer be able to use cURL. I have been looking at cURL like command line utilities we can use to replace most of the capabilities, if not all of cURL. So far, I have looked at grpcurl, grpc_cli and polyglot .In these blog posts, we will try and compare these tools.

A Jackson and FreeBuilder quirk

Jackson is a great tool to have in your tool set if you deal with JSON or XML. It facilitates easy serialization and de-serialization to and from Java classes with a convenient annotation based interface. With the same set of annotations, we can achieve both XML and JSON serialization and de-serialization. With Jackson’s data-format-xml it is even possible to give the same Class a different JSON and XML representation.

Net::HTTP and the simplest of explanations

This blog post exists purely to remind myself that Ruby’s Net::HTTP expects a host and a port as parameters when creating a new connection and not a url string. This is a story about how many layers of abstractions and indirections one works through on a daily basis as a developer and the effort required to dive through these layers, all the while ignoring the simplest of explanations of why things may have gone wrong in the first place.

Python URL manipulation revisited

My last blog post about publishing standalone files to Nexus repositories prompted me to revisit URL manipulation in Python. When I did this the last time, I used Python stand library’s urlparse and it did the job. This time around, I needed to do a different kind of manipulation. Given a URL, I had to set credentials on it. I started at urlparse and soon realized that Python3 moved this module to urllib.

Uploading a standalone artifact to Nexus 3

This is one of those “I had to figure out how to do this today, so the next time I google this, I have a place to look” blog posts. Today, I had to upload a zip file as a build artifact to our Nexus 3 repository. The zip file had been generated by custom shell scripts that did not have a Maven, Ivy or Gradle projects to wrap them.

Implementing feature toggles for a Spring Boot application - Part 4

In the fourth part of this series about implementing feature toggles for a Spring Boot application, we will take a look at how our implementation so far introduced a dependency on the application being restarted for changes to take place.

Implementing feature toggles for a Spring Boot application - Part 3

In the third part of this series about implementing feature toggles for a Spring Boot application, we will take a look at exposing the state of feature flags as a Spring Boot management end point for monitoring and testing purposes.