The blog

Writing from the workshop

111 articles on the parts that actually hurt.

section
The Search Highlight That Deletes Your Selection
CSS

The Search Highlight That Deletes Your Selection

A search-highlight feature that rebuilds its DOM on every keystroke can wipe out a user's own text selection with no warning. The CSS Custom Highlight API fixes it by styling text ranges without ever touching a DOM node.

Sep 13, 2026 · 6 min
My .catch() Never Ran. The Bug Was Two Lines Above It
JavaScript

My .catch() Never Ran. The Bug Was Two Lines Above It

A function that sometimes throws synchronously instead of returning a promise will skip every .catch() chained to it — because the promise never gets created. Promise.try() fixes it, and does one thing try/catch can't.

Sep 13, 2026 · 5 min
NestJS Module Encapsulation Explained (with Cheat Sheet)
Nestjs

NestJS Module Encapsulation Explained (with Cheat Sheet)

How NestJS module boundaries actually work: what exports really cross, why @Global() isn't a shortcut, and how forwardRef breaks circular module dependencies.

Sep 13, 2026 · 14 min
NestJS Dependency Injection Explained (with Cheat Sheet)
Nestjs

NestJS Dependency Injection Explained (with Cheat Sheet)

How the NestJS DI container resolves providers: tokens, module scope, singleton vs request vs transient, and why 'singleton' can still mean two instances.

Sep 13, 2026 · 14 min
Stop Regex-Parsing document.cookie. Use CookieStore
JavaScript

Stop Regex-Parsing document.cookie. Use CookieStore

document.cookie hands you one flat string and no way to know when it changes. The Cookie Store API gives you async get/set/delete and a change event — but its set() defaults to a stricter SameSite than the one you're used to.

Sep 13, 2026 · 5 min
addDays() Mutated a Date Three Components Away From Where I Called It
JavaScript

addDays() Mutated a Date Three Components Away From Where I Called It

A date utility that calls .setDate() and returns the same object looks pure. It isn't — Date is mutable, so the caller and everyone else holding that reference get changed out from under them. Temporal, now shipping in real browsers, fixes it by making dates immutable.

Sep 12, 2026 · 5 min
React Form Actions: useActionState & useFormStatus Guide
React

React Form Actions: useActionState & useFormStatus Guide

How React 19 form Actions manage pending state automatically — useActionState, useFormStatus, and useOptimistic explained with the bug they replace.

Sep 12, 2026 · 13 min