Rubber Duck Debugging The Digital Way

Anyone who slings code for a living knows the feeling all too well: your code is running fine and dandy one minute, and the next minute is throwing exceptions. You’d swear on a stack of O’Reilly books that you didn’t change anything, but your program stubbornly refuses to agree. Stumped, you turn to the only one who understands you and pour your heart out to a little yellow rubber duck.

When it comes to debugging tools, this digital replacement for the duck on your desk might be even more helpful. Rubber duck decoding, where actually explaining aloud to an inanimate object how you think the code should run, really works. It’s basically a way to get you to see the mistake you made by explaining it to yourself; the duck or whatever – personally, I use a stuffed pig– is just along for the ride. [platisd] took the idea a step further and made his debugging buddy, which he dubs the “Dialectic Ball,” in the form of a Magic 8-Ball fortune teller. A 3D-printed shell has an ATtiny84, an accelerometer, and an LCD screen. To use it, you state your problem, shake it, and read the random suggestion that pops up. The list has some obvious suggestions, like adding diagnostic print statements or refactoring. Some tips are more personal, like talking to your local guru or getting a cup of coffee to get things going again. The list can be customized for your way of thinking. If nothing else, it’ll be a conversation piece on your desk.

If you’re more interested in prognostication than debugging, we have no shortage of Magic 8-Ball builds to choose from. Here’s one in a heart, one that fits in a business card, and even one that drops F-bombs.

Continue reading “Rubber Duck Debugging The Digital Way”

Constant Innovation And Useless Ducks

[Mike]’s hacks aren’t breathtaking in their complexity, but they got a good chuckle out of us. [Mike], the CEO of The Useless Duck Company, lives in a hub of innovation somewhere in Canada, where he comes up with useful gadgets such as a Fedora that tips itself, or a door that locks when you’re shopping for gifts for your wife and you’re in incognito mode.

It all started when he was trying to learn the Arduino, and he put quite a few hours into making a device that could wirelessly squeak a rubber bath duck from the bathroom. The whole project reminded us of our first clumsy forays into the world of electronics, with entirely too many parts to complete a simple function. The Arduino being the gateway drug it is, it wasn’t long before he was building a bartending robot.

We hope he continues to construct more entertaining gadgets.

Continue reading “Constant Innovation And Useless Ducks”