Idioms & SlangBeginner
Rubber duck debugging
PronunciationRUB-er DUK dee-BUG-ing
Definition
Explaining your code line by line to a rubber duck (or anyone), which often helps you find the bug yourself.
Where you hear it
Developer culture and pair programming.
Examples
I explained the bug to my rubber duck and found the problem.
Try rubber duck debugging before you ask for help.
Explaining the function line by line to a rubber duck exposed the wrong variable.
Common mistake
Skipping it because it sounds silly. Saying the problem out loud forces you to think clearly.
Say it at work
- In a meeting or chat
I'm stuck on this logic, let me try rubber duck debugging it for a minute before we dive in together.
- In an email or ticket
I have performed rubber duck debugging on this module and identified a missing edge case in the validation logic.