4 ms·
Rubber duck debugging
- dylanrw 14y agoI tend to do the same thing when I peel away from the screen and take a shower to think on a problem. Maybe instead of keeping it all in my head a rubber duck would be more efficient...
- imperio59 14y agoSome of my personal favorites: http://www.dodgycoder.net/2011/11/yoda-conditions-pokemon-exception.html http://www.dodgycoder.net/2011/11/yoda-conditions-pokemon-ex... "Pokemon exception catching" (Gotta catch 'em all!) And in OOP, Spaghetti with meatballs. http://en.wikipedia.org/wiki/Spaghetti_code#Spaghetti_with_meatballs http://en.wikipedia.org/wiki/Spaghetti_code#Spaghetti_with_m...
- dclowd9901 14y agoMy version's far more embarrassing. I go to a real life colleague of mine because I couldn't figure it out for the life of me, and as I explain it to them, I come to the answer myself in the middle of explaining it to them. So I succeed in wasting my colleagues time and making myself look like an idiot.
- greenyoda 14y agoIf you try to explain the problem to your colleague in an e-mail instead of in person, you can avoid sending the e-mail if the answer comes to you in mid-explanation. I can't even count how many bugs I've solved this way.
- lloeki 14y agoExcept a real person can ask questions, even naive ones, and still guide your mind towards the solution. The process is incredibly close to maieutics, with the "duck" playing Socrates.
- enraged_camel 14y agoNo. Greenyoda is talking about the process where writing down just the initial description of the problem is sufficient to notice the solution. Happens to me all the time, and I also observe it happen to others. My more junior coworkers sometimes sent me IMs like this: Coworker: Hey enraged_camel, I'm having an issue, I was wondering if you can help It goes like this <description of the issue, followed by a 10-15 second pause> Actually I think I figured it out... Sometimes I read their problem description and don't respond for several minutes to allow them to have that internal conversation with themselves. And a lot of the time, it works.
- r00fus 14y agoThis is called, in my experience, "throwing it against a backboard" (ie, basketball reference). It's incredibly useful - not everyone can explain things to a rubber duck but can usually explain a problem to a real person. Plus you get some more human interaction - which as a programmer, you probably need more than you are allowing yourself (or your coworker is).
- anttipoi 14y agoSome breeds of dogs are very good listeners. I've heard of libraries where they occasionally have a dog around for children to read to: it apparently is a good experience to learn to read by reading out loud to a patient listener. I've wanted to have a code dog for a long time. I'd invite the bug hound over and explain my code to it.
- silencio 14y agoI used to do this to random things I had on my desk, then a rubber duck (that I lost...), and eventually My Little Pony toys - http://pic.twitter.com/sijtDFZh http://pic.twitter.com/sijtDFZh ...turns out that doing a question/reply in my head with a MLP toy with their respective in-show personalities would sometimes help me figure things out. But I recently adopted a cat, and now my cat is who I talk to when I need to talk a problem over :D http://www.flickr.com/photos/chix0r/8419684010 http://www.flickr.com/photos/chix0r/8419684010
- pjscott 14y agoThose are easily the most adorable debugging methods I have ever heard.
- kogir 14y agoPinkie Pie is helpful, but the DTrace Laser Pony is the best debugging pony :) http://dtrace.org/blogs/about/dtracepony/ http://dtrace.org/blogs/about/dtracepony/
- n3rdy 14y ago> and eventually My Little Pony toys You were right to replace the pony. http://lesswrong.com/lw/efi/friendship_is_optimal_a_my_little_pony_fanfic/ http://lesswrong.com/lw/efi/friendship_is_optimal_a_my_littl...
- mistercow 14y agoI also like to use my cat as a rubber duck, but he tends to get distracted and tries to lie on my wrists while I type.
- kennethlove 14y agoEvery time this pops up, I just have to mention http://developerduck.com http://developerduck.com
- nsns 14y agoCould try talking to an actual bug.
- caffeinewriter 14y agoTime to get a pet cricket.
- jacobr 14y agoA rubber duck HAL-bot would be cool, it would answer with some programming related jibberish from previous questions. You could even feed it some CS literature!