Showing results for March 2004 - Page 2 of 6 - The Old New Thing

Mar 26, 2004
0
0

The ways people mess up IUnknown::QueryInterface

Raymond Chen
Raymond Chen

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 IUnk...

History
Mar 25, 2004
0
0

Swedish spicy food

Raymond Chen
Raymond Chen

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 "inedi...

Non-Computer
Mar 25, 2004
0
0

URLs too small? Here comes hugeurl.com

Raymond Chen
Raymond Chen

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 V0Zac...

Other
Mar 25, 2004
0
0

Regular expressions and the dreaded *? operator

Raymond Chen
Raymond Chen

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, and th...

Code
Mar 25, 2004
0
0

The SAS in-flight safety video

Raymond Chen
Raymond Chen

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 four t...

Other
Mar 24, 2004
0
0

Out of the deep fryer

Raymond Chen
Raymond Chen

McDonalds anonunced that it would no longer offer "Super Size" on its menu. The ostensible reason was that the addition of newer healthier options didn't leave room on the menu for "Super Size". This was of course laughable on its face. Now it's even more laughable, because it turns out that the so-called "healthy" options are even fat...

Non-Computer
Mar 24, 2004
0
0

Some files come up strange in Notepad

Raymond Chen
Raymond Chen

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-endian) ...

History
Mar 23, 2004
0
0

the qUirKY jaPan HomEPage

Raymond Chen
Raymond Chen

The weird stuff about Japan you were afraid to ask about. The Seldom-Asked Questions are interesting, but what I find the most fascinating is the pictures of various Japanese subcultures. [Raymond is currently on vacation; this message was pre-recorded.]

Non-Computer
Mar 23, 2004
0
0

@-notation was never legal in HTTP URLs anyway

Raymond Chen
Raymond Chen

Some people are in an uproar over IE's dropping of support for @ notation in HTTP URLs. What people fail to note is that The @ notation was never legal for HTTP URLs in the first place. If you go to RFC 1738 section 3.3 (HTTP), it explicitly states: An HTTP URL takes the form: where <host> and <port> are as described in S...

Other
Mar 22, 2004
0
0

Why an object cannot be its own enumerator

Raymond Chen
Raymond Chen

I've seen people using the following cheat when forced to implement an enumerator: Why create a separate enumerator object when you can just be your own enumerator? It's so much easier. And it's wrong. Consider what happens if two people try to enumerate your formats at the same time: The two enumerators are really the same enumerator, so o...

Code