The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Mar 31, 2010
Post comments count 0
Post likes count 0

2010 Q1 link clearance: Microsoft blogger edition

Raymond Chen

It's that time again: Sending some link love to my colleagues.

Mar 31, 2010
Post comments count 0
Post likes count 1

The great thing about URL encodings is that there are so many to choose from

Raymond Chen

A survey.

Mar 30, 2010
Post comments count 0
Post likes count 1

Non-Microspeak: Boiling the ocean

Raymond Chen

Some time ago, MSN Careers listed Boil the ocean as a workplace phrase you should learn. Thankfully, the phrase (meaning "to attempt something impossibly ambitious") is not currently in wide use in Microspeak. However, a friend of mine who works in another industry tells me that it is not only very much alive in his line of work, it became corrupted as it was imported. My friend's industry involves companies from around the world, and although the working language for meetings is English, most of the participants are not native speakers of the language. He suspects that the phrase boil the ocean was introduced ...

Mar 29, 2010
Post comments count 0
Post likes count 0

Ruth Bader Ginsburg, the yardstick for Wikipedia entries

Raymond Chen

I use Ruth Bader Ginsburg's Wikipedia entry as a yardstick for other Wikipedia entries. At the time I'm writing this blog entry, her Wikipedia article is 1600 words long. So 1600 words is how many words Wikipedia assigns to the 20th most powerful woman (and the most powerful female lawyer) in the world. By comparison, Wikipedia has collectively decided that the 2007 Philadelphia Eagles season merits 5500 words. The exploits of a lackluster last-place American football team therefore clocks in at 3.4 Ginsburgs. In a sense, Wikipedia says that a last-place football team's exploits is over three times more signif...

Mar 29, 2010
Post comments count 0
Post likes count 1

What happens to the control names in the IDE when my program is running?

Raymond Chen

They don't exist any more. In a way, they never existed.

Mar 26, 2010
Post comments count 0
Post likes count 1

WaitForInputIdle waits for any thread, which might not be the thread you care about

Raymond Chen

We saw last time that the function waits only once for a process to go input idle. Even if the process later stops processing messages, will return immediately and say, "Yeah, he's idle." The way a process is determined to be input idle is that it is waiting for user input when there is none. This translates into the process sitting in a function like or when there are no messages. But what if a process has more than one thread? And what if one of the threads is waiting for input, while the other is busy and unresponsive? The function will treat the process as having gone input idle, even if the ready thre...

Mar 25, 2010
Post comments count 0
Post likes count 1

WaitForInputIdle should really be called WaitForProcessStartupComplete

Raymond Chen

The function waits for a process to finish its initialization, which is determined when it reaches a state where it is just sitting around waiting for messages. The documentation for doesn't even get around to the initialization part until the Remarks section. If all you read is the one-sentence summary, Waits until the specified process is waiting for user input with no input pending, or until the time-out interval has elapsed, it would not be unreasonable for you to conclude that a process goes into and out of the input idle state each time it processes a message. But no, it's a one-time transition. If you ...

Mar 24, 2010
Post comments count 0
Post likes count 1

First, try reading the error message, episode 3: Even programmers see error messages without reading them

Raymond Chen

As we all know, users don't read error messages. And, sad to say, this behavior extends to the group of people you would think pay the most attention to error messages, namely, programmers, who are the people who cause your computer to display the error messages! Today's example comes from an internal programmer's tool which I will call Program Q. I'm trying to back out an update I made to record 19 of our table (which was entered as transaction 512), but I can't get it to work: What is the problem here, and how do I fix it? The transaction couldn't be backed out because somebody else made a chan...

Mar 23, 2010
Post comments count 0
Post likes count 1

Why does it take longer to reject an invalid password than to accept a valid one?

Raymond Chen

You may have noticed that it takes longer to reject an invalid password than to accept a valid one. There are a few reasons for this. First of all, it simply takes longer to confirm that a password is invalid. Your local computer retains a password cache. This password cache improves performance of local authentication operations, such as unlocking a workstation. If you unlock the workstation with the same password you used to log on, then the password is assumed to be good. This allows the workstation to unlock quickly. Without the password cache, unlocking the workstation would require going back to the dom...