Monday, May 4, 2020

Solve your own problems! - rubber duck problem solving


If you get stuck on an issue, googling the answer is not the only way to solve the problem.   Get yourself a rubber duck, use a cardboard cutout dog or SITSE: show it to someone else!

https://rubberduckdebugging.com/
The rubber duck debugging method is as follows:
  1. Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety).
  2. Place rubber duck on desk and inform it you are just going to go over some code with it, if that’s all right.
  3. Explain to the duck what your code is supposed to do, and then go into detail and explain your code line by line.
  4. At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way.
Note: In a pinch a coworker might be able to substitute for the duck, however, it is often preferred to confide mistakes to the duck instead of your coworker.
Original Credit: ~Andy from lists.ethernal.org
https://blog.codinghorror.com/rubber-duck-problem-solving/
At Stack Exchangewe insist that people who ask questions put some effort into their question, and we're kind of jerks about it. That is, when you set out to ask a question, you should …
  • Describe what's happening in sufficient detail that we can follow along. Provide the necessary background for us to understand what's going on, even if we aren't experts in your particular area.
  • Tell us why you need to know the answer. What led you here? Is it idle curiosity or is this somehow blocking you on a project? We don't need your whole life story, just give us some context here.
  • Share your research on your problem; what have you found so far? Why didn't it work? And if you didn't do any research … should you even be asking? If you're inviting us to spend our valuable time helping you, it's only fair that you put in a reasonable amount of your valuable time into crafting a decent question. Help us help you!
By trying to explain an issue to the rubber duck, you may discover an answer that you did not come up with before.  This is used as a code review technique but can be used for lots of problem solving.

Try it!

For fun, you can read "The Myth of the Cardboard Cutout Dog".
https://www.sjbaker.org/humor/cardboard_dog.html



No comments:

Post a Comment

Solve your own problems! - rubber duck problem solving

If you get stuck on an issue, googling the answer is not the only way to solve the problem.   Get yourself a rubber duck, use a cardboard...