Hacker News new | ask | show | jobs
by euroderf 660 days ago
While programming Java full-time, I found myself waking in the middle of the night with some big chunk of my brain grinding away on coding issues. Not good.
5 comments

Reminds me of a similar situation I experienced while working on a big project. I came down with the flu and woke up in a delirious, feverish state at 2am feeling like I was trapped in the codebase and I needed to make all the tests pass so I could escape. It almost felt like my conscious brain had somehow found its way into the unconscious part.
I've had a couple of these.

The first one was programming; I'd been working on a little image editing application, implementing anti-aliased gradient brushes (one colour in the centre and another at the edges, with a fast enough and close enough hack to deal with the jagged edges).

The fever had me hallucinating circles and how to render them for the entire (unbelievably tedious) night.

The other time I'd been playing RA95 for a few hours (I was addicted to that shit) and started feeling progressively worse over the space of a few minutes.

I called it an early night (it was about eight o'clock) and went to bed - then it got worse;

The fever, the headache, and an army of little men and tanks running all over the ceiling.

I guess not strictly on topic, but I once had the dubious idea to read a book about the battle of Stalingrad while having the flu and high fever.

Drifting to sleep and waking up with that book in my head was a ride.

I get these as well - with any difficult coding or even SRE problem or any sort of deep logical problem that I find myself working on until the last moment before I go to bed.

I find that doing something else for about an hour before going to sleep helps with this almost 100% of the time. It could be listening to music, watching TV, reading, playing with my kid, almost anything. But giving my head a full hour to rest from a deep problem helps me sleep without ending up in some logical nightmare that only some construct from my problem could resolve (and tends to make worse)

Coding nightmares! I get these too, when working too much. Perseverating on solving intractable problems that don't exist. Once solved it though, and woke up thrilled. That was a good work-night.
Thank you for teaching me the word "perseverate"!! It's a good one!
I agree. It can definitely be useful, but not if I'm stressing too much about it. Then, waking up feels like I was hit by a bus in the night.
Caffeine will do that to you.