Writing
Blog
Mixed writing on software engineering, web architectures, system design, and ideas worth sharing.

Learn JavaScript from scratch by understanding variables, data types, operators, type conversion, and writing your first programs with practical examples.

Step into the modern frontend landscape. Learn how React revolutionizes web development through component-based architecture, declarative UI, and deep dive into JSX and props.

Deep dive into JavaScript logic. Master conditional statements, loops, functional programming, scope, and powerful built-in array and object methods with practical examples.

Deep dive into React's operational brain. Master the useEffect lifecycle hook, managing complex component states, rendering dynamic lists with keys, and handling forms efficiently.

The definitive final guide to modern JavaScript. Master asynchronous execution, Promises, Async/Await, fetching live APIs, manipulating the DOM, and local browser storage.

The definitive final guide to engineering enterprise React applications. Master global state management via the Context API, performance tuning with hooks, routing architectures, and production patterns.

Break free from the client-side limitation. Master Node.js architecture, the asynchronous event loop engine, module systems, and native file system operations with practical code.

Accelerate your backend development. Master HTTP lifecycle protocols, establish high-performance Express.js servers, design professional modular routing systems, and engineer custom middleware pipelines.

The definitive final guide to launching professional Node.js backends. Master the Model-View-Controller (MVC) design pattern, database integration layer engineering, global error boundary management, and production-ready server hosting setups.

Break out of strict relational tables. Learn why modern applications scale with MongoDB, understand BSON document logic, and master core CRUD data queries from scratch.

Deep dive into NoSQL database design. Master structural data modeling, embed vs. reference relationships, index optimization for fast lookups, and multi-stage Aggregation Pipelines.

The definitive final guide to engineering enterprise-grade NoSQL infrastructure. Master high availability with Replica Sets, scale horizontally via Automatic Sharding, and secure clusters on MongoDB Atlas.

Step into modern server architecture. Discover why Express.js is the gold standard web framework for Node.js, master HTTP structures, and build high-performance REST APIs.

Scale your backend infrastructure. Master modular routing tables, design advanced custom middleware handlers, handle cross-origin resource sharing (CORS), and implement an absolute global error safety net.

The definitive final guide to deploying professional Express.js backends. Master the Model-View-Controller (MVC) layout pattern, schema input validation, HTTP response header security tuning, and rate limiting architectures.

Unlock production-ready React. Master Server Components, Client Components, and modern file-based routing architecture with Next.js from scratch.

Optimize your data layer. Master Static Site Generation (SSG), Server-Side Rendering (SSR), Incremental Static Regeneration (ISR), advanced caching systems, and async Suspense layout borders.

The definitive final guide to mastering full-stack Next.js. Implement secure Server Actions for form submissions, build modular Route Handlers for custom APIs, optimize SEO metadata frameworks, and deploy to Vercel.
Complete notes on designing a URL shortener: why truncated hashes collide, and how a counter with Base62 encoding, range-based ID allocation and a cache make it scale.
Fixed window, sliding window and token bucket explained with their real weaknesses, plus how to make the limiter correct across many servers and what to do when Redis goes down.
Why sending the SMS inside the API request fails, and how queues, priority lanes, retries with backoff and provider failover make notifications fast and reliable.
What to clarify before designing anything: how functional and non-functional requirements differ, and how one number can change the entire architecture.
From polling to WebSockets, how single, double and blue ticks really work, what happens when the receiver is offline, and how messages cross between chat servers.
How the read-to-write ratio decides your architecture: caches, replicas and CDNs for reads; queues, batching, LSM-tree storage and sharding for writes.
Fan-out on read versus fan-out on write, why accounts with millions of followers break the simple model, and how the hybrid approach keeps the feed instant.
Cache-aside, write-through and write-behind, TTL and LRU eviction, invalidation on update, and the three classic problems: stampede, penetration and avalanche.
How millions of driver location updates are stored, how nearby drivers are found without scanning everyone, and how one driver is never given two rides.
A repeatable method for estimating QPS, storage, bandwidth and server count, with the rounding tricks and reference numbers that make the arithmetic easy.
How suggestions appear within milliseconds of each keystroke: a trie with precomputed top results per node, built offline from search logs and served from cache.
Vertical versus horizontal scaling, routing algorithms, health checks, stateless servers, layer 4 versus layer 7, and how the load balancer itself avoids being a single point of failure.
How to sell 100 items to millions of simultaneous buyers: atomic stock decrement, waiting rooms, queues, reservations with expiry and idempotent orders.
What relational and non-relational databases each guarantee, the four NoSQL families, how SQL scales, and a decision rule based on access patterns.
The upload pipeline, transcoding into multiple qualities, segmenting video into chunks, adaptive bitrate streaming and CDN delivery, explained end to end.
Replication scales reads and provides failover; sharding scales writes and storage. Covers replication lag, read-your-writes, shard keys, hot shards and resharding.
Why a timeout is not a failure, how idempotency keys prevent double charges, and how a state machine, a double-entry ledger and reconciliation keep money correct.
What consistency, availability and partition tolerance really mean, why partition tolerance is not optional, how CP and AP systems behave, and what PACELC adds.
How a delivery partner's GPS pings reach the customer's map within a second: write-heavy ingestion, latest location in memory, pub/sub per order and WebSocket push.
Why work is moved out of the request path, queue versus pub/sub, how Kafka partitions and consumer groups work, at-least-once delivery, idempotent consumers and dead letter queues.
Why incrementing a database row on every view collapses under load, and how event streams, batching, sharded counters and deduplication give accurate counts at scale.
Why distance creates latency, how edge servers cache content, what can and cannot be cached, TTLs and versioned file names, origin shielding and DDoS absorption.
Why auto-increment and UUIDs fall short in a distributed system, and how Snowflake-style IDs combine a timestamp, a machine ID and a sequence into a sortable 64-bit number.
What each architecture gives you and what it costs, including distributed tracing, sagas and compensating actions, and why most products should begin as a well-structured monolith.
Chunking, delta sync, content-hash deduplication, separating metadata from blocks, change notifications across devices and handling conflicting edits.
How to design a clean REST API: resource naming, correct use of HTTP methods and status codes, offset versus cursor pagination, idempotency keys, versioning and rate limiting.
Why sorting the scores table on every request does not scale, how a sorted set gives rank and top-N in logarithmic time, and how to handle ties, durability and very large boards.
Why hash mod N remaps almost every key when the server count changes, and how a hash ring with virtual nodes limits movement to about one N-th of the keys.
A complete object-oriented design: requirements, entities and relationships, strategy pattern for spot assignment and pricing, the open-closed principle and thread-safe spot allocation.
A step-by-step structure for any system design question: requirements, estimation, API, data model, high-level design, deep dives and trade-offs, with a time plan and a reference of building blocks.
