Ask HN: Do you dream in code?

I recently had a full dream in code (after a long night of js). Freaked me out a little bit but it also made me feel more confident in my abilities. Curious to hear if this is common? :)

  • This is quite common.

    Good code dreams range from symbolic "module" level code flows, down to individual line by line execution, observing the flow is like watching people dancing, or music playing.

    Bad code dreams involve getting stuck on a single bug. Getting caught in non-terminating loops, and more abstractly, not being able to see a solution and getting caught oscillating between two poor options.

    It's interesting because I was discussing this with other developers and data scientists and they said it was common too -- even the "bad" code dreams I mentioned above were also their bad code dreams - getting stuck in non-terminating loops was the most common 'nightmare'

  • when i was learning to program, i used to think of ways to maximise my knowledge acquisition. one of those ways was toying with lucid dreaming - allowing me 6 or so extra hours every night to hone my skills.

    turns out my subconscious isn't the greatest compiler, and i was too busy winning the world series or saving the president to worry about unrecognised selectors and off-by-one errors.

  • Most nights.