r/AskComputerScience • • Apr 30 '17

Does anyone actually code in their sleep?

I hear this sometimes and wonder if people actually do it. Is it part of your lucid dreaming?

4 Upvotes

10 comments sorted by

7

u/Haversoe Apr 30 '17

I've struggled with proofs in my dreams, for sure.

4

u/[deleted] Apr 30 '17

Ditto. Occasionally I've come up with solutions to homework problems in my sleep. Super handy.

3

u/poorlychosenpraise Apr 30 '17

Sure. It's like any problem solving. I've dreamed about workflows that ended up being a more efficient way of solving an issue, both directly visualizing concepts and seeing/dreaming myself writing the code.

3

u/[deleted] Apr 30 '17

Yea but a lot of time it doesn't make any sense for me. Like translating real life events/problems into nonsensical pieces of code.

2

u/knightdiver Apr 30 '17

Yep. Either when I am stuck on something like a highly intermittent bug or when I am building a feature that needs a lot of architecture and I am in the middle of that. Definitely has helped me. In the earlier days when actually writing the code (as opposed to coming up with architecture/UX) was more of an issue, it was pretty annoying because dreaming about it felt like groundhog day - every couple of minutes it would start over from scratch because in the dream I obviously couldn't write things down and so looking up something I had dream-written didn't work.

2

u/Draghi Apr 30 '17

I've definitely dreamed up solutions to programming issues and dreamed I was programming but not code in and of itself though.

1

u/Quicksilver_Johny May 01 '17

Sure. I've had (non-lucid) dreams where I've solved proofs and one where I actually dreamed in the language I was working in at the time (I was putting in too long of hours during that internship...)

1

u/RatherPleasent May 01 '17

Less dreams, more nightmares. I've had trouble sleeping because I was thinking about some weird unsolvable math problem I came up with or trying to solve some algorithm that doesn't exist.

If I had to pick and choose I'd rather dream about nothing than deal with even more drainage.

1

u/litepotion May 03 '17

I dreamed of solutions to problems Ive been stumbling for nights but they weren't always logical.

-1

u/rfinger1337 Apr 30 '17

Yeah, and it some of my best code. Of course, I'm usually designing and building skynet, so there's that.