DEV Community

Discussion on: Rubber duck debugging doesn't need to involve a duck!

Collapse
 
exadra37 profile image
Paulo Renato

Well when I was a freelancer I would just speak to my wife about my frustration with the problem, thus trying to explain it in non-technical words, was sometime just enough to shed some light in the right direction.

Now that I work in an office I just bug one of my colleagues... shame on me :(.

Another trick is to read your code backwards, because it breaks the way your brain is used to think about it.

Another way is to write the docs blocks for each class/function or the README, because it forces you to look into the problem from another perspective.

And for last, sometimes you just need to take a break, and suddenly, when you are not thinking on the problem anymore, your brain gets illuminate with a possible solution for it, or when you are back to the problem you are forced into a fresh start, its just like rebooting your Windows machine to get it back on the right track ;).

Collapse
 
nataliedeweerd profile image
𝐍𝐚𝐭𝐚𝐥𝐢𝐞 𝐝𝐞 𝐖𝐞𝐞𝐫𝐝

Must confess I do also speak to my colleagues sometimes - haha. I'm the only developer, so whilst some may understand technical terms, I do have to break things down as non-technically as possible. But you're right, doing this helps me solve the problem as I'm talking. To which I just jokingly thank them and turn back to my screen, leaving them a little dazed!

And for last, sometimes you just need to take a break, and suddenly, when you are not thinking on the problem anymore, your brain gets illuminate with a possible solution for it,

YES!! The amount of times I'm driving home and solve the problem I've been worrying over is incredible. I have to quickly grab my phone and record a possible solution so I don't forget it!

Collapse
 
exadra37 profile image
Paulo Renato

To which I just jokingly thank them and turn back to my screen, leaving them a little dazed!

I often say... Thanks for being my Rubber Duck ;)

And then they go.. What is that?

Then my fast answer is to show them this site.

YES!! The amount of times I'm driving home and solve the problem I've been worrying over is incredible.

Exactly, this our brain saying thanks for letting me to take a break ;)

But the hard part for me is giving up of trying to solve the problem and take the break or just work in something else ;)

Thread Thread
 
nataliedeweerd profile image
𝐍𝐚𝐭𝐚𝐥𝐢𝐞 𝐝𝐞 𝐖𝐞𝐞𝐫𝐝

Haha I used to have a colleague whom I lovingly nicknamed Ducky, as he helped me solve soooo many problems!