Debugging
Finding out why something broke: reading errors, browser dev tools, logs, and the classic works-locally-fails-in-production gap.
56 posts · page 2 of 2
Postgres Connection Strings Explained: Format, Examples, and Common Errors
What every part of a PostgreSQL connection string (DATABASE_URL) means, how to write one, special characters in passwords, sslmode options, pooled vs direct connections (including Supabase's ports), and how to fix the errors people hit most.
npm ERESOLVE "Unable to Resolve Dependency Tree": What It Means and How to Fix It
npm ERR! code ERESOLVE means two packages disagree about which version of a third they need. How to read the error, what peer dependencies are, the safe fixes in order, and when --legacy-peer-deps or --force are (and aren't) acceptable.
Finding Memory Leaks in Node.js: Heap Snapshots, Retainers, and Common Culprits
Your Node.js server's memory climbs until it crashes. How to confirm a leak, read process.memoryUsage, capture heap snapshots in production safely, compare them in Chrome DevTools, follow retainer chains, and fix the usual causes: unbounded caches, listeners, timers and closures.
Next.js Hydration Errors: What They Mean and How to Fix Them
"Hydration failed because the server rendered HTML didn't match the client" — what hydration is, the usual culprits (dates, random values, window, browser extensions, invalid HTML, theme switchers), and the correct fix for each.
Mixed Content Errors: Why Your HTTPS Site Loads Things Over HTTP (and How to Fix It)
"Mixed Content: The page was loaded over HTTPS, but requested an insecure resource." What mixed content is, why browsers block it, how to find every http:// URL, and the fixes — including apps behind a proxy that generate http links.
"JavaScript Heap Out of Memory": Why It Happens and How to Fix It
FATAL ERROR: Reached heap limit — JavaScript heap out of memory. What Node's heap limit is, why builds and servers hit it, how to raise it safely with --max-old-space-size, when the real problem is a memory leak, and the difference from exit code 137.
Error Monitoring for Beginners: Find Out About Bugs Before Your Users Tell You
Error monitoring tools catch crashes in your app — frontend and backend — and alert you with the stack trace and context. What error tracking is, how tools like Sentry work, what to set up first, source maps, privacy, and avoiding alert fatigue.
ERR_TOO_MANY_REDIRECTS: What Causes It and How to Fix It (Including Cloudflare)
"This page isn't working — redirected you too many times." The usual causes of a redirect loop — Cloudflare's Flexible SSL mode, conflicting www rules, an app that doesn't know it's behind a proxy, and login loops — and how to find and fix each.
DNS Propagation Explained: Why Domain Changes Take Time (and How to Speed Them Up)
You changed a DNS record and your site still points to the old place. What "DNS propagation" really is (caching, not spreading), how TTL controls the wait, why nameserver changes take longest, how to check from different places, and how to flush your own cache.
Core Web Vitals Explained: LCP, INP, and CLS for Beginners
Google's Core Web Vitals measure how fast, responsive and stable your pages feel. What LCP, INP and CLS mean, the thresholds for "good", how to check your scores, the difference between lab and field data, and the usual fixes.
"Cannot Read Properties of Undefined": What It Means and How to Fix It
The most common JavaScript error, explained for beginners: what "TypeError: Cannot read properties of undefined (reading 'map')" means, the five usual causes, how to find the exact line, and the right fixes — not just sprinkling ?. everywhere.
Async/Await in JavaScript, Explained Simply (With the Mistakes AI Code Makes)
Why some JavaScript code has to wait, what a Promise is, how async and await work, how to handle errors, how to run things in parallel, and the common async bugs — like the missing await — that show up in AI-generated code.
Why Refreshing Your React Page Gives a 404 (and How to Fix It on Any Host)
Your single-page app works when you click around but shows 404 Not Found when you refresh or share a link. Why client-side routing causes it, and the exact fix for Nginx, Caddy, Netlify, Vercel, GitHub Pages and Express.
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.