Wondering how many on this forum have experienced finding solutions to problems while asleep.
Ask HN: How many of you dream in code or find solution to a problem in sleep?
1–10 of 21 posts
This use to happen to me once in a while, but recently the frequency has increased considerably.
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#2I did not once but multiple times. This has become one of the points in my mentorship advice as well.
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#3I've long ago realized that going to sleep with a prepared mind (occupied by the problem) would often result in a working solution when waking up in the morning.
Once read an article that research showed that studying before sleep would increase retention 30% compared to studying in the morning. So at night your brain is actively working and you can take advantage of that.
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#4[dead]
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#5The earliest I remember is during college (around 2008-9). I had been solving lot of exercise problems within a short span and then had a dream. Found a bug in one of solutions.
I've had a few since then, but not many that left an impression. One was automated test generation during my job as a test engineer for Digital Signal Processing chip (fitful sleep with unending ideas about generating tests).
Another was last year, after I had answered a question on stackoverflow. It was good enough to warrant a blog post: https://learnbyexample.github.io/mini/dreaming-solutions/
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#6I have, but only when Ive stayed up way too late coding, or coding over multiple days without much sleep. It’s never a good thing really.
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#7This has happened to me on a few occasions, once during SAT prep in highschool, I woke up with the answer to a hard math question a friend and I had been stuck on.
I’ve also dreamt in code after a long week at work - the code was mundane and just a reiteration of what I’d been doing during the week, and didn’t involve any interesting breakthrough solution or anything.
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#8I know of someone who had a nightmare about being stuck in an infinite loop.
I rarely have code dreams, but when I do it's usually rows of IDE text that I can't make out from a distance.
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#9I dream in code if I am learning something new and hard - like Haskell,
but I never find a solution though!
Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?
#10For a counterpoint I have never once dreamt in code. I have woken up fresh and been in a better state to solve problems but I’ve never woken up with a solution in mind.