7

Situation:

  • Your program has a problem.
  • You spend ages debugging the program.
  • You give up and ask on StackOverflow.
  • While writing up the question you realise the answer.

This happened to me just 10 minutes ago. Anyone else ever had this happen to them?

7
  • I presume explaining it to someone would of had the same effect, but this was on a personal project.
    – Macha
    Mar 13 '10 at 20:45
  • 1
    Explaining it does not have the same effect. You have to "clean" the question to get it ready for SO, and that's where you usually solve it. Mar 14 '10 at 1:48
  • 3
    @Yar, I disagree. Often when I've been stuck for hours I explain my problem to a collegue, just to have the answer dawn on me half way through explaining it, because when you explain it you basically boil the question down into the same ingredients as you would if you were asking it on here. Mar 14 '10 at 5:42
  • 3
    It's basically online high-tech rubber duck debugging: en.wikipedia.org/wiki/Rubber_duck_debugging
    – MatrixFrog
    Mar 15 '10 at 1:00
  • 2
    Rubber duck debugging is scientifically proven. I say that because I've done it and it works. That's science. No citations needed.
    – snicker
    Mar 15 '10 at 15:47
  • @Farseeker, we don't disagree. But if you do that boiling with colleagues, you have some very patient ones. Personally, I've got to have the question boiled down before I explain it. Otherwise I've got no audience. Mar 22 '10 at 1:11
  • 2
    I'm voting to close this question as off-topic because it's a polling question that has already received several "yes, me too" answers, so there doesn't seem to be benefit in inviting more of the same. Apr 30 '17 at 16:20
14

According to legend, a college computer lab used a teddy bear as a lab assistant in order to lighten the load on the humans. Before asking the human a question, you'd have to explain the issue to the teddy bear, which usually made the student realize the answer.

Luckily, now we have Stack Overflow, so we don't need to have teddy bears on our desks.

4
  • 2
    aww. does this mean i have to put the teddy bear away? i sic him on unicorns when they pop up. Mar 14 '10 at 5:48
  • 3
    No, you can absolutely keep him. I didn't mean to suggest that bears were forbidden, merely that they were no longer as necessary as in the past. I still have a floppy drive, for example.
    – dsolimano
    Mar 14 '10 at 20:32
  • I am not fond of speaking to unicorns.
    – snicker
    Mar 15 '10 at 15:48
  • This is not "lucky" at all! It's the primary cause for question spam on SO. If only people still actually thought through problems instead of just loading up SO and using our free time as their first recourse to do achieve anything at all in the programming world. Jan 17 '13 at 3:00
4

Anyone else ever had this happen to them?

Yes. I usually try to update the question accordingly and post the solution - people may be doing research for me after all, and I wouldn't want them to do that for naught. I hate it when that happens to me answering a question.

If it's only a few seconds old, hasn't received many views, and has no perceivable value for future generations, I tend to delete it right out.

4

Repeatedly.

The process of formulating a well-asked question will often lead you to think about the problem differently -- and this can either lead you to the answer directly, or give you a great idea of where to look.

3

This happened to me yesterday link. I just posted the answer, so that future searchers might learn from it. That's the way it's supposed to work, right?

2
  • Your program has a problem.
  • You spend ages debugging the program.
  • You give up and ask on StackOverflow.
  • While writing up the question you realise the answer.

Something is wrong.

The bolded steps should be almost identical to you. If when "cleaning" the problem for writing on SO you found the problem, then that only says that you did not debug properly in the first place.

"Clean" the problem when you're debugging.

2
1

This used to happen to me all the time, but I've gotten smarter.

1
  • 4
    I thought I was wrong once, but I was mistaken?
    – user102937
    Mar 15 '10 at 1:46
0

Heh, actually happened last night. Was in the processes of cleaning up some code so I could paste it in the question and I saw the issue. Then of course found another issue and had to ask another question.

0

Not the answer you're looking for? Browse other questions tagged .