Pocobor.

Me and My Ninja Ducky

Rubber Ducky Debugging

I was recently introduced to the software debugging practice known as “rubber duck debugging” (I credit this indirectly to this Reddit post).  It’s an incredible methodology with an extremely low barrier to entry – all you need is a rubber ducky. Seriously, all you need is a plastic floatable duck, the one we all know and love (or better yet a ninja rubber ducky). You might be asking yourself, “What can an inanimate floating bath tub toy do for my software?” The truth is that ducky could save you hours of pain and suffering and maybe even earn you a couple of uncomfortable stares from your co-workers.

So How Does This Work?

1. Buy a rubber ducky from Amazon (what don’t they sell?)
2. Place ducky on your desk facing you
3. Explain (out loud) your buggy code or algorithm to your ducky
4. Laugh out loud when your ducky finds the bug

So Why A Rubber Ducky?

Why not? Plus you feel pretty bad-ass when you’re coding with a Ninja Rubber Ducky. Honestly, all you need is a sounding board to sort your code out. It’s pretty easy to get the blinders on when you crank out a couple hours worth of software – from time to time you’ll notice that your brain and your typing don’t align, especially when fatigue sets in. If you are forced to explain your code to someone (even your rubber ducky), you’ll easily find the places where your intended functionality does not match the code you wrote. By using the rubber ducky instead of a busy co-worker, you can sort through the obvious problems without needlessly disrupting the workflow of your company.

Funny thing is I’ve been doing this for years, just not so formally. I am always more effective after the 9 to 5’ers have stepped out because I tend to talk to myself, Mr. Compiler, or Mrs. Computer when I write software. Now I feel open to talk during normal business hours because I’m talking to someone, my rubber ducky. I haven’t decided if it’s more bizarre to be talking to myself or a rubber ducky – regardless, the ducky definitely adds some personality to the discussion.

Be Sociable, Share!