The Power of Rubber Duck Debugging

Thinking Aloud as a Metacognitive Strategy

If you’ve ever tried to explain a problem to someone else, and suddenly found the solution yourself, you’ve experienced the magic of “Rubber Duck Debugging.” This quirky, yet highly effective, method is not just for coders. It’s a metacognitive strategy that’s equally transformative in education. In my own teaching practice, the influence of this technique has been so profound that I’ve even named my class “The Ducks Class” in honour of the method that encourages learners to articulate their thought processes.

So what Is Rubber Duck Debugging?

Rubber Duck Debugging is all about verbalising your thinking. Talking through a problem. Originally coined in the world of programming, it involves explaining your code or problem aloud to a rubber duck, or any inanimate object for that matter. This process forces you to slow down, re‐examine your potential assumptions(Remember: “assumptions are the enemy of clarity”), and break down complex problems into smaller, manageable steps. The concept was popularised by The Pragmatic Programmer by Andrew Hunt and David Thomas, and it shows that sometimes, just talking things out can reveal insights and errors that were previously hidden.

For those interested in the origins, you can find out more about, and get your own copy of The Pragmatic Programmer here: Book Link

The Pragmatic Programmer Book Cover

Metacognition and the Think‐Aloud Protocol

The act of thinking aloud isn’t a new idea in education. The think‐aloud protocol has long been recognised as a powerful metacognitive tool that enables learners to reflect on their reasoning and problem-solving processes. By verbalising what they’re thinking, students become active participants in monitoring their own learning, they learn how to identify gaps in understanding, and make real-time adjustments to their strategies.

Research in educational psychology consistently highlights the benefits of these approaches. The Education Endowment Foundation has shared on this topic extensively and through research, have repeatedly demonstrated that when learners articulate their internal thought processes, they are more likely to engage in deeper processing and self-correction. 

This method isn’t just a debugging trick for programmers; it’s a fundamental cognitive strategy that improves learning across disciplines.

Insights from Tom Sherrington and W

alkThrus

Another big advocate for these reflective practices is Tom Sherrington. His work, especially the “WalkThrus” approach, has been influential in demonstrating how ‘Narrate Your Thinking’ can be integrated into everyday classroom practice. In his WalkThru books, Sherrington models his internal thought processes step-by-step, providing learners with a window into effective problem solving. This transparent method of teaching allows students to see how a teacher approaches a problem, making it easier for them to adopt similar strategies in their own learning.

Tom’s emphasis on the power of thinking aloud resonates with broader metacognitive research. By encouraging both teachers and students to verbalise their reasoning, WalkThrus help demystify complex problems and transform abstract cognitive processes into tangible, learnable steps. You can explore more about his approach on Tom Sherrington’s Walktru website.

Rubber Duck Debugging in Action: Real Classroom Scenarios

In the Primary Years: The Ducks Class

In my very own Ducks Class, where I work with Key Stage 1 learners, we’ve embraced the principles of rubber duck debugging in a playful yet effective way. The classroom has two soft toy ducks, Donald and Daisy(Named by the children at the start of the year. They travel home with a child every weekend to add to their adventure book(A scrapbook filled with writing, photos and activities the children do with the ducks during their days off) However, when not travelling, these two ducks live in the classroom and are to each student as a “thinking partner.” Here’s a typical scenario:

  • Scenario: A young learner is struggling to complete a simple Computational Thinking puzzle. Instead of quietly feeling frustrated, the student picks up Donald, our soft toy Mallard duck and begins to explain, step by step, what they are trying to do. “I first tried putting this piece here because it looked like it might fit, but then I realised it wasn’t quite right…the colours…” As the student talks through the problem, an ‘aha’ moment often follows.
  • Outcome: The student not only solves the puzzle but learns the value of verbalising their thought process. This exercise helps foster a classroom culture where mistakes become learning opportunities and collaborative discussion is encouraged.

At Secondary Level: Debugging Complex Problems

Older students also benefit greatly from this technique. In a secondary computing lesson, for example, the challenges are naturally more complex:

  • Scenario: A student working on an algorithm struggles with an unexpected output. Rather than immediately seeking help, the student is encouraged to explain each step of their code out loud, to a classmate, a spare object, or even to the whiteboard. I even have heard of Teachers physically letting their CS students ‘adopt’ a rubber duck.
  • Outcome: As the student articulates their logic, inconsistencies or errors that had previously gone unnoticed become clear. This method not only aids in solving the immediate problem but also builds robust debugging skills and independence in problem-solving.
Image generated by Gemini 2.0 Flash, Prompt: “Create an image of debugging”

Across the Curriculum

The principle of “talking it out” is not limited to Computing. Whether it’s a student walking through the steps of solving a mathematical equation, a writer clarifying their ideas before drafting, or a Science student outlining a hypothesis, the underlying strategy remains the same: externalising internal thought processes leads to clearer understanding and better outcomes.

CS50 and the Broader World of Computing

Harvard’s CS50 is a prime example of how reflective strategies are embraced in modern Computer Science education. CS50 emphasises the importance of debugging techniques, including the practice of talking through code. In lectures and documentation, CS50 instructors stress that explaining your thought process, akin to rubber duck debugging, is essential in resolving complex coding challenges. Explore more about CS50’s approach on their official website and check out their YouTube lectures for practical insights.

Screen grab from CS50 Lecture 1

Why Does It Work?

At its core, the value of these techniques lies in metacognition; the practice of thinking about one’s own thinking. By slowing down and articulating each step of a problem, learners engage in deeper reflection and self-monitoring. This method not only aids in identifying errors but also provides insight into why those errors occurred, thereby fostering more effective problem-solving skills.

In my Ducks Class, the transformation is evident. Students become more resilient, confident, and proactive in their learning. They understand that making mistakes is part of the process, and that talking through those mistakes can lead to powerful ‘aha’ moments.

So whether you’re debugging code, solving a complex equation, or preparing a written piece, the simple act of “talking it out” can bring remarkable clarity and insight. Rubber Duck Debugging isn’t merely a programmer’s trick, it’s a universal metacognitive strategy that empowers learners to take control of their thinking. So, the next time you or your students hit a roadblock, consider finding your “duck” and verbalising your thought process. You might just uncover the solution you were looking for.

Article written by Sethi and originally published on the ReadySetCompute website

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.