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
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.
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.
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.
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.
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.
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.
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 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
AGI Timelines: The Continual Learning Bottleneck and Why Agents Aren't Ready
AGI Timelines: The Continual Learning Bottleneck and Why Agents Aren't Ready
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.
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.
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.
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.
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.
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.
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.
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.