Live data from Hacker News

Ask HN: How many of you dream in code or find solution to a problem in sleep?

news.ycombinator.com

1–10 of 21 posts

Re: Ask HN: How many of you dream in code or find solution to a problem in sleep?

#3
I'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?

#5
The 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?

#7
This 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.
Post reply on HN