Live data from Hacker News

How to Program in Your Sleep

bellmar.medium.com

51–52 of 52 posts

Re: How to Program in Your Sleep

#51

I found myself assaulted by the evil twin of incubation. Half-waking in the middle of the night and realizing that programming problems from the office were thrashing around in my mnind like carps out of water. Really, really irritating and ultimately fatiguing.

I have had a lot of issues with this for the last few years. I saw someone post on here a few days ago to tell yourself you’ll set a specific time in the future at which you’ll entertain those thoughts. For me, when I find myself thinking about specific work tasks, I just told myself “At 7:30am I will entertain this train of thought”, and did my best to think of literally anything else. I fully expected this to not work at all, but it was effective basically the first night I tried it. I fell right back asleep. The last two nights I’ve tried this have been quite restful. We’ll see how that continues.

A separate but related issue I’ve found is that I’m often dreaming in programming languages now, which is a totally surreal experience. I think this is like how some people say when you move to a new country and learn a new language, there comes a point where the language in your dreams shifts from your native one to your newly immersed language. But I find it happening to me now: a complete standard dream scenario, but all thoughts are expressed completely (and partially nonsensically) in SQL, or python, or classes and subclasses, interfaces, data models, APIs, tests, and error handling. It’s really odd. Especially because it’s not even specifically a work challenge, it’s just like a standard dream but my brains way of constructing it happens to turn it into a technical challenge somehow. These nights are rarely restful.

This probably indicates some underlying anxiety or something that I should more seriously and proactively address, but for now I’m just happy if I can get a restful 6-7 hours in.

Re: How to Program in Your Sleep

#52
post #49
post #43

I can buy that information is consolidated for generalization during sleep. And also that the subconscious mind does a lot of work that we aren't aware of. One aspect of this that hasn't been mentioned though is just fatigue. By analogy, if you were training in a gym for an hour and then decided to try to go for a heavy bench press, it might be harder and harder the more you try, since you are getting more tired. But…

Pianists who slept longer can perform better than whose who waked up earlier to practice (source: some popsci book) i.e., perhaps sleep does more than just decreasing fatigue.

fatigue is a feeling that makes sleep, getting rid of it is not the purpose of sleep, it is to convince you to sleep
Post reply on HN