JavaScript

Jul 08
The Illusion of 100% Test Coverage

The Illusion of 100% Test Coverage

I've watched teams chase 100% and still ship bugs. Coverage proves code ran, not that it worked. Real safety comes from assertions that bite, weird inputs, mutation tests, and tough reviews. Treat coverage as a flashlight, not a finish line.
8 min read
Jun 29
The Tyranny of Tiny Modules

The Tyranny of Tiny Modules

Modularity is not a numbers game. A 300-line component with a clean flow beats ten shallow ones across folders. Barrels bloat bundles and hide cycles. Write for brains, not style cops: minimize hops, keep related logic close, abstract when it’s earned.
15 min read
Jun 22
Cutting Redundant Data Fetches with React’s `cache` in React 19

Cutting Redundant Data Fetches with React’s `cache` in React 19

React 19’s cache memoizes server calls per request. Wrap a fetch or DB query, call it from multiple server components, and React runs it once. Fewer duplicate hits, faster pages, consistent data. The cache clears after render. Use it in Next.js 15 with RSC.
7 min read
Jun 10
TypeScript Soup: Taming an Unruly API

TypeScript Soup: Taming an Unruly API

One tiny helper, big payoff. Use template literal types to infer base fields from `nameFr` style keys, then `getLocalized(locale, obj, fields)` returns exactly what you asked for. No copy-paste, no string concat, typos blocked, locales centralized, fallbacks handled.
3 min read
Jun 03
Fresh vs. Next.js 15

Fresh vs. Next.js 15

I tried Fresh after another hydration bug. It shipped HTML, woke just the interactive islands, and my laptop sighed in relief. Next 15 felt heavier but battle-tested. My take: use Fresh for speed and clarity, Next when you need every plugin and playbook.
14 min read
May 12
Exponential Backoff in Modern JavaScript

Exponential Backoff in Modern JavaScript

Stop hammering a sick API. Exponential backoff—with jitter and caps—turns retries into resilience. I show how to wire it in React/Next.js (client + Route Handlers) and Fastify, when to retry vs bail, and how to keep users happy in 2025.
13 min read
May 12
React 19’s New Hooks: Practical Relief or Added Complexity?

React 19’s New Hooks: Practical Relief or Added Complexity?

React 19: use() for async data, form actions with useFormStatus/useActionState, useOptimistic for snappy updates, and async transitions. Fewer effects and form libs—cleaner patterns for forms, fetching, and UX.
16 min read
May 03
Are React Server Components Improving Your Apps?

Are React Server Components Improving Your Apps?

React Server Components (RSCs) can deliver real performance wins. One team rebuilt their Next.js site with RSCs and achieved a 62 % drop in JavaScript bundle size and a 63 % boost in Google’s Speed Index. Less client‑side React logic means faster first paints.
9 min read
Apr 25
The Cost of Switching Frameworks Every Year That No One Wants to Admit

The Cost of Switching Frameworks Every Year That No One Wants to Admit

Frontend development moves fast. Every few months a new framework entices us. We rebuild our app in React, then Vue, then Svelte or Solid. Yet beneath the fun of chasing the newest, there are hidden costs—technical overhead, morale hits, loss of institutional knowledge, hiring headaches.
7 min read
Apr 24
ESM vs CommonJS: History, Differences, and the Big Shift

ESM vs CommonJS: History, Differences, and the Big Shift

You’ve likely seen multiple JavaScript module systems. Node.js built on CommonJS with require and module.exports. Browsers adopted ES modules using import and export. Today the ecosystem is shifting toward ESM, but CommonJS still holds strong in many projects.
13 min read
Sep 11
Managing complexity: Shared business logic in Next.js (Part 1: Server-Side Architecture)

Managing complexity: Shared business logic in Next.js (Part 1: Server-Side Architecture)

In Next.js 14+, structuring shared business logic through repositories, action functions, and standardized error handling cuts duplication and keeps API routes and Server Actions consistent. This layered approach boosts maintainability, type safety, and sleep quality.
9 min read
Mar 05
Advanced Union Type Techniques in TypeScript — 05 Object Values with const Assertion

Advanced Union Type Techniques in TypeScript — 05 Object Values with const Assertion

Const assertions in TypeScript lock values to their exact literal types and make them readonly, preventing accidental changes. Used strategically in configs, mappings, and critical state, they catch errors early, keep code predictable, and boost maintainability without unnecessary rigidity.
6 min read