Why? There are several reasons why you’d want to squash the database migrations in your Ruby on Rails application:
In a long running project you may end up with hundreds of …
[Read more]
Understanding a Postgres query plan
A query plan is a sequence of steps used by a database to access data. Being able to read a query plan is key to understanding the performance of an SQL query. While tuning a query …
[Read more]
Database integration tests for a Spring application
Suppose you are tasked with writing tests for a Spring and Hibernate application. This application uses a mix of native queries, HQL or entity associations to fetch data from the …
[Read more]
The small pleasures of programming
It’s not just pulling off a complex engineering feat that makes programmers love their jobs. There are small pleasures to be had even in your day to day tasks, if you look for …
[Read more]
Representing natural numbers in lambda calculus
One of the joys of reading SICP is that apart from the main subject matter, we come across many tangential topics that are interesting in their own right. One such topic is …
[Read more]
Using thread dumps to analyse deadlocks
In a multi-threaded Java application, a deadlock occurs when two threads wait forever attempting to acquire locks that are held by each other. Here’s a simple example to simulate a …
[Read more]
Setting up a JavaScript project in 2017
Creating a front-end JavaScript project can be a daunting task due to the sheer volume of choices available while deciding the tech stack. First, you need to decide the JavaScript …
[Read more]
Hystrix – a simple use case
Hystrix is a fault tolerance library that is very useful for managing failures in a distributed environment like microservices. Suppose we have a service A dependent on service B, …
[Read more]
Running time intensive operations in parallel with RxJava Observables
Recently I delved into the RxJava library. In this post I will demonstrate how RxJava Observables can be used to execute two long running tasks in parallel, so as to reduce their …
[Read more]
In case of any query, revert back to me
If you have ever worked in an office in India, you would have encountered the phrase “revert back” at the end of official emails. When people ask you to “revert back”, …
[Read more]