Archive for March, 2008

What are you reading right now?

Thursday, March 13th, 2008

Continuing with my reader participation streak. There will be time for more single sided rants later on. ) This time I’m flipping it around and hopefully letting everyone, both tech oriented and non-technical readers to have a chance to contribute. Let’s talk about literature! I hereby designate this as the book recommendation thread.

What are you reading right now? Alternatively what was the last book that you have read that has either profoundly affected you? I’m mostly looking for fiction recommendations, but if you have some good non-fiction titles that are a must-read in your mind, I would love to hear about them as well.

You can usually see what I’m reading at the moment in the little status thing in the sidebar - but I forget to upgrade it half of the time. For example, right now I’m reading The Road by Cormac McArthy but that thing still says Night Watch because I was to lazy to change it. I’m 3/4 through the book, and I can tell you, it is good. Profound, disturbing and thought provoking. And I can’t put it down. Great read. You should see a review of it appearing here very shortly - I just need to finish it and gather my thoughts on it.

I have a few titles on the back burner. I’m around half way through Helstrom’s Hive by Frank Herbert (creator of Dune) but I’m not really feeling it. It’s one of his early novels and it shows. I will trudge through it after I’m done with Cormac out of respect for the author and likely post a review as well.

I have Stranger in Strange Land sitting on my shelf, lined up to be next on the reading list because I’m apparently not allowed to use the word grok until I finish it. After that, I’m open to suggestions. Here is what I got so far from various sources:

  1. Hyperion by Dan Simmons
  2. Life of Pi by Yann Martel
  3. House of Leaves by Mark Danielewski

I haven’t read any of these yet, but they all seem interesting, each for different reasons. After that, I’m out of reading material. This is where you come in. What should I pick up next? This is the time to pimp your favorite book, or plug your favorite author.

What Language Are you Coding in Right Now?

Wednesday, March 12th, 2008

As I write this it is 2am on Tuesday night and I have nothing. I’m grasping for topics once again. So this post is yet another one of those conversational threads in which I ask you a questions and you answer back. )

I know that large segment of my readers are programmers and IT folk, so out of curiosity, I wanted to ask what language are you working with right now. By that I mean the current project you are working on. It can be for work, or it might be a hobby/part time thing that you do on the side. I want to get an idea of what is the spread of languages here.

I have two follow up questions too. First, what language do you love (or would love to learn more about) but you just don’t get many chances to work with? Second, what is the language you absolutely abhor, but you have to use from time to time?

I don’t want to exclude people who don’t code so I’ll add a last follow up to the follow up - what was the most boring, degrading project that you had the “pleasure” of working on lately?

I’m working in PHP + Javascript right now building internal applications for work. I recently started using the jQuery framework, and I’m absolutely amazed how small, simple and yet incredibly powerful it is. For years I was always uneasy when using Javascript because it was like wadding into a minefield. Half of the features would work only in IE, the other half only in FF and etc.. JQuery put the fun back in client side scripting for me because stuff just works regardless of platform and browser. Not only that but it lends itself to elegant code and separates javascript from HTML - so instead of multitude of onClick and onChange properties in the body of the page, you simply use a wide array of selection statements to grab the HTML element and attach a handler function to it. It’s great - I highly recommend checking it out if you are doing any kind of web design.

I would love to work more with two languages: Ruby and Lisp. Both are great languages for different reasons. Most of my side/hobby projects are on the back burner right now because I just don’t have time for them. At work on the other hand there is a mountain of PHP code into which I can just plug new components. It makes no sense to use any new language unless for a new, unrelated project.

The language i hate but have to work with from time to time is VBA. Horrible language, horrible editor, and piss poor debugging experience. I don’t wish this on my worst enemies. I also love when people ask me to do something that is virtually impossible to do in Word. For example, one guy wants to have the chapter title repeated on the first line of every page of the document with exception of certain pages that will include tables full page tables or figures (which btw can appear anywhere and are inserted by the user manually). Oh, and that chapter title cannot be in the header - it must be on the first line of the text. And it also should be context aware and change to the title of section or subsection within the chapter if it contains any. Sigh…

How about you?

What if the World Died Tomorrow?

Tuesday, March 11th, 2008

On Saturday evening I lost power. I do get a lot of brownouts around here, but this was different. It was around 7pm, and all of a sudden I found myself in total darkness. Fortunately I always keep a LED flashlight on my desk. Most times I use it when I crawl under my desk and try to sort things out in the sprawling jungle of unkempt cables down there. But every once in a while it comes in handy during power outage.

It’s interesting, but once the power is gone the different appliances do not shut down at the same time. It is like a strange sequence of events that lasts a split second, but your brain registers it as a set of well defined stages. First the house lights dimmed down. Then the desk lamp made a short buzzing sound and flickered off. The CRT followed with the characteristic”krrrr-ponk” sound echoing deep within the cathode ray tube behind the display. The video output collapsing down to a single line in the middle of the screen then fading into black. The faint wheezing sound of the desktop fans spinning down to an abrupt halt came next. Behind me I could hear the static swish of the TV and cable box dying in unison - a very different sound than that of the dying monitor, and yet the two use the very same technology to display moving pictures on their screens. After that, there was only a def and mute blackness. As if I was thrown into a black void of nothingness. Both the sense of sight and hearing suddenly went into overdrive trying to overcompensate of the sudden loss of abundant stimuli. The only sound I could hear was creaking of my own chair, and my own breathing. Sometimes, the power would come right back. I sat there waiting for few seconds.

One… Two… Three… Was it going to come back?

Five… Six… Seven… I guess not. I fumbled for my flashlight which was standing between an empty soda can a stack of letters and a coffee mug full of old pens and markers.

I climbed up the stairs from my underground lair, through the kitchen into the living room only to be greeted by a distant howling sound. A bit like sirens - maybe it was a passing ambulance, or a police car… But the pitch was wrong. It didn’t oscillate the way emergency signals do. It didn’t move closer or farther away as it’s the case with the a moving vehicle signaling it’s passage. Perhaps these were distant fire sirens? But my town doesn’t have them - we have a professional fire department, not volunteers. Besides, these sirens rise and fall in pitch. The howling sound I heard did not - it was fairly constant. What was it then? It took me a minute or two to identify the sound. It was the wind! A high pitched distant howl, and my house was creaking as the violent gusts sweep over it. I could hear it so well, because of the deathly silence in the house. There was no radio, no TV, no noise from the spinning fans on my desktop. Nothing to down out the sounds of nature.

I peeked outside through the glass deck door. I saw only darkness - as if someone coated the glass with a thick layer of black paint. I could hardly make out the outline of my deck, as my eyes adjusted to the sharp contrasts around me. The bright LED flashlight was wreaking havoc to my night vision. Judging from the absence of light outside I summarized that the whole neighborhood got hit. The nearby houses were just dark silhouettes far beyond the range of my flashlight. Not a single window was lit in any of them. They were like black, cardboard cutouts backdropped against the sky - two dimensional outlines devoid of detail. The only sources of light were glimmering high up above me the night sky. The stars and the moon - they were incredibly clear. Clearer than I have seen them in years. No wonder - suddenly all the reflected light feedback that usually obscures them was gone in the area. Now the only thing trying to obscure them were the naked winter crowns of the trees swaying violently in the wind. Like withered claws of some strange primordial Lovercaftian beast born of darkness, clawing madly at the sky.

I made my way to the front of the house, and peered outside the front door. The streetlights were off, but the headlights of a passing car bathed everything in bleak artificial white. The house across the street was dark as well. In this sudden brightness it’s windows appeared to me as dark gaping voids - bizarre black holes which collapsed upon themselves and opened passages to strange dark dimension. But illusion only lasted for a brief second. As the car passed, the house became a dark shadowy silhouette again. The red tail lights didn’t really give off much light - not enough to see the details of the house across the street. Instead they made the shadows of the trees and streetlights come alive. They seemed to dance and move in the cars wake as some unsettling procession of twirling stick figures. Soon all I could see were two red dots going of into distance, heading for a shiny green beckon!

The traffic lights! They were still on. I watched them turn amber, red, then green again. At least part of the infrastructure had to be working if they were on. If they have power at the intersection, then it shouldn’t take them that long to fix this outage. Perhaps it’s just my street that went down.

I went back inside, chilled to the core by the cold wind and decided to check the view outside the deck door again. This time I saw a faint, shaky flickering in the distance. It was almost like a mysterious swamp light. It would appear for few seconds, in one spot dim down into nothing and flare up somewhere else. My neighbor must have found a flashlight, or a candle at last and I could see it through the windows as he wandered from one room to another.

As I was sweeping the flashlight back and forward over the deck and the garden the shadows were moving eerily following and scattering away from the beam of light. The trees were still clawing at the sky. The whole world seemed to be moving to the tune of some strange music my ears could not hear. An idea about what must have happened started coalescing in my mind. The crazy wind must have downed a tree which in turn damaged a power line. That had to be it. They would just have to find it, and reroute the power. It shouldn’t take that long. Maybe 20-30 minutes tops.

I was watching the shadows scatter in front of the circle of light, only to jump out on the other side, elongate and then join the darkness which has spawned them with a strange sense of fascination. This phantom movement was both mesmerizing and unsettling. The hedges and bushes below the deck and along the fence in the back of the yard were shaking violently in the wind. It was as if there was something that was hiding in them and now decided to stumble out rushing towards the light - or perhaps away from it. On the left side there was no fence at all. On the right, it is only a symbolic waist high chain-link. Only the back of the property is somewhat shielded. Shielded from what? The neighbors? They were all good people. But suddenly it worried me that, someone could come from either direction, waltz straight onto my deck and I would never see them. Not just tonight - on any night. My back yard is never really lit up very well. Anyone could just walk across the lawn unseen almost all the way to to the deck stairs. From there, it would only take five quick steps, and they would be right in my face. And the only thing that protected me from potential intruders was a thin sheet of glass. I felt vulnerable.

I’d have to board it up. That was what popped into my head. If the power never comes back, there would be looting, and the deck door would need to be barricaded to keep people outside and hide the activity in the house.

Why was I thinking about this? Who would come here? This was a small, local power outage and I was in a nice suburban town, which would be the last place on earth you would expect to see the post apocalyptic looting war bands I suddenly imagined. Still, the thought made me uneasy. I made sure the deck door was fastened shut, and was about to shut down the vertical blinds. I figured that not having to look at the gloomy scenery out there will make me feel safer. Ironically, I wouldn’t even be able to see the potential intruders with the blinds shut. But there were no intruders to see around here.

That’s when I saw a shadow darting into the circle of the moving light made by my flashlight. Black as night, elongated and shapless it was moving on it’s own, dancing along the whole length of the deck and moving from left to right until it filled out all available space. This was not the normal shadow dance that I produced by moving the flashlight back and forward. This shadow was attached to something that seemed alive.

The owner of the shadow suddenly appeared right against the glass of the deck. Two charcoal black in black eyes peered at me from the darkness. They were darker than the night, and much deeper than those of a human being. Huge pupils, almost no retina visible - these were the eyes of a nocturnal predator. He looked inside, surveyed the room and finally affixed his gaze upon me crooking his head expectantly. Inquisitive and curious beast - he was hungry. My uneasiness evaporated, and I swung the door open letting him inside. This cat still doesn’t trust me, but he is pretty comfortable eating inside of the house. He has his bowl right by the deck door. Such an odd relationship we have - a man and a wild animal. Domesticating this little guy is an ongoing project, and there is no end in sight yet. This is no lazy house cat - he is proud, individualistic hunter. I suspect he didn’t mind the wind much, and naturally was completely unaffected by the power outage.

I often wondered how he perceives us, humans. He was born out in the suburban wilderness and has never known a human touch. Never lived inside of a house. How strange we must be to him. Awkward towering giants with booming voices, always hoarding food and are curiously willing to share it. What we have is a fragile truce - and he reminds me of it by hissing and baring his fangs as I pass by him to fetch him something to eat. To close for comfort. Sorry pal, didn’t mean to startle you…

As my feline friend was getting his evening meal the family assembled at the kitchen table, speculating about the power outage and fiddling with different battery powered light sources and candles. We sat there for several hours chit-chatting and gathering field reports from friends and relatives in the area. For some time the cell phones were in constant use - calling ringing, connecting. Then it all died down, as we got the low down on everyone’s situation. It seems that the outage affected more than just my town but rather a larger area comprised of 2-3 towns. It seemed serious, but nothing that could not be fixed in few hours. I called the power company, only to get re-routed the automated power outage reporting system every time.

As we sat together the wind dropped off and picked up several times. It’s low pitched howling mixed with actual emergency siren sounds fading in and out from all directions. My brother works at a restaurant 10 minutes away from the house. You cross the bridge, and jump on the highway, make a U turn and you are there. He had power all evening so obviously the damage was local. But sitting in that dark house, and listening to the howling wind, and counting the passing ambulance/police sirens it almost seemed like we were are in some post apocalyptic movie in which the civilization just came crushing but no one has noticed yet.

Around 11pm, I went back downstairs with a big battery powered lamp, and a plastic yellow radio/cassette player we used to take to the beach. I hooked the lamp above my bed, propped the radio on my night stand, and tuned into some music station. Compared to the howling, and creaking I heard upstairs, my room was quiet as some ancient tomb. Initially I wanted to play some mp3’s from the desktop, but naturally this wouldn’t work without electricity - and I don’t have any music on my work laptop. So the radio had to do for the time being. I desperately needed some background noise in this deathly silence. Next to the radio I placed my cell phone which was both my life line to the outside world, and also the only watch I owned that still worked. All of the other time keeping devices in the room, require running power. Next to the cell phone, I placed my trusty LED flashlight. Thus armed I hopped into bed with a book and decided to use this time to catch up on my reading.

It’s funny how even during this blackout I was desperately clinging to technology. My cell phone, the radio, the electric lamp. They were all my crutches. What it this was it, though? What if the power never came back up? What if the world died that night for whatever reason? My cell phone would die unless I found some way to recharge it that didn’t involve plugging it into the power socket. My lamp, my flashlight and my radio would only work as long as I would keep feeding them DD batteries. And then what?

Even worse, was that all of my lives work - everything that I have created, and learned so far would suddenly become irrelevant, and absolutely useless. My MS in Computer Science and sysadmin/software developer background would mean nothing in a world where computers were just a distant memory. I was ill prepared for living in a post apocalyptic world. My professional skill set was narrow and useless - the only useful bits of knowledge would be the stuff I have learned in the science classes. Chemistry would probably be useful if I had to Robinson Crusoe by myself for the rest of my life in the urban jungle. So was math, engineering and biology. But computer science would be all but irrelevant.

I did not really posses any survival skills to speak off - I’d usually just google up just look up stuff like that as needed. I think that if the civilization ended tomorrow, and I was one of the few survivors, one of my priorities would be to loot a library searching for useful urban survival knowledge. But my mind balked at the prospect of searching for knowledge this way. That would be so slow and inefficient - and there would be no guarantees I’d find what I was looking for.

What would I do in this new world? How I would the rest of my life play out? Would I be a drain on my family, and the local society possessing few useful skills? How would I deal with all my hopes, dreams and hobbies being blinked out of existence. How about you? Do you think you would survive in such scenario? Do you think you would be ready?

I must have dozed off with the book, and my dark thoughts about the end of the world. I woke up way past midnight. All the lights in the room were on, and the blaring TV was trying to compete with the radio over who can assault my ears with a louder and harsher cacophony of sounds. I smiled to myself, I switched the radio off, turned the volume down on the TV, shut off the lights and went to check my email. I really needed to finally buy that damn UPS for the desktop.

Dog Ear Bookmarking

Monday, March 10th, 2008

The other day my dad saw me dog ear my book to save my place, and he made a comment about it. I didn’t have the heart to tell him that I also sometimes make notes on the margins, and mark interesting quotes and passages in the books that I own. It seems that a lot of people get hung up about these things. No dog earing, no putting an open book face down on the table, no scribbling in the books and etc… And these are not just pet peeves of few bibliophiles - these are quite widely held beliefs.

But why is that? It is just a hard copy! A $5 paperback edition and there is a million of copies just like this one. A book is just a storage medium - it is designed to store information in a human accessible way. The data which it contains is the important and valuable commodity. The paper based container however - is for a lack or a better word disposable. And it comes with a built in bookmark functionality. Why not use it?

In fact I would argue that by adding my notes, scribbles and permanent dog-ear bookmarks I’m actually adding value to my copy. Now it has annotations that will help me find interesting passages, or remind me about the parts that I found worth remembering when I pick up the book second time around. It’s almost like having a time capsule - as you re-read the book that had a profound impact on you, you see what used to be important to you in the past. So the paper medium is not only containing data but also my markup and notes.

So I guess this is just a difference of the point of view. Which one are you? Do you dog ear and scribble in your books, or do you keep them in pristine condition? Are you one of the people who think dog earing is a criminal offense? Let me know. I’d love to hear arguments from both sides - to see how people treat their reading material and why.

Night Watch (the book)

Saturday, March 8th, 2008

Back at the begining of February I reviewed the movie Night Watch. It was deeply flawed but great looking action flick - in other words, very Hollywood like in execution. The plot seemed fragmented, and some things didn’t make any sense. I felt that there had to be more to this, so I picked up the book on which the movie was based.

Night Watch Cover

Unsurprisingly it turned out the be much better than the adaptation. It is still somewhat action oriented, fast paced and easy reading but it has a very different tone. It’s actually much lighter, and not devoid of humor. Lukyanenko seems to have a good grasp of irony which is completely missing from the movie. And it’s this sense of irony that actually is the centerpiece of the whole story. The setup is as follows: there is a treaty between the forces of good and evil, forcing them to coexist peacefully. There are checks and balances, tribunals an special enforcement agencies on both sides.

The dark side naturally wants to cause suffering, chaos and mayhem because they feed off human misfortune. It is the actual source of their power - this is how they charge up for performing powerful feats of magic. Unfortunately for them, they can’t really just walk around making people miserable. For every harm they cause, the light side gets to do equal (or equivalent) amount of good. Sadly it works both ways.

Imagine yourself being in the shoes of the main character - Anton. He has the proper training, and enough power to do incredible amount of good. He could heal the terminally ill, save people from a horrible train wreck, or turn recidivist criminals into upstanding citizens. But he can’t - and if he tried, his pals from the light side would have to put him down to maintain the balance between the good and evil. So instead Anton has to walk past pain, suffering and ignore human crimes and idly watch as vampires feed on unsuspecting humans as per licensing agreements they were able to obtain from the light side.

The treaty is uneasy for both sides, and both scheme, plot and try to find some wiggle room to further their goals, and gain small advantage over the other. This means that the Night Watch (a light side organization which oversees and polices the activity of the dark ones) is not always about doing good. It’s almost always about self sacrifice. Being on the side of light means being a pawn in a convoluted game of intrigue, brokered deals with the dark side, diversions, feints and subversive tactics.

When the story begins, Anton is already pretty jaded about the shady tactics of the Night Watch. As his power grows, and he finds out more and more about the history and inner secrets of the organization, and becomes an unwilling pawn in one of it’s biggest operations to date he becomes completely disillusioned.

Lukyanenko starts with a black and white world, where the forces of evil are well defined, and then grabs his color palette, and starts adding shades of gray all over the place. In the end there is nothing left, and the light side ends up being as detrimental to the well being of the human kind, as the dark side. So the interesting bit is watching this deconstruction of this universe.

The backdrop for the story is modern Moscow which is a city of great contrasts very similar to the stark contrast between the forces of the Day and Night Watch. Here wealth and luxury spectacularly clashes with dirt and poverty - both competing for the same living space inside of the city. Lavish sports cars zoom past groups of underprivileged lower class citizens who can barely make the ends meet in post communist capitalistic Russia. You probably couldn’t pick a better setting.

The story is unveiled in 3 self contained chapters. Each is constructed the same way - it starts with a short exposition of a crisis situation. Next we witness Anton being thrown into the middle of the crisis, with the tension building up to an explosive resolution, accompanied by a clever twist. Naturally after the first chapter, you are pretty much expecting the very same type of twist in the second one, and when it happens again in the third you are no longer surprised. Each part could probably fend on it’s own as a short story, but they are related and and up telling a much broader and more interesting tale when read as a whole. To me however a less structured approach could have been better - but it helps to keep the book fast paced and easy to follow (which, again, is not always a good thing).

To tell you the truth, the part of the story which interested me the most was the concept of the Twilight, which was barely hinted at in the movie. Lukyanenko describes it as a sort of parallel shadowy dimension which can be accessed by rising your shadow and walking through it. It sort of reminiscent of Umbra from WoD.

Anton claims that there are 3 (or perhaps more) levels of Twilight. The first level essentially looks like a bleak and shadowy version of this universe that is run in slow motion. Deeper levels become much more alien, and disconnected from the physical universe. Second level for example is a dark realm filled with mist and rain in which features from the real world start to disappear. For example, Anton dispatches an enemy by pulling him into the second level of Twilight on an observation platform high above the ground. Since the platform does not exist thus plunging him down to the ground. We never see the third level, because our hero is not powerful to survive in it.

Twilight seems to drain your strength, and while an experienced Other can stay on the first level for hours, sooner or later it becomes dangerous. Second level is even more difficult to navigate, and more power hungry. Third is almost impossible to enter without strong protective magic, or transforming into some demonic form.

Similarly to Umbra, Twilight is inhabited by strange, and often misunderstood spirits. Most of them seem to be some sort of wraiths or ghosts of Others who either withdrew into this shadowy realm and were changed by it, or decided to inhabit it after death. There is no mentioning of daemons, gods or any kind of other supernatural beings living in there, other than some storage blue moss which seems to feed of human emotion.

In the novel, all magical duels and face-offs happen within Twilight, to keep collateral damage down to minimum. It is rather convenient solution, but it does make sense internally. It is an interesting concept and the movie really under-utilized it.

I guess my main complain about this book would have to deal with translation. Andrew Broomfield does a very good job for the most part, but there were several things that bothered me. For example, he insists on translating militsiya (мили́ция) as militia. While technically correct, considering the etymology of the word it seems a bit clumsy. In most English speaking countries when we talk about militia we usually mean a temporary, unpaid, paramilitary force composed out of citizen volunteers created to deal with specific threats or emergencies. This is naturally a wrong connotation. In soviet block countries militia (or rather militsiya) was essentially a state funded police force. The tactics, and organization differ from western police models, but I personally think that militia was a wrong choice here.

I say that, because it took me few seconds to realize what the characters were talking about - and I actually lived in a country that used to have a militsiya (there called milicja and later renamed to policja) for many years. So if I was confused, someone unfamiliar with this terminology would be completely lost. Using the word Police, or leaving it as a militsiya (which is I think transliteration from cyrylic) would make much more sense.

There were several other small hiccups like this one. I didn’t write any of them down, and I can’t recall them all but I remember that there was more than one. As a whole, the book just seems too sterile. None of the characters ever use any slang, or common contractions. They are all very articulate, and fond of big words. And while this clean and articulate voice it is perfectly acceptable for Anton - who is an educated programmer, it seems out of place when used for some of the other characters.

Some sort of change of pace, or creative speech-pattern modeling would do wonders for this novel. I have seen this done many times - only the other way around. For example, back in the day I read Polish translations of some of Terry Pratchet’s early books and found them humorous and colorful - with the signature English humor either surviving intact, or being converted to something more familiar and sensible as needed.

Translating a novel isn’t always about simply getting the meaning across. Sometimes injecting a bit of a personal touch and creativity into the text goes a long way. But that’s just my opinion.

All in all, Night Watch is not a bad book. It is mostly a fast paced, action romp but the ambiguous approach to the whole light and darkness dichotomy gives it a more layered, and almost philosophical touch. Don’t expect it to change your life, but if you want some easy but not brain-dead reading I recommend picking it up. )