Lesson 980 of 1455
Rubber-Ducking Bugs With an AI Chatbot
Explaining your bug to an AI chatbot like ChatGPT or Claude often shows you the answer before the AI even replies.
Builders · AI-Assisted Coding · ~4 min read
The big idea
Rubber-ducking means explaining your bug out loud to a rubber duck on your desk. Half the time you spot the fix while talking. AI chatbots like ChatGPT or Claude are rubber ducks that talk back — and the talking-back part is a bonus, not the main event.
Some examples
- You paste a broken function into Claude and start typing 'I expected X, but I got Y'. Mid-sentence you realize you forgot a return statement.
- You describe a CSS layout that won't center to ChatGPT and notice the parent has display:inline.
- You explain a failing test to GitHub Copilot Chat and spot the typo in your assertion.
- You walk Cursor's chat through your data flow and realize you mutated the array you meant to copy.
Try it!
Next time you're stuck for more than 10 minutes, open a chat and write a paragraph explaining the bug like the AI knows nothing. Send it. See if you solved it before the reply finishes streaming.
Key terms in this lesson
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
Builders · 35 min
Tests as Prompts — an Unexpected Superpower
Writing a test first is not just good engineering. It is the clearest possible prompt for an AI. Let's use tests to make AI code reliable.
Builders · 30 min
Python File I/O
Reading and writing files is where real scripts start. Learn the with-statement, path handling, and JSON round-trips.
Builders · 35 min
SQL Basics With AI
SELECT, WHERE, JOIN, GROUP BY. Four keywords run the data world. AI is excellent at SQL because it has read every StackOverflow answer ever.
