Monday, April 6, 2009

Commute on a rainy day

Today I woke to a rainy, snowy day. In the west end of city where I live, the wind was blowing fiercely and even under the multitude of blankets and sleep covers, I could hear the muffled roar of the wind outside my window. I threw a tired arm out from under the blankets and manged to grasp the remote control of my zenith tv resting on my night table. I turned on channel 7, Breakfast television, and listened to Frank Ferragine describe the forecast for today. Was it 25 mm or 25 cm of rain that it was going to fall today? I don't remember. But since it referred to rain I believe it must have been 25 mm. Then, tomorrow 8 cm of snow. Awesome!

I sat up in bed, listened to some more news. Watched Jennifer on the live eye tell the news on the fashion show at George Brown college; great show. Great models. I mean professionally, stop it! Then got up, showered, got ready and went to work. As soon as I got out of the building the wet damp snow falling on my head, and face made me realize one thing, the commute would be a pain. From where I live it normally takes me about an hour and fifteen minutes to get to work downtown. Usually at eight in the morning the subway and bus routes are bearable if not half empty, which is just the way I like it. However, when it rains or snows it seems as though the city swells in population. I don't know how it happens, but I believe it's a conspiracy. Yes, I believe the city has a conspiracy to ruin my mornings. I believe everyone congregates at city hall the night before it's going to rain, and think up ways to annoy me in the morning. Let me tell you, it actually works.You might think it's the nut in me talking, but why else would so many people come outside, just when I am outside, the days when it's cold, and damp and gray, and dark?

From my bedroom window I can see the 427 South with a line of cars squeezed bumper to bumper, and I know that they will remain bumper to bumper towards the Gardener Express Way and the exit on Yonge street. So, I choose not to drive downtown when it rains. I decide instead to take the bus, and the subway. But guess what, it's also full of conspirators pushing and closing up against me. You can all tell me your reasons of why both the highways and the transit systems get packed, and I am sure they are all reasonable excuses. I know the truth though. It's a conspiracy.

Today as it was to expect the subway was overflowing with passengers. On the Bloor Street line people were elbow to elbow as cars would be bumper to bumper on the surface. The next great thing about a subway ride with these many people is the festival of smells that erupts. As soon I thought of it as a festival, the image formed in my head, and in my mind it went something like this:

Narrow wet damp streets were suddenly formed between canvas tents with blue plastic tarp roofing tide at the corners with rope. Suddenly, a cacophony of loud marketeer screams exploded.

"Cigarette butt and Channel No. 5!" A well dressed business looking woman in the tent beside me was screaming.
"Cigarette butt and Channel No. 5, here for free! Only today! Do not miss it! Just for today, because it's rainy and gray, and ugly!"

Then from another tent a little to the left of this one someone else was screaming louder. "Stale coffee and sweaty armpits. Stale coffee, and sweaty armpits everyone! Don't miss it! Only while it rains!
"Every one gather around, stale coffee and sweaty armpits!"

Meanwhile in a very small tent in front of me a blond girl with pale blue eyes and a U of T bag pack was looking up and whispering "Acqua di Parma. Acqua di Parma, " but no one could hear her.

Now, in the dynamic marketplace the cigarette butt and Channel No. 5 tent had merged with the stale coffee and sweaty armpits tent and together had made a powerful enterprise which was slowly driving every marketeer out of business.


Just then from the far right an hysteric cry silenced all others. All the other tents disapeared. There was no festival anymore. Just one person. Standing in an open road. He was wearing a suit. He was holding a briefcase. He was looking at his watch. He was annoyed. He was upset. He was late. "Baad breaaath! Baad breaaath! Baad Breaath!" Screaming in my head like a fire alarm.

Thankfully just then my stop came and I got off before I got a headache. But as I walked up the stairs of the Yonge and Bloor subway station I could still smell some of the products the festival was giving away, and I wondered if by chance they had left me with a few samples.

Experience, no experience

There is this William's Coffee Pub on Queen Street that I love going to. Of course if you knew that I have only gone there twice then you would wonder whether that's enough time for me to judge wether I like it or not. Also, if you knew me well you would know that I change my mind quite a lot and for me to go somewhere twice and still like it, it's quite an accomplishment. Good on you Williams Coffee Pub on Queen Street!
So, as I was saying, I like this place quite a lot. I like it because it has this unique feeling to it you know? It's like walking into a place with class but which it's still affordable. It's like going into a cafe' where you might find interesting people, even if you don't. It's like entering a place in Europe while you are still in Brampton. Once you walk inside it's almost impossible to miss the gigantic blackboard with the menu on it written in different colored chalk. If you are lucky and it's not crowded you might be able to get a booth along the wall where you can sit and lay back while appreciating a nice cup of coffee or a fruit smoothie, or a nice piece of cheese cake. If you are not so lucky you might still be able to find an empty table somewhere with a couple of unused chairs. It's as unique a place as any of the other dozens of Williams Coffee Pubs spread throughout the city, damn globalization! But that's a subject for another blog.

I was there the other night with my fiancée and we were having a conversation about the importance of experience in the workforce. I was having a blended coffee smoothie which I hoped would wake me up for the ride home. But turns out it didn't. With the times as they are, with people getting laidoff left and right, and resumes being done to compulsive levels; I began to think about what most dread the most. "Do I have enough experience," or from the employers' point of view "Do you have enough experience."

It seems to me that people sometimes do not realize that there is a catch in that method of thinking. I have seen for myself that there is a problem with that mentality. For an enterprise to function well, in my opinion there must be a balance. Of course you need experienced people in your staff, but it's also important that you look and hire inexperienced personnel. Experience only functions well and becomes a benefit when coupled with inexperience. If you haven't noticed, maybe you should be a little more observant, but experience in many cases means that you know a vast number of ways in which things won't work. It's fine if you don't agree with me. You think I am wrong. Just humour me for a bit. We as humans are programmed to draw parallels. If an infant tries to grab a light bulb and gets burnt, he will stay away from all types of illuminating objects while the memory lasts (do I really need to mention not to try this? ). But it also means that he might be scared to play with a safe toy which emits light.

In a strange way knowledge sometimes puts a box around us from which it can be hard to get out. The walls of the box are constructed by the parallels we draw. I remember one day I was looking for a particular book in the catalog computer at my local library. I was looking for a Chinese cooking book. I kept trying different combinations of Chinese cooking books, but I would get one hit returned along with a bunch of Italian or Spanish cooking book results.
It became noticeable perhaps through my cursing that I was struggling, and a nice Samaritan came to the rescue. I struggled not to curse as I explained the problems I was having. Finally she said, why don't you try typing China, hitting enter, and then typing cooking books. "What a moron," I thought to myself. She is trying to tell me, me, the computer scientist how a database works. If she had half a brain even if it was shrunken in pickle sauce she would still know that two different queries, that's right they are called queries, are separate entities. But to humour her, I tried it.

Lo and behold it worked!

It seems that this was a smart database which kept context, so after I keyed in China and later cooking books it returned just about every cooking book in China (there are a lot!). She didn't know how databases worked so she was open to try anything. She had no box. Me, on the other hand, well...Let's leave it at that.

If you have a bunch of people with a ton of experience trying to solve a new revolutionary problem that might require out of the box thinking, you will get a bunch of whiteboards horribly harassed and a couple of trees killed in report pages explaining why this problem can't be solved. Or, in the better cases you get solutions which cost billions of dollars, a kidney, and a squirrel. And although this is true, it doesn't mean that the experienced staff are stupid and can't figure out less expensive ways. It's just that they are blinded by previous knowledge and they have probably built a bunch of redundancies into the solution.

On the other hand if you get a bunch of people with no experience you might end up with a solution that costs twenty bucks,a squirrel, and works perfectly well on Tuesdays.

However if you combine the Chutzpa and genius that comes from the freedom of not knowing what won't work with the experience of those who know, you might end up with a product that's reasonable, cost effective, and you might spare a squirrel.
It's like this, the inexperienced people will bring the crazy ideas that range in the whole spectrum of what's possible and what isn't. That by definition must include what works. And the experienced people will bring their knowledge of what hasn't worked in the past so that mistakes are not constantly repeated, and not to reinvent the wheel.

I believe I will quit doing what I do the minute I am so experienced I can't think of anything new to do.

Now, do us all a favour and start hiring not based only on experience but on creativity and perseverance which are far greater virtues.

Friday, March 6, 2009

Almost science fiction

I was reading an article about NASA's Kepler telescope and the missions to find intelligent life in other planets and it made me think about the necessity of such misuse of resources. This is not to say that I, like many NASA critics, suggest that the space agency is a total waste of money and time. No, in fact I am a strong supporter of NASA and of scientific research. However, I have never been a great fan of extra terrestrial life exploration. I am more concerned with understanding how we function and the laws of physics which are involved in making us function in that particular way.

Searching for life in outer space is another thing, one which I don't quite support. It suffices to me to know that it is almost mathematically certain that in the billion upon billion upon billion of planets out there, there is another one just like this one and that it too, supports life. To me this is as certain as the laws of probability.

The search for life in other planets aside from being wasteful, to me lacks any visible benefit. Suppose that we were able to find another planet with intelligent life. Suppose it were close enough for us to send an expedition of scientists to explore the planet and interact with the living creatures. We now also have to suppose that we can come up with a way to communicate with them in which we won't unintentionally flash them a sign which they would interpret as the extraterrestrial equivalent of giving the middle finger, in which case our poor scientists would end up being rectally probed and shoved into an extraterrestrial state of the art Zoo. And if you believe I am talking none sense then you probably have never been prepped for a business meeting with clients of different cultures.

Looking through our history I can't say much good has come from the encounters of two civilizations. And before any of you gets sentimental and start telling me about how great the encounter of the European and the American civilization was, first try to convince native americans or try to convince me of the genocides and extermination of the many Indigenous civilizations in the Americas.

And this is just in good old Earth.

Tuesday, September 16, 2008

Back to a cube

So, after a month of sitting in the Presidential office, regarded the best office in the company, I am back in a cubicle. Yes, don't kid yourself, or let anybody fool you, it sucks.

First, how did I end up getting the Presidential office? Am I the President of the company? Ha! Well, it so happened that around the beginning of the summer there were some changes in the leadership of the company and the president's office was left empty. Lets just leave it at that. At that time I had all sorts of equipment and target machines, and development machines, and blackboards, and whiteboards, and mice (optical ones), and I was barely able to fit in my 8'x8' cube. So, one of my co-workers and a friend suggested that I ask for the Presidential office with the pretext that I needed the space (which truly, I did need). But of course he meant it as a joke. To me however it made sense. The office was empty, and I needed the space.

I walked in one morning in early July to see one of the managers who deals with these kinds of requests and asked him very politely if I may have the office next to my cube which at the time lay empty. He said he would look into it, and we left it at that. Later that same day he walked by my cubicle and realized then, that the office next to my cubicle was the mildly large office with two equally large windows overlooking Richmond Street, just east of Church Street. He let out a chuckle and inquired again as to my need for the office. I, with a movement of my arm unveiled the inhumane mess in which I was trapped. He nodded and left. The day after I was allowed to move into the office. This is one thing I like about this company, if you make a request, and you can convince someone that it makes sense it will be made possible.

And in that office, of long windows reaching from the ceiling almost down to the floor, with Sun light splashing on the walls, and a view of the city's bums, prostitutes, prominent business men and hotdog vendors, I basked in the formidable space. But the most brilliant thing of all, was that that office, as opposed to my cubicle, had a door! A door! Oh that slab of wood, oh boundary of the blessed! Thou hath left me, for now I am back in a door less cubicle.

How did I end up back in a cubicle?

We moved office buildings.

Now, one individual who knew I spent a couple of months in that office came and asked me how does it feel to be back amongst "the peasants." Aside from the inaccuracy of the remark, it borders on offensive. I never attached any personal achievement or merit to that office, I was still reporting back to the same people. Just as I do now. But I loved the space. Now, I am back in a cube, which to be completely honest it's not too bad and when I am submerged in my work I kind of forget the world around me. But from time to time, when I look back, I miss looking at the bums and the prostitutes, down in the street.


Monday, September 1, 2008

An artisan and an Artist

An oddity worth mentioning:

I find it particularly interesting and brain grinding the fact that since the beginning of civilization our technology has evolved, our intellect and ways of life have evolved. We no longer have slaves who fight to their deaths in coliseums. We no longer burn "witches" at stakes --at least not in free societies-- yet the process of cultural evolution remains the same; an individual or a small group presents a new idea, the idea gets ridiculed and shutdown with only a few revolutionary souls insisting upon it until slowly the masses begin to accept it. When this happens the new idea is the one formally adopted and the previous method is shunned and forgotten. It takes a few years, or decades, or centuries depending on the medium but eventually the furor and excitement of that, once new idea, dies down and freckles of the old system begin a come back as the old time "classic" and blend its influences into the now established medium only to have the whole cycle repeat itself again.

Early painters of the Renaissance basked in the arms of Realism making the subjects of their paintings, the sceneries, and their clothing depict reality as close as could be done on canvas and oil based paints.

During the Baroque period artists began to experiment more with light and paint itself, and towards the end, impressionism began to emerge. With impressionism light effects took over the scenery and became the subject of the piece, brush strokes became more visible and intricate.

From the Renaissance to Impressionism to Modernism we see a trend in moving away from reality and making the medium the subject of the arts; painting is now about brush strokes and colour.

A friend of mine was recently working on creating a 3D model of a car's dashboard dial for a car manufacturer which was moving away from using the analog dials to using the more futuristic 3d OpenGL dial. The 3d model had a glossy finish of metallic blue. The needle in the centre of the dial swung as though floating in the middle of some virtual magnetic field. He explained to me that it took him quite some time to figure out a mathematical formula that would yield a realistic needle behaviour. The dashboard dial he created was done so amazingly well that it would be hard for me to describe it except perhaps by referring you to any existing car with a round dashboard dial of metallic blue. And I think to myself, why work so hard and invest so much time to duplicate something we already have, be it in a different medium or not? Are we experiencing the Renaissance's of computer graphics? I see movies keep coming out where the actors are 3D rendered images which look more and more like real actors. I have worked on the software for airplane cockpits where the altitude and fake horizon dials are exact copies of their analog predecessors. I see all this and I wonder; why? Why spend resources, time and money in creating a 3D rendered image which looks just like my uncle Joyce, why not just call my uncle Joyce who is a very good actor and give him the role in the movie? Why create a 3D version of the same old dashboard dial?

We have the need to imitate reality. It's in ourselves to observe the surroundings and imitate it and that's what we do every time we find a medium that allows us to do so. In the dashboard dial scenario however, there is an extra psychological factor. We are not just replacing the analog dial with a software one. We are replacing the whole dashboard and we have become very good at interpreting the round dials with the needle in them. And since we are used to using that concept we preserve it in the software model. With time the computer graphics medium will evolve too and the art will be in the infinite possibilities that the imaginative mind can hold. It will too, hopefully move away from copying reality.

Yet, I myself can't help but wonder what it would be like if we weren't so sensitive to change. Imagine we didn't have to go through these cycles all the time. Computer graphics artists should stop drawing dashboard dials which are as freakishly realistic and esthetically stunning as the one in my dad's ten year old car. The beautiful thing about computers is that it is the tangible dimension of the imaginary. In the world of virtual reality the stuff dreams are made of can be seen, and almost touched. There is an infinite world in this medium where our laws of physics have no jurisdiction, and should not. Instead of copying what we see and having two exact just as realistic copies of the same thing, disrupt and distort them. Just because a concept has been used for 50 years does not mean it can't change, if anything it means it should change. A person that creates a 3D image of my uncle Joyce so detailed that the sweat beads falling down his sideburns augment each wrinkle or vein that falls beneath it, is not an artist, it's a great artisan.

An artist will show me something I have never seen, and awe me with it.

Thursday, August 28, 2008

Finally fixed the driver

The only thing worth going through the painful process of fixing a complicated problem, the kind of problem which keeps you up at night and makes you dream of code and unfathomable journeys through memory space filled with pointers and addresses, is that when you finally solve it you feel that much better.

In "One of those weeks" I told you about a problem that I was facing where a particular memset call was producing access violations, even though the memory was mapped and should have been accessible. I stayed in my office yesterday until 9pm and banged my head against the screen a few times before I figured out the problem. I started the driver and while booting I saw in my debugger window in Visual Studio something that caught my attention. I saw that instead of the driver been loaded at an address which I expected it to, it had been shifted a little (I almost couldn't help say a 'bit'). This shift caused the whole loading process to shift and so our memset address got shifted and ran out of bounds.

I set the expected address to the address where the driver was actually loaded, and lo and behold it worked. This is a problem that I was able to solve but just as well might not have since it was so difficult to identify. This brings me to an important point. Sometimes especially when things do not seem to work and we try every possible solution, just like I had tried--I changed the address, re-mapped the address, checked the buffer size, every test that I made suggested that the driver should work--then the best way to proceed is to throw all of your knowledge, your instincts, your results, and most importantly your assumptions out the window and question your initial assumption which might have shifted your whole problem astray. Sometimes the solution to the problem does not lie within the intricacies of itself, but rather within the context in which we are trying to solve it. In my case, the driver itself was correct just like my tests were showing, and the mapping was done perfectly. To keep investing time in debugging the inner works and magic of the driver would have been to waste it. Instead, taking back a look at how the driver itself is loaded into memory and question whether this process was correct, yielded the right answer.

The other thing I like about solving difficult problems aside from the feeling of confidence it gives balancing the sessions of self esteem bashing, is that it has a humbling factor. Difficult problems serve to show us that no matter how much we think we know, there is always more for us to learn, by researching and from others.

And no, I did not scream I am king of the world.

Thursday, August 21, 2008

One of those weeks

I have been having one of those weeks where nothing you throw at the intellectual world seems to work. You know, those weeks when your neurons seems to say 'see ya fella' and go on vacation. I have been working on this port to WINCE6 and it's been pretty much hell from the beginning. I have never seen so many problems together, all caused by bad memory mapping. The only good thing about the sleepless nights and the self esteem bashing of not being able to solve the problems, is that when you do, you feel like the king of the universe, and like DiCaprio you run to the balcony in your office and climb on the railing and yell "Im king of the world!"

Yeah... I don't do that either.

Well, this past week it's been like the first part of that odyssey of which I spoke. I am having a problem where a simple memset call render an access violation, even though, the address is mapped. I have thrown everything I have at it, and the damn thing just won't work.

I am the kind of person who can't let a problem go. I can't just move on to something else. For the past three nights I have been dreaming of pointers and disarray. I hate memory mapping.

I remember the school days of a year a go and it is only now when I can appreciate the difference between schooling and working. While in university I maintained that you feel more pressure in school because you need to get that degree, after that, work was almost a given. But first you needed to achieve that position. While true, the one difference which I did not realize back then is that in school you seldom have to do 100% of the work. I remember in my operating systems class our FIFO prototypes and memory mapping exercises would only work on certain days of the week, and if Mars aligned with Jupiter, but not with Pluto, which then was a planet. In our networking class, our clients and servers would not communicate past the three way handshake, but we still got B's and you can pass with a B.

In the real world however, much to my surprise the software needs to work everyday of the week no matter where Mars is; madness!