Talk to a duck

24 Feb 2015 | 2 minutes de lecture

Categories: debugging

Tags: debugging, talk, slides

Last october, I gave a lightning talk at Blend Web Mix, a conference in Lyon, France. My talk was about Rubber duck debugging. I named it “Talk to a duck”. This was a french speaking conference, but this is a quite interesting subject, so I’ll try to summarize here what I said.

Talk to a duck - Slides cover

I started my speech with a small anecdote from my work as technical leader, about other developers coming to me with some logical problem, and finding the solution while explaining it out loud, while I didn’t even say a word (Yes, this part of my job is very easy).

This is such a frequent case that some people created a debugging method based on explaining problems out loud, The rubber duck debugging method. You’ll explain a problem, it’s context and as much detail as possible to a rubber duck and your mind flow will eventually lead you to the solution.

This can look ridiculous at first so I backed what I was saying with some science facts. First with the Invisible Gorilla Experiment, explaining the basics of Inattentional blindness, the reason why we need to explain our bugs out loud so that our brain flow can slow down and focus.

Another science experiment made by the swiss psychologist Jean Piaget showed that around our tenth anniversary, we start to become aware that other people and objects have a different point of view. This is an essential step to explain some problem to anyone. Basically, anyone over 12 year old can Rubber Duck Debug.

I then explained that you can go further, by replacing the duck with a coding buddy : a fellow programmer to whom you can explain your logical bugs, ideally with him knowing nothing of your project. You’ll obviously get better feedback, but remember to always take time to explain the problem.

This is a short summary of a short talk about this subject, so I encourage you to look further into rubber duck debugging, and in psychology of development in a more general purpose (I will talk a lot about this subject here).