Why are we talking about rubber ducks on the Web Services blog? Turns out, rubber duck debugging is an actual thing that developers do…!

As part of our Agile working process, we have daily meetings where we update each other on what we are working on. And we talk about any issues we are encountering. During a recent meeting, one of our developers said he had “rubber ducked” some code with some other developers… Hmmm, Mike, did you just say you “rubber ducked?!”

Our team of developers surrounded by code with rubber duck in center

What is rubber duck debugging?

Rubber ducking is a technique that programmers use to debug code. They explain it line by line to a rubber duck. Or any entity that understands almost nothing about the problem. It’s like having a sounding board to bounce your ideas off of. This helps to simplify and clarify problems. And by taking it step-by-step, the solution often presents itself.

How does it work?

Explaining something to someone helps you to better understand it. It lets you see things from a different perspective. And you may uncover or catch something that you missed before.

Legend has it that Andrew Hunt and David Thomas (a couple of programmers from days gone by), would carry around an actual rubber duck. When they got stuck, they’d explain their code to the duck. But not just the code itself. They’d also describe their goals and what they wanted the code to do. And they would do this in as clear and simple terms as they could.

Have you ever been in a situation where you are explaining a problem to a friend…? And before you even finish, you’ve come up with the solution. Same idea. The bonus with rubber duck debugging is that you don’t even need to disturb anyone.

To solve problems and to learn things, it often helps to teach them to someone else. This is the premise behind rubber duck debugging. Unfortunately, the duck doesn’t give you the solution… But by talking things out and explaining issues, you clarify and uncover solutions.

Try it Out

Rubber duck debugging is a popular technique in the programming world, but maybe it’s not just for programmers… Anyone who is working through a complex problem or trying to brainstorm a creative solution could benefit from it.

So, the next time you’re feeling stuck on a problem, grab a rubber duck (or your pet) and give it a try. You may be surprised at just how helpful it is. Quack quack!

Sign up for our newsletter for more web tips and updates :)