The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

What seventh grade students want to be when they grow up, an analysis
Nov 6, 2008
Post comments count 0
Post likes count 0

What seventh grade students want to be when they grow up, an analysis

Raymond Chen
Raymond Chen

A few years ago, I listed some of the careers seventh grade students chose for themselves. But my friend the seventh grade teacher pointed out to me that the list hides the correlation between the jobs and the students. The lower-performing students chose the high-glamour jobs: Professional athlete, model, rock star, actor. Some of these students may be exhibiting boundless optimism; others may simply not have thought through the question very much and just picked the first thing that popped into their head. By comparison, the higher-performing students tended toward low-glamour but highly-skilled jobs: Contra...

Does version 6 of the common controls support ANSI or not?
Nov 6, 2008
Post comments count 0
Post likes count 0

Does version 6 of the common controls support ANSI or not?

Raymond Chen
Raymond Chen

I mentioned in passing a few years ago that version 6 of the common controls supports only Unicode. And then other people stepped in to say, "Well, XYZ uses ANSI and that works for me." So does it support ANSI or doesn't it? It does and doesn't. All of the controls in the common controls library are internally Unicode. But not all controls in the library are created equal. The first group is the traditional common controls. List view, tree view, those guys. These controls were never part of the window manager and have been internally Unicode on all Windows NT platforms. The ANSI messages such as ar...

Microspeak: Represent
Nov 5, 2008
Post comments count 0
Post likes count 0

Microspeak: Represent

Raymond Chen
Raymond Chen

The more conventional definition of represent is along the lines of "to act as a proxy for". An attorney represents his or her client in court. Your legislator represents you in the assembly. A token on a board represents your position in the game. At Microsoft, the word represent takes on a stranger meaning. Here are some usages inspired by actual sentences: In the first case, I'm guessing that the word represent means "to act as an advocate for" or possibly just "to serve as a source of information on". In the second case, it appears that the word represent just means "tell us in an official capacity...

Quite possibly my last in-person ballot for a long time
Nov 4, 2008
Post comments count 0
Post likes count 0

Quite possibly my last in-person ballot for a long time

Raymond Chen
Raymond Chen

Most parts of the state of Washington have switched to all-mail voting. No more standing in line at the polling place and casting your vote in person. This is certainly a convenience, but to me, it dilutes the voting experience. Part of the experience is the sense that you're part of a process, and standing in a room full of voters certainly drives that point home. You may come from all walks of life, but you all have one thing in common: You all want to vote. Also concerning to me is the loss of the guaranteed secret ballot in a mail-in election. With a mail-in ballot, you have the problem that an overbeari...

How did Spicy Hot V-8 vegetable juice get added to the complimentary beverages in Microsoft kitchens?
Nov 4, 2008
Post comments count 0
Post likes count 0

How did Spicy Hot V-8 vegetable juice get added to the complimentary beverages in Microsoft kitchens?

Raymond Chen
Raymond Chen

Today is Election Day in the United States. Don't forget to vote. (Void where prohibited.) In honor of Election Day, I figured I'd tell a story about voting. One of the complimentary beverages available in Microsoft kitchens is Spicy Hot V-8. (Sure it's tasty, but watch out for the sodium content!) I remember well when Spicy Hot V-8 was added to the refrigerators. At the 1992 Company Meeting, Bill Gates and then-head of HR Mike Murray appeared on stage to read questions submitted by employees ahead of time. One of the questions was "Can we carry Spicy Hot V-8 in the kitchens?" Mike Murray decided to pu...

Sensor development kits were flying off the shelves
Nov 3, 2008
Post comments count 0
Post likes count 0

Sensor development kits were flying off the shelves

Raymond Chen
Raymond Chen

After the Sensor and Location Platform PDC presentation, people were stopping by the booth and grabbing sensor hardware and development kits like they were candy. Then again, to geeks, this stuff is candy. (And technically, they weren't flying off shelves. They were flying out of bins. Well, and technically they weren't flying either.) Other notes from the last day of the 2008 PDC:

If there’s already a bug, it’s not surprising that there’s a possibility for error
Nov 3, 2008
Post comments count 0
Post likes count 0

If there’s already a bug, it’s not surprising that there’s a possibility for error

Raymond Chen
Raymond Chen

It's great to think about all the things that can go wrong but you also have to think about the situations that could lead to those bad things. In particular, you have to recognize when you are trying to avoid a bug that is ultimately outside your component and which you can't fix anyway. For example, consider this multithreaded race condition: Why is used in the implementation of ? The only reason I can think of is for multithread safety. But that function doesn't look multithread safe—what if another thread was about to increment ? Does the refcount incrementer have a special interlocked check fo...

Stick to the normal candy and nobody gets hurt
Oct 31, 2008
Post comments count 0
Post likes count 0

Stick to the normal candy and nobody gets hurt

Raymond Chen
Raymond Chen

Hallowe'en is a family affair at Microsoft. It typically starts at around 3 or 4 o'clock, with costumed kids roaming the hallways collecting treats from offices. One year, one of my colleagues decided that the kids deserved more than the usual candy bars and chocolates. Even though he is Caucasian, he went to the local Asian foods market and stocked up on all sorts of Asian candies. Lychee-flavored gelatin, rice crackers, spiced watermelon seeds, you name it. It's a holiday and a cultural learning experience. He dumped all the candies into a big bowl and set them out for the kids. The kids didn't quite know w...

Working with ambiguous and invalid points in time in managed code
Oct 31, 2008
Post comments count 0
Post likes count 0

Working with ambiguous and invalid points in time in managed code

Raymond Chen
Raymond Chen

Public Service Announcement: Daylight Saving Time ends in most parts of the United States this weekend. I pointed out some time ago that Win32 and .NET deal with daylight saving time differently. Specifically, Win32 always deals with the time zone you are currently in (even if it's not the time zone that corresponds to the timestamp you are manipulating), whereas .NET deals with the time zone that was in effect at the time the timestamp was generated. For more details on the latter, I refer you to Josh Free from the BCL Team Blog, who some time ago explained how to work with ambiguous and invalid points i...