Wednesday, February 04, 2009

if(nightmare==1)

I remember my dreams for the most part. In my professional opinion dreams are just unprocessed information that gets jostled around into the subconscious. Basically, they don't mean anything special. They do mean that something's been on your mind recently. Sometimes we forget what's been going on in the last day or two and when something we dream comes up, we're surprised and think that it's prophetic. Other times we know exactly what's been going on and so it shouldn't be a surprise that we're dreaming it.

In 2002 I was a freshman at UH, studying computer science. I was taking Intro to Computer Science I. We were programming in C. I had written programs due for that class in C++ (the language I knew fluently) to start and translated to C. An exam was coming up and I was still having trouble writing in just C and not C++ to begin. While extremely similar the differences in the languages are kind of important. I ended up doing something I rarely did: study my textbook.

I was in the habit then of reading before going to bed. Dreams tended to come from a mishmash of things I had just read and things I did in the recent days. I fell asleep after studying. And this dream was different. I've only had maybe a dozen nightmares in my life. They all sucked. This sucked the most vividly.

Here is a snippet:

if(run==1)
vampire.chase=1;
if(run==0)
vampire.attack(target);

The AI wasn't really sophisticated but the attack code was a mess. That was kidna scary in its own right.


After that dream I started to see everyday things in terms of code. Breaking down characteristics of simple objects was easy. I started looking at the games I played in terms of its mechanics and how to approximate it in code, at least in general terms. People though ... that's something else. I still want to program an AI. I wonder how that'll work out for humanity.

Can't do much to change that particular memory, at least not simply. Eh.

No comments: