How to Program in Your Sleep

Marianne Bellotti
4 min readAug 24, 2023

I thought it was just me … but then I talked to a bunch of mathematicians

Image by goonerua

A year or two ago when I was working on the core compiler functionality for Fault, I got into this weird habit of programming in my sleep. I don’t mean I sleepwalked over to my computer and started cranking out API endpoints (although apparently some people also do this). I mean I would wrestle with a complex problem all day, only to give up, go to bed and wake up with the answer. Within five minutes that bug that had been driving me crazy for hours was fixed, or I had a strategy for organizing my abstractions, or a set of new ideas to test. While my consciousness was quiet and empty, my subconsciousness continued to work on the problem.

Some people describe it as dreaming a solution. That’s not the way it works for me. I don’t dream about it. I don’t have any particular recollection of even thinking about the problem. I just wake up and a solution is sitting in my mind, all queued up and ready to go.

https://www.reddit.com/r/webdev/comments/kbqc5j/comment/gfn0g05/?utm_source=reddit&utm_medium=web2x&context=3

This phenomena is so common it actually has a name. It’s called incubation and it can also be triggered by long walks, or just distracting your conscious mind with something else so that your subconscious…

--

--

Marianne Bellotti

Author of Kill It with Fire Manage Aging Computer Systems (and Future Proof Modern Ones)