The Old New Thing

Trying to avoid double-destruction and inadvertently triggering it

We saw some time ago the importance of artificially bumping an object's reference count during destruction to avoid double-destruction. However, one person's attempt to avoid this problem ended up triggering it. The explanation for the line was that it was done to avoid the double-destruction problem if the object receives a temporary ...

I reorganized your kitchen for you, sweetie

I suspect most people are familiar with the It may be a mess, but it's my mess and I know where everything is phenomenon. That doesn't necessarily mean that items are in the best location, but at least you know which suboptimal location you chose. :: Wendy :: told me a story some time ago about something that happened while her ...

Stories of anticipating dead computers: Windows Home Server

Like most geeks, I have a bit of history with dead computers. In the past, I used the "wait until it breaks, and then panic" model, but recently I've begun being a bit more anticipatory, like replacing an old laptop before it actually expires. Anticipating another future dead computer, I bought an external USB hard drive for backing up ...

How do I create a toolbar that sits in the taskbar?

Commenter Nick asks, "How would you go about creating a special toolbar to sit on the taskbar like the Windows Media Player 10 minimised toolbar?" You would look at the DeskBand API SDK Sample in the Windows Platform SDK. The magic word is DeskBand. This MSDN page has an overview. Bonus chatter: I've seen some online speculation as to ...

Signs that the symbols in your stack trace are wrong

One of the things programmers send to each other when they are trying to collaborate on a debugging problem is stack traces. Usually something along the lines of "My program does X, then Y, then Z, and then it crashes. Here is a stack trace. Can you tell me what's wrong?" It helps if you at least glance at the stack trace before you send it...

The day the coffee machine exploded

Some time ago, Microsoft began installing Starbucks coffee makers in the kitchens, and caffeine addicts waited anxiously for the machines to reach their building. Or at least that's what happened on the main Redmond campus. But what about the satellite offices? I'm told that each satellite office qualified for an iCup machine when the ...

In the product end game, every change carries significant risk

One of the things I mentioned in my talk the other week comparing school with Microsoft is that in school, as the deadline approaches, the work becomes increasingly frantic. On the other hand, in commercial software, as the deadline approaches, the rate of change slows down, because the risk of regression outweighs the benefit of the fix. A ...