Subconscious Bugfixing

Updated to a new version of a library and everything worked fine. Well, except for this tiny little detail. Started debugger to fix it. Debugged strange, complicated code with foreign language comments and cross-platform #defines clattered over the whole library, stepped through at least 200 files. No luck. Bug still there, no idea why. Read forum posts with similar problems. Studied the change log of the library. Nothing. Again, debugging. Again amazed by the amount of code my data gets pushed trough. Giving up, going to sleep.

Next day: an idea. What if I put this flag into that function? Actually, I have no idea why I wanted to try this but it's better than giving up. Compiled. Started the app. Bug fixed.

This happened quite some times now for me. It seems that somehow sometimes my subconscious mind solves programming problems for me during my sleep, and it tells me what to do, but not why. :) But I better don't think in detail about this.

six comments, already:

This happens to me quite a lot too.

The moral of the story: If you’re having trouble debugging some code: go to sleep!!; Staying up and staring at it doesn’t work anywhere near as good :-D.

The other flipside to this is having a dream that you SOLVED it but you don’t remember how; those really suck…
Chris () (link) - 24 03 10 - 14:07

happens to me too quite often. :)
horace () - 24 03 10 - 14:16

It’s a common thing regarding creativity, read e.g. Csikszentmihalyi to learn more about this. Sometimes, the solution to a problems comes weeks later …
rip () - 24 03 10 - 14:29

Happened to me recently.
Conde Nostaw - 24 03 10 - 18:43

Oh my god! Isn´t only me ? for 20 years I thought I was special or something
Daniel - 24 03 10 - 20:17

Lol … I guess this happens to everyone. The point is to get your mind off the problem and start with a new approach. IIRC the “guru meditation” error of the Amiga OS ment (during it’s development) that the programmers had to do something else if they weren’t able to fix the bug in a certain amount of time and go back to the bug with a fresh mind.

Of course this does also happen to me from time to time ;)
Brainsaw (link) - 25 03 10 - 07:22

Remember personal info?
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.