The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Voicemail security, even stronger than bank security
Mar 3, 2010
Post comments count 0
Post likes count 0

Voicemail security, even stronger than bank security

Raymond Chen
Raymond Chen

Microsoft's telephone department takes security very seriously. Your voicemail password must be at least eight digits long. By comparison, the password for my ATM card is only four digits long. Because voicemail is that important, I guess. (Yes, I know about two-factor authentication. I'm writing this only half-jokingly.)

Microspeak: Dialogue
Mar 2, 2010
Post comments count 0
Post likes count 0

Microspeak: Dialogue

Raymond Chen
Raymond Chen

Why have a conversation when you can dialogue? I think this is minimal work, but do others care? If they don't, then this is one for the ideas that failed bin. If they do, well let's dialogue... No need to talk when you can dialogue.

Chilly Hilly 2010 kicked my butt
Mar 1, 2010
Post comments count 0
Post likes count 0

Chilly Hilly 2010 kicked my butt

Raymond Chen
Raymond Chen

This year, I was woefully unprepared for the annual Chilly Hilly ride, not having gotten on my bicycle for the entire month of February. And I paid dearly for this lack of preparation, conking out and ending up walking up some of the last few hills. I rode with a few other people, but I quickly ended up lagging behind them. They would sometimes stop to let me catch up, but I told them not to bother and just go at their own pace. At one point, I ran over a nail and lost precious time to a flat tire. (I took the flat tire as an opportunity to take my midpoint break, since it occurred just a half mile or so from t...

When does STARTF_USESHOWWINDOW override the parameter passed to ShowWindow()?
Mar 1, 2010
Post comments count 0
Post likes count 1

When does STARTF_USESHOWWINDOW override the parameter passed to ShowWindow()?

Raymond Chen
Raymond Chen

kokorozashi wants to know what the rules are which govern when the second parameter to is overridden by the flag. The guiding principle is that the parameter is ignored if the window manager thinks that the window you're creating is the application's main window. The details behind the implementation of this principle change over time, so everything from here down is implementation detail and should not be relied upon. I'm providing it merely to satisfy your curiosity. To reiterate, do not rely on information in the second half of this article because it can and will change. In fact, just to emphasize the ...

Microwave popcorn enthusiast proudly proclaims, "I *am* popcorn!"
Feb 26, 2010
Post comments count 0
Post likes count 0

Microwave popcorn enthusiast proudly proclaims, "I *am* popcorn!"

Raymond Chen
Raymond Chen

Oscar Night is a few weeks away, but when you settle in to watch the show with your bowl of popcorn, please be aware that inhaling deeply from the fumes of a freshly-opened bag of microwave popcorn is not the greatest decision you can make from a health standpoint. (Then again, you probably ought to reconsider eating microwave popcorn in the first place, but let's leave that aside.) A disease informally known as popcorn lung afflicts people who work in popcorn factories and has been known since 2002. But in 2007, doctor diagnosed the first case of popcorn lung in an end-user. The risk is not from eating the popc...

It's fine to use fibers, but everybody has to be on board with the plan
Feb 26, 2010
Post comments count 0
Post likes count 0

It's fine to use fibers, but everybody has to be on board with the plan

Raymond Chen
Raymond Chen

We saw fibers a long time ago when I looked at how you can use fibers as a form of coroutines to simplify the writing of enumerators. A fiber is a handy tool, but it's a tool with very sharp edges. Since fibers are promiscuous with threads, you have to be careful when running code that cares about what thread it is running on, because that code may discover that its thread changed out from under it. For example, critical sections and mutexes remember which thread owns them. If you enter a critical section on a fiber, and then you unschedule the fiber, then reschedule it onto a different thread, and then you l...

Food products that are offenses against nature: Bagel-fuls
Feb 25, 2010
Post comments count 0
Post likes count 0

Food products that are offenses against nature: Bagel-fuls

Raymond Chen
Raymond Chen

Wow, it's been a long time since my last rant against food products that are offenses against nature. Today's rant is against Bagel-fuls, a product which Kraft launched in April 2008. Bagel-fuls (note the hyphen and the lowercase "f") are a dense, doughy material formed into a log shape, with a cream cheese filling. Think of them as Twinkies, but with cream cheese instead of a sugar cream filling, and with a dense, doughy substance instead of whatever alien material it is they make Twinkies out of. The great thing about this product is that it is an attempt by Kraft to learn its lesson from a previous faile...

What happens to the fibers which ran on a thread when the thread exits?
Feb 25, 2010
Post comments count 0
Post likes count 0

What happens to the fibers which ran on a thread when the thread exits?

Raymond Chen
Raymond Chen

What happens to the fibers which ran on a thread when the thread exits? Are all the fibers destroyed? No, only the currently-executing fiber is destroyed. Fibers running on other threads and fibers which are not running on any thread at all are not affected. Fibers do not have thread affinity (when not running), and they do not remember what threads they have been run on. Indeed, one of the features of fibers is that you can switch away from a fiber on one thread, then switch to that same fiber on another thread, and that fiber will resume execution on the new thread. Fibers are the social butterflies of schedu...

German language tip: Matratzen = mattresses, Matrosen = sailors
Feb 24, 2010
Post comments count 0
Post likes count 0

German language tip: Matratzen = mattresses, Matrosen = sailors

Raymond Chen
Raymond Chen

Be careful not to confuse the two. Since we're sharing: During a conversation in German, I talked about seeing Unfall (accident) instead of Abfall (garbage) on the street. To my credit, I immediately corrected my error. To my discredit, the error was made at the state finals of a German language contest.