The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Dec 18, 2009
Post comments count 0
Post likes count 0

The economic inefficiency of gift-giving

Raymond Chen

Economist Joel Waldfogel explains why gift-giving is bad for the economy, and why a charity gift card is the best luxury gift of all. He goes into more detail in his new book, Scroogenomics, which you can buy somebody for Christmas just to tell Waldfogel where he can stick it. ("In the bank!" he'll say as he heads out with his royalty check.) Related: Economist Tim Harford writes an advice column called Dear Economist for the Financial Times. But instead of applying economic theory to economic problems, he applies economic theory to personal problems. As Harford himself explains, "Every advice columnist n...

Dec 18, 2009
Post comments count 0
Post likes count 1

I got an array with plenty of nuthin'

Raymond Chen

A customer reported a memory leak in the function : We found the following memory leak in the function . Please fix it immediately because it causes our program to run out of memory. If the 's type is , then the corresponding is leaked and not cleaned up. Right now, we are temporarily working around this in our program by inserting code before all calls to to free the , but this is clearly an unsatisfactory solution because it will merely result in double-free bugs once you fix the bug. Please give this defect your highest priority as it is holding up deployment of our system. The value is not a va...

Dec 17, 2009
Post comments count 0
Post likes count 0

Surprising things injected into Mozart cadenzas

Raymond Chen

This review of a Seattle Symphony concert from 2007 mentioned that back in 1998, soloist Jon Kimura Parker inserted the theme from The X-Files into one of his cadenzas. Cadenzas were originally points in a concerto at which soloists could improvise and show off their technical skills, but over the years, the contents of cadenzas have become more and more rehearsed, with most composers having switched over to fully-written-out cadenzas over a hundred years ago. That's why it's so exciting when an improvised cadenza reappears on the scene. All of a sudden, anything can happen. Reading the article reminded me of ...

Dec 17, 2009
Post comments count 0
Post likes count 3

What was the ShowCursor function intended to be used for?

Raymond Chen

Back in the days when Windows was introduced, a mouse was a fancy newfangled gadget which not everybody had on their machine. Windows acknowledged this and supported systems without a mouse by having keyboard accelerators for everything (or at least that was the intent). But if the design stopped there, you'd have a dead cursor in the middle of your screen all the time, which you could move around if you had a mouse, which you didn't. Enter the function. The function takes a parameter that indicates whether you want to show or hide the cursor. (It would perhaps be more verbosely named .) If you call then ...

Dec 16, 2009
Post comments count 0
Post likes count 1

Just like in real life, you can hire someone to do your programming taxes for you

Raymond Chen

Commenter denis bider considers accessiblity an altruistic endeavor and suggests that it would be more efficient to outsource accessibility to another company. Sure, why not. Just like in real life, you can hire someone to do your programming taxes for you. If you would rather hire another company to come in and add accessibility support to your application, then more power to you. Yes, accessibility is one of those altruistic things, but so too is not consuming 100% of the CPU all the time, or being usable at high DPI or color schemes different from the Windows default. Sure, you can write your program so it ...

Dec 15, 2009
Post comments count 0
Post likes count 0

You are listening to Radio Free Bob, a pirate radio station broadcasting on the Microsoft corporate network

Raymond Chen

Saturating the network with broadcast packets.

Dec 14, 2009
Post comments count 0
Post likes count 1

Why did the word Start disappear from the Start button?

Raymond Chen

Commenter Mike Dunn would like to know why the word Start disappeared from the Start button in Windows Vista. After all, adding the word Start helped new users figure out what they should click first. I don't know but I can guess. To emphasize that these are guesses, I went back in after I wrote them and added all sorts of weasel words. It sort of saps the punch from the statements, but it's one of those things I've learned that I have to do to avoid the more egregious forms of willful misunderstanding. First of all, it might have been a leftover from one of the older designs for the Vista taskbar, one whic...

Dec 11, 2009
Post comments count 0
Post likes count 0

Lamebook: The best of Facebook

Raymond Chen

Craig's List has a Best of Craig's List, but Facebook doesn't. Well now it does: LameBook (warning: often NSFW). My favorite: Lameonella.

Dec 11, 2009
Post comments count 0
Post likes count 1

The format of bitmap resources

Raymond Chen

Another in a sporadic series on the format of Win32 resources. Here's a question from a customer: I'm noticing some strange behavior: When I call then on an embedded bitmap, the data being returned by is not a properly formatted bitmap. The data is missing the , but the rest of the file is there. also states that the bitmap resource is 14 bytes smaller than it actually is. 14 bytes happens to be equal to . However, if I load the bitmap directly using , everything works fine. If I look at the resource using Visual Studio, the Bitmap displays correctly and the binary data correctly includes the . Anyone h...