Pankaj Tanwar

Blog. ✍️

The archive of everything I've written.

July 15, 2024
––– views

I turned my 10 year old tablet into a digital photo frame, displaying google photos album. 🌴

Last weekend, I built a digital photo frame, from my a-decade-old tablet. It cycles through photos from a shared Google Photos album, switching up the display every hour.

December 17, 2023
––– views

I built a gnome shell extension to show how much my day, month, year and life has passed.

last night, Inspired by the concept of "Memento Mori", I built a Linux gnome shell extension which shows how much day, month, year,my life has passed, in menu bar.

August 22, 2022
––– views

Top 3 USELESS JavaScript interview questions 🤮

I recently went through the roller-coaster trip that every corporate buddy goes through, THE JOB HUNTING. I'm going to list down the top 3 WORST Javascript real interview questions that that made me just walk out of the interview.

June 12, 2022
––– views

How redis expires keys? A dive into how TTL works internally in Redis. 🌊

Redis is one of the super-cool pieces of software that I've always admired. Recently, I got curious about the algorithm behind expiring keys in Redis. I've used the TTL feature in Redis, quite a lot but never digged deeper to understand the concept behind it.

April 8, 2022
––– views

I quit my job, built 8 freelance projects at a time, and made good money but… lost happiness💡

3 months back, I quit my job, without much of a plan on what to do next. So, here is my experience so far.

March 9, 2022
––– views

I built a file upload service without any external library, just pure JavaScript 🤖

Build a file upload service with vanilla JavaScript from scratch with a method that requires no npms and no dependencies.

February 5, 2022
––– views

How I built a real-time blog view counter with NextJs and Firebase 👨‍💻

I wanted to build a simple, free solution for tracking blog post views (with lazyload) on my website for better accuracy and privacy for the readers. This blog is a documentation of my journey to build this solution using NextJs + firebase and deploy it for absolutely free.

January 22, 2022
––– views

Pagination with Cassandra - let’s deal with paging large queries in python 🐍

Pagination in Cassandra is one of the hair-pulling problems. Sometime back, I encountered a use case where I had to implement pagination in Cassandra. But my happiness got vanished when I found, there is no such thing as LIMIT, OFFSET and BETWEEN in Cassandra at all.

January 7, 2022
––– views

Counting my contributions to a git repo 💻

Recently, I resigned from my position as a software engineer to try out a different path. My crooked mind didn't let me enjoy the notice period and started wondering, exactly how many commits or lines of code I contributed while working here for the last 1 year.

January 7, 2022
––– views

I resigned.... what's next? 🚀

Recently, I resigned from my position as a Software engineer at without much of a plan on what to do next. Figured out, the new year is a good time to talk about this.

December 29, 2021
––– views

A directory is not a folder.

I started using computers with Windows and later switched to Linux. I didn't even realize my transition from using the term folder to directory. Yesterday, my crooked mind tricked me to research why folders are called directories in Linux.

August 31, 2021
––– views

Prevent duplicate cron job running.

Today, while working on an in-house project, I encountered a really interesting concurrency problem. I have scheduled a cron job to run every 30 minutes, but if the script takes more than 30 minutes to finish, another cron job started and these jobs started stacking up over each other. This essay discusses my approach to get rid of this interesting issue.

August 29, 2021
––– views

3% Formula to invest in yourself.

If you want to grow, you need to invest in yourself

July 16, 2021
––– views

What is latency? Let’s deep dive & understand possible ways to optimise it.

Latency is yet another, a very important topic when we talk about backend engineering or networking. In this article, we will be discussing latency, it's importance and ways to optimise it in order to improve application performance.

June 30, 2021
––– views

Introducing - Share & explore personal resources at one place!

The Web is crowded. So, I asked engineers from Google, Facebook, Uber etc to share their personal resources and built

June 20, 2021
––– views

What is the sorting algorithm behind ORDER BY query in MySQL?

Since the last couple of weeks, I have been working on MySQL more closely. MySQL is a brilliant piece of software. I remember reading about all the sorting algorithms in college so I was curious to know which algorithm MySQL uses and how ORDER BY query works internally in such an efficient manner.

May 30, 2021
––– views

Have you ever thought, how ‘nodemon’ works internally? Let’s build our own ‘nodemon’ in under 10 minutes!

If you have ever worked with Node.Js, you must have used a package called nodemon for development.But, have you ever thought about how it works internally? How would you proceed if you are asked to build a nodemon clone?

May 21, 2021
––– views

Do you know 0.1 + 0.2 ≠ 0.3 in JavaScript? Here is why!

It’s been a while since I have been working with JavaScript. Yesterday, I experienced a very strange behaviour - console.log(0.2 + 0.1) // 0.30000000000000004

May 15, 2021
––– views

The basics you need to know about Kafka [Graphic Explanation Ahead 🖥️]

Welcome to my Apache Kafka series. In this series, we will be, one by one covering, (with the help of interactive & friendly graphics) from the basic terminology to deep diving into the brilliant architecture behind the wonderful piece of software, Kafka.

April 29, 2021
––– views

How to implement WhatsApp like End-to-end encryption?

One of the WhatsApp key feature is end to end encryption of messages. In this article, we will quickly understand a simple implementation of WhatsApp like end to end message encryption.

April 23, 2021
––– views

Interesting analogy to understand synchronous, callback, and async-await (promises) approach like I am 10 Y Kid 🧒

Let's quickly understand the difference between synchronous, callback, and async-await (promises) approach like a 10 Year old Kid.

April 20, 2021
––– views

How does Github store millions of repo and billions of files?

Let's find out the architecture behind Github - world's largest code hosting platforms for collaboration and version control, storing millions of repo and billions of files.

April 17, 2021
––– views

How Instagram computes real-time trending hashtags ?

Instagram has built a brilliant system in-house, to parse ~85M new photos and 700M hashtags everyday from over 500M users to compute realtime trending content. In this article, we will deep dive into how Instagram approached identifying, ranking and presenting the best trending hashtags realtime in the Instagram app.

April 10, 2021
––– views

System Design - How to design Google Drive / Dropbox (a cloud file storage service)?

Let's design a highly scalable file upload & sharing service.

March 31, 2021
––– views

How database indexing actually works internally?

An illustrated guide, to help you understand how exactly database indexing works internally!

March 24, 2021
––– views

Proxy vs Reverse Proxy - using a real life example!

I am sure, you must have heard of Proxy and reverse proxy server. This is a very important topic, when we talk about backend engineering & computer networking. Some times it's very confusing to find the exact difference between both of them.

March 15, 2021
––– views

System Design - Is client side load balancing a good idea?

Client side load balancing is a barely touched area while designing systems. Is client side load balancing, a good idea?

March 8, 2021
––– views

Scalability Challenge - How to remove duplicates in a large data set (~100M) ?

Dealing with large datasets is often daunting. With limited computing resources, particularly memory, it can be challenging to perform even basic tasks like counting distinct elements, membership check, & filtering duplicate elements.

February 26, 2021
––– views

How Twitter stores 500M tweets a day?

Twitter handles close to 500M tweets per day. Let's deep dive into the architecture behind storage engines at twitter.

February 18, 2021
––– views

Generating unique IDs in a distributed environment at high scale.

At a high scale, generating unique IDs is a really intresting system design problem to solve. Let's deep dive into possible methods with their pros and cons.

February 13, 2021
––– views

My journey - from python scripts to 20+ freelance full stack projects.

Here is my journey from writing python scripts to a freelance full stack developer.

January 12, 2021
––– views

Convert number to Indian format number using Javascript.

Different countries have different conventions to display monetary values. Likewise, India follow Indian numbering convention. Let's checkout quickly, how to convert number to indian format number.

January 10, 2021
––– views

Advantages & disadvantages of declaring JavaScript functions inside objects.

Few days back, one of my friends was asked this question in his JS developer interview. There are several methods & coding techniques to write JavaScript functions.

January 10, 2021
––– views

Explain Microservices like I am 10.

Microservice architecture explained in the simplest way possible to understand by a 10 year kid

January 10, 2021
––– views

Possible ways to iterate a string in JavaScript.

JavaScript is a commonly used language. Let's see some really intresting methods to iterate a string in JavaScript.