The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

More musings on the peculiar linguistic status of languages acquired in childhood
Jul 7, 2009
Post comments count 0
Post likes count 0

More musings on the peculiar linguistic status of languages acquired in childhood

Raymond Chen
Raymond Chen

You don't even notice.

Command line parsers look at what you typed, not what what you typed looks like
Jul 7, 2009
Post comments count 0
Post likes count 0

Command line parsers look at what you typed, not what what you typed looks like

Raymond Chen
Raymond Chen

Command line parsers are stricter than human beings. The computer cares about what you typed. If you type something else that superficially resembles what you want, but is not actually what you want, then you won't get what you want, even though it sure looks like what you want. I covered a special case of this topic earlier when I described smart quotes as the hidden scourge of text meant for computer consumption. You think you typed a quotation mark, but the editor secretly "improves" it from U+0022 to U+201C. Then you paste the text into a command line and you get strange output because the command line pa...

If somebody speaks a language I’m not expecting, sometimes I don’t understand it, even though I should
Jul 6, 2009
Post comments count 0
Post likes count 0

If somebody speaks a language I’m not expecting, sometimes I don’t understand it, even though I should

Raymond Chen
Raymond Chen

It depends on whether the language is in the instinctive part of my brain.

A 32-bit application can allocate more than 4GB of memory, and you don't need 64-bit Windows to do it
Jul 6, 2009
Post comments count 0
Post likes count 0

A 32-bit application can allocate more than 4GB of memory, and you don't need 64-bit Windows to do it

Raymond Chen
Raymond Chen

Commenter Herb wondered how a 32-bit program running on 64-bit Windows can allocate more than 4GB of memory. Easy: The same way it allocates more than 4GB of memory on 32-bit Windows! Over a year before Herb asked the question, I had already answered it in the tediously boring two-week series on the myths surrounding the /3GB switch. Here's a page that shows how you can allocate more than 2GB of memory by using shared memory (which Win32 confusingly calls file mappings). That code fragment allocated 4GB of memory at one go, and then accessed it in pieces (because a 32-bit program can't map an entire 4GB memor...

The most unwanted song ever
Jul 3, 2009
Post comments count 0
Post likes count 0

The most unwanted song ever

Raymond Chen
Raymond Chen

A follow-up to why ABBA songs are so catchy: Vitaly Komar, Alex Melamid, and David Soldier developed a song scientifically engineered to be the most unwanted song ever: By their calculations, "fewer than 200 individuals of the world's total population would enjoy this piece." Ah, opera rap. Also check out The Most Wanted Paintings. America's Most Wanted Painting contains "an autumnal landscape with wild animals, a family enjoying the outdoors, the color blue, and George Washington."

Why does my screen go black when an emergency hibernation is in progress?
Jul 3, 2009
Post comments count 0
Post likes count 0

Why does my screen go black when an emergency hibernation is in progress?

Raymond Chen
Raymond Chen

Sometime last year a customer wanted to know why the screen goes black when the system automatically hibernates due to critically low battery power. Shouldn't there be some sort of feedback to tell the user, "Hey, like, I'm hibernating, don't worry"? The power management folks explained that they turn off the screen for a reason: They're trying to save your data while they still can. When the system gets the "Oh no, the battery is about to die!" notification from the hardware, there's no time to lose, and even less power to waste. Keeping the screen lit takes a lot of power, so turning it off might make the dif...

Foreign languages can be used to impede communication
Jul 2, 2009
Post comments count 0
Post likes count 1

Foreign languages can be used to impede communication

Raymond Chen
Raymond Chen

One of the reasons people give for studying a foreign language is to increase the number of people one can communicate with. But what people don't mention is that foreign languages can also be used to impede communications, and that can be just as useful. (Be careful, though, because it can backfire.) During my visit to Sweden some years ago, I was walking back to my hotel room from the Göteborg train station. I had spent the afternoon visiting the nearby city of Alingsås, whose claim to fame is that they are the birthplace of the man who introduced potatoes to Sweden, although he is probably more ...

You can use a Coke slogan as your password, but not a Pepsi one
Jul 2, 2009
Post comments count 0
Post likes count 0

You can use a Coke slogan as your password, but not a Pepsi one

Raymond Chen
Raymond Chen

When Larry Osterman mentioned News Flash: Spaces are legal characters in both filenames and passwords, I was reminded of my own little experiment with passwords and spaces. Over a decade ago, I tried using spaces in my password, and they were accepted, but I ran into a different problem: Brand name bias. The password system accepted "Coke adds life" as my password, but it rejected "Pepsi the choice of a new generation". Why did the password system accept a Coke slogan but not a Pepsi one? Hint.

The New York Times says I'm doing it all wrong, but maybe that's for the better
Jul 1, 2009
Post comments count 0
Post likes count 0

The New York Times says I'm doing it all wrong, but maybe that's for the better

Raymond Chen
Raymond Chen

Some time ago, The New York Times ran a story titled In Web World of 24/7 Stress, Writers Blog Till They Drop, which mentions that "those on the lower rungs of the business can earn as little as $10 a post." Dude, if that's what people on the lower rungs earn, then I'm below ground level! (Nevermind that just the previous month, an article in The New York Times wrote about the business of blogging: Don't expect to get rich.) Then again, I probably shouldn't complain, seeing as what most people took away from the article was that blogging kills. Slate's Timothy Noah noted in his article Death by Blogging t...