Lesson 719 of 1169
Talking to AI Like a Rubber Duck to Fix Bugs
Explaining your code to AI out loud often helps you find the bug yourself.
Explorers · AI-Assisted Coding · ~3 min read
The big idea
Coders have a funny trick: they explain their code to a rubber duck, and the bug magically appears! AI works even better — you can type your code AND it asks smart questions.
Some examples
- You paste your code and say 'walk me through what this does'.
- AI asks: 'What did you EXPECT this line to do?'
- Often you spot the mistake while you're explaining!
- If not, AI usually helps you find it next.
Try it!
Find a small bit of code. Tell AI 'I want this to do X but it does Y. Ask me questions.' Try it!
Key terms in this lesson
Practice this safely
Try this with a low-stakes example and a trusted adult nearby. The goal is to notice how AI talks about rubber-duck, not to let it make the decision for you.
- 1Ask AI to explain rubber-duck in plain language, then underline anything that sounds uncertain or too broad.
- 2Give it one detail from "Talking to AI Like a Rubber Duck to Fix Bugs" and ask for two possible next steps plus one reason each step might be wrong.
- 3Check debugging against a trusted source, teacher, adult, expert, or original document before you use it.
End-of-lesson quiz
Check what stuck
8 questions · Score saves to your progress.
Lesson help
Questions are best handled with a grown-up here.
For this age range, Tendril keeps freeform AI chat paused until parent/guardian consent and child-safe moderation are fully verified. Use the quiz, notes, and related lessons below, or ask a parent, guardian, teacher, or librarian to work through the question with you.
Progress saved locally in this browser. Sign in to sync across devices.
Related lessons
Keep going
Explorers · 7 min
AI Can Help You Find Bugs in Code
Show AI broken code and it will help find the bug, like a code doctor.
Explorers · 5 min
AI Helping You Code: What Even Is That?
AI can help write computer code. You type what you want, AI writes the code. Here is what that looks like and why it is so cool.
Explorers · 40 min
Use AI to Fix Code That Does Not Work
When your code breaks, AI is amazing at finding the problem. Way faster than just staring at it.
