Sharing Knowledge: Rubber Duck Debugging


Every week I will share some knowledge with you on the RvdB Design social media channels and website. To kick things off, let's start with one of my favourite little tricks: Rubber Duck Debugging.
What is Rubber Duck Debugging? To answer that question, you first need to know what Debugging actually is: When you are building (new parts of) an application, sometimes the code does not exactly do what you expect it to do. Programmers refer to this as a bug in the application. When you are debugging the code, it means you are editing the code to remove the bugs from the application.
So Debugging means removing the bugs from an application. When you talk about Rubber Duck Debugging, you are using a Rubber Duck as a tool to find the bugs. The principle is simple: explain the bug in full detail to a rubber duck. Usually, while you are explaining the bug, you find the cause! It's important to not leave out any details, as assumption is very often the cause of overlooking the bug's origin.
Now I know this all sounds somewhat technical and maybe some of you don't really see how this can help you. I think this technique can help anyone in many situations. The best example I can give: You lost your keys. Consider this a bug: the keys are not at the place where they are supposed to be. Explain the problem to your rubber duck in detail, from the last moment you remember having your keys until the moment you realised they were not where they were supposed to be. All you rubber duck is stare at you while you explain the bug. But afterwards, you know exactly all the places where to look!