Debugging
Finding out why something broke: reading errors, browser dev tools, logs, and the classic works-locally-fails-in-production gap.
19 posts
How to Write a Good Bug Report (for Humans and AI Tools)
'It's broken' can't be fixed. 'On /checkout, clicking Pay with an empty cart returns a 500' can. The five parts of a useful bug report, how to find reproduction steps, what evidence to attach, and a template you can paste into GitHub issues or your AI coding tool.
Why Is My Website Slow? A Beginner's Guide to Finding Out
Slow sites lose visitors. How to measure speed properly, what Core Web Vitals mean, and the usual culprits in AI-built apps — huge images, too much JavaScript, slow database queries, waterfalls of API calls, and a server far from your users — with a fix for each.
Why Does My App Work Locally but Not in Production?
The app runs perfectly on your machine and breaks the moment it's deployed. It's almost always one of about a dozen causes — missing environment variables, localhost URLs, a filesystem that doesn't persist. How to find which one, in the order most likely to be it.
How to Test Your App Before Launch (Without Writing Tests)
You don't need to be a programmer to find most bugs before your users do. A practical, one-afternoon testing plan for AI-built apps: the journeys to walk through, the 'try to break it' checks, the security tests, and how to keep track of what you find.
Stuck in an AI Fix Loop? How to Break Out
You ask the AI to fix a bug. It says it's fixed. It isn't. Three rounds later, two other things are broken too. Why AI tools get stuck in loops, how to recognise one early, and a step-by-step way out that works far better than asking again.
Structured Logging: Logs You Can Actually Search
console.log('user saved') is useless at 3am when you need every request user 4812 made in the last hour. How structured logs work, what fields to include, request IDs that tie a request together, log levels that mean something, what never to log, and how logs make AI agents better debuggers.
Regular Expressions for Beginners: Reading Regex Without Panic
^[\w.+-]+@\w+\.\w{2,}$ looks like a cat walked on the keyboard. It's a regular expression, and AI tools write them constantly. The dozen symbols that cover most regex, how to read one piece by piece, how to test them, and when not to use regex at all.
What Is an IP Address and a Port? localhost:3000 Explained
Every network connection goes to an address and a port — the building and the apartment number. What IP addresses and ports are, the common port numbers, what 0.0.0.0 means, why 'address already in use' happens, and why your app works on your laptop but not on the server.
The N+1 Query Problem: How to Spot It and Fix It
The most common performance bug in ORM-based apps: one query for a list, then one more per item. How N+1 happens in Prisma, Drizzle, Django, Rails, and GraphQL resolvers, how to detect it from logs and pg_stat_statements, and the fixes — eager loading, batching, joins, and DataLoader.
Merge Conflicts Explained: What They Are and How to Fix Them
CONFLICT (content): Merge conflict in app.js looks alarming, but it's Git asking you a simple question. Why conflicts happen, how to read the <<<<<<< and >>>>>>> markers, how to resolve one in VS Code or with an AI tool, how to back out safely, and how to avoid most of them.
Load Testing Your App Before Launch Day
Find out where your app breaks before your users do. What load, stress, spike, and soak tests reveal, writing a realistic k6 scenario with thresholds, reading p95 and error rates, finding the actual bottleneck, and the safety rules for testing without taking production — or a third-party API — down.
I Leaked an API Key. What Now? A Step-by-Step Response
You pushed a .env file to GitHub, pasted a key in a screenshot, or found your secret key in your app's frontend code. What to do in the next ten minutes, the next hour, and the next day — revoke, rotate, check for abuse, clean up — and how to stop it happening again.
HTTP Status Codes Explained: 200, 301, 404, 500 and the Rest
Every response from a server starts with a three-digit number that says how it went. What the 2xx, 3xx, 4xx, and 5xx families mean, the dozen codes you'll actually meet, what each one tells you about where a bug lives, and which ones your own API should return.
How to Read an Error Message (and Fix Things Faster)
Error messages look like walls of gibberish, but they usually tell you exactly what went wrong and where. How to find the one line that matters, what common errors actually mean, where to look when there's no error at all, and what to give an AI so it can fix it first time.
File Paths Explained: Absolute, Relative, and Why 'File Not Found' Happens
Cannot find module './components/Button'? ENOENT: no such file or directory? Most of the time it's a path problem. How file paths work on Mac, Linux, and Windows, absolute vs relative paths, ./ and ../, the working directory, case sensitivity, and import aliases like @/.
Debugging for Beginners: A Calm, Repeatable Way to Find Bugs
Debugging isn't guessing until it works. A simple five-step method — reproduce, read, locate, hypothesise, verify — plus console.log, breakpoints, git bisect, rubber-ducking, and how to debug alongside an AI tool without getting stuck in a loop.
Dates and Time Zones in Apps: How Not to Get Them Wrong
Reminders sent an hour late, bookings on the wrong day, 'yesterday' that's actually today. Why dates are hard, the golden rule (store UTC, display local), ISO 8601, time zones vs offsets, daylight saving traps, and how to check your AI-built app handles them.
CORS Errors Explained: Why Your Frontend Can't Reach Your API
'Blocked by CORS policy: No Access-Control-Allow-Origin header' is one of the most common errors in AI-built apps. What CORS is, why the browser enforces it, how to fix it properly on the server, why the quick fixes are dangerous, and when you don't need CORS at all.
Browser Developer Tools for Beginners: The Five Tabs That Matter
Every browser has a built-in toolkit that shows what your app is really doing. How to open DevTools, and how to use the Elements, Console, Network, Application, and device-mode views to find bugs and give your AI tool something useful to work with.