✦Blog · 21 articles

Bugs, fixed.
Notes from the debugger.

The errors that eat an afternoon, and the ones nobody warns you about. Each article starts from the exact symptom, explains why it happens, and ends with code you can paste.

SpacePhysicsBlack Holes

Black Holes, Explained: A Field Guide

Everything behind the black hole on this site: horizons, spaghettification, spin, Hawking radiation, how we see them, 240 years of history and the four people who worked it out.

21 min read
ReactHooksJavaScript

Fixing useEffect Infinite Loops and Stale Closures in React

Why useEffect loops forever or reads old state, with broken and fixed code for object deps, derived state, intervals, listeners and racing fetches.

19 min read
Next.jsWebpackCaching

Fixing "Cannot read properties of undefined (reading 'call')" in Next.js Dev

Next.js dev crashing in webpack.js with reading 'call'? A stale browser-cached chunk is a sneaky cause. How to prove it, fix it, and rule out the rest.

11 min read
FastMCPMCPPython

FastMCP in Python: Common Pitfalls and How to Fix Them

FastMCP makes Python MCP servers easy, but bad schemas, blocking calls, stdout prints and odd errors trip people up. Here are the fixes.

11 min read
MCPAIPython

Debugging MCP stdio Servers That Work Locally but Fail in the Client

Your MCP server runs fine in a terminal but Claude or Cursor shows it as failed. Here's why stdio servers break and how to fix each cause.

12 min read
BooksFreelancingMoney

The Psychology of Money: Lessons for Developers

Morgan Housel's ideas on compounding, room for error, tails and enough, applied to freelance runway, estimates, tech debt and dev careers.

13 min read
Node.jsJavaScriptESM

Node.js ESM vs CommonJS Errors: Causes and Fixes

Cannot use import statement, require is not defined, ERR_REQUIRE_ESM and more: why each Node.js ESM/CommonJS error happens and the exact fix.

16 min read
FastAPIPythonasyncio

Why One Slow FastAPI Endpoint Freezes All the Others

Blocking calls inside async def endpoints stall FastAPI's event loop. How to spot them and fix them with threads, async libraries or processes.

14 min read
SpaceTypeScriptAstronomy

Mars Time, Moon Phases and Planet Distances in Plain TypeScript

Compute Mars time, the Moon's phase and live planet distances in plain TypeScript with no API, then check the numbers against real events.

17 min read
BooksHabitsProductivity

What Atomic Habits Taught Me About Shipping Software

James Clear's Atomic Habits applied to engineering: ship small daily, make the right thing the default, make bad habits hard, and track without gaming it.

15 min read
Three.jsReactWebGL

Fixing Three.js Memory Leaks and WebGL Context Lost in React

Three.js scene in React getting slower on every navigation until the WebGL context is lost? Dispose GPU resources, clean up effects and reuse the renderer.

12 min read
Three.jsGLSLWebGL

Rendering a Black Hole in a Single Three.js Shader

How the black hole on my site is drawn on one quad: a Keplerian accretion disk, Doppler beaming, faked lensing, bent starlight and theme-aware alpha.

20 min read
Tailwind CSSCSSNext.js

Tailwind Classes Not Applying? Every Cause and the Fix

Tailwind class in the markup but no style on screen? Learn to tell a class that was never generated from one that loses, then fix each cause.

14 min read
PrismaNext.jsPostgreSQL

Fixing Prisma Too Many Connections Errors in Next.js and Serverless

Why Prisma on Vercel exhausts Postgres connections (too many clients, P2024, P1001) and how a singleton, connection_limit and a pooler fix it.

11 min read
Next.jsReactSSR

Fixing Hydration Mismatch Errors in Next.js

Why Next.js throws hydration mismatch errors (dates, window, invalid HTML, extensions, themes, locales) and the exact fix for each cause.

12 min read
Next.jsEnvironment VariablesDeployment

Next.js Environment Variables Undefined or Stale? Here's Why

Why Next.js env vars come back undefined or stale: NEXT_PUBLIC_ inlining, static pages, Docker and Turborepo, with a fix for each.

16 min read
FastAPIPythonCORS

FastAPI CORS Works on Localhost but Fails in Production

Your FastAPI API works locally but the deployed frontend gets CORS errors. Here's why it happens and how to fix origins, proxies, redirects and cookies.

14 min read
CSSWeb DevLayout

Why position: sticky Is Not Working (and How to Fix It)

position: sticky silently doing nothing? Find the overflow ancestor, add a threshold, give it room to stick and stop flex stretching. Fixes for each cause.

11 min read
PythonGotchasDebugging

Python Mutable Defaults and Late-Binding Closures: Two Bugs That Pass Code Review

Why def f(x=[]) shares one list and lambdas in loops all see the last value, plus the sentinel, factory and partial fixes and the Ruff rules that catch them.

12 min read
DockerNext.jsNode.js

Next.js Works Locally but Breaks in Docker: How to Fix It

Why a Next.js or Node app that runs locally breaks in Docker, from localhost binding to native modules, arm64 images and CRLF, and how to fix each one.

14 min read
BooksCode ReviewCommunication

How to Win Friends and Influence Code Reviews

Dale Carnegie's 1936 classic applied to code reviews: kinder comments that still block bugs, better PRs, blameless write-ups and saying no to clients.

15 min read