rohan singh

software engineer. bicyclist & rock climber. craft beer addict.

Actually Dreaming in Code

Before I begin, here are a few great, relevant xkcd’s: #719 #430 #203

Anyhow, say what you will about Scott Rosenberg’s book, Dreaming in Code — but the fact is, it makes Googling for experiences of actually dreaming in code fairly impossible.

Personally though, I find dreaming in code to be very real. My dreams have always quite vividly blended reality and the imaginary, often leaving me confused as to which is which, and leaving me with a somewhat tenuous connection to the former. Code dreams are no different, and I’ve found that mine fit into three major types:

  1. The Text Editor. This is your fairly standard code dream. In my case, white background, plain text and some code appearing or being written. Sometimes, it might make sense and actually relate to a project I’ve been working on or code I’ve being writing, but quite often this code doesn’t make any sense whatsoever.

    Often, there is no background or text, but just the lines and constructs of code floating in a place where there is no physical reality. I wonder if mathematicians have dreams similar to these, but with mathematical constructs?

  2. The Inspiration. These dreams are comparatively rare, and don’t actually seem to involve any coding whatsoever. However, they very specifically relate to something I am working on, and when I wake up I know how to structure some code that I have been struggling with.

    This seems to be a pretty straightforward case of the brain working on a waking-world concern while asleep. Too bad the hours aren’t billable.

  3. Code Blends With Reality. This is the strangest type of dream and the most difficult to relate, but in many ways my favorite. In these dreams, physical reality seems to blend and mix with the reality of code. While there is a normal dream of the physical world underlying everything here, in these dreams I interact with that world with code instead of in the normal physical manner.

    For example, I might find myself writing a script to light a campfire. Or instead of traveling from place to place by walking or in a car, I might just fiddle with the parameters that define my location. People may speak in code or in concepts rather than words.

Overall, I find #3 to be the most common type of code dream I have, as well as the most interesting. It lets the world become a playground that is strangely close to the real world. It is almost as if, in these dreams, magic is real, and code is magic.

While it’s probably not the most important thing in the world, I’m really curious to hear whether lots of other people out there dream in code, and how everyone else’s code dreams differ from mine.

After all, we spend an amazing amount of time asleep throughout the course of our lives. Who knows, maybe if talk about dreaming code enough, clients will agree that those hours asleep should be billable after all, eh?