Thedermreviews

View Original

How To: Rubber Duck Debugging

A Problem-Solving Tool Beyond the Code

By: Matthew French | 2min read

Matthew works as a Senior Software Engineer at a popular late stage start-up and regularly creates content focused on creativity and learning at @mattsideabox.

Software engineers have a charming and surprisingly effective trick up their sleeves when it comes to overcoming mental roadblocks in coding: Rubberducking, or rubber duck debugging.

This technique involves sitting down with a literal rubber duck and engaging in a conversation about the problem at hand. While primarily a tool for software engineers, the benefits of rubber ducking extend beyond the realm of code. (PS: You don’t have to quack, your language of choice is completely fine)

The Zen of Rubber Ducking

Beyond the world of programming, the beauty of rubber duck debugging lies in its simplicity. Even before uttering a word, the act of taking a break, finding that trusty rubber duck, and preparing for a chat provides the brain with a much-needed breather. This practice is a valuable cognitive reset, applicable to various problem-solving scenarios.

Action step: Identify the Problem and Take a Break.

  • Clearly define the problem at hand.

  • Step away from the issue to disengage and gain a fresh perspective.

  • Use this break to locate your rubber duck.

Initiating the Conversation

As the dialogue begins, the feathery companion eagerly awaits the lowdown on the problem. Regardless of the field, starting from the beginning is crucial. Painting a comprehensive picture of the task at hand, elucidating the steps taken, and delving into how the problem manifested offers clarity and a structured approach, applicable beyond coding challenges.

Action step: Introduce Your Duck to the Problem.

  • Sit down with your rubber duck as your confidant.

  • Provide a comprehensive overview of the problem, starting from the beginning.

  • Gain clarity on the mission, steps taken, and stumbling blocks.

Quacking Through the Details

Following the problem overview, it's time to delve into the specifics. Whether troubleshooting a technical issue or navigating a complex challenge in a different domain, talking through the nitty-gritty often reveals overlooked mistakes or forgotten steps. This reflective process is a universal aid in problem resolution.

Action step: Describe Your Approach & Reflect On Missteps

  • Delve into the specifics of your problem-solving approach.

  • Share what you've attempted, what worked or failed, and your current state of mind.

  • Verbalizing details often reveals overlooked mistakes or forgotten steps.

Why a Duck, Not a Human?

One might question the choice of a rubber duck over a human confidant, especially in non-technical contexts. While seeking input from others is valuable, the reality is that there may not always be someone available or familiar with the intricacies of a particular situation. Additionally, the silent, non-judgmental, and all-ears nature of the rubber duck makes it an ever-reliable companion in times of crisis, regardless of the problem's nature.

To Sum Up

If we break rubber ducking down to 6 steps:

  1. Identify the Problem and Take a Break

  2. Introduce Your Duck to the Problem

  3. Describe Your Approach

  4. Engage in a Dialogue

  5. Consider Alternatives

  6. Reflect and Iterate

In the vast landscape of problem-solving, rubber duck debugging emerges as a versatile tool. Beyond its roots in software engineering, this practice offers a therapeutic and structured approach to problem resolution applicable across various disciplines. So, whether you're wrestling with lines of code or navigating the complexities of a different challenge, don't hesitate to grab your trusty rubber duck and start quacking away your problems. After all, the power of the duck is universal.

Read Matthew’s Article: 4 ways to Think like a Software Engineer and Win your next Project