This website collects cookies to deliver better user experience
Rubber Duck Debugging in 100 Seconds
Rubber Duck Debugging in 100 Seconds
🦆 What is Rubber Duck Debugging?
Rubber Duck Debugging refers to debugging your code with the aid of a rubber duck. You describe and explain each step of your code, in detail, to the duck, until you notice the problem that's been causing the unexpected behavior.
👤 Origination
The name Rubber Duck Debugging is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, line-by-line, to the duck.
📋 How to apply
The rubber duck debugging method is as follows:
Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety).
Place rubber duck on desk and inform it you are just going to go over some code with it, if that’s all right.
Explain to the duck what your code is supposed to do, and then go into detail and explain your code line by line.
At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way.