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.→
October 6, 2026map, filter, reduce: Array Methods for Beginners3 min read

Four array methods replace most of the for-loops you'll ever write. What map, filter, reduce and find each do, step by step, how to chain them, and when a plain loop is still the better choice.

#JavaScript
October 6, 2026Hash Functions Explained: Turning Anything Into a Number4 min read

A hash function maps any input to a fixed-size number, the same input always to the same number. How a simple one works, why collisions are unavoidable, what makes a hash good, and how the same idea powers hash maps, caches and passwords.

#DSA
October 6, 2026The DOM Explained: How JavaScript Sees a Web Page3 min read

The browser turns your HTML into a tree of objects, and that tree — not the HTML file — is what's on screen and what JavaScript changes. How to find, change, create and remove elements, and how events travel through the tree.

#JavaScript
October 5, 2026Arrays vs Linked Lists: How Data Sits in Memory3 min read

The two most basic ways to store a sequence. Arrays keep items side by side for instant access by position; linked lists chain scattered nodes for cheap inserts. What each operation costs, and why arrays win most of the time anyway.

#DSA
October 5, 2026Callbacks Explained: Passing Functions Around3 min read

A callback is a function you hand to another function to call later. Why JavaScript is built on them, the difference between synchronous and asynchronous callbacks, and how 'callback hell' led to promises and async/await.

#JavaScript
October 5, 2026let, const, and var: Which One and Why3 min read

Three ways to declare a variable, and the differences that actually matter: block scope vs function scope, the loop bug that var causes, and what const does (and doesn't) protect. A beginner's guide with one simple rule at the end.

#JavaScript
October 5, 2026Structural Typing: Why TypeScript Cares About Shape, Not Names3 min read

In TypeScript, a value fits a type if it has the right properties — no matter what it's called or where it came from. How structural typing works, the excess-property check that seems to contradict it, and how to opt into nominal types with brands.

#TypeScript
October 5, 2026TypeScript Utility Types: Partial, Pick, Omit, Record — and How They Work3 min read

Define a type once, then derive the variations — update payloads, public views, dictionaries — so they can never drift apart. The built-in utility types, and the mapped-type machinery (keyof, in, T[K]) they're built from.

#TypeScript
October 4, 2026Discriminated Unions: Making Impossible States Impossible3 min read

Give every member of a union a shared literal field, and TypeScript can tell them apart — narrowing in each branch and refusing to compile when a case is forgotten. The pattern behind loading states, reducers and API results.

#TypeScript
October 4, 2026Type Narrowing: How TypeScript Follows Your if Statements3 min read

A union type means “one of these — find out which before you use it”. How typeof, equality, in, instanceof and early returns narrow a type line by line, and how to write your own type guards.

#TypeScript

148 posts · page 5 of 15