Verbose Logging

software development with some really amazing hair

T + G I F R

Rubber Duck Debugging

· · Posted in Programming
Tagged with

Your software has bugs.

Deal with it.

To fix these bugs, I prefer the rubber duck debugging technique. Well, maybe prefer is too strong a word, but it’s definitely the first stop.

Rubber duck debugging is when you have a bug, and can’t yet see what the problem is. You get a rubber duck, put it next to your monitor, and explain the problem you’re having. In the process of explaining the bug, you realize the root problem and are able to fix it.

It’s a solid, well tested and scientific method to fix most software problems.2

It doesn’t even have to be a rubber duck. It could be a zombie, android, or tribble.

It doesn’t even have to be inanimate; it can be a coworker! Chances are you’ve already partaken in rubber duck debugging. Asking Jill to come over and look at your code while you explain it to her, realizing your mistake in the process, is the same thing.

Now go forth and expand your problem solving techniques to include explaining things. Explain it to ducks, to fish, and to stuffed novelty items. Explain it to Star Trek figurines, and to your pets. Explain it to Bob, Jill, Mike, and Dana! Explain it to the world, and you’ll probably solve your problem.

You even might learn something in the process.

1 Photo copyright hetgallery/Hiromitsu Morimoto Rubbe Duck in Osaka / Florentijn Hofman

2 Not actually true.