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

Black(out) humor at the 2005 PDC

Trying to make light (get it? light?) of the situation, there were quite a few jokes about the power outage at the PDC. The Hands-On Lab was being set up at the time the building went dark. A bunch of us speculated what the technicians must have been thinking when the power went out just as they plugged in a rack of computers... Perhaps in reaction to this, the "Frequently-Used Tasks" section of the Hands-On Labs software included a new task: Cause Power Outage. I of course couldn't resist and clicked on it. "Shame on you!" it roared back at me.

Giving fair warning before plugging in your computer

That colleague who gave me the AOL CD that came with a big-iron server later received a prototype Itanium computer for testing purposes. The early Itaniums were behemoths. They weighed a ton, sounded like a weed whacker, and put out enough heat to keep you comfortably warm through the winter. (If you opened them up, you would likely see several carefully-shaped Styrofoam blocks with the label "Do not remove! Engineering styrofoam!" I never thought I would ever see the phrase "engineering styrofoam" used seriously. Note: Styrofoam® is a registered trademark of the Dow Chemical Company; consequently, it shoul...

Things to do at Microsoft when the power goes out

When the power goes out, the first thing you notice is how quiet everything becomes. The hum of the computers in the building stops. You hear... nothing. Bask in its peaceful silence. The next thing you do is turn off all the machines in your office, because you don't want to stress the power grid and network when the power eventually returns by having a hundred thousand computers all firing themselves up and joining the network at the same time. Of course, another thing you need to do is find your way around. This can be quite a challenge if you're in a lab with no windows and no emergency lighting: It s...

Please disconnect all cell phones, signal watches, and pagers

Last Saturday night, a group of us (including butt photographer Wendy) attended a performance of the Seattle Symphony consisting of the world premiere of the orchestral arrangement of Shafer Mahoney's Sparkle, Richard Strauss' Don Quixote (with guest soloist Lynn Harrell) and concluding with Brahms' Fourth Symphony. I was pleasantly surprised by the Mahoney. World premieres are a hit or miss affair (mostly miss), but Sparkle had wit and direction. It had the feel of an overture, because when it was over, I was expecting Act One to start. And even today, I can remember bits and pieces of it. If only all world p...

Corrections to the answers I gave at the end of my PDC talk

I guess one advantage of having a web site is that I can publish errata. I haven't watched the Channel9 video (and probably never will; it's hard to watch yourself), but I do remember some of the questions at the end that I wasn't able to answer off the top of my head, but after a few days' research I think I can do it now. The person who asked "When I call from my MFC application and shut down the system, why does my application crash?" stopped by the Fundamentals Lounge later that day, and we went into more detail about his problem. It turns out that he was a victim of one of the bullet points I called out ...

Why doesn’t Microsoft give every employee a UPS?

One reaction to my story about the oldest computer at Microsoft still doing useful work was shock (shock!) that Microsoft suffers from power outages. In the Pacific Northwest, winter windstorms are quite common, and it is not unexpected that a windstorm blow down tall trees (which are also quite common) which in turn take out power lines. And if those power lines supply Microsoft main campus, then main campus loses power. All the critical computers have UPSs so that they can make a soft landing when the power goes out, but it's hardly the case that every single computer in every office and lab gets a UPS. T...

Fiddling with the fonts, part 2: Keeping the English font small

We concluded last time that we wanted the custom large font to apply only to the columns containing Chinese characters and leave the original font in place for the English columns. We do this by carrying two fonts around, choosing the appropriate one for each column. class RootWindow : public Window { ... private: HWND m_hwndLV; HWND m_hwndEdit; HWND m_hwndLastFocus; HFONT m_hfChinese; HFONT m_hfNormal; int m_cyEdit; ... } RootWindow::RootWindow() : m_hfChinese(NULL) , m_hfNormal(NULL) { } RootWindow::~RootWindow() { if (m_hfChinese) DeleteObject(m_hfChinese); if (m_hfNormal) DeleteObject(m_hfNo...

Fiddling with the fonts, part 1: Making the Chinese characters larger

Let's pay a quick visit to our continuing dictionary project. One of the things you may have noticed is that the Chinese characters are unreadably small. Let's fix that by making them larger. class RootWindow : public Window { public: virtual LPCTSTR ClassName() { return TEXT("Scratch"); } static RootWindow *Create(); RootWindow(); ~RootWindow(); ... private: HWND m_hwndLV; HWND m_hwndEdit; HWND m_hwndLastFocus; HFONT m_hfChinese; int m_cyEdit; ... } RootWindow::RootWindow() : m_hfChinese(NULL) { } RootWindow::~RootWindow() { if (m_hfChinese) DeleteObject(m_hfChinese); } LRESULT RootWindow::On...

Typo patrol at the PDC

You can find the following typographical errors in the Big Room at the PDC: If you can locate all three of them and catch me at the PDC (say at the Fundamentals Lounge or at the Ask the Experts table), I'll award you a prize of um (rummaging through my bag) how about a retractable network cable? (Or an autographed business card? But then again, anybody can get one of those just by asking for one.)