The Notebook

Writing

Interview post-mortems, system-design deep dives, and the layer beneath the answer I gave. Everything here started as a real question I had to answer out loud.

All Posts29 posts

Algorithms & Problem SolvingAug 12, 2026

Array Replacement: The Difference-Array Trick, Explained From Scratch

A Codeforces Div. 2 D that looks brutal — replace a[i] with a[i-1] - a[i] + a[i+1] whenever its two neighbours share parity — turns out to be nothing but sorting. Here is the whole thought process: how the difference array collapses that formula into a single adjacent swap, why the parity gate becomes 'same parity', and why sorting each run ascending is provably optimal.

#competitive-programming#codeforces
19 min
System DesignJul 28, 2026

How Netflix, YouTube and Spotify Actually Recommend Things

A system design walkthrough of recommendation at scale — candidate generation, ranking, embeddings, the cold start problem, and why it's really a two-stage funnel.

#system-design#recommendations
17 min
System DesignJul 25, 2026

Everything That Breaks When You Scale (100M Transactions, 1M Queries a Second)

Idempotency, retries, state machines, backpressure, queue-based load levelling, and the failure modes nobody warns you about — explained without jargon.

#distributed-systems#scaling
19 min
Databases & NetworkingJul 22, 2026

What Is a 'Connection', Really? (Postgres, Kafka and Redis)

An interviewer asked me three times what a database connection actually is. I couldn't answer. Here's the real answer — sockets, file descriptors, backend processes — plus how pooling works and why Kafka and Redis are completely different.

#databases#kafka
17 min
Databases & NetworkingJul 19, 2026

How Postgres Actually Works (Explained Like You're New Here)

Pages, tuples, MVCC, xmin/xmax and WAL — explained with warehouses and sticky notes, plus the interview puzzle that catches almost everyone.

#postgres#databases
15 min
Language InternalsJul 16, 2026

What Does `lock.lock()` Actually Do? (All the Way Down to the CPU)

An interviewer asked what the lock function compiles into — 'ultimately, what zeros and ones?' I had no answer. Here's the whole chain: ReentrantLock, AQS, CAS, cache coherence, and futexes.

#java#concurrency
13 min
Language InternalsJul 13, 2026

Singletons, `static`, and the Question I Failed

Write me a database singleton that can never be null. I couldn't. Here's the answer, and everything about the static keyword that makes it work.

#java#design-patterns
12 min
Language InternalsJul 10, 2026

Java Streams and Lambdas, From Zero

What a lambda actually is, what a Stream actually is (it's not a collection), and the CSV question I fumbled in an interview — with all the code.

#java#streams
14 min
Language InternalsJul 7, 2026

What Is a hashCode, Really? (And Why My HashSet Let Duplicates In)

Buckets, linked lists, treeification, and the equals/hashCode contract — explained with the interview question I got wrong.

#java#collections
14 min
Language InternalsJul 4, 2026

Array vs ArrayList vs LinkedList (And What `List` Actually Is)

The interviewer asked twice about LinkedList's advantage, because the standard answer is incomplete. Here's the full one, including why ArrayList wins even when Big-O says it shouldn't.

#java#collections
12 min
Engineering & PracticeJun 29, 2026

Log-zilla: I Studied How Datadog and Sentry Work, Then Built My Own With Claude Agents

After deep-diving into Husky, NRDB, and Snuba, I shrank the same architecture down to something that runs on a laptop: a self-hosted log console that eats every localhost service's output. Here's the design, the trade-offs, and how a team of Claude agents wrote nearly all of it.

#observability#logging
12 min
Interview ExperiencesJun 23, 2026

From HashMap to RAG — What a 15-Minute Interview Taught Me About AI Search

A real interview question about cricket articles that started with a simple inverted-index answer and turned into a deep dive on retrieval-augmented generation, tool calling, MCP, and hash map internals. The question that looked like a trick was really testing how far I could think.

#interview#rag
6 min
Engineering & PracticeJun 18, 2026

Building a Blazing-Fast Kanban Board UI with IndexedDB

How I built a Kanban board that feels instant by pushing state into IndexedDB on the frontend and pairing it with a Linear-inspired sync engine on the backend. The architecture, the tradeoffs, and what I'd do differently.

#indexeddb#local-first
5 min
Interview ExperiencesJun 15, 2026

Rakuten Java Interview Experience

A detailed walkthrough of a Java-focused Rakuten interview round covering core Java, OOP, collections, Spring Boot, Hibernate, concurrency, and tricky language questions — with complete answers and code.

#interview#rakuten
12 min
Interview ExperiencesJun 8, 2026

HighLevel SDE-3 System Design Interview

A real SDE-3 system design round at HighLevel — designing a multi-tenant CRM backend. The questions asked, where the discussion went, and what the right answers look like.

#interview#highlevel
7 min
System DesignJun 4, 2026

How Datadog, New Relic and Sentry Ingest Trillions of Logs Without Falling Over

Every observability platform is secretly the same machine: an agent, a queue, a columnar store, and a query engine. A deep dive into how Datadog's Husky, New Relic's NRDB, and Sentry's Snuba actually work — push vs pull, consistency trade-offs, storage tiers, and the numbers that make interviewers nod.

#system-design#observability
21 min
Interview ExperiencesMay 17, 2026

Stripe Programming Round Interview Experience

A walkthrough of Stripe's programming round — from the take-home-style assessment to a live 60-minute problem-solving session built around a 3-part shipping-cost problem that scales from a simple min-sum into a full DP. With the full problem, my actual solutions, and the optimal ones.

#interview#stripe
10 min
Interview ExperiencesMar 16, 2026

Rippling Interview — AI-Powered Coding Round

A short writeup of Rippling's pipeline: a simple HackerRank assessment, then an AI-powered coding round where I built a corporate credit-card expense-policy engine end to end. The focus here is on how I ran the interview — nailing the entities and labels up front, talking through the design, and using AI to do most of the typing while I drove.

#interview#rippling
5 min
Interview ExperiencesMar 10, 2026

LLD Of a Crypto Wallet

A low-level design round from a well-known crypto company: design a multi-asset crypto wallet with correct, concurrency-safe transaction handling. Full Java design — project structure, entities, DTOs, controllers, services, a double-entry ledger, transaction state machine, idempotency, and concurrency control.

#interview#lld
12 min
Interview ExperiencesMar 3, 2026

De Shaw Interview — Java Autoboxing & Unboxing

A De Shaw round where I was handed a deliberately tricky Integer vs int snippet. Here's the snippet, the answer I gave, and the full theory of why Java's autoboxing and unboxing make each line behave the way it does — including the Integer cache landmine.

#interview#de-shaw
6 min
Engineering & PracticeDec 17, 2025

AGI Timelines: The Continual Learning Bottleneck and Why Agents Aren't Ready

AGI Timelines: The Continual Learning Bottleneck and Why Agents Aren't Ready

#agi#ai
3 min
Engineering & PracticeDec 16, 2025

How I Used Claude Code to Diagnose and Fix My Site's Latency

A case study in agentic engineering: instead of guessing at a 700ms page load, I drove an AI coding agent like a senior pair — anchoring it with constraints, demanding proof before any change, and forcing production verification. Here are the exact prompts I used, the agentic workflow, and the real optimizations that shipped.

#ai#agentic-engineering
6 min
System DesignDec 15, 2025

Design a Parking Lot System - Low Level Design

Learn how to design a parking lot management system from scratch using object-oriented principles and design patterns.

#system-design#object-oriented-design
4 min
System DesignDec 10, 2025

Design a URL Shortener like bit.ly - High Level Design

Learn how to design a scalable URL shortener service that can handle millions of requests per day with proper system architecture.

#system-design#scalability
6 min
Engineering & PracticeDec 9, 2025

You Can't Benchmark a Dev Server: Dev vs UAT vs Production

A 700ms local page load sent me down a rabbit hole — and the real lesson had nothing to do with the page. Why dev, sandbox, and UAT environments are structurally incomparable to production, how to actually benchmark and load-test on AWS/Azure, and what a senior engineer looks for before trusting a single latency number.

#performance#benchmarking
7 min
System DesignDec 5, 2025

Design a Real-Time Chat System - System Design

Learn how to design a scalable real-time chat system that can handle millions of concurrent users with WebSockets, message queuing, and distributed architecture.

#system-design#real-time
9 min
Engineering & PracticeNov 17, 2025

What Lied First: 5 Real Production Incidents and Their Engineering Lessons

Big outages are rarely about a system going down — they're about one part of the system lying while everything else looks green. Five public postmortems from Google, AWS, Atlassian, Cloudflare, and GitLab, and the concrete engineering lessons from each.

#postmortems#reliability
9 min
Engineering & PracticeAug 12, 2025

Rate the Date: I Built an App for the Hardest Sentence in Any Relationship — 'Something's Wrong'

Dating apps spend billions getting two people together and nothing on what happens after. Rate the Date is my answer to the other side of the line: a private app where partners rate each other on the five love languages, and an AI turns those honest-but-unsayable scores into a letter your partner can actually hear. The psychology of why we can't say hard things, and the design decisions that route around it.

#side-project#product-psychology
13 min
System DesignJun 28, 2025

Swipe, Match, Pay: How Dating Apps Hack Your Brain, Print Money, and Are Actually Built

Tinder, Bumble, and Hinge are three of the most psychologically sophisticated products ever shipped. A deep dive into the slot-machine mechanics behind the swipe, the freemium funnel that turns loneliness into ~$6B a year, the quiet paradox at the heart of the business model — and the geosharded architecture that serves 75 million people their next maybe-soulmate in under 50ms.

#system-design#product-psychology
12 min

Stay Updated

Get notified when I publish new posts on system design, interviews, and what lives one layer down.