Building Blocks

Debugging

Finding out why it's broken

TL;DR

The art of finding and fixing what's broken in code. 90% of programming is just figuring out why the thing you wrote doesn't work. Named after an actual bug in a computer in 1947.

The Plain English Version

Programming isn't mostly writing code. It's mostly figuring out why the code you wrote doesn't work. That process is called debugging — hunting down the "bug" (the error) and squashing it.

The term has a great origin story. In 1947, engineers at Harvard found an actual moth stuck in a relay of the Mark II computer, causing it to malfunction. They taped it into the logbook and wrote "First actual case of bug being found." The name stuck. Now every error in software is called a "bug" and fixing it is "debugging."

Debugging is part detective work, part therapy. You stare at code that SHOULD work. You add print statements to figure out what's happening. You question your life choices. You find that you misspelled a variable name or forgot a comma. You fix it. It works. You feel like a genius for 30 seconds. Then the next bug appears. This is the cycle.

Why Should You Care?

Because if you ever write any code — even with AI doing most of the work — you'll need to debug. AI coding assistants are great at generating code but they still produce bugs. Understanding the concept of debugging (isolating the problem, testing hypotheses, reading error messages) is a fundamental skill even for vibe coders who are mostly directing AI.

The Nerd Version (if you dare)

Debugging involves identifying, isolating, and resolving defects using tools like interactive debuggers (breakpoints, step-through, watch expressions), logging frameworks, profilers, and stack trace analysis. Techniques include rubber duck debugging, binary search through changes (git bisect), unit test isolation, and print/log debugging. Modern IDEs provide integrated debugging with variable inspection, call stacks, conditional breakpoints, and hot reload. AI-assisted debugging tools can analyze error messages and suggest fixes.

Like this? Get one every week.

Every Tuesday, one AI concept explained in plain English. Free forever.

Want all 75 terms in one PDF? Grab the SpeakNerd Cheat Sheet — $9