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

How do I inflate a bicycle tire with a potato?

I see this all the time. People have a problem and have already decided what technology they're going to use to solve it, and then they hit a roadblock: The technology they picked is unsuited to the problem! How do I put my laptop into standby mode from VBScript? How do I change the user's mouse acceleration from a batch file? I changed the registry values but it doesn't take effect immediately. The functionality you seek is implemented in native code via Win32. At the end of the day, the solution involves calling or , since those are the functions that actually do the work. There's no law that forbid...

How not to prepare for the STP (2007 edition)

I signed up for the annual Seattle-to-Portland bike ride, known to Seattle-area bicycling dorks as STP. My bicycle riding is mostly just commuting to and from work, nothing even approaching the 200-mile trek that STP entails, but one of my friends who recently started bicycle-commuting inspired our little bicycle commuting group to sign up. One of my colleagues rode the STP last year, and when he returned, I asked him how it went. He conceded that he was riding with a group that wanted to go faster than he was prepared to ride, and the ride was not quite as enjoyable as it could have been. "I should've trained...

Email tip: Lay off the massive email signatures

All too often I see email like this: From: X Is there a way to turn off Q? Thanks, X Support Professional Microsoft Product Support Services Tel: +123 456 7890 Extension 1234 Email: X@microsoft.com In case I am unavailable and you need urgent assistance, you can contact the following people: My Backup: Y, Phone: +123 456 7890 Extension 1235 or Email: Y@microsoft.com My Manager: Z, Phone: +123 456 7890 Extension 1236 or Email: Z@microsoft.com Note: If you are a customer of Microsoft, Please refer to the terms and conditions which cover the provision of support and consulting services to you/your...

It's official: The logo for the London 2012 Olympic Games is hideously ugly

Yesterday, the organizers of the London 2012 Olympic Games unveiled their official logo, and it's officially hideous. They paid £400,000 for that? As one of my friends put it, it looks like a bunch of old people tried to imagine something that would appeal to young people. Unfortunately, they forgot that today's young people don't live in the 1980's.

Compatibility constraints of the water cooler

One of the things you learn when dealing with compatibility is that every single external detail is a potential compatibility constraint. A few years ago, the water coolers in the buildings were replaced. I have no idea why. Maybe the new water cooler company put in a lower bid. Who knows? All I know is that I like the newer ones less, and I'm not the only one. The water cooler has three spouts: one for hot water, one for room-temperature water, and one for cold water. (Okay, so it's also a water heater as well as a water cooler.) The old machine positioned the spouts close enough together that you could fit...

Death at a Funeral, Cashback, and Tell No One

Another installment in Raymond's short reviews of SIFF movies he's seen recently. Death at a Funeral: The family funeral gets off to a bad start when the funeral home delivers the wrong body, and it's the only mishap that actually gets fixed without further incident. Everything else goes horribly wrong, and then when you thought it couldn't get any worse, it gets worse. Hilarious if you're willing to laugh at uncomfortable situations, a disaster spiraling out of control, men behaving badly, gross-out humor, accidental consumption of hallucinogens, an old man with a filthy mouth, and lots of other stuff that wi...

Choosing a provocative debug signature

Back in Windows 95, there was an elusive heap corruption bug in the graphics engine, and after a lot of analysis, the graphics folks were convinced that the corruption was coming from outside their component, and they had a pretty good idea who the corruptor was, but they needed proof. One of the standard techniques of narrowing down the source of a problem like this is to put a signature value in the object and validating the signature on entry to every function that uses that object as well as on exit. If you find that the signature was valid on entry but is corrupted on exit, then your function corrupted...

I took the Monorail to the Shadow of the Moon

It turns out that the replacement movie wasn't any of the ones I listed. Instead, I decided to see In the Shadow of the Moon, a mid-week performance in Seattle. Since it was also a fantastically warm sunny day, traffic into Seattle was a nightmare. As the bus crawled along the highway, I had to do some mental calculations. I'm definitely going to miss my connecting bus downtown (the number 4 at 6:05pm); what's the best recovery plan? It turns out that my decision, in retrospect, was the correct one, but it was merely a lucky guess. I arrived downtown at 6:17pm, intending to transfer to the 3 or 4 bu...

Inserting as many layers between the message and reality as possible

Some time ago I received a message that described a situation that was "based on a reality-based scenario." Wow, how many layers away from reality can you get? It wasn't a real scenario. It wasn't a reality-based scenario. It was based on a reality-based scenario. Then again, I'm just adding to the problem. I'm writing a message about a situation based on a reality-based scenario...