Modern Debugging

Traditional debugging:

Modern debugging:

True Names

"For magic consists in this, the true naming of a thing."   - Ursula LeGuin, A Wizard of Earthsea

to know the true name of an object... or a concept... is to have power over it


you can't google an error until you know the name of the error

Google to Learn

Often, bugs and errors come from programmers not quite understanding the library or language feature they are using.

While reading docs can be tedious, it can help you to understand what problem you're trying to solve...

...even if only to be able to ask for help elsewhere and start by saying, "I've read the docs and I still don't get it."

tech support cheat sheet

tech support cheat sheet


How to Google

Google is not a Debugger

If you get an error that you don't understand...

...the first thing to do is not to Google it.

Modern Debugging: Step 1

Step 1: read the error

See Read the Error to learn how to read an error.

Often, reading the error reveals enough information to give you an idea for a solution.

Modern Debugging: Step 2

Step 2: google the name of the error

You may find a relevant tutorial, blog post, or StackOverflow answer.

Modern Debugging: Step 3

Step 3: google the name and context of the error

"context" here means either system information (like file paths) or abstract information (like a problem domain, or the name of a package you're using).

Modern Debugging: Step 4

Step 4: Stack Overflow

After googling, you will probably find your question answered on

Remember, though: not all answers are correct. You shouldn't just copy and paste code from the first result.

Read the words, not just the code, in the answer, to make sure the author really is solving a problem that is fundamentally similar to yours.

SOOP: StackOverflow Oriented Programming

copy / paste / tweak / repeat

This workflow is far from ideal, but it is acceptable...

... with these caveats:

Ask for Help

Write a Failing Test

When a user reports a bug, the first thing to do is to write a test that exposes the bug, then run it and watch it fail.

This assures that you have actually identified the cause of the bug, and that once you think it's fixed, it's actually fixed.

 Previous Lesson Next Lesson