Skip to main content

Command Palette

Search for a command to run...

Rubber Duck Debugging

Updated
2 min read
Rubber Duck Debugging
P
Senior Software Engineer specialising in cloud architecture, distributed systems, and modern .NET development, with over two decades of experience designing and delivering enterprise platforms in financial, insurance, and high-scale commercial environments. My focus is on building systems that are reliable, scalable, and maintainable over the long term. I’ve led modernisation initiatives moving legacy platforms to cloud-native Azure architectures, designed high-throughput streaming solutions to eliminate performance bottlenecks, and implemented secure microservices environments using container-based deployment models and event-driven integration patterns. From an architecture perspective, I have strong practical experience applying approaches such as Vertical Slice Architecture, Domain-Driven Design, Clean Architecture, and Hexagonal Architecture. I’m particularly interested in modular system design that balances delivery speed with long-term sustainability, and I enjoy solving complex problems involving distributed workflows, performance optimisation, and system reliability. I enjoy mentoring engineers, contributing to architectural decisions, and helping teams simplify complex systems into clear, maintainable designs. I’m always open to connecting with other engineers, architects, and technology leaders working on modern cloud and distributed system challenges.

Rubber ducking, also known as "rubber duck debugging," is a valuable method employed by programmers to troubleshoot and solve coding issues. This technique involves carefully explaining the code, step by step, to an inanimate object, frequently a rubber duck, though any other object can serve equally well. The method derives its name and popularity from the book "The Pragmatic Programmer" by Andrew Hunt and David Thomas, which highlighted how articulating problems aloud can significantly aid in debugging.

The principle behind rubber duck debugging is straightforward yet remarkably effective. Programmers choose an object, often a simple rubber duck or something similarly innocuous, and then begin describing their code and the challenges they are encountering. As they explain the intended function of each line or block of code, they are forced to slow down, articulate clearly, and scrutinise their own assumptions and logic. Through this careful, verbalised reflection, programmers frequently gain fresh insights and uncover errors or inconsistencies that were previously overlooked. One reason rubber duck debugging is so effective is that it promotes clarity of thought. Explaining the code aloud compels the programmer to deeply understand and simplify complex logic and assumptions. It also mitigates cognitive biases, which often cause developers to miss obvious mistakes by repeatedly approaching the problem in the same mental patterns. The simplicity of this technique adds to its appeal, as it requires no specialist tools, software, or additional expenses.

To practice rubber duck debugging successfully, it is essential to articulate assumptions clearly, describing the intended behaviour of each part of the code in detail. Programmers should question each step of their code's logic, patiently and methodically analysing the reasoning behind every decision. By adopting this disciplined approach, programmers increase their likelihood of identifying the precise nature of any problem. Importantly, the principle of rubber duck debugging is not confined solely to programming. Its effectiveness extends into other professional contexts, such as general problem-solving and decision-making processes. Clearly verbalising challenges and potential solutions can help clarify complex situations across various fields.

In essence, rubber duck debugging reinforces essential skills such as clear communication, reflective thinking, and logical analysis. Even though the "duck" may remain silent, it remains an indispensable partner in resolving complex issues efficiently and effectively.