Courtesy: https://www.baeldung.com/

Use Case Analysis

Assume you have a use case, where there’s an input of N numbers from the user and you need to fetch the results of an expensive mathematical function f(x) computed on those numbers and return any first K that finish first.

Further, the logic of computing the result of the expensive function is obtained through HTTP interactions with a remote service, say Math Service

The objective is to solve this with a minimal latency overhead.


Uber engineering blogs are a goldmine that provide solid insights into their architectures. There’s no doubt. Like all big tech firms, they take great pride in the quality of their content.

However, there’s something off about how the page is structured. Too much focus on sidebars, big sticky headers and misaligned content.

I find myself spending so much time perusing these blogs that I have gotten insanely triggered by the small nits that violate my user experience.

Default Mode

I developed an extension to help declutter this. It essentially addresses these problems in order. The results are self explanatory.


Image Courtesy: Atlassian Blogs

Pull request creation, review, comment redressal, re-review and LGTM process carve out a significant chunk of a developer’s bandwidth. There’s no denying the importance of this process. However, this can take time.
Let’s discuss how we can reduce the turnaround for the entire process.

For this article, let developer be the a person requesting a review and let peer / reviewer role correspond to the peer reviewing the developers’ pull request (although their roles may interchange on a different PR)

Pull Request Lifecycle

Broadly, a PR approval lifecycle can be summarised as follows:


Courtesy: https://bit.ly/38cWpbZ

We’ve all been there. For our pull requests (PRs), there’s this.

Hoping they safely make it through the barbaric eyes of a senior developer.
Hoping that we do not get nit picked on some “code” aspects by a pedant.
Hoping that we are only judged by the functional completeness of the task. Hoping that our 100 line diff will not garner more than a 1–2 comments.

The wishful thinking finally ends with this.


Debezium is a wonderful piece of technology. You can easily start a Debezium connector having followed the basic guide and lo and behold, you have events!

However, problems starts to appear when the environment around the initial happy path configuration changes which then breaks your connectors and the downstream consumers.

Here we’ll look at the following problems.

  • The database binlog rolls over and we were out of sync.
  • The entire database host changes along with its binlog,
  • You lose events for some reason.
  • You want to capture a new huge table in an existing connector
  • You introduce sudden schema changes…


This is a story about how I leveraged some of the Python’s lesser known capabilities to my advantage in solving a regular expression problem in a rather esoteric way (as we’ll see) on a popular coding platform called Hackerrank.

It’s been 5 years since and I think I can finally come out of the closet and reveal to the world what I did that day.

Year 2016, January. The 7th.

I was in the third year of my Computer Science undergrad when I came across the Regular Expresso challenge on Hackerrank. I found it intriguing that I had to solve…


Explore the various ways to tackle unoptimised MySQL queries.

Many times you’d like to profile the query that is being executed. This could be due to a myriad of reasons.

  • Current execution is latent and we need to optimize.
  • To figure out unused indexes or to determine if indexes are even potentially on the query path or not.
  • To figure out the query execution plans.
  • To profile the time taken for the queries at the server.

Slow Query Logs

If you are experiencing misbehaving or slow queries, first and foremost, the server should be set to log them. …


And how to make the most of them for non trivial use cases in production

Logs that are about to rotate
Logs that are about to rotate and topple

Logs are the lifeline of any non trivial application running on production. Any one who has been an on-call at their workplace can corroborate the significance of proper application logging when things go south at 3 AM.

For applications built atop the JAX-RS framework with an implementation such as Jersey, the solution is usually to register the Logging Feature with the environment. This works both on the client side and the server side.

environment.jersey().register(
new LoggingFeature(
Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME),
Level.INFO,
LoggingFeature.Verbosity.PAYLOAD_ANY,
1000
)
);

With this simple…


In this article, we continue our journey of building the support for Unit Of Work for JDBI in Dropwizard.

Having described how the Jdbi Handle Manager, Event listeners, Transaction Aspect and the resource layers work in liaison, we now turn our attention to the possible implementations for the handle manager.

Recall, the contract for a Jdbi Handle Manager.


In this article, we continue our journey of building the support for Unit Of Work for JDBI in Dropwizard.

Recall the plan that we were supposed to follow:

Aman Garg

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store