I’m about to teach you how to take Rubber Duck Debugging to the next level. But before I can do that, let’s review classic Rubber Duck Debugging.
Rubber Duck Debugging
The wiki entry describes this technique as follows.
In software engineering, rubber duck debugging or rubber ducking is a method of debugging code. The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, line-by-line, to the duck. Many other terms exist for this technique, often involving different inanimate objects.
It may sound trivial, but there is value in talking out your problems. Even if you don’t have a teammate, getting out of your own head can give you a new perspective.
But, long ago I realized that my rubber duck has a missing feature. He doesn’t remember anything… so I have to remember everything for him.
There are several benefits to having a duck with a memory, but here are a few of my top picks.
- Write out ideas and read them back to yourself.
- Time tracking and accountability.
- Copy and paste frequently used snippets.
- Recover from interruptions and unplanned work.
A Digital Duck
The key difference with the advanced duck is the method of communication. Classic duck is spoken to. Advanced duck is instant messaged. And the chat history is its memory.
There are many ways to chat with your digital duck. My favorite method is by using a fully-featured chat client such as Discord, HipChat, or Slack. These will hyperlink text, prettify your code, and allow for advanced search of your duck’s memory.
So how can you setup your duck? Create a new Private room/server/channel called “rubber-duck”. Optionally, add a cute duck icon for the room.
Then, tell your duck all your problems. Give him the details, and update him often. Once you get the hang of it, this will become second nature.
When you’re on a roll, it might look something like this:
The duck remembers all, so go ahead and make that 2nd pot of coffee. Your incomplete thought will be here waiting for you!