Congratulations! Your support has been successfully sent to the author
Rubber Duck Debugging

Rubber Duck Debugging

Published Jun 19, 2020 Updated Jun 19, 2020 Offbeat
time 3 min
2
Love
0
Solidarity
0
Wow
thumb 0 comments
lecture 389 readings
2
reactions

On Panodyssey, you can read up to 10 publications per month without being logged in. Enjoy9 articles to discover this month.

To gain unlimited access, log in or create an account by clicking below. It's free! Log in

Rubber Duck Debugging

Have you ever been stuck on a problem and could not figure out the solution no matter how hard you tried to problem solve it? You tried and tried and yet you found yourself making no progress. So in frustration you pushed away whatever you were doing, walked down the hallway to find your spouse and exclaimed:

“Dear, I need your help! I have this problem and I can’t fix it!" 

“Yes honey, what’s the problem!? How can I help?” your spouse replies. 

So you start explaining this problem and suddenly you find yourself pausing mid sentence and saying “actually, you know what? I just found the answer!”.

This happened to me COUNTLESS times over different aspects of my life, not just in learning programming. On the other hand, I have had others come to me to ask a question, only to find that they found the answer to their own question mid sentence, or sometimes even before they started explaining the problem to me.

In the software development world, this is known as “Rubber Duck Debugging”, but chances are, you have done a variation of this yourself in some aspect of your life, you just didn’t know it as this!

 

 

So, when you get stuck on a problem.. try explaining it to someone else or some inanimate object.

 

What is Rubber Duck Debugging?

David B Hayes of thoughtful code explains the psychology of why this happens in 2 shifts:

  1. There is a strong likelihood that you will slow down and be more contextual when explaining your problem than when you were power typing that code, or speed reading that Flight Operations Manual.

  2. Whoever or whatever you are explaining the problem to, may not have the same level of understanding of the subject that you do. So therefore you are forced to explain the problem in a much bigger picture, sometimes explaining the foundational knowledge to then get to the specialised area where you are stuck. 

So if your duck doesn’t know how to code, or fly an airplane, you have to first teach the duck how to code, or how to fly an airplane!

It is this exact psychological shift that makes rubber duck debugging effective. Suddenly you were forced to break out of that rut. You approached the problem from a completely different angle. That's the key takeaway.

https://www.thoughtfulcode.com/rubber-duck-debugging-psychology/#:~:text=%E2%80%9CTeaching%E2%80%9D%20Your%20Rubber%20Duck%20to,code%20through%20in%20your%20head.&text=It%20is%20precisely%20this%20that%20makes%20rubber%20duck%20debugging%20effective.

What if this didn't fix it?

Perhaps this didn’t work. perhaps you are still stuck after explaining a problem for hours.

Have you ever had a situation where you worked on a problem only to get constantly stuck, then have the answer come to you in the middle of the night when you were sleeping? Or having a bath?

Your subconscious mind had probably been working on the problem the entire time in a stage of creativity know as the ‘incubation’ stage which then led you to having your eureka moment.

https://www.interaction-design.org/literature/article/what-are-the-stages-of-creativity

Your brain works on things constantly. Sometimes it just needs to be redirected to look at the bigger picture.

The last keypoint is try teaching someone. If you never share or teach the knowledge you know with anyone, you are actually shortchanging your own development.

If you teach someone, your understanding of the topic itself will become better. Because it makes you retrieve what you have learnt and also makes you learn the material to a deeper level of understanding to then teach someone. Isn’t it funny, when we teach something to someone, the benefit of that learning is returned to us!

https://digest.bps.org.uk/2018/05/04/learning-by-teaching-others-is-extremely-effective-a-new-study-tested-a-key-reason-why/#:~:text=The%20learning%2Dby%2Dteaching%20effect,been%20demonstrated%20in%20many%20studies.&text=For%20a%20new%20study%20in,what%20they've%20previously%20studied.

 

To Summarise

  1. Try explaining the problem to someone or something else.

  2. Allow the problem to incubate/sit in your subconscious mind

  3. Teach others what you have learnt.


For an alternative resource

https://rubberduckdebugging.com/

lecture 389 readings
thumb 0 comments
2
reactions

Comments (0)

Are you enjoying reading on Panodyssey?
Support their independent writers!

Prolong your journey in this universe Offbeat
Bissextile
Bissextile

Un mot d'un dictionnaire, ma...

Bernard Ducosson
1 min
Avent
Avent

Un mot d'un dictionnaire, ma définition, votre sourire, ma joie.

Bernard Ducosson
1 min
Curiosité
Curiosité

Un mot d'un dictionnaire, ma définition, votre sourire, ma joie.

Bernard Ducosson
1 min

donate You can support your favorite writers

promo

Download the Panodyssey mobile app