The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts

The real cost of compatibility is not in the hacks; the hacks are small potatoes

Commenter Myron A. Semack asks how much faster Windows would be if you took out the backward compatibility stuff. Myron is so anxious about this that he asked the question a second time. Asking a question twice typically counts as a reason not to answer it, but since I had already written up the answer, I figured I'd post it anyway. Oh great, and now he asked it a third time. Myron is so lucky I already wrote up the answer, because if I hadn't I would've just skipped the topic altogether. I don't respond well to nagging. The answer is, "Not much, really." Because the real cost of compatibility is not in ...

Apparently some people consider this a vacation; I consider it insane

One of the little cards that came in the STP information packet is an advertisement postcard for Epic Cycling Climbs of France. For $3299 (+airfare) you receive the "privilege" of cycling up the Alpe d'Huez and other notorious mountains. I'm sorry. If I'm going to go up l'Alpe D'Huez you're going to have to pay me, not the other way around. (Then again, I paid to ride my bicycle from Seattle to Portland, so obviously I'm a little insane already. I've already taken the first steps in progressive insanity; maybe they were just showing me where I was headed if I didn't watch my step. Sort of like those anti-smok...

Screwing the computer parts back together is the most dangerous step

I had removed the cover from one of the computers in my office in order to upgrade one of its hard drives (from 20GB to 200GB, woo-hoo). The hard drives are kept in a removable cage, so first I had to unscrew the cage, then unscrew the drive from the cage, then swap in the new drive. Of course, you don't screw everything back in until you've tested it out, so I had the computer running with its innards strewn about my floor until it ran to my satisfaction. Okay, time to put everything back together. I screwed the drives into the cage, screwed the cage into the case, but before I screwed the cover back onto the c...

Food products that are offenses against nature: Fast Franks

My colleague (who posts under the pseudonym Cloudy Starlight) tipped me off to some wonderful products which made me just stare at the screen agape, unable to express my, um, awe. I'll focus on one of the products today; the others will have to wait for another day. First, let's suppose you've got a hankerin' for a hot dog. Your adventure might go like this: "Gotta have a hot dog, gotta have a hot dog. Where's that hot dog? In the fridge. Right, in the fridge. Open the fridge, find the hot dog. Find the hot dog. Got it. Need a bun. Where's the bun? Where's the bun! My kingdom for a bun! Oh, there's the bun,...

You don’t optimize for the case where somebody is mis-using your system

Like this is something that should be optimized?

If you read any book about traditional weddings in Russian history, there must be a fight

You can buy a fake vacation for $500 or shell out $300 to $400 for a fake brawl at your wedding. "If you read any book about traditional weddings in Russian history, there must be a fight," said Alexander Yermilov, 22, who recently made a living at it. If you're looking for counterfeits, fakes, and forgeries, Moscow's your place. Assuming you can spot them. Even Putin's doctoral dissertation, researchers from the Brookings Institution revealed this year, contained major sections lifted from a text published by academics from the University of Pittsburgh. The revelations barely were repeated in the Moscow ...

Why is the limit of window handles per process 10,000?

If your program runs haywire, you will find that it manages to create about 10,000 window manager objects and then the system won't let it have any more. Why stop at 10,000? The first answer is "If you have to ask, you're probably doing something wrong." Programs shouldn't be creating anywhere near ten thousands window manager objects in the first place. Furthermore, as we saw last time, the maximum number of window manager objects that can be created is around 32,700. Giving a program 10,000 is already a third of the total amount available. That's already pretty darned generous, if you ask me. Preventing a pro...

Not my finest hour: Driving a manual transmission

Sara Ford messed up her leg last month; you can see her on ScooterCam-1 at TechEd 2007. The best part of the name ScooterCam-1 isn't the ScooterCam; it's the 1. That just gives it that extra little kitchy space technology feel that turns a good name into a great name. Anyway, she asked around if somebody with a car with an automatic transmission would be willing to swap with her manual transmission car until her leg got better. To me, driving a stick shift is like changing a flat tire: It's something that everybody should know how to do, but it's not something that anybody is expected to enjoy doing. I o...

How are window manager handles determined in Windows NT?

We left off our story last time by raising the problem of programs that send messages to windows that have already been destroyed and how window handle re-use exacerbates the problem. Although this is clearly a bug in the programs that use window handles after destroying the window, the problem is so widespread that the window manager folks in Windows NT decided to take a more proactive approach. (Reiterating in case you couldn't figure it out: This entry goes "behind the scenes". Behavior described here falls into the category of "implementation detail" and is subject to change at any time.) In Windows&nb...