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!

Sunday, August 17, 2008

Software on the 51st floor

Last night was a pretty interesting night. I went to Cirque du Soleil at the Air Canada Centre home of the Toronto Maple Leafs, The Toronto Raptors, and any other event too small to fill the Rogers Centre, or as previously known the Skydome.

The show was stupendous. I can honestly say it was the most professional and electrifying circus act I have seen in my life. The juggler juggled from 7-9 balls and bounced them around his feet at speeds almost too high to see clearly. But the best performance in my opinion goes to a guy who played a joyful boy. The act was a crowd interactive piece with a mixture of sound effects he made with his mouth and mime gestures which brought the better half of the spectators to tears with laughter. He even made a guy get up from the crowd and jump around, and pretend to be in a western duel from the times of the wild west. I would recommend it to anyone with a chance to go see Cirque du Soleil, extremely entertaining.

The show began at 7:30 pm and ended at around 9:00pm. It was a beautiful night for walking in downtown Toronto. It wasn't too cold and the sky was clear and if you squinted long enough you could even see a star. We walked south on Bay street for about two minutes to the parking lot behind the Gardiner Expressway on Bay and Harbour. The mass exodus from the ACC seemed to carry us with them towards the overcrowded parking lot. From behind the elevated highway running over the parking lot the CN Tower rose in its exuberant red and white glow, to its right the TD Waterhouse tower seemed dwarfed and merged into the skyline.

It was early so it meant we had time to meet my fiancee's friend and her boyfriend which had been meaning to get together with us for a while. We drove north on Bay street to Bloor street where we found parking in an underground garage for 12 dollars, plus the 20 we had previously paid meant we had already spent 32 dollars on parking space. If that doesn't make you want to ride the subway, I don't know what will! We parked in the Yorkville area which is filled with extravagant bars and expensive clothing stores. In every corner it seemed there was a patio filled with people dressed in suites and women in night dresses all drinking wine and eating oysters. We walked to the Menu Life Building which houses one of the bars with the best views in the area. Panorama and it's situated in the 51st floor right at the heart of downtown Toronto.

It was my first time going to Panorama, but right from the elevator I knew it was a peculiar type of bar. There were only two buttons, second floor, and 51st floor- pretty specific I would say. I guess since it's a bar you want to give drunk people less options and ways to get confused and wandering lost inside a 51 story building. We pressed the obvious choice and twenty seconds later we were 51 stories high and our ears were popping. The bar looked nice, with dimmed romantic and accented lights at the corners of the walls, mahogany tables and leather couches. My fiancee spotted her friend sitting in the patio, yes that's right a patio in the 51st floor. The patio had couches and reclining chairs, and you could see the whole of Toronto. The CNTower, the TD tower, the CIBC building, Lake Ontario, and the breeze was fresh as could be.

After the courteous introductions I ordered a mojito-which just so you know was amazing and about the best mojito I have had- and almost treacherously and unexpectedly the very dreaded question popped up.

"So what do you do?"

I realized I had been asked a question but gently dodged it and continued to drink my mojito and enjoy the view which by now included a school of seagulls and loonies flying inland.

"Ken, he is asking you what do you do" - That was my fiancee nudging me with her elbow.

Ahh, love, a beautiful thing.

Gina's boyfriend Mark, an entrepreneur, business major, and very proud of his accomplishments asked me what do I do.

About what, was my natural answer after Red Foreman from That 70's Show.

Perhaps to many people including other computer scientists this question is not such a big deal. To me however, it is not a question I want to answer while nursing a very expensive mojito at the edge of the universe. What I do is write and test graphics drivers for embedded systems, this includes safety critical system like aerospace projects (Airbus A380), or other non safety critical systems like GPS gadgets for cars and such. But if I begin to explain that I am in the graphics world of computing I can almost guarantee that I will be asked to photoshop a wedding picture for them.

Then what can I say, I wondered. If I say I am a programmer (though I don't like that because it's over simplifying what computer science is, and what I do) then I'll be asked what areas of programming I like most, just like I am always asked. And then, when I say that I prefer the low level side of programming they look at me with soggy eyes and pouting lips, as though saying awww I'm sure if you try hard enough one day you could do higher level stuff.
One thing I find funny is that people cannot get over the fact that low level and high level have a completely different meaning in the world of computing.

I looked at him straight in the eyes and said.

"I work at PizzaHut"

My fiancee pinched me hard in the ribs and still hurts, and I continued to drink my mojito.

Welcome!

Hello there and welcome to the launch of Software, and a little more. In here I will be talking about the software life cycle and every little aspect I can think of regarding the software development process, which includes donuts and a little secret I'll let you all in on a little later (includes a magic dance) .

As a computer scientist I see the science of computing (I bet you didn't see that coming) as a little more than math and science. To me computer science is an art, and as such this site won't be about the needy greedy, boring, nerd seeking, geek infested bits and bytes composing the software world. Instead, my goal is to speak of the world of software making from a much higher level, which includes dealing with management, dealing with customers-this is always a fun subject if you haven't had the joyous opportunity to have experienced it already-and meeting impossible deadlines.

As the title implies this blog will be about Software, and a little more... In the "a little more..." portion I want to include everyday life anecdotes which might or might not directly relate to the software building process, but who cares, it'll be fun and interesting. After all I'm lots of fun, really, you should all meet me. I will try to write as often as I am able to. But I have promised myself that I will update this blog at least twice a week.

Thank you all, and I hope you enjoy the blog!