Blog

Off by One

I’ve written i <= array.length more times than I’ll admit. These posts cover modern CSS and the strange history behind JavaScript, with demos you can drop straight into your next build. Mostly bug-free. Give or take one.

Subscribe via RSS · Updated monthly

Why JavaScript Months Start at Zero

JavaScript counts January as month 0 because its Date is a port of Java's original date class. Here is where that came from and how to stop it biting you.

CSS Typed Arithmetic Turns Lengths Into Plain Numbers

CSS can now divide a length by a length and get a plain number. Use it to let one container width drive line-height, aspect-ratio and more, with no JavaScript.

Why HTTP's Referer Header Is Misspelled

The HTTP Referer header is a 1990s typo that can never be fixed. Here is how it happened and which spelling to use in headers, HTML and JavaScript.

The Friday the 13th Virus Was Caught by Its Own Bug

The Jerusalem virus was built to delete programs on Friday the 13th. A broken file check exposed it first, and its date check still has a lesson for web code.

Clean Up Your Claude Memory Once a Month

A five-minute memory cleanup gets you better answers from Claude in every chat. Here's why I run it and the prompt I use, ready to copy and paste.

Why Browsers Claim to Be Mozilla

Every browser's user agent string is a pile of borrowed names left over from a 1990s fight over frames. Here's how to read one, and why feature detection beats it.

Streams Are Async Iterable Everywhere Now

Safari 27 shipped async iteration for ReadableStream, so for await...of now works on a fetch response body in every major browser. Here is how to use it, plus the one behavior that surprises people.

CSS Can Replace More of Your JavaScript in 2026

Popovers, anchor positioning, scroll-driven animations and stylable selects now ship in real browsers. What each one replaces, the code to use, and where you still need a fallback.

Every Check Passed. The Page Was Still Wrong.

An AI agent migrated my site, and every automated check came back green. Then I opened the page. What I check now when an agent writes front-end code.