The Old New Thing

You know you've been in Sweden too long when…

Some Aussie ex-pats developed a list of “You know you've been in Sweden too long when...”. My friend who is acting as my host (and who is himself a U.S. ex-pat) says that the list is astonishingly accurate, and that your reaction to it goes through several phases. For example, my friend explained points 73 and 74 to me...

What U.S. college students miss from home

I didn't believe it until I saw it myself: My friend asked me to bring red and blue plastic cups to Sweden because the U.S. students really miss them. It's true. Here's why. (This needed to be explained to me because this was a part of U.S. college life I missed out on.) These cups are valuable because they are opaque. This allows you to walk ...

The ways people mess up IUnknown::QueryInterface

When you're dealing with application compatibility, you discover all sorts of things that worked only by accident. Today, I'll talk about some of the "creative" ways people mess up the IUnknown::QueryInterface method. Now, you'd think, "This interface is so critical to COM, how could anybody possible mess it up?" Forgetting to respond to...

Yahoo's privacy policy regarding web bugs

Here's Yahoo's privacy policy regarding so-called web bugs (or as they call them "web beacons") - these are the little 1x1 images that web sites use to keep track of where you're going. Halfway down the page (at least as of the time I wrote this, which is not the same as the time this gets posted since I write stuff in advance...) in ...

Swedish spicy food

My friend Jonathan is acting as my host in Uppsala, and he was responsible for preparing dinner for a staff party at his nation. He chose curry. The same thing he chose the last time he was responsible for preparing dinner for a party. The last time, one of the attendees ceremonially dumped the curry into the trash because it was "...

URLs too small? Here comes hugeurl.com

Sure, everybody knows about little tinyurl.com, handing out short URLs for large unwieldy ones. But nobody pays any attention to tinyurl.com's arch-nemesis: www.hugeurl.com, or as they like to call themselves, http://www.hugeurl.com/?ZWY3ZTE0NWFmOTg5ZDU2M2QxYWI3ZTNhMGJj ZjlhNGMmMTImVm0wd2QyUXlVWGxXYTJoV1YwZG9WVll3Wkc5alJsWjBUVlpP ...

Regular expressions and the dreaded *? operator

The regular expression *? operator means "Match as few characters as necessary to make this pattern succeed." But look at what happens when you mix it up a bit: This pattern matches a quoted string containing no embedded quotes. This works because the first quotation mark starts the string, the .*? gobbles up everything in between, ...

The SAS in-flight safety video

Each time I see the SAS in-flight safety video, I am amused by the story they tell about each of their "characters". The safety video features four groups of travellers, a man and a young girl, a retired couple, a (very Scandinavian-looking) businesswoman, and a (vaguely Hispanic) young man. Each procedure is illustrated one of the ...

Some files come up strange in Notepad

David Cumps discovered that certain text files come up strange in Notepad. The reason is that Notepad has to edit files in a variety of encodings, and when its back against the wall, sometimes it's forced to guess. Here's the file "Hello" in various encodings: This is the traditional ANSI encoding. This is the Unicode (little-...