Raymond Chen

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

Post by this author

Taskbar notification balloon tips don't penalize you for being away from the keyboard

The function is used to do various things, among them, displaying a balloon tip to the user. As discussed in the documentation for the structure, the uTimeout member specifies how long the balloon should be displayed. But what if the user is not at the computer when you display your balloon? After 30 seconds, the balloon will time out, ...

Taskbar notification balloon tips don’t penalize you for being away from the keyboard

The function is used to do various things, among them, displaying a balloon tip to the user. As discussed in the documentation for the structure, the uTimeout member specifies how long the balloon should be displayed. But what if the user is not at the computer when you display your balloon? After 30 seconds, the balloon will time out, ...

How can code that tries to prevent a buffer overflow end up causing one?

What's the deal with those ...ncpy functions anyway?

A rant against flow control macros

I try not to rant, but it happens sometimes. This time, I'm ranting on purpose: to complain about macro-izing flow control. No two people use the same macros, and when you see code that uses them you have to go dig through header files to figure out what they do. This is particularly gruesome when you're trying to debug a problem with ...

You don't need to run away from home to join the circus

Last week, I saw a performance of Circus Contraption at The Seattle Center with some friends. We were all left agape by the aerialists as they climbed ropes, hoisted, hung, and balanced themselves high above the ground. I thought back to seeing acrobats as a child at the circus and realized how much more impressive they are as you get older...

PulseEvent is fundamentally flawed

The function releases one thread (or all threads, if manual-reset) which is/are waiting for the pulsed event, then returns the event to the unset state. If no threads happen to be waiting, then the event goes to the unset state without anything happening. And there's the flaw. How do you know whether the thread that you think is waiting...

You don’t need to run away from home to join the circus

Last week, I saw a performance of Circus Contraption at The Seattle Center with some friends. We were all left agape by the aerialists as they climbed ropes, hoisted, hung, and balanced themselves high above the ground. I thought back to seeing acrobats as a child at the circus and realized how much more impressive they are as you get older...

Using fibers to simplify enumerators, part 5: Composition

Another type of higher-order enumeration is composition, where one enumerator actually combines the results of multiple enumerators. (Everybody knows about derivation, but composition is another powerful concept in object-oriented programming. We've seen it before when building context menus.) In a producer-driven enumerator, you would ...

Using fibers to simplify enumerators, part 4: Filtering

One type of higher-order enumeration is filtering, where one enumerator takes the output of another enumerator and removes some elements. In a producer-driven enumerator, you would implement filtering by substituting a new callback function that responds to callbacks on behalf of the client for items that should be filtered, and forwarding ...

Using fibers to simplify enumerators, part 3: Having it both ways

As we discovered in the previous two entries [second], the problem with enumeration is that somebody always loses. Now we will use fibers to fight back. Before you decide to use fibers in your programs, make sure to read the dire warnings at the end of this article. My goal here is to show one use of fibers, not to say that fibers are the ...