Glitch

DEBUGGING + INSPECTION — *there's always a reason; bugs are findable without shame.*

Content note: This chapter engages trauma-adjacent themes (anti-shame). The content has been reviewed for our trauma-informed posture.

Loading audio…

Press play to listen along. The line being read lights up as you go.

Show full transcript

Loading transcript…

01 Opening
Glitch beat 1 of 5

Glitch wasn't an animal, and wasn't a person either. Glitch looked like a tiny magnifying glass that floated over a line of code, with a warm, soft light glowing under the glass — not a scary red alarm, just a gentle glow that said, come look at this. Glitch showed you where a problem was. It never, ever said you broke it.

That mattered more than anything. Because movies and games love to make bugs seem scary — the programmer who "broke everything," the big embarrassing failure — and that fear makes cheeks go warm and shoulders go tight, and you can't think clearly when you're worried. Glitch existed to take that bad feeling away. Its whole gentle message was: there's always a reason. Bugs are findable. Bugs are just information — chances to learn — not proof that you're bad at this.

02 Glitch
Glitch beat 2 of 5

Loop was trying to make her game character, Pip — a little pixelated frog — jump. She typed the code, pressed Run, and instead of leaping high, Pip just wiggled sadly on the ground. Loop sighed. "Oh, Pip. What did I do wrong?"

A tiny glow appeared, hovering gently over one line of code. Glitch. No red flash, no loud noise — just warm and curious. Loop's shoulders came down, and she smiled a little. "Thanks, Glitch. I forgot. There's always a reason." She looked at the screen, where a small message read: TypeError: cannot multiply sequence by non-int of type 'float'. "See — Glitch reminds us to read the error message. These are helpful hints — they tell you where the problem is and what kind it is. 'TypeError' means I used the wrong kind of data." She scrolled to the line Glitch hovered over: jump_power = "5" jump_strength. "Aha! I put quotes around the five — that makes it text, not a number. You can't multiply text like that." She fixed it: jump_power = 5 jump_strength.

03 Glitch
Glitch beat 3 of 5

She ran it again. Pip still wiggled — but the error was gone. "Okay, new problem — no error message this time. So what's next, Glitch?" The warm light pulsed. "Right! Print debugging. You make the computer tell you what's happening inside — like asking the code, hey, what number are you holding right now?" Loop added print(jump_power) and print(jump_strength), ran it, and watched the console:

50 10.0

"Hmm. Jump power is 50, jump strength is 10 — that seems fine. But Pip still isn't jumping. So the trouble's somewhere later." She wasn't frustrated. She was curious now — the bug was just a clue she hadn't followed yet.

04 Glitch
Glitch beat 4 of 5

"Another trick is stepping through with a debugger," Loop told Glitch, "like pressing pause on a video game — you stop the code and watch every value, moving forward one tiny step at a time." She set a breakpoint and ran it, and the program froze mid-jump so she could see every variable. "Good for tricky bugs. But sometimes you just need to talk it out." She reached for a small green rubber duck. "Okay, Mr. Quackers. Pip the frog isn't jumping. My code sets jump_power, then updates Pip's position, then—" She stopped dead. "Wait a minute. I set Pip's y position to 0 after I add the jump power — so he lands back on the ground immediately!" She'd found it — that was rubber-duck debugging, where explaining code out loud lets your own brain hear the mistake. She swapped the two lines, put the position update before the jump, and ran it. Pip leaped — a perfect pixelated flip. "YES! Good job, Pip! Good job, Mr. Quackers!" Glitch's light pulsed happily.

05 Closing
Glitch beat 5 of 5

"And when a bug's really hidden," Loop said, pulling out a notebook labeled Bug Journal, "there's bisecting — you comment out half your code and run it. Bug gone? It was in that half. Bug still there? It's in the other half. Keep cutting in half until you land right on it." She tapped the journal. "And I always write down what I tried and what I learned, so when the same kind of bug shows up again, I remember how I fixed it. A detective's notebook for code." She looked at Glitch fondly. "So — read the error, inspect your variables, print, step through, talk to a duck, bisect, keep a journal. Find it gently. Bugs are information, not failures."

And here's what Loop wanted every coder to feel: that first warm-cheeked, tight-shouldered oh-no-I-broke-it moment — and then Glitch's soft light arriving, and the whole feeling loosening, because a bug was never a verdict on her. It was just a reason, waiting to be found. She let out a slow breath, shoulders easy, and felt the quiet, steady calm of a person who knows that whatever's broken, there's always a reason — and I can go look for it, gently. That calm, she'd tell you, is the best part of the whole job.

The CodeRealm ensemble

Glitch is part of CodeRealm's distributed-narrative cast. Each character embodies a different curricular primitive; together they teach the full subject.

Kids also liked