The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Jun 23, 2006
Post comments count 0
Post likes count 0

The subtle usability considerations of conference nametags

Raymond Chen

When you go to a conference or some other event where everybody wears a nametag, pay closer attention to the nametag design. There are many subtle usability mistakes that I see far too often. First of all, is your name easy to read? It's called a nametag, after all; the name and affiliation of the wearer should be the most prominent thing on the tag. I've been to events where the most prominent thing on the nametag was the name of the conference itself. Hey, everybody presumably already knows what conference they're attending. It's printed on the agenda sheet, it's printed on the tote bag, it's printed on eve...

Jun 22, 2006
Post comments count 0
Post likes count 0

The continuing phenomenon of size inflation in fast food

Raymond Chen

Wendy's is getting rid of "Biggie" and "Great Biggie" size drinks and fries from their menu. Oh, they're still offering them, just with a different name. What used to be "Biggie" is now "medium" and what used to be "Great Biggie" is now "large". Even the "small" drink is a massive 20 ounces, or two and a half FDA servings.

Jun 22, 2006
Post comments count 0
Post likes count 1

An auto-reset event is just a stupid semaphore

Raymond Chen

When you create an event with the function, you get to specify whether you want an auto-reset event or a manual-reset event. Manual-reset events are easy to understand: If the event is clear, then a wait on the event is not satisfied. If the event is set, then a wait on the event succeeds. Doesn't matter how many people are waiting for the event; they all behave the same way, and the state of the event is unaffected by how many people are waiting for it. Auto-reset events are more confusing. Probably the easiest way to think about them is as if they were semaphores with a maximum token count of one. If the eve...

Jun 21, 2006
Post comments count 0
Post likes count 0

It's still not a democracy, but at least other people have noticed, too

Raymond Chen

I'm glad I'm not the only person to notice that elections for boards of directors are completely rigged so that the nominees always win and there's nothing you can do about it. It appears that the issue was the hot topic in this year's proxy war skirmishes. This year, one company actually called me at home asking me to send in my proxy. I guess they didn't have enough votes for the meeting to be held. I explained that not voting was an intentional decision on my part, since it was the only way I could prevent the board of directors from being elected. The caller appeared mollified by that explanation and didn...

Jun 21, 2006
Post comments count 0
Post likes count 0

Psychic debugging: Understanding DDE initiation

Raymond Chen

You too can use your psychic powers to debug the following problem: We have a problem with opening documents with our application by double-clicking them in Explorer. What's really strange is that if we connect a debugger to Explorer and set a breakpoint on , then wait a moment after returns, then hit '', then the document opens fine. But if we don't wait, then the application launches but the document does not open. Instead, you get the error message "Windows cannot find 'abc.lit'. Make sure you typed the name correctly, and then try again." Here is the command we are executing when we run into this problem...

Jun 20, 2006
Post comments count 0
Post likes count 0

Three-Minute Masterpieces (2006)

Raymond Chen

The Seattle Times invited its readers to make three-minute movies, and the best were screened at the Seattle International Film Festival. Or you can watch them online.

Jun 20, 2006
Post comments count 0
Post likes count 1

A single-instance program is its own denial of service

Raymond Chen

There are many ways a program can establish itself as a single-instance program; I won't go into them here. But once people head down the path of a single-instance program, they bump into another issue in their security review: Denial of service. We are using a named mutex with a fixed name in order to detect whether another copy of the program is running. But that also means an attacker can create the mutex first, thereby preventing our program from running at all! How can I prevent this type of denial of service attack? If the attacker is running in the same security context as your program is (or would be) ...

Jun 19, 2006
Post comments count 0
Post likes count 0

Announcements on the ferry, one self-explanatory, one not

Raymond Chen

While I was riding the ferry last Saturday, there were two announcements made over the public address system. "All crew please report to the Second Mate's office." What were they all doing in the Second Mate's office? Would the whole crew fit into the office? And while all the crew are in the Second Mate's office, who's steering the ferry? The second announcement was self-explanatory: "Will the owner of a XYZ please report to the Car Deck to shut off your car alarm? The passenger in the car is becoming increasingly frantic." What was I doing on the ferry anyway? I was returning to Seattle from a bike ride w...

Jun 19, 2006
Post comments count 0
Post likes count 1

Why can't you programmatically reorder the items on the Start menu?

Raymond Chen

The classic Start menu and the "All Programs" portion of the Windows XP Start menu permit you to customize the order of the shortcuts that appear there. You can use drag/drop to rearrange them, or force them to be sorted by name. But why is there no programmatic interface to these actions? Because the power would be used for evil far more than it would be used for good. As noted before, the Start menu is highly contentious screen real estate. If a programmatic interface were given to the order of the items on the Start menu, programs would just use it to force their shortcut to the top (and possibly demot...