Blog
Notes on data structures & algorithms, system design, and things I learn along the way.
Why `hash % N` falls apart the moment you add a server, and how consistent hashing moves only a fraction of your keys when the cluster changes.
The protocol behind for...of, the spread operator, and async/await — plus generator functions, which can pause mid-execution and resume exactly where they left off.
The operators every developer half-remembers — AND, OR, XOR, shifts — and the handful of tricks that turn them into fast, elegant solutions.
The data structure behind autocomplete and spellcheck. How a trie stores words as shared character paths, and why lookups cost the length of the word — not the size of the dictionary.
How a heap keeps the smallest (or largest) element one lookup away, why it's stored in a plain array, and the sift-up/sift-down operations that keep it valid.
Why linked lists still matter, and the two-pointer trick that detects a loop in one pass with no extra memory — the famous tortoise and hare.
DP is not a scary black box — it's recursion that stops repeating itself. Follow one problem from exponential recursion to a linear table, one cell at a time.
Breadth-first and depth-first search are the same algorithm with one data structure swapped. See both walk the same graph, and learn which to reach for.
Recursion feels like magic until you see the call stack. Here's the mechanical picture — frames pushing and popping — plus base cases, stack overflows, and tail calls.
Two of the highest-leverage array patterns in interviews and real code — how they turn nested O(n²) loops into a single O(n) pass, and when each one applies.
The prototype chain is the engine behind every JavaScript object and the class keyword is sugar on top of it — here's how the whole thing actually works.
Why this is confusing in JavaScript and how four simple binding rules — plus arrow functions — determine its value in any situation.
Why [] == ![] is true and other coercion puzzles — the actual rules behind == , truthiness, and the handful of habits that keep them from biting.
How binary search eliminates half the problem with every comparison, and how binary search trees turn the same idea into a data structure — with interactive animations.
What a closure actually is, how the scope chain makes it work, and the three places closures matter most — private state, the classic loop bug, and React hooks.
An interactive guide to debouncing and throttling — when to use each, how to implement them from scratch, and the edge cases that bite in production.
How hash maps actually work — hashing, buckets, collisions, and resizing — with an animated walkthrough and a from-scratch implementation.
A visual, step-by-step guide to the event loop — call stack, task queue, microtasks, and async/await — with interactive animations you can play through.
The rules that make promises predictable — state transitions, how .then chains really resolve, error propagation, and when to reach for all, allSettled, race, or any.
Why the classic interview question is really a lesson in composing data structures — with an animated walkthrough and two working implementations.
A visual walkthrough of quick sort and heap sort — how partitioning and heaps achieve O(n log n) without merge sort's extra memory, with animated demos and code in Java and JavaScript.
How APIs decide who gets throttled — token bucket, fixed and sliding windows, animated demos of each, and what changes when the limiter goes distributed.
Four ways to get server data to the browser without a refresh — animated message flows for each, and a decision guide drawn from building live-data UIs.
A visual, hands-on walkthrough of four classic sorting algorithms with animated demos and code in both Java and JavaScript.
Learn how to build your first micro-frontend architecture using NextJS, exploring the benefits of modular development and strategies for seamless integration in modern web applications.