Blog
Tutorials, guides, and insights to help you become a better developer.
Awaiting four independent API calls in sequence instead of parallel can triple your endpoint latency. Here's the pattern, the math, and how to catch it in review.
AdminJuly 20, 20265 min read
You've read "Node.js is single-threaded and non-blocking." Fine. But that sentence raises more questions than it answers. If it's single-threaded, who's doing the file I/O while your JavaScript runs?
AdminJuly 17, 20268 min read
If you're still writing pages/api/... files in a new Next.js project, stop. Route Handlers are the App Router's replacement, and they're meaningfully better — typed, streaming-capable, and built on the same Web platform APIs that Cloudflare.
AdminJuly 15, 20267 min read
Strip Express and Koa down to their core: a 30-line compose() function that chains async middleware with before/after hooks, short-circuit support, and error propagation.
AdminJuly 13, 20265 min read
`forEach` doesn't return a Promise, so `await` before it resolves instantly. Every async callback fires and is forgotten — this is how batch processors ship broken.
AdminJuly 10, 20265 min read
Your endpoint is async but it still freezes the server. Here's the synchronous CPU work pattern that blocks Node's event loop and how senior devs catch it in review.
AdminJuly 3, 20268 min read
Node.js Modules: CommonJS vs ESM, Circular Dependencies, and How Node Actually Resolves Your Imports
Node.js has two module systems that don't interoperate cleanly. Here's how CommonJS and ESM work, how Node resolves imports, and how circular dependencies behave in each.
AdminJune 26, 202610 min read
EJS, Handlebars, Pug and Nunjucks all do the same three things: tokenize, parse, compile. Build a real one — loops, conditionals, partials, escaping by default — and see exactly where HTML escaping stops protecting you.
AdminJune 19, 202613 min read
Open a modal 10 times without cleanup and you've got 10 stacked timers silently draining memory. Here's what this looks like in a PR and how senior devs catch it.
AdminMay 29, 20266 min read