Tag: dreams

I had a dream today. In fact, it was a nightmare that woke me up at 3am and kept me up for the next three hours or so. And I tell you honestly – this kind of things don’t happen to me all that often. In fact, I don’t even remember when was the last time I had anything similar.

I dreamed that the whole world is somehow written in PHP. A few bits were alright, but it mostly sucked. There were constant ground tremors. Buildings were shaking in the slow soft waving motions. Things that were supposed to be soft were plastic hard. Things that were supposed to be hard were bumpy soft. Road tarmac felt like a gentle green grass field.

At some point of those tremors opened a long, deep crack in the ground. The resulting vibration tore a nearby skyscraper in half, like it was a wet baguette, and the top part of the building slowly fell and disappeared in that crack (hi, dr. Fraud). That was rather unpleasant to watch.

After a few scenes of apocalypse, the nightmare movie was cut to action, where I was a part of the task force that was supposed to fix the world. And, I tell you, we tried hard. We’ve refactored parts of the code, migrated a few most critical systems to CakePHP, upgraded PHP to 5.6 and even tried all those high performance tricks from Facebook (hi, Hack). Things were getting better but not nearly enough. The world was still awkward, unstable and slow.

PHP wasn’t the only thing we were looking at. There was a lot work around databases and tuning servers. We’ve tried every profiling, monitoring and analytics tool we could get our hands on. But, to no avail.

The really horrifying part of the nightmare was when we finally realized that PHP won’t cut it and we’ll have to rewrite parts of the world in C. We also somehow were missing a C compiler. I bet you can guess the epicenter of the nightmare now. Yes, indeed. We started writing a C compiler in PHP. That’s when I woke up in cold sweat, screaming “Noooooo!” through my lungs. That was more than I could bear.

For three hours after I tried not to Google or think if that was at all possible. Apparently, I love the world the way it is now – screwed up in a billion ways, but NOT written in PHP. With that peaceful thought and a beautiful sunrise I fell asleep.

There is an urban legend that drinking tequilla before going to sleep will guarantee you some really cool colorful dreams. Unfortunately, that’s more than an urban legend. I’ve tried it myself several times and it never worked out.

But another thing that I’ve tried myself and that worked out just fine, but which I haven’t heard anyone talking about, is threaded dreams.

What are threaded dreams? Well, threaded dreams are those that you (or should I say – I) have after programming threads or forks too much. I’ve always had a suspecion about the existance of threaded dreams, but I never had to program threads often enough to notice the trend.

This month though confirmed my suspecions a few times in a row. Two of these dreams were particularly interesting.

I had a very strange dream today, which I liked none-the-less. I was dreaming that Olga was ill and that she was in the Intense Care Unit, much like she was there a couple of years ago. I was sitting next to her together with Maxim. We played some games with him, like rock-scissors-paper. He was about five or six years old, but I knew that it was him.

Maxim was obviously bored and tired and wanted to go home. At one point he asked me why we were spending the time in the hospital, sitting by the bed of his mother, when she was unconcious anyway and couldn’t see or hear us. And there were all these doctors to take care of her anyway.

What was so nice abot this dream you wonder? Well, the best part of it was the answer that I gave to Maxim. I told him that his mother needs the support of angels who don’t have any place to land if we leave, because the only place they can sit is our shoulders. And it is because of the heavy angels sitting on our shoulders that we feel uncomfortable and tired. The explanation was so good that Maxim calmed down, seated his butt on the chair, put his head on his heads and made this deep sigh. He was ready to stay as long as it was needed.