Friday, January 26, 2007


We went to the naturalization interview on Wednesday. We arrived early, but I lined up at the wrong entrance so ended up one minute late upon check-in at the reception desk. And then waited for maybe 45 minutes for a short interview, in which the most difficult part (no, really) was writing my name in cursive letters. You see, I haven't really written in cursive for nearly twenty years (I blame Lindsley), and the two signatures didn't really look alike.

No matter, we passed (actually, aced) the test and will become US citizens when we swear in next month. To celebrate, we had dimsum at Yank Sing. Somehow I don't really feel American yet, whatever that's supposed to feel like. My colleagues tell me now I can be partially blamed for everything.

Thursday, January 11, 2007

Absolute and Relative

Something I just realized while looking around for reactions to the iPhone. Geeks are appreciative of history, and therefore are concerned about how innovative a new product is over existing ones. Normal people are more concerned about whether the new product meets a certain absolute threshold of quality, usability, price, and other factors. If it does, they'll buy one even if it's just 2% better than existing ones.

Geeks see it as a mere 2% better than existing alternatives. Normal people see the existing products as 1% below their expectations, and the new one as 1% above.

Tuesday, January 9, 2007

The iPhone Cometh

The iPhone was announced today at the MacWorld keynote, so I was looking around for reactions. On I find this gem:

I surf the web on my 1 inch ms smartphone now, and it works fine.

If it did I'd still be working for Openwave. I didn't have much to do with the iPhone, though.

Monday, January 8, 2007


According to dnScoop, is worth US$874! Let's see what some of my friends are worth:


Tom is the man!

Complete Your Classes

One important feature of C++ and other object-oriented languages is the grouping of code and data into "classes" or "objects." They have language structures that allow a user-created type to behave just like a built-in one, but it requires that the writer of the class fill in all the blanks.

One such blank in C++ is the copy constructor. It is the responsibility of the writer of the class to provide one, even when you cannot imagine when it will be needed. If you don't, then somebody who doesn't have intimate knowledge of the class may have to write one later, and that's where mistakes are easily made. There are probably a few exceptions (a singleton, or a class for which a shallow copy will do, would certainly be exempt), but have a better reason than just laziness. Forcing your users to peek into your class to figure out how to make a copy of it destroys the whole point of encapsulation, because your class is no longer a black box that just works.