The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Disaster averted, thanks to international time zones
Sep 15, 2006
Post comments count 0
Post likes count 0

Disaster averted, thanks to international time zones

Raymond Chen
Raymond Chen

Boy, the world has been really lucky this year. After successfully avoiding a massive tsunami in the Atlantic Ocean, the world narrowly escaped global disaster as predicted by Yisrayl Hawkins, leader of the organization The House of Yahweh. What saved us? Well, I'll let Mosheh Sang, leader of the organization in Kenya, explain: According to Sang, a nuclear war between the US and North Korea only failed to kick off Tuesday as expected due to difference in international time zones. But they're not giving up yet. According to another leader, Eleazor Kamotho Mugwe: It can take up to seven years from now for t...

Allocating and freeing memory across module boundaries
Sep 15, 2006
Post comments count 0
Post likes count 0

Allocating and freeing memory across module boundaries

Raymond Chen
Raymond Chen

I'm sure it's been drilled into your head by now that you have to free memory with the same allocator that allocated it. matches , matches , matches . But this rule goes deeper. If you have a function that allocates and returns some data, the caller must know how to free that memory. You have a variety of ways of accomplishing this. One is to state explicitly how the memory should be freed. For example, the documentation explicitly states that you should use the function to free the buffer that is allocated if you pass the flag. All s must be freed with . And all memory returned across COM interface bound...

The lost follow-ups: Products and people that appear to have vanished without a trace
Sep 14, 2006
Post comments count 0
Post likes count 0

The lost follow-ups: Products and people that appear to have vanished without a trace

Raymond Chen
Raymond Chen

There'll be the big announcement promising a revolution in the computer industry, lots of press coverage, and then... nothing. What ever happened to these companies and products? Does anybody know?

The danger of using boldface for Chinese characters
Sep 14, 2006
Post comments count 0
Post likes count 0

The danger of using boldface for Chinese characters

Raymond Chen
Raymond Chen

Intricacies become lost in the ink.

Raymond's excursions into East Asian pop music, episode 3: Morning Musume (モーニング娘)
Sep 13, 2006
Post comments count 0
Post likes count 0

Raymond's excursions into East Asian pop music, episode 3: Morning Musume (モーニング娘)

Raymond Chen
Raymond Chen

It really all started with Katamari Damacy (塊魂). The music for that game is so darned infectious, and it was my fascination with that music that prompted my colleague to loan me the CDs his wife bought while she traveled through Asia. I already mentioned China Dolls (中國娃娃). Another of the CDs in the collection was 4th Ikimasshoi! (4th いきまっしょい! = 4th Let's Go!), the um fourth album from the J-Pop group Morning Musume (モーニング娘 = Morning Girls). I'm sure somebody will correct my Jap...

Philosophical discussion on when to mark a method as virtual
Sep 13, 2006
Post comments count 0
Post likes count 0

Philosophical discussion on when to mark a method as virtual

Raymond Chen
Raymond Chen

When should you mark a method as virtual? This question has both a technical and a philosophical aspect. The technical aspect is well-understood: You mark a method as virtual if you want calls to the method to be invoked on the run-time type of the invoked object rather than on the compile-time type of the invoking reference. But there is a heavy philosophical aspect to this question as well. Some people argue that every method should be virtual so that derived classes can override the behavior of the base class in ways the base class may not have anticipated. This grants you maximum flexibility, avoiding havin...

Grammar review: Verb+particle versus compound noun
Sep 12, 2006
Post comments count 0
Post likes count 0

Grammar review: Verb+particle versus compound noun

Raymond Chen
Raymond Chen

Although the inflections and compound-mania are largely absent from the English language, there are still some vestiges of its Germanic roots. One detail of English grammar that I often see neglected is the distinction between the verb+particle and the compound noun. Consider the verb phrase "to shut down", which is the one I see misused most often. This is a verb+particle combination and is treated as two words. When you turn it into a noun, however, it becomes "shutdown", one word. This Knowledge Base article, for example, manages to keep its head on straight for most of the article, using the verb+particle f...

If you ask a Yes/No question, make sure the user also knows what happens when they say No
Sep 11, 2006
Post comments count 0
Post likes count 0

If you ask a Yes/No question, make sure the user also knows what happens when they say No

Raymond Chen
Raymond Chen

I was talking with someone last year who had a gripe about a music organizer program. Suppose you create some playlists and then decide, "Oh, nevermind, I don't like this playlist." You highlight the playlist and click "Delete". You then get a dialog box that asks, "Do you want to move the songs in this playlist to the Recycle Bin?" "Well, no, I don't want you to recycle those songs. I want to keep the songs. Just delete the playlist," you say to yourself and you click "No". Unfortunately, the program was asking you, "Do you want to move the songs to the Recycle Bin or delete the songs permanently from your com...

Turns out you can't learn Mandarin Chinese by watching television
Sep 8, 2006
Post comments count 0
Post likes count 0

Turns out you can't learn Mandarin Chinese by watching television

Raymond Chen
Raymond Chen

It is generally accepted that language exposure in the first year of a baby's life is important. To what certainly must be the dismay of couch potatoes everywhere, researchers at the University of Washington determined that it's particularly important that it come from a live human being. Watching DVDs doesn't have any effect. What was particularly notable to the researchers was that even just five hours of exposure made a significant impact.