Blog
Notes on data structures & algorithms, system design, and things I learn along the way.
Learning DSA? Follow the structured path — ordered articles from recursion to dynamic programming.→Proxy lets you intercept fundamental operations on an object — get, set, delete, has — before they happen. It's the mechanism behind Vue's reactivity, ORMs, and API validation layers.
A regular Map keeps its keys alive forever, which turns 'metadata keyed by object' into a memory leak. WeakMap holds weak references instead, letting the garbage collector reclaim entries the rest of the program has already forgotten.
async/await isn't a new concurrency model — it's syntax sugar over promises and generators. Understanding the desugared version explains error handling, sequential-looking parallel bugs, and why 'async' functions always return a promise.
require vs import isn't just syntax — it's dynamic vs static, copies vs live bindings, sync vs async. A field guide to the module systems and the interop errors between them.
How DOM events really travel — capture, target, bubble — and how delegation exploits bubbling to handle a thousand rows with a single listener.
Reachability, generational GC, and the four leak patterns that survive garbage collection — timers, detached DOM nodes, growing caches, and forgotten listeners.
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 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.
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.
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.