What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 129 Stack Exchange communities.

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?

share|improve this question
    
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. –  Yar 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. –  Mark Henderson 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. –  Yar Mar 22 '10 at 1:11

7 Answers 7

up vote 12 down vote accepted

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.

share|improve this answer
2  
aww. does this mean i have to put the teddy bear away? i sic him on unicorns when they pop up. –  quack quixote 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. –  Lightness Races in Orbit Jan 17 '13 at 3:00
  • 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.

share|improve this answer
1  
+1 Sounds like user is rushing. –  staticx Sep 7 '11 at 13:47
1  
@0A0D: Exactly! –  Lightness Races in Orbit Sep 7 '11 at 13:54

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?

share|improve this answer

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.

share|improve this answer

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

share|improve this answer
3  
I thought I was wrong once, but I was mistaken? –  Robert Harvey Mar 15 '10 at 1:46

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.

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.

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