Rubber Duck Chronicles: Coding, Debugging, and Friendship
Once upon a time, in the hallowed halls of grad school, the web and smartphones were the stuff of science fiction dreams. The only thing smart was the person behind the keyboard, and that, too, was debatable.
Ah, you fortunate souls of today, coddled by the luxuries of smart IDEs, Google, Stack Overflow, and now Copilot! My first dance with an IDE was in the mid-1980s, twirling around with TurboPascal before I started my grad school journey.
Now, here I am in the big leagues of graduate school, programming in a “real language” (C++), and all I had was VI, arcane command lines, and complex makefiles, all of which made debugging a pain in the ASCII. Graphical interfaces? Pshaw! All the coding I did was via the trusty DEC VT terminals to access the mighty VAX machines.
Debugging code in that antediluvian era was like being in a fencing tournament armed with nothing but a wet noodle.
You can only go so far with printfs and core dumps. Other than screaming at the computer and tearing your hair out (those who know me will know why I am the way I am), you just had to walk away.
Enter my secret weapon—the art of walking away.
I would do that. I would get up and walk away. But, only as far as Matt’s desk. Matt, a comrade-in-arms from my grad school days, wasn’t just a dear friend; he was also my trusted ally, or enemy, to be more exact, in our epic battles fighting our way through hordes of invading demons from hell in Doom.
I will bring Matt over, plonk him down in front of my computer, and walk him through whatever problem was stumping me at that moment.
But, of course.
Nine times out of ten, I knew what I had done wrong before I had finished.
You see, dear reader, I had inadvertently stumbled upon the now-famous technique of rubber duck debugging. Having grown up in Bangladesh, I never had an actual rubber duck. I didn’t even know what a rubber duck was.
But once I met Matt, I finally had my own rubber duck — my best friend Matt.
The next time you find yourself with a coding problem, hold off a bit before you hit the web. Summon the spirit of Matt, grab your rubber duck, and quack your way out of your predicament. And spare a thought for those of us who battled the code gremlins in dimly lit labs, armed only with their wits and a rubber duck.
From wiki: In software engineering, rubber duck debugging (or rubberducking) is a method of debugging code by articulating a problem in spoken or written natural language. The name 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. Many other terms exist for this technique, often involving different (usually) inanimate objects, or pets such as a dog or a cat. Teddy bears are also widely used.