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]
Logging with Spring AOP
Aspect oriented programming (AOP) is a way of separating the business login in your code from cross cutting concerns. What is a cross cutting concern?
Analogy time. A typical house …
[Read more]
Memory profiling – simple examples
Recently I have been trying to learn different memory profiling tools to monitor Java applications. I have looked into the command line tools that are shipped as part of JDK like …
[Read more]
JPA Entity Relationships
In a relational database, the relationships between two tables are defined by foreign keys. Typically, one table has a column that contains the primary key of another table’s row. …
[Read more]
Introduction to jdb
jdb (Java Debugger) is a simple command-line debugger for Java classes that is provided as part of the JDK tools and utilities.
jdb is based on a server-client model. While …
[Read more]