3 Alternative Ways of Rubber Duck Debugging

Known among programmers for being a method of analysing code, rubber duck debugging can help anyone deal with a wide range of difficulties in an effective and satisfying way.

What, How, and Why

By using rubber duck debugging (or rubber ducking), programmers basically help themselves analyse code by explaining it line-by-line to a rubber duck, let’s see why.

The sole act of teaching forces us to think of a subject from different perspectives, which helps us understand it better, regardless of any external feedback.

And while exposing our problem at hand, it can happen that a solution arises naturally from within ourselves, with no hints by the audience!

Thus, with rubber ducking we try to invoke the same eureka moment by talking to our plastic buddy, without disturbing anyone else.

After all, it could be annoying to make use of someone else’s help just to discover that the solution was embarrassingly obvious!

Alternative Ways of Rubber Ducking

Good news is: when dealing with any kinds of problems at work (not just coding issues), we can successfully deal with them by using the very same principle behind rubber ducking.

Now, you probably do not feel like getting involved in a conversation with a duck-shaped piece of rubber which acts as a silent interlocutor, so let’s give the alternatives below a try.

Alternative 1: The Email

First alternative consists of preparing an email to be sent to colleagues, where you seek for their help and advice.

You start writing the following content in a clear and concise way:

  1. Summary of the problem;
  2. Difficulties being faced with some details; and
  3. Approaches already considered.

While writing, you often come up with a solution all by yourself: what a joy! In this case, no email needs to be sent thus none of your colleagues’ time is wasted.

Or if you finish writing and no solution comes to mind, that’s fine too: by sending the email you are going to raise an issue which is apparently non-trivial.

Moreover, without having to interrupt your colleagues, the email will probably make it easier for them to understand the problem and help you.

Alternative 2: The List of Questions

Similar to the above, this alternative consists in preparing a list of questions you need to ask someone. During the preparation, you often clarify your doubts all by yourself: yeah!

Otherwise, if at the end of the preparation you still need help, then you have just prepared a list of relevant and thoughtful questions to ask.

Alternative 3: The Chatbot

Haven’t tried it yet, but I think talking to ELIZA can also be a valid alternative.

It’s an early chatbot that applies text replacements to what you write in order to emulate a conversation between you and a psychotherapist.

Thus like a rubber duck it doesn’t give you any answer: at the very most it can encourage you to describe the issue.

At least, it could help to have a little fun while pondering about the problem at hand.


© 2024 Massimo Nazaria

RSS

Licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.