~/devreads

Arpit Bhayani

https://arpitbhayani.me · 168 posts · history since 2016 · active

1 Jun

1 min read

Every AI workflow is a dependency problem. You have steps that produce outputs, other steps that consume those outputs, and a hard constraint: consumers cannot run before their producers finish. Get the order wrong and you read stale data, call a tool with missing context, or trigger an agent before its inputs are ready.

20 May

1 min read

If you have ever taped together a cron job, message queue, a database table for state, and a retry loop - only to watch the whole thing break during a network blip at 2am - you already understand the problem Temporal solves. The fix you built was a workflow engine. Temporal is workflow engine done right.

15 May

1 min read

Most of us build RAG the same way: follow a tutorial that embeds a handful of PDFs, stores the vectors in a local Chroma instance, and chains everything together with LangChain (if that's still a thing). The demo works. The answer looks reasonable. Then you take it to production and it falls apart in quiet, hard-to-diagnose ways.

13 May

1 min read

Role tagging is not cosmetic. It shapes how the model responds, how context is managed across multiple turns, and how application developers constrain and direct model behaviour at a structural level. Understanding this format is the difference between using an LLM and building reliably on top of one.

12 May

1 min read

If you have used ChatGPT, Gemini, or Claude, you have already formed an intuition about what these systems do. You type something in, and text comes back that feels coherent, knowledgeable, and sometimes eerily human. But the machinery underneath is simultaneously simpler and stranger than most people expect.

28 Apr

1 min read

You have a monolith, and you are proud of it. One repo, one deployment, one database - no Kubernetes, no service mesh. You have watched teams burn months “extracting microservices” and come out slower than when they started. You stayed sensible. You kept the monolith.

8 Mar

1 min read

There is an implicit contract at the foundation of every database architecture decision you have ever made. You probably never wrote it down. Nobody does. It just… existed.

4 Mar

1 min read

There is a particular kind of respect reserved in engineering for the algorithm that outlives its era. BM25 is one of them. BM25 was born out of information retrieval research in the 1970s and 1980s, polished over decades, and eventually adopted as the default ranking function in Elasticsearch, Solr, and Lucene.

24 Feb

1 min read

When you write a SQL query with a JOIN clause, you probably do not think much about what happens next. You just expect the database to return the right rows. But this simple keyword forces your database to make one of the most consequential decisions a query planner makes: which join algorithm should it use?

9 Feb

1 min read

We all vent at work. That is normal. Tough sprints, messy decisions, frustrating meetings - it happens, and letting off steam is okay and, in fact, healthy.

8 Feb

1 min read

That is the half-life of knowledge in computer science and software engineering - the time it takes for half of what you know to be replaced by better tools, approaches, or understanding. For an engineering degree earned in 1930, the half-life was roughly 35 years. By 1960, it had dropped to about a decade.

27 Jan

1 min read

Distributed databases face an interesting challenge: how do you ensure that multiple servers scattered across different machines, data centers, or even continents agree on the order and outcome of database transactions? This is where consensus algorithms come into play.

16 Jan

1 min read

MySQL replication enables data synchronization across databases, powering read scaling and even some complex distributed architectures. At the core lies the binary log (binlog), which is the authoritative record of all data modifications on a source server.

29 Dec 2025

1 min read

A Bloom filter is a probabilistic data structure that answers a very specific question - have I seen this thing before? - while using almost no memory.

23 Dec 2025

13 Dec 2025

1 min read

Partitions sit right in the middle of how Kafka works. They define ordering, parallelism, and how far it can scale. But what actually happens when you need more of them? How does Kafka grow that number, what happens to the data you already have, and which guarantees stay intact after the change?

7 Dec 2025

1 min read

Recommendation engines, image retrieval platforms, document matching services, and RAG pipelines all rely on finding the nearest neighbors to a given query vector in high-dimensional space. This is where vector similarity search comes in.

26 Nov 2025

1 min read

At the core of the attention mechanism in LLMs are three matrices: Query, Key, and Value. These matrices are how transformers actually pay attention to different parts of the input. In this write-up, we will go through the construction of these matrices from the ground up.

24 Nov 2025

22 Nov 2025

1 min read

When you enter a prompt into an LLM, the model converts your text into numbers, processes them, and returns a response one token at a time. In this article, we go through the journey of LLM inference and see how it works.

14 Nov 2025

1 min read

Concurrent programming is one of the most interesting and challenging aspects of software engineering. When multiple goroutines need to share data, coordinating access becomes critical.

12 Nov 2025

1 min read

In distributed systems, one of the fundamental challenges is knowing whether a node or service is alive and functioning properly. Unlike monolithic applications, where everything runs in a single process, distributed systems span multiple machines, networks, and data centers. This becomes even glaring when the nodes are geographically separated. This is where heartbeat mechanisms come into play.

20 Oct 2025

1 min read

Apache Cassandra is a distributed database designed for high availability and horizontal scalability. This write-up explores the complete write path in Cassandra, from the moment a client sends a write request to how data gets replicated across nodes in the cluster.

17 Oct 2025

1 min read

One of the most fundamental design decisions in Redis replication is that it's push-based rather than pull-based. This means the master (or primary) actively sends data to replicas, rather than replicas polling the master for updates.

5 Oct 2025

1 min read

We've all dealt with that colleague who dominates the room, dismisses ideas, and acts like the smartest person there. That's arrogance, but it doesn't have to ruin your day...

2 Oct 2025

1 min read

Content Delivery Networks (CDNs) content replication is far more nuanced than most engineers realize. Let's dive deep into how CDNs actually replicate, distribute, and manage content across their global networks.

29 Sept 2025

1 min read

You will notice processes, tools, or practices that feel inefficient, outdated, or even wrong. Maybe the team uses Jira instead of Linear, Java instead of Go, MongoDB instead of MySQL (for a use case), or Tabs instead of Spaces. It will be tempting to point it all out immediately. Resist that urge.

25 Sept 2025

1 min read

Emotional outbursts are natural. I've been there too, and I've seen teams struggle because of it. We all have moments when the pressure gets too much, and emotions spill out.

24 Sept 2025

1 min read

When Google introduced gRPC in 2015, one of the most significant architectural decisions was building it on top of HTTP/2 rather than the widely adopted HTTP/1.1. This was just about following some trend, but a deliberate choice that fundamentally shapes how gRPC performs and behaves.

22 Sept 2025

1 min read

We've all been in meetings where no one really knows why they're there or what's about to happen. Always attach an agenda doc or at least a clear description when you schedule a meeting.

18 Sept 2025

1 min read

I follow a simple flow of questions that helps me stay focused, improve consistently, and make incremental impact at workplace. I'm never running around like a headless chicken. Here are the questions I ask myself, and answer honestly, like really true to its core

13 Sept 2025

1 min read

Frequent job switches can be great for short-term financial gains. I believed that early in my career as well, but here’s what I’ve learnt over the years.

8 Sept 2025

1 min read

Yes, higher compensation means you won't have as many options to choose from, but fewer does not mean none. As long as you can demonstrate measurable impact, there will always be opportunities at every compensation level.

6 Sept 2025

1 min read

Everything we interact with today is a "distributed system". From microservices to cloud-native applications, from databases to message queues. We are constantly building systems that span multiple machines. But there comes a fundamental challenge - how do we ensure that all independent nodes agree on shared state?

5 Sept 2025

1 min read

Database deadlocks are one of the most challenging concurrency issues encountered in production systems. Understanding why they occur and how databases handle them is important in building robust applications.

4 Sept 2025

1 min read

While we write code thinking about algorithms and data structures, the CPU is quietly making millions of decisions about what data to keep close and what to evict from its precious cache memory.

3 Sept 2025

1 min read

While strong consistency might seem like the obvious choice - given it keeps the data perfectly synchronized at all times - the reality is that eventual consistency has become the preferred approach for most large-scale distributed systems. But why so...

2 Sept 2025

1 min read

DNS is one of the most critical pieces of internet infrastructure, quietly translating human-readable domain names into IP addresses billions of times per day.

1 Sept 2025

1 min read

If you're aiming for research, go for a top school and squeeze every drop of value. If you want to switch domains or countries but can't break in otherwise (via job switches), a master's can help bridge that gap. But, doing it just because it feels like the “next step” is usually not worth it.

29 Jul 2025

1 min read

Remember, your job is to solve a problem, not just write code. You are not a code monkey who just hammers the keyboard. You are on a journey to build something that millions use, and for that, you have to

21 Jul 2025

1 min read

Mentoring someone is one of the most satisfying ways to share what you've learned and see someone grow because of it, but doing it well is what makes the difference.

14 Jul 2025

1 min read

If you have more than 5 years of experience, always keep a few small projects ready on the back burner. These are ideas you can pick up and run with at any time.

30 Jun 2025

1 min read

When participating in conversations, meetings, or discussions, we're often very confident in what we're saying and the points we're putting forward. But pause for a moment and ask yourself - do you truly know, or are you assuming, vaguely remembering, or guessing with confidence?

23 Jun 2025

1 min read

Dependable always beats the brilliant; if people can't count on you, nothing else matters.

16 Jun 2025

1 min read

If you are known for owning outcomes and driving results, leadership will trust you with higher-stakes work because the most important projects go to those who get things done.

10 Jun 2025

2 Jun 2025

1 min read

Say you have an idea, something that could change your company's or product's trajectory and fast-track your career growth. What do you do?

26 May 2025

1 min read

Beyond a point, your reputation determines how high you will go in the career ladder. And it takes months, sometimes years, to build one that truly matters.

22 May 2025

1 min read

We often focus on the wrong problem when asking for help. Instead of describing what we actually want to achieve, we end up asking about a side issue, i.e., instead of asking about X, we end up asking about Y. Let me explain...

19 May 2025

16 May 2025

1 min read

Chasing promotions is important, but it shouldn't consume all your energy. Even if it's your main focus, that's okay. Just make sure you're also growing, doing work you're proud of, and finding peace in what you do.

12 May 2025

1 min read

Once you're in the system and thinking deeply, you'll start to notice inefficiencies and gaps. You might see decisions being made that feel wrong. But instead of putting your point across bluntly, it's important to raise it thoughtfully.

23 Apr 2025

1 min read

The best engineers ask for help early and often. We all have blind spots - technical, architectural, and just plain human.

14 Apr 2025

1 min read

Don't be a nitpicker! Learn when to let small mistakes slide and build a positive team culture. Kindness drives progress, not constant correction.

9 Apr 2025

1 min read

If there's one underrated superpower at work, it's giving credit - generously, and often. When your teammate goes out of their way to help, contributes meaningfully, or quietly ships something excellent, take a moment to recognize it, publicly.

24 Mar 2025

1 min read

Of course, soft skills matter, but which ones? In my opinion, every engineer should be better at these two: active listening and clear communication.

21 Mar 2025

1 min read

Don't just listen, experience! Form opinions based on firsthand understanding. Real impact in work and life demands seeing the full picture.

18 Mar 2025

10 Mar 2025

1 min read

A worklog is just a set of things you did grouped by the day. I have been doing this for the last 12 years, and it has been extremely helpful.

6 Mar 2025

1 min read

Instead of sweeping failures under the rug, own them. When we try to hide our mistakes, we miss out on growth opportunities. Owning up to what went wrong is the first step toward becoming a better engineer.

1 min read

Learn to own your failures as an engineer. Reflect, take responsibility, and grow from mistakes to build a stronger career.

4 Mar 2025

1 min read

We all encounter issues and blockers, and it's inevitable, but how well we respond to them says a lot about our effectiveness and efficiency. So, when you face a problem

25 Feb 2025

1 min read

Temporary fixes can become permanent problems. Invest in quality code now to save yourself (or others) headaches later. Ship it right!

18 Feb 2025

1 min read

Interviews are unfair and will remain so, no matter how hard we try they can never evaluate people 100% objectively with clear measurables; and the intuition and gut feel of the interviewer will always add a small bias.

11 Feb 2025

7 Feb 2025

1 min read

Craft effective engineering OKRs with this practical guide. Learn best practices, avoid common pitfalls, and drive team alignment.

4 Feb 2025

1 min read

At your workplace, keep people informed. Driving a project or working on an individual item, you should always keep the people informed about - progress, clarity, and timeline.

29 Jan 2025

1 min read

Prototypes are not only great for learning concepts better, but they are also great for doing highly reliable project estimations. Here's how ...

13 Jan 2025

1 min read

Working with people is hard, but making them prioritize your work is even harder. Hence, one of the key skills you have to build is getting things done by others.

7 Jan 2025

12 Dec 2024

11 Dec 2024

10 Dec 2024

1 min read

With the tech moving and evolving so fast, every few years, evaluate the work you are doing vs what the world is doing. Do not let the gap widen.

19 Oct 2024

1 min read

Is it time for a career change? Use the 3P formula (Paisa, Power, Position) to evaluate your job and unlock your career growth potential.

2 Oct 2024

15 Sept 2024

3 Sept 2024

28 Aug 2024

26 Aug 2024

21 Aug 2024

13 Aug 2024

12 Aug 2024

1 min read

Don't let roadmaps limit your growth! Explore beyond the plan to deepen your understanding, boost adaptability, and truly excel as an engineer.

6 Aug 2024

31 Jul 2024

1 min read

Don't bad-mouth ex-employers in job interviews! Learn why it hurts your chances and how to discuss past roles professionally and positively.

29 Jul 2024

1 min read

Ace your tech interview! Learn how to demonstrate culture fit alongside your skills to land your dream engineering role.

23 Jul 2024

1 min read

Stand out with your resume! Learn how to quantify your engineering achievements and showcase your impact with simple, effective templates.

15 Jul 2024

8 Jul 2024

1 min read

Ace your interview! Discover 7 smart questions to ask the interviewer & gain valuable insights into the company culture and role.

1 Jul 2024

1 min read

Build trust & collaborate effectively! 3 simple rules I used leading engineering teams to foster ownership, execution & better teamwork.

20 Jun 2024

17 Jun 2024

10 Jun 2024

29 May 2024

27 May 2024

1 min read

Become a generalist engineer early in your career to build a strong foundation, then specialize later for expertise and impact. Learn how!

21 May 2024

1 min read

LLMs summarize well, but summaries hinder deep learning. For engineers, relying solely on them creates a surface-level understanding.

6 May 2024

27 Mar 2024

1 min read

Don't let inflated titles fool you! Focus on building real skills & impact for lasting career growth in software engineering.

11 Mar 2024

1 min read

Level up your engineering career! Learn how to generate innovative project ideas and become a proactive problem-solver.

15 Jan 2024

16 Nov 2023

1 min read

Stuck as a software engineer? Learn practical strategies to get unblocked, improve problem-solving, and boost your productivity.

7 Mar 2022

21 Feb 2022

1 min read

Explore LFSRs, a simple & efficient pseudorandom number generator widely used in microcontrollers. Learn how they work with code examples.

7 Feb 2022

31 Jan 2022

24 Jan 2022

16 Jan 2022

1 min read

Explore leaderless replication - a fault-tolerant, strongly consistent data replication strategy. Learn how it works and its benefits.

3 Jan 2022

1 min read

Explore conflict resolution strategies in multi-master databases. Learn to handle conflicts with unique IDs, database precedence, & custom logic.

28 Nov 2021

3 Nov 2021

3 Oct 2021

22 Sept 2021

1 min read

Explore read-your-writes consistency in distributed systems. Learn how to solve replication lag with strategies like synchronous replication.

7 Sept 2021

15 Aug 2021

10 Aug 2021

7 Aug 2021

1 min read

Explore the Master-Replica architecture - how it scales reads, handles writes, and recovers from failures. Examples included!

19 Jul 2021

1 min read

Explore database durability, the "D" in ACID. Learn how databases ensure data survives failures & the role of transaction logs.

7 Jul 2021

1 min read

Dive into database isolation! Understand its importance in maintaining data integrity during concurrent transactions with real-world examples.

2 Jul 2021

1 min read

Understand Atomicity (the "A" in ACID) in databases, file systems, and hardware. Learn how it ensures data integrity and prevents partial updates.

1 min read

Understand database consistency (the "C" in ACID) and its importance. Learn how databases maintain data correctness through rules and constraints.

22 Jun 2021

1 min read

Explore common architectures in distributed systems, including client-server, 3-tier, n-tier, and peer-to-peer. Understand their characteristics and when to use each one for optimal system design.

17 Jun 2021

1 min read

Learn about the 8 common fallacies of distributed computing that can lead to critical system design flaws. Understand the realities of network reliability, latency, bandwidth, security, topology, administration, transport costs, and network homogeneity for building robust and scalable distributed systems.

9 Jun 2021

1 min read

Online Coding Platforms and Code Evaluators are susceptible to this attack as they accept raw code from the user and execute it. So, if you are building one, do ensure you are protected against it and infinite loops.

28 Apr 2021

19 Apr 2021

1 Apr 2021

15 Feb 2021

1 min read

Explore Fully Persistent Arrays - Understand how to implement arrays that preserve all previous versions, enabling auditing and historical access.

7 Feb 2021

1 min read

Explore persistent data structures - access historical versions, understand partial, full, and confluent persistence, and see real-world applications.

10 Jan 2021

1 min read

Explore Python's constant folding - how it optimizes code by evaluating expressions at compile time. Dive into CPython's elegant implementation.

20 Dec 2020

13 Dec 2020

6 Dec 2020

29 Nov 2020

22 Nov 2020

1 min read

Explore Israeli Queues, a unique priority queue variation where elements join friends already waiting! Learn how they optimize batch processing.

16 Nov 2020

1 min read

Explore procedural 1D terrain generation for games using Python. Learn techniques like interpolation and superposition for realistic landscapes.

8 Nov 2020

1 Nov 2020

23 Aug 2020

1 min read

Explore constant time LFU cache implementation using hash tables and doubly-linked lists. Learn how to achieve O(1) complexity!

2 Aug 2020

26 Jul 2020

19 Jul 2020

1 min read

Bitcask was introduced as the backend for a distributed database named Riak in which each node used to run one instance of Bitcask to hold the data that it was responsible for. In this essay, we take a detailed look into Bitcask, its design, and find the secret sauce that makes it so performant.

12 Jul 2020

1 min read

Explore Phi Accrual Failure Detection, an adaptive algorithm for detecting failures in distributed systems. Learn how it improves on heartbeats!

5 Jul 2020

1 min read

Unlock 10x engineer potential - Simplify complex problems, own your work, and prioritize business impact. Learn key traits for career growth.

1 min read

Crack repeating-key XOR ciphers! Learn how to find the key length using Hamming distance and frequency analysis in this crypto challenge.

21 Jun 2020

14 Jun 2020

1 min read

Dive into Python internals - Modify CPython to make integers iterable! Explore iterators, protocols, and why it's a bad idea.

7 Jun 2020

31 May 2020

24 May 2020

17 May 2020

10 May 2020

3 May 2020

26 Apr 2020

19 Apr 2020

12 Apr 2020

1 min read

Learn how to create a robust rating system using Bayesian Average to rank items effectively. Explore its advantages over arithmetic mean and cumulative ratings, and see how it can be applied using the MovieLens Dataset.

5 Apr 2020

10 Mar 2020

1 min read

Explore Inverse Document Frequency (IDF), a key concept in search & text mining. Learn how it quantifies term rarity and its connection to probability.

28 Feb 2020

1 min read

8 rituals to level up your programming skills! Learn how to code better, think faster, and build complex systems with these actionable tips.

21 Feb 2020

1 min read

Customize your Python interactive shell prompt! Learn how to personalize and format your `>>>` and `...` prompts.

14 Feb 2020

7 Feb 2020

31 Jan 2020

17 Jan 2020

1 min read

Explore image steganography - Hide secret messages within images! Learn techniques, from LSB substitution to JPEG methods.

10 Jan 2020

1 min read

Explore Python's arbitrary-precision integers! Learn how it handles large numbers internally, from storage to operations like addition.

3 Jan 2020

24 Mar 2017

23 Mar 2017

1 min read

Is MongoDB `skip` slow? Understand when & why `skip` impacts pagination performance. Learn efficient alternatives for large datasets.

22 Mar 2017

12 Apr 2016

1 min read

Explore HTTP messages by building a simple Python webserver and interacting with it using Netcat. See requests in action!