The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Email tip: Pronouns in the subject line are in the eye of the beholder
Jun 12, 2008
Post comments count 0
Post likes count 0

Email tip: Pronouns in the subject line are in the eye of the beholder

Raymond Chen
Raymond Chen

This applies to email, but it applies even more to meetings and appointments, which are typically arranged via email or similar workflow. It may seem obvious at the time, but messages with pronouns like me or you in the subject line tend to be harder to understand when you come back to the message a little while later. I was reminded of this by a colleague who received a meeting reminder alert that simply read: Title: One-on-one chat Start time: May 9, 2007 4:00 PM Location: my office Whose office is my office? This is a generalization of choosing a subject line that is meaningful to the recipient. You wan...

If you say that you don't care about something, you shouldn't be upset that it contains garbage
Jun 11, 2008
Post comments count 0
Post likes count 0

If you say that you don't care about something, you shouldn't be upset that it contains garbage

Raymond Chen
Raymond Chen

There are many situations where you pass a structure to a function, and the function fills in the structure with information you request. In some cases, the function always fills in the entire structure (example: ). In other cases, you tell the function which bits of information you care about, to save the function the effort of computing something you weren't interested in anyway (example: ). In the latter case, if you say that you aren't interested in certain parts of the structure, and then you change your mind and start paying attention to them, don't be surprised if you find that there's nothing interesti...

Simply attach a piano to the end of the trebuchet
Jun 10, 2008
Post comments count 0
Post likes count 0

Simply attach a piano to the end of the trebuchet

Raymond Chen
Raymond Chen

As easy as 1-2-3. What's really scary is that they are hardly the only people to have done this. An Internet search will reveal many other people who've expressed similar musical talent. Or you can build one out of an industrial robot and hurl flaming bowling balls.

There are only twelve function keys, and who says there's somebody there to push them?
Jun 10, 2008
Post comments count 0
Post likes count 0

There are only twelve function keys, and who says there's somebody there to push them?

Raymond Chen
Raymond Chen

One of the proposals for adding hidden features to Windows Setup is to have a bunch of hidden function keys, one for each hidden option. Well, first of all, there are only twelve function keys and there are way more than twelve possible Setup features. (Yes, there may be a few function keys still active during Setup, but they exist only for compatibility purposes. No new Setup features involve function keys as far as I'm aware. And yes, there are keyboard layouts with more than twelve function keys, but think about what you're saying in context: "Yes, Setup should use function keys that are not available on most...

Money: The new plagiarism
Jun 9, 2008
Post comments count 0
Post likes count 0

Money: The new plagiarism

Raymond Chen
Raymond Chen

It appears that the country of Burundi used a freelance photographer's image on their currency without permission. (If the article goes down, BoingBoing saved a side-by-side comparison for your inspection.) The article adds that Fajack says he's talked about his case with several lawyers, editors and people experienced in photography and none of them has heard of any other infringement cases involving currency. I guess nobody remembered that the initial design for the Euro included images taken from the book Bridges: Three Thousand Years of Defying Nature. The theory must have been that there's no room fo...

Why are DLLs uninitialized in the "wrong" order?
Jun 9, 2008
Post comments count 0
Post likes count 0

Why are DLLs uninitialized in the "wrong" order?

Raymond Chen
Raymond Chen

This is really just a corollary to Why are DLLs unloaded in the "wrong" order. Exactly the same logic that explains why DLLs are unloaded in the "wrong" order also explains why they are uninitialized in the "wrong" order. Once you understand the first issue, the second comes for free; just change to in your analysis. Apply the logic to the scenario posed in this comment and you'll see why it too is flawed.

Million Dollar Password: At least it shares a name with the original
Jun 6, 2008
Post comments count 0
Post likes count 0

Million Dollar Password: At least it shares a name with the original

Raymond Chen
Raymond Chen

Password was one of the classic game shows. Its methodical pace encouraged thoughtful play, as opposed to today's game shows which appear to rely on dramatic music and ominous spotlights for their appeal. This is not a clip from the game show but rather a scene from the comedy The Odd Couple in which the two characters are contestants, and as you might expect from a sitcom, they fail spectacularly. But even from the clip, you can get a pretty good feel for how the game is played. The new version is nothing like it. It's really "try to guess a word which your partner describes in three words." The strategy of...

Why does OpenProcess succeed even when I add three to the process ID?
Jun 6, 2008
Post comments count 0
Post likes count 0

Why does OpenProcess succeed even when I add three to the process ID?

Raymond Chen
Raymond Chen

A customer noticed that if you add three to a process ID and pass it to the function, it still succeeds. Why is that? Well, first of all, I need to say up front that the behavior you're seeing is an artifact of the implementation and is not part of the contract. You're passing intentionally invalid parameters, what did you expect? The context of this question is "We're seeing this behavior and we can't explain it," not "We're using this trick and want confirmation that it's okay." Now, you actually know the answer to this already. As we saw earlier, for convenience, the Windows NT kernel uses the hand...

Portugal TechDays 2008: A report
Jun 5, 2008
Post comments count 0
Post likes count 0

Portugal TechDays 2008: A report

Raymond Chen
Raymond Chen

Back in March, I agreed to make a brief appearance at Portugal TechDays 2008. My arrival was delayed due to heavy traffic: I had taken the number 15 tram, which was jam packed, and the traffic on the road didn't help either. And then when I found the building labelled Centro de Congressos, I found the doors locked. That's because the big sign facing Rua da Junqueira is not the main entrance. The main entrance faces Travessa da Guarda. But of course, when you're standing on Rua da Junqueira, you don't know that. And right next to the big sign is a door. Which is locked. And there's no sign on the door that says ...