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

11–20 of 21 posts

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

#11
I've recently read the book named "Why We Sleep: Unlocking the Power of Sleep and Dreams" by Matthew Walker[0] and he explains in good detail how and why this happens.

This is not something particular peculiar about just certain individuals but actually is, in fact, one of the functions of sleep.

I would vividly recommend anyone to read it, in order to improve their own life overall, that includes memory recollection + reconciliation.

[0] https://www.goodreads.com/book/show/34466963-why-we-sleep

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

#12
I had a (not very long) time where I was heavily into making electronic music. After a while I dreamed in music. It actually scared me a bit as music was all there was. Nothing else. Not even thoughts. Only the sound of music. Yet it did not help me making more or better music. It might have if I would have continued longer, but I stopped some time after that, starting to chase another passion...

But the music dream was a very unique and memorable experience.

Code and programming sometimes plays part in my dreams, sometimes I just continue to work on the program I worked on before going to bed. At least that is what I remember after waking up. Did not bring me any great breakthrough so far. But continuing the real code the next day goes lighter, sometimes.

The feeling of code dreams is not as weird as from the music dream. Maybe I am just used to that from being in the flow in my waketime. When in the flow, code, or the abstract problem I work on, is all there is - similar to the dream. It also has the bonus that I can actually get things done and they persist. No wake-up and puff-all-gone.

To conclude I would liken code dreams to a light version of prototyping. You try out some stuff, throw it away and (hopefully) do better the next time you work on similar stuff. Not that I can consciously remember the lessons learned, but it trains intuition and the feel for handling problems.

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

#13
I spent many years solving difficult code problems as part of a research group. One of my standard techniques for solving the toughest problems was to gather as many facts as I could and then sleep on it. I'd find myself not reviewing the code, but reviewing the facts in my sleep, and when I'd wake up I'd have figured out the problem or at least have figured out how to get more information to solve the problem. I'd often wake in the middle of the night to write down these insights or write them down first thing on waking.

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

#14
I'd always have this one where I'd be half-asleep in the morning, thinking about a person, event or place, and I'd be confused about whether it was a class or an object. My brain knew that everything has to be one or the other, it just couldn't quite seem to figure this one out... or that one...

Never happens anymore. Maybe my programming style changed, or I just got better at not thinking about work too much outside of work hours.

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

#15
I work at a technology company and I have at various times been in an evangelism or a technical marketing role. I know it's not the same thing as dreaming in code, but I frequently wake up in the morning with a great idea for something to write. This happens more often when I go to sleep thinking about what I need to write the next day. It feels like my active mind let's go and my subconscious mind gets creative. This did not happen to me in college or grad school, so I suspect it is related to the stress I put myself through thinking about what I need to write the next day.

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

#17
I have dreamt in code, yes. Sometimes it would feel like I was solving something but it was either a meaningless sensation or I would forget it. I don't code in my free time or take work home anymore so it doesn't seem to happen now. Now I dream in having a social life where I vividly feel content. Solving that problem is more important now so it occupies my subconscious.

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

#20
I've never coded. I'm a boatbuilder and marine architect (that's a very specialized kind of hardware engineer in startup language). We have "coding problems" too: how to make a boat so it doesn't kill the people who take it out to sea.

Different parts of a boat need to do different things, and often your next boat can't be designed by copying your last one and making things smaller or bigger; you need an entirely new concept for a new function.

So when I sit and "think" about the problem, trying to make progress on it, I usually spin my wheels and get nowhere. I can't draw, I can't write, because I'm forcing it. Trying to make money thinking, right, and it just won't come.

But often, later that night, I'll have a fully-formed picture of the solution come into my head, of the thing that was puzzling me back in the daylight. I'll get up, turn on the light, go to my desk, and sketch the thing out, with explanation about what the different chicken scratch lines are. I put my mouse on top of it so my cats don't knock it onto the floor, because in the morning I've complete forgotten I even woke up and drew it. The next morning, there's my solution sitting on my desk.

So faced with problems demanding solutions, I've learned to just relax and be the space that the solution can come into.

Post reply on HN