Sunday, June 25, 2006

Romantic Dinner

Sonja and I had an anniversary of some sort last week and we went to a restaurant that was recommended to us, the Mt. Hamilton Grandview Restaurant. The picture was taken with my little cell phone while we were dining. The sunset was very nice, and it was very cool to see darkness overtake the valley and bring out all the lights. That's where the romance ended. Don't get me wrong, Sonja and I still had a good time and we were fine and enjoyed each other.


Image014.jpg
Originally uploaded by jmeyer.



The restaurant itself didn't really ooze romance, unless you are into 60's or 70's style dark brown wood paneling on the wall, flowery carpets and a somewhat dull interior decoration. The food was average, edible, not bad but not so good that I definitely want to come back. The views (especially around sunset) make up for a lot of shortcomings, just don't go there and expect romance to greet you at the door.

Thursday, June 15, 2006

Soccer Fever

Whoever reads this probably knows that the greatest sports tournament in the world is currently under way. Yeah baby, I am talking about Soccer World Cup, or Fußballweltmeisterschaft as we say in German. I overheard somehwere that an estimated 1.2 billion people watched the opening game of this World Cup between Germany and Costa Rica. For the final game an estimated 1.5 billion people will watch this event. It is truly the World's sport. Don't get me wrong, I like all kinds of sports but having played soccer my entire childhood in Germany and a few years after that, it truly is Germanys pastime. I have been watching games at home and at work (thanks to Yahoo for the nice big screens in the cafeteria) or been following them online. Yeah, my productivity suffers a little but once every 4 years you get to see the world's best soccer players in one tournament and it's just terrific. I wish I could be in Germany right now, my friends tell me that all of Germany is going uts and with every win of our national team, people will get more insane. I am hoping for a rematch of the last World Cup finals, between Germany and Brazil. This time though, Germany will be on top. And for someone like me who loves soccer to see your home team win is really, really cool. Germany has won 1954, 1974 and 1990. I wasn't born back in '54 and I was only 3 years old in '74 but I still remember watching the finals in Italy when Germany beat Argentina 1-0 in 1990. It wasn't a good game but winning the title pushed all of Germany into delirium for one night. Anyone who has ever played in a championship game on any level knows that it's a special feeling when you come out as the winner. I am hoping for something like it again. Let's see what happens. In the meantime I will keep wearing my red Germany jersey when they are playing. So far they are undefeated when I am wearing it and I have been saving it for almost a year for this world cup ... If that isn't helping I don't know what can.

Why comments in code are useful ...

Everyone who is a programmer knows that good coding isn't just writing code that has very few problems, is efficient, does what it's supposed to, requires little maintenance and is easily extensible. This means that it is not just about using correct syntax and the latest and greatest algorithms and implementing them correctly. It is about telling oneself and others why something was implemented a certain way. Yeah, you may already guess it and you are right. I am talking about comments in code. I know, I know, you may say: "I bet Joerg has sometimes delivered less than perfectly commented code". And you are right, but I try to always do it when appropriate. Hell, I don't need someone to tell me something like this:

void incrFunc( int& i ){
i++; // adding one to i
}

That's dumb, don't state the obvious. But when you chose a certain algorithm or use something that is non-standard, write a line or two about it and add documentation so that people that will have to pick up your code know what the hell you were thinking. Why am I writing about this? Well, I am currently working on a project that is about integrating something cool and new into an older codebase. And this includes using code others have written. It's amazing when you trying to code towards certain APIs what kind of surprises you sometimes see. And you don't see them by reading the code, you learn through painful and time-consuming debugging. Here is an example. Consider the case where you have larger buffer and you have to mark certain regions in the buffer to identify subsections. One way to do this would be through a struct like this:

struct section {
int start;
int end;
};

Now, for me, the intuitive thing would be to assume that start denotes the byte offset of the first byte of the section and end would denote the offset of last byte of the section. Well, I came across some code where end pointed to the first byte after the section. Why? Well, no comment or anything in the code. Thankfully, the programmer was still there and I could ask. And even though he had a reason for doing so (he wanted to be able to express section of length zero [don't ask me why], and ...well...laziness), a comment would have avoided a bunch of confusion. Even better, don't name it end but length and there is no ambiguity at all. What's even worse is that when I asked the programmer about it he did not know/remember why he did that. And this is where useful comments come in again. They are not just good for others, they help you as well. And believe it or not, the code that you write will be seen by more people than you might think. So use smart comments but don't litter the code, nobody wants to read source code files that are 4000 lines or longer. This is another one of these things that people shouldn't do but I will leave that to another post.

Monday, June 12, 2006

Commuting ... Take Two

I have already written about the things you may or may not encounter on the road when commuting. Reading all the things that there are to find on a car are a whole other story. There is stickers of course, customized license plate numbers and the oh so useful license plate frames. Personally, I hate the personalized license plate numbers. Some people go to a lot of extremes making something out of nothing. Sometimes, it's pretty easy to figure out and sometimes it makes no sense whatsoever. I wish people would stop this all together. Why do you have to have "MY BMW" on the license plate of a BMW? Isn't it obvious? And who cares whether the driver or the bank owns it?

An even dumber thing is what you can find written on license plate frames. Here is a prime example of stupidity: "My other car is an airplane" (Found on an Acura SUV)

Let's start with the obvious. An airplane isn't a car. I made sure to check on Wikipedia and I am certain that any other online encyclopedia would tell the same. Next problem with it is: "Who the hell cares?" I think it's perfectly fine to put stickers on your car or even have something that's funny. Whatever it is, just make sure it makes sense. So whoever you are, airplane dummy, if you read this, take off the license plate frames or fly your darn airplane so we don't have to see your stupid license plate frames. On the other hand you would probably drive your airplane. Whatever it is, just stay off the road because whoever puts stupid stuff like that on his car will probably do more harm.

My commute ... Now, I have seen it all.

I am commuting to work by car. That's really no surprise when you live in the Bay area which (aside from when you live to close to Bart or within San Francisco) does not have a good public transportation system. That's beside the point in this post as this time I am writing about the interesting, not so interesting, scary and sometimes even disgusting things you see when you spend a fair amount of time in traffic and at stoplights. In the morning there is the numerous women who put on make-up while driving their big SUV swerving left and right. I wonder how many eye injuries there are per year caused by putting on make-up in the car. Some guys are not that much better, shaving while driving, half looking at the traffic in front of them, half looking in the mirror to check whether they've missed a spot. Thankfully, I have yet to see someone who does not use an electric shaver. I have even seen a guy brush his teeth in the car and spit the foam out the window.
Then there is the people picking their nose. I know, it's not nice but I think everyone at one point has picked his/her nose. What seems wrong to me though is that some people just don't seem to be bothered when you actually see them doing it. Even worse, they have no problem inspecting their finds. Where do they end up? I leave that to your imagination. Seriously, I could do with out these people.
When commuting in stop-and-go traffic you also can't help but looking at the people in the cars beside you or just look at the cars themselves. My favorites are the Japanese sports cars with these insane rear spoilers. You really need them badly when you are going down San Tomas Expressway in San Jose with approximately 12.5mph.
My favorite so far has been the old guy reading porn while stopped at traffic lights. One day I ended up driving right along side this old guy in his old Honda Civic. After we have come to a stop at an intersection, he pulls out a magazine puts it on his steering wheel and turns out it was a Playboy magazine. Very nice! Two stoplights later I am right next to him again and same procedure. A few pages further into it or so it seemed but he did not even bother putting it on the passenger seat. He simply did not care or was he just being very good and wanting to share his magazine. Who knows, haven't seen him again which is said because I as curious about the next playboy issue.
What's the moral of all this? No moral here but keep your eyes open when commuting, there is definitely interesting and weird stuff going on. Or simply close them to get spared the nose picking and other disgusting habits ... But wait, you are in traffic, better keep those eyes open...