Lesson 1035 of 1570
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.
Lesson map
What this lesson covers
Learning path
The main moves in order
- 1The big idea
- 2rubber duck debugging
- 3AI chat
- 4bug explanation
Concept cluster
Terms to connect while reading
Section 1
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
15 questions · Score saves to your progress.
Tutor
Curious about “Rubber-Ducking Bugs With an AI Chatbot”?
Ask anything about this lesson. I’ll answer using just what you’re reading — short, friendly, grounded.
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.
