Rubber Duck Debugging

Nick Holland on Flickr

Ducks, dolls, and other stuff make great programmers. Here's how it works.

Got an impossible coding error to figure out, no matter how many times you read your code, line after line? How do you solve an unsolvable problem?

Talk to a duck. Or a teddy bear. Or your Star Wars Pop! Vinyl doll (or American Girl doll). While it’s called Rubber Duck debugging, any inanimate object works.

If you sit your duck down next to your computer and carefully explain what your code is designed to do, then explain line by line how your code does what it’s supposed to do, at some point you will find a solution to your problem. You will find the bug. Or find an idea or two how to fix the problem.

While it’s fun to think of inanimate objects as master coders, when humans explain code in detail often they see things they don’t notice when simply reading code. The difference between what we think happens and what actually happens becomes clear.

So keep a duck or other favorite object by your computer when you code. While they might be happy to stand around all day, they also can help when you get stuck coding.

Learn More

Rubber duck debugging

Why Rubber Duck Debugging is the best way to debug your code

The Rubber Duck Story

Rubber Duck Problem Solving

Ask the Duck

How a Rubber Duck Taught Me to Be a Better Programmer

Also In The December 2017 Issue

Building and creating your tools with the Minecraft toolbox helps you survive the game.

Sensors give robots the senses humans have.

30+ ideas for all age holiday gifts, from books to apps to board games to VR and more.

There might be a reason that too-real robot and video game character creeps you out.

This programming language uses colors instead of text and punctuation to add and perform other tasks.

Knowing how passwords are cracked can help you create better passwords.

There are a number of strategies teachers (plus parents and students) can take to learn programming.

This project uses conductive thread to create a glove to activates your phone.

Software programming does neat things with language, in this case, mixing capital letters.

This Scratch game has lots of ways you can customize the game play. No cats were harmed in the making of this article either.

Links from the bottom of all the October 2017 articles, collected in one place for you to print, share, or bookmark.

Interesting stories about computer science, software programming, and technology for October 2017.