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.
July 17, 2026Proxy and Reflect: Intercepting JavaScript Objects4 min read

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.

#JavaScript
July 17, 2026WeakMap and WeakSet: Memory-Safe References in JavaScript5 min read

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.

#JavaScript
July 16, 2026Async/Await Under the Hood: Promises in Disguise4 min read

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.

#JavaScript
July 13, 2026ESM vs CommonJS: What Actually Differs (and Why It Still Bites)5 min read

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.

#JavaScript
July 13, 2026Event Delegation: One Listener to Rule the List4 min read

How DOM events really travel — capture, target, bubble — and how delegation exploits bubbling to handle a thousand rows with a single listener.

#JavaScript
July 13, 2026JavaScript Memory Management: How the Garbage Collector Thinks5 min read

Reachability, generational GC, and the four leak patterns that survive garbage collection — timers, detached DOM nodes, growing caches, and forgotten listeners.

#JavaScript
July 12, 2026Generators and Iterators: Functions That Pause4 min read

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.

#JavaScript
July 7, 2026Prototypes and Inheritance: How JavaScript Objects Really Work6 min read

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.

#JavaScript
July 7, 2026The this Keyword: Four Rules That Explain Every Case4 min read

Why this is confusing in JavaScript and how four simple binding rules — plus arrow functions — determine its value in any situation.

#JavaScript
July 7, 2026Type Coercion and Equality: Making Sense of == in JavaScript5 min read

Why [] == ![] is true and other coercion puzzles — the actual rules behind == , truthiness, and the handful of habits that keep them from biting.

#JavaScript
July 6, 2026Closures in JavaScript: Private State, Loops, and Stale Values5 min read

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.

#JavaScript
July 6, 2026Debounce vs Throttle: Taming Event Storms in JavaScript4 min read

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.

#JavaScript
July 6, 2026The JavaScript Event Loop: How Async Actually Works5 min read

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.

#JavaScript
July 6, 2026JavaScript Promises in Depth: Chaining, Errors, and Combinators5 min read

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.

#JavaScript