← Back to context

Comment by vanviegen

2 days ago

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 used to do this regularly when I first started coding, I called them "Codemares". They were like nightmares with the shouting of commands I didn't quite understand would invade my dreams.

  • It seems to me that this is the purpose of nightmares. I especially noticed this after having kids. They are not by default scared of snakes and such but if they see a nature documentary of a snake biting something or even a cartoon bad guy, it's enough to trigger bad dreams which reinforce the fear and it's far stronger the next day.

    IMO this is under-appreciated in current AI models. RL is not very effective in avoiding crocodiles for example, by the time like 5 of your tribe-mates are eaten it's far too late. You need some mechanism that ensures the danger is learned after just a single incident.

> in a dream! The eureka adrenaline woke me up

YES! I have never told anyone this (because it feels so random) but it's great to know I'm not the only one. I pretty much expect this when I am in depths of an issue I cant somehow consciously resolve, so much that I keep a pen and writing pad next to me, before I sleep, because the code I saw in my dream often gets lost by the time I go to my office and resume the laptop.

I even figured out a hack - I just force myself to go to sleep if I can't consciously resolve it for more than an hour. It's as if my brain gets an otherwise untapped firepower.

That said, this absolutely destroys my sleep cycle for the next day or two and spikes my BP for the rest of the day to the point where I feel sick.

Although in theory I'm sleeping more than the 8h, I feel horribly mentally exhausted. I can work out, physically just fine but my brain is on empty - because of this, I limit this to critical blockers.