back
271 comments
I was at my first real software job and we had an in-house system to provide automated installers for common open-source applications for our end-users. After I started getting familiar with it I had a dream one night that certain input fields (which were very common) could be rather easily exploited to inject shell commands with root access.

I woke up convinced that it was a real bug, went to work the next day, and proved it. It was exactly as I dreamed. I never had access to our internal codebase, but had seen enough of the front-end and what we stored on disk to piece it together in my dream.

While it made me popular with some folks, it was a strange lesson indeed to discover that not everyone was as thrilled to have an up-start from tech support make such a discovery.

Fast forward almost 20 years later and I've never had anything even remotely close happen again.

When I was young, I dreamt that I was playing guitar and made up a cool song. When I woke up I was so excited, that's something you would hear an old rockstar say about their best song, right? "Came to me in a dream". I jumped out of bed, grabbed the guitar, and started playing the song, every note still clear in my memory.

It was a completely random series of notes.

At uni on an advanced algorithms class we had a take-home exam with 6 problems for 3 days or so.

On Saturday I already had some ideas for most problems, but there was one that I didn't knew how to approach and stayed a bit late thinking about it.

On Sunday morning I woke up really exited as I solved the damn problem. I immediately knew that probably like dreams, the memory was fragile, so I rushed to my desk to write the sketch for the idea, which after grabbing coffee turned into my solution to it.

There's no way I didn't spent my sleep thinking about it and solving it, likely around the last sleep cycle when I woke up.

Reminds me of one childhood experience, which was much less serious, but for me quite amazing:

I had an old MSDOS computer, which had a mouse, but the mouse did not work at all. Perhaps that computer didn't have the drivers or maybe no such thing existed at that time. That computer had DOS games on it. Just that I could not access some of the applications, when their executables were not immediately children of a top level folder, because I didn't know how to expand folders in the tree view pane, without having the mouse to click on the + in front of the folder name.

One day I had a dream of me sitting at the computer (I spent a lot of time playing as a kid). In my dream I was lamenting, that I could open those folders. Suddenly a voice in my head said: "Well, why don't you simply try pressing the + key?"

I woke up and was excited. Immediately I started that computer to try it. And what do you know ... it actually worked!! More games for me to play!

Years later I also found myself often dreaming of chess games and thinking about best moves, only to have the board grow dynamically and somewhere far away a bishop appearing, pinning exactly the piece I needed for my best move ... back to the drawing board. Those chess dreams were actually somewhat exhausting.

I remember in uni two days after taking an exam I dreamed about the professor asking me to explain the calculationd I made, and while I was going through them I realized at some point I did an addition instead of a subtraction.

I woke up and indeed I made that mistake. (This was during covid so the exam was done remotely and I still had the paper with the calculations at home).

My experience was with building a new computer. I had gotten all of the parts needed to completely upgrade my pc, keeping only the case.After installing all of them, the computer refused to boot and just showed a generic error with a blinking light. I tried multiple things to troubleshoot like taking out each ram stick, different hdd, reseating cables, different hdd, change to internal gpu, nothing worked.

Then I fell asleep and when I woke up in the morning, I had a very strong feeling that the issue was definitely the memory and I had to move the ram to the set of slots for the other channel. And that was the issue, broken slots.

What's impressive is not that it worked, but that after waking up I had no doubt that was the problem, even though practically I couldn't conciously identify why I was so confident about it.

Can't say I have had such a productive dream for work, but I have had dreams that helped me process emotions. For example, on separate occasions many years apart (thankfully), I've dreamt I saw a recently departed pet or family member one more time. In one specific instance, I had been so caught up in other things I hadn't actually processed the grief of the loss. Can safely say it was super helpful, if painful, and necessary.

There's research out there that supports dreams as places we process emotions. I wouldn't be surprised if that tied in to other kinds of problems.

Had a very similar one, I wasn't working frontend but had a dream about a frontend vulnerability that also proved to be true. I dreamed about it, and assume it was because it's the kind of thing that bugs me and while dreaming I had some time to think about things other than the code at hand.
Did you try to harness this power again? I.e. seed your dreams to solve problems?
I wonder if you have, but that normally what dreams provide is often just delivered subconsciously. You might be regarding a lot of great ideas as having occured when you were awake even though maybe some would never have come had you not slept/dreamt on them.
During my time at university studying pure mathematics I had an interesting experience of doing a challenging sheet of combinatorics problems during a vacation. Every day I attempted one question and got stuck on it. Then the next morning I woke up knowing the solution. It was a recurring thing: this happened every day for about 2 weeks until I had solved all the problems.

For me this a big eye opener about the importance of sleep and relaxed thinking to solve challenging problems.

I once solved a particularly nasty bug, causing a c++ server to segfault in production about once a week, in a dream! The eureka adrenaline woke me up, and I rushed to my laptop to find the insight was real. I had been trying to comprehend that segfault for several long days. It wasn't the most restful night though.
I've had some incredible product ideas while asleep, down to very intricate technical detail. The problem has been that when I wake up, reality kicks in, and I realise that, say, even if I built that incredible messenger app for dogs, they still wouldn't be able to communicate with us.
Aside, but I struggled a long time with regular sleep. I have been a night owl since I was a kid. I experience late hours as magical, don’t know how to describe it. So I always slept too little, then not at all, then drifting and sleeping in.

But I somehow managed to have a regular schedule and now I start to sleep at 00:00-01:00 very often, sometimes even earlier.

No idea how I managed to do that. I guess I just did improve many small things, like getting rid of bad habits, being more content, appreciating sleep more, prioritizing things differently.

I wish everyone good, healthy sleep.

"communicate" seems like the really interesting part of this, but gets a one-off mention only.

like, how does this communication work? how does one sleeping person communicate skills to another sleeping person?

have we found the mechanism? was it awake poeple communicating to sleeping people? the reverse?

Reminds me of Ramanujan learning during sleep from Namagiri.

There are umpteen stories in Hindu scriptures of baby learning in the womb of the mother and how the expecting mother must only be exposed to good thoughts and a good environment for giving birth to an intelligent and well rounded child: stories of Abhimanyu (learning how to break the Chakravyuha formation in his womb while mother was learning it but his learning was incomplete when mother fell asleep during the lecture) and Prahlada (mother learning about Lord Vishnu against the wishes of her demon husband Hiranyakashyapu). Wonder if any studies have been done on this as well.

Ah, very soon we will need to work in dreams. Can’t leave any stone of productivity unturned, right?
I have started feeling good after waking up from a nightmare after learning that that nightmares may serve to prepare us to tolerate nasty things, helping the brain rehearse threats and build resilience or reduce fear over time. Apparently that is still questionable, I prefer it though , recent findings does not show that nightmares are generally a resilience mechanism. https://sleepeducation.org/survivor-reinterpreting-dreams-wi... at least it helps me to dismiss all superstitions and dodgy stuff.
So I guess having dreams about recurring meetings is... honing corporate skills?
I regularly have abstract dreams I have trouble remembering. I wake up feeling like I understand problems better but I can't articulate why. However, I can indeed tackle problems from the day before more easily.

It's pretty fascinating. What's even more fascinating is often times when I do remember the dream, a lot of it is nonsense. And yet I'm doing better at the things I dreamt about.

Kinda related but I used to practice guitar in my dreams. If I had been learning something I’d often dream about playing it over and over again, and even going beyond that and figuring out “solos” and melodies and stuff over the chord. Can’t be sure if it translated into any real life skill, but it felt like I was actually learning or at least strongly reinforcing what I’d been practicing.
AI does the work during the day and we learn while sleeping. Society doesn't collapse from ignorance. We have a new movie plot gentlemen.
Two months ago my partner recorded me speaking in my sleep. I was speaking fluent Mandarin. I always thought sleep time is used for learning (among healing etc), but now I am convinced.
It's not new information that people can learn/practice in their sleep. This is already known and well documented. The interesting question is: what conditions increase the chance practicing in ones sleep? What are the mechanisms?
Where I live the building emits a low rumbling like a spaceship in a sci-fi show. After binge-watching The Expanse then Wheel of Time I had this dream: In order to penetrate the forsaken's magic one must send a sequence of signals, and according to Naomi Nagata on the Rocinante, the sequence of 12 signals resulted in a temporary bypass of the magic, the /count/ was the key. I woke up and wondered what problem this applied to, then tried it with a recent PRNG problem I was having where George Marsaglia's XOR-shift sequences were mostly useless for GLib.get-monotonic-time() as the seed...
This is why I would smash my head against a wall trying to beat a boss in Dark Souls for an entire evening, then wake up the next day and beat them on my first or second attempt.

Very common phenomena that is discussed frequently in the souls community.

20 years ago I was struggling to build an app that worked in ie6, FF and chrome. While still sleeping I asked my girlfriend what flavour JavaScript she liked. I don’t think it was a good dream.
Interesting comment they have towards the end about "targeted memory reactivation can disrupt sleep".

It is important to note the study they are referring to is "targeted memory reactivation with sleep disruption", there are methods of doing targeted memory reactivation without sleep disruption.

I work in neurotech/sleeptech as the founder of affectablesleep.com, and though we are mostly focused on slow-wave (deep) sleep, we have been looking into memory reactivation, lucid dreaming and other stimulations for additions.

I read a short novel about a technology that allowed you to have a VR like experience while dreaming. Of course, there was all the fun/perverted stuff you can think of but also it was immediately put to use as a corporate tool. Over a few years, more and more white collar jobs shifted to night shifts where you worked via dream VR. Then people were available during the day to do whatever, watch their kids, pursue hobbies, etc. In many ways- it was a very promising future.
Cats practice skills while dreaming all the time. Watch their little paws go!
My favourite part of coding is going to the park, sit on the bench and dream the problem. After a while, some times it needs several visits I write any code.

Unfortunately most employers see this as slacking. It cannot be done in a noisy open plan office.

At one place few other devs were into this. We would be spending most of the working day in the park. Managers were not happy, but work was delivered always.

Srinivas Ramanujan famously said he did most of his work at night in dreams.

As a total aside, I've had sleep issues my whole life and can sometimes inadvertently induce lucid dreaming, and then I can think for hours while sleeping; it's amazing. Unfortunately a bit inception-y, but whatever.

When I was a kid I wanted to learn how to skateboard. I watched videos on technique a lot, read a bunch of articles, watched Rodney Mullen do some insane foot trickery, and then one night I had a dream of the mechanics of it. Standing on the board as I'd learned online, how to push (not mongo, naturally), and when waking up that day, I asked my friend if I could borrow a skateboard to try.

I remember getting on the board, pushing as I'd dreamed, and voila! Off I went. Something about it did not feel new at all. I'd really visualised the process and it just worked. God I miss skating sometimes, but my self-preservation always far outweighed my desire to eat concrete.

Lucid dreaming is a cool concept but I've never been able to pull it off. I still try, though!
This happens to me both sleeping and awake. When I’m stuck on a problem and decide to walk away from it for a while, I subconsciously spin off a thread in my mind and move on to something else. The number of times I’ve had a eureka moment 3-5 hours later (not realizing I was even percolating on it) has to be in the hundreds.

Happens probably twice a week when I sleep on the problem as well.

To parlay this back to the current LLM craze, if we just export all our problems to some fuzzy non deterministic solver without ever trying to understand the problem, our collective brains will atrophy severely.

I use the LLM my work pays for, sparingly, because I refuse to let that atrophy occur.

Once upon a time, I had a Game Boy with Tetris. Now, I wasn’t particularly good or anything; I was an average player. I was at the end of high school so I’d have been in my late teens.

After just a few days of obsessively playing Tetris it was all I could dream about! I heard the music, saw the pieces falling, rotating, getting faster. It was play play play all through the night! I did get better at the game pretty quickly but I have to admit: the dreams freaked me out a bit! They’re why I stopped playing entirely — I didn’t like the idea something could put itself in my head that way!

I've been intensively learning German for a year and once or twice a week in dreams I have brief dialogues with the locals. Very useful as additional speaking practice :)
> In perhaps the most striking example of learning during sleep, Konkoly, Paller, and several collaborators witnessed what amounted to conversations with people who were in the midst of dreams. Independent lab groups in the U.S., France, Germany, and the Netherlands asked lucid dreamers to answer yes-or-no questions and solve simple math problems. Electrodes measuring body and brain activity verified that the participants were not awake. Martin Dresler, a sleep researcher at the Donders Institute, who ran the Dutch experiments, said that they were able to verbally deliver new information to the sleeping mind—and to receive responses. Some people could remember the questions they had been asked when they woke up. “This is a form of very complex learning,” he told me.

https://xkcd.com/269/

This has always been clear as day to me, but I just couldn’t prove it. I used to take naps right after practicing guitar because I believed it would help me learn faster! LOL
I was once able to prove a MAC scheme was insecure by allowing ciphertext to be rearranged while in a dream; this was a cryptography exercise.
Not about sleep learning but lucid dreaming in general: I have long been puzzled and disappointed that we are not pouring more research, interest, and funding into controlling the induction of lucid dreams. There are ways to learn to do it now, but they are slow and unreliable. Gadgets exist but they're fringe - there is no great lucid dreaming movement like there is with longevity, for example.

I would have thought in a society where we want a gadget or magic pill for anything and everything, our interest in this would be through the roof. You can live a whole other lifetime in a dream, either your own or of some other character or world you step into. You can replay the past see the future, countless times. Controlled lucid dreaming seems like the closest we will likely ever get to immortality. Why aren't we more bullish about facilitating it?

Omelette du fromage
I rarely remember my dreams in the morning, only a handful times in my life. At one I was a Chinese citizen and experienced a dense feeling of being a little ant in the greatest Empire the universe and time had ever seen (China). A nothing in the whole. There are no words. Another one was an insane, out of the world sex experience. Dreams are wild.
I have been saying this for years.

When I was young I somehow figured out how to control my dreams. By the time I was an adult and working in software all my dreams were always iterating over solutions to problems I had at work. And every day I would come into the office with the ability to move forward on projects with insights in leaned that night while sleeping.

My wife used to think that I had terrible sleep apnea because I'd repeatedly quit breathing for a minute or two at a time and then gasp for air, but it turned out I was just dreaming about freediving for lobsters.
Happens to me all the time, waking up with a solution (or a new problem :/) to complex software issues.
Edison, famously, solved problems in a light dream state [1].

[1] https://www.scientificamerican.com/article/thomas-edisons-na...