Debugging as Literacy

Debugging isn't just fixing code. It's a mode of thinking - a literacy in the root sense: the ability to read, understand, and respond to systems. Treating debugging as literacy changes how we teach code in videogame design.

Practice - what you do

The Conventional View

In CS education, debugging is remediation. You wrote a bug; now fix it. Debugging is failure recovery.

This framing makes debugging shameful. Students hide their bugs. They feel dumb when code doesn't work.

The Literacy View

Debugging is reading. When code breaks, you read what it's actually doing (vs. what you intended). That reading skill transfers: you can read code you didn't write, read systems you didn't design, read behavior you didn't expect.

Debugging is inquiry. "Why doesn't this work?" is a research question. You form hypotheses, test them, revise. This is scientific thinking applied to systems.

Debugging is craft. Every craft has failure. Potters have collapsed pots. Writers have bad drafts. Debugging is normal, not shameful.

Why This Matters for Videogame Design

Videogame designers who can't debug are dependent on engineers. They can't prototype. They can't tweak feel. They can't understand why their design isn't working.

Videogame designers who can debug have:

  • Prototyping independence: Build rough versions without waiting for engineers
  • Feel intuition: Tweak values, see results, iterate fast
  • System literacy: Understand how videogame systems actually work
  • Communication ability: Talk to engineers in their language

You don't need to be a great programmer. You need to be a competent debugger.

Teaching Debugging

Normalize Failure

Code not working isn't failure - it's the normal state. Nobody writes perfect code first try. Professional developers spend most of their time debugging.

Read Before Fix

Before changing anything, understand what's happening. Read the error message. Read the code. Articulate (in words) what you think is wrong.

One Change at a Time

Change one thing, test, repeat. If you change five things and it works, you don't know which change fixed it.

Print Statements Are Your Friend

The simplest debugging tool: print the value. See what's actually happening, not what you think is happening.

Rubber Duck Debugging

Explain the code to someone (or something - a rubber duck). The act of articulating often reveals the bug.

Use the Error Message

Error messages tell you something. Read them. They're not random noise.

The Code Bank and Debugging

The Code Bank scaffolds are designed for reading and modification, not just execution.

When a scaffold doesn't produce the feel you want:

  1. Read the scaffold code
  2. Identify which variable controls the aspect you want to change
  3. Hypothesize what changing it will do
  4. Test by changing and running
  5. Iterate until it feels right

This is debugging as design process.

Debugging Without Coding

The debugging mindset applies beyond code:

Debugging a design: Something doesn't work. Why? Form hypothesis. Test. Revise.

Debugging feedback: Playtesters report frustration. Where? Why? What's the root cause?

Debugging communication: Message isn't landing. What's being misunderstood? Where's the gap?

The skill transfers. Learning to debug code teaches you to debug everything.


Related