The Old New Thing

Exploiting the inattentive: The posted wine rating may not match the wine on the shelf

The Washington Post did a spot check of area wine stores and found that of the "shelf talkers" signs (those things that describe the wine and tell you what score it received from Wine Spectator magazine) it found, a quarter of them were incorrect, usually by attributing a good score to the correct wine vineyard but from a different year. So ...

Why is it possible to destroy a critical section while it is in use?

Some time back, Stu wondered why it is possible to destroy a critical section while it is in use. Well, there's nothing stopping you from creating a file that contains these lines: and then telling your compiler to turn it into a program. It's not like a bolt of lightning is going to come out of the sky and zap you before you hit the ...

Tweeting Too Hard: Best of Twitter

We had Best of Craig's List. We had Lamebook. Now we have Tweeting Too Hard, "where self-important tweets get the recognition they deserve." Examples: The people who say I'm arrogant and shallow don't see me when I'm at home with my wife. Did I mention that she's a former swimsuit model? How was it I got invite to last yrs White House...

No, you can't lock icons to the user's desktop

In another installment of I bet somebody got a really nice bonus for that feature, I submit this question for your consideration. My customer wants to know how to lock a specific icon to the upper left hand corner of the desktop. This company must be writing the most awesome program to end all programs, a program so amazingly awesome that ...

Christmas gift idea for your favorite Microsoft fanboy geek with no sense of fashion or taste

Then again, the "no sense of fashion or taste" may be redundant. Perhaps you are so enamored of the Microsoft-branded Snuggie you received at the Company Meeting that you can't keep your excitement to yourself and want to share the joy with a friend. No problem. You can now pick one up at the Microsoft Company Store in Redmond, right across...

What version of the compiler does Raymond use?

From the suggestion box, BrianK asks, "What compiler do you and other developers use? Are you using VS2005 yet?" To be honest, I don't know what compiler I use. There is a separate part of the team that worries about things like "What compiler should we use?" They deal with nitty-gritty details like "What version of the compiler should we ...

The economic inefficiency of gift-giving

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...

I got an array with plenty of nuthin'

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 ...

Surprising things injected into Mozart cadenzas

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 ...

What was the ShowCursor function intended to be used for?

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 ...