The Old New Thing

Practical development throughout the evolution of Windows.

Latest posts

Aug 30, 2006
Post comments count 0
Post likes count 0

If you work at a company, it's not your computer any more

Raymond Chen

My posting a while back on solving one problem by creating a bigger problem was written from the standpoint of an IT department doing something like tweaking a logon script. I even mentioned that context partway through but clearly didn't highlight it clearly enough. So say you're an IT department and somebody says, "Oh, just install this other program and learn a new programming language and convert your existing batch file to it, and then your problem will be easy to solve." You might not be too excited about that type of "solution". And even if you decide, "Okay, I can justify to my boss taking a week away f...

Aug 29, 2006
Post comments count 0
Post likes count 0

As I recall, Germany did not ratify the United States Constitution

Raymond Chen

I remember reading a news report on a court case wherein the defendant claimed protection under the First Amendment of the United States Constitution. An interesting angle, especially since the case was being tried in Germany under German law. I may be wrong, but it is my impression that Germany did not ratify the United States Constitution. There's actually a point to this anecdote. Occasionally, when someone notes that Windows doesn't do one thing or another thing for legal reasons, people will post comments saying something like, "Well, a German court ruled that XYZ is legal, so your reason is bogus." Or, "...

Aug 28, 2006
Post comments count 0
Post likes count 0

How did "Start Me Up" become the theme for the Windows 95 launch?

Raymond Chen

Add this to your trivia pile. Keith Combs links to a pair of articles that that go into the history behind how Start Me Up become the theme for the Windows 95 launch. Part 1, Part 2.

Aug 28, 2006
Post comments count 0
Post likes count 3

Try to avoid having BOOL function parameters

Raymond Chen

Generally speaking, I believe that you should try to avoid giving functions a boolean parameter (, , etc.) unless the meaning of that boolean parameter is blatantly obvious. Examples of obvious meaning would be the second parameter to the function ( obviously means the window is being enabled and means that it's being disabled) and the final parameter to ( obviously means the scroll bar is being shown and means that it's being hidden). In both of these cases, the meaning of the boolean parameter is encoded in the name of the function itself. But for functions like , what does that first parameter mean? Firs...

Aug 25, 2006
Post comments count 0
Post likes count 1

We know it's insecure, but we want to do it anyway

Raymond Chen

I remember a question from somebody who asked, paraphrasing: We're writing a secure screen saver that the user can interact with. We're going to present the user with various types of information, and if they click on a hot link, we want to launch a web page on their desktop once the user unlocks the workstation. We know it's insecure, but we want to do it anyway. Apparently these people didn't get the memo on security. Windows tries to make it hard for you to do this to a secure screen saver. The restrictions on secure screen savers have gotten tighter over time. Originally, secure screen savers were isolate...

Aug 24, 2006
Post comments count 0
Post likes count 1

Moving a file does not recalculate inherited permissions

Raymond Chen

Inherited permissions are established at creation.

Aug 24, 2006
Post comments count 0
Post likes count 0

Those folks from Birmingham talk funny, and I mean that in a scientific way

Raymond Chen

In celebration of their tenth birthday, the Paramount Comedy Channel in the UK commissioned a study on how regional accents affect perceived funniness, and the conclusion was that people from Birmingham have the funniest accents. The Received Pronunciation, which is the only British accent most people in the United States are familiar with, came in dead last. I'm sure that there are some nuances of class that I miss out on when I watch a British-made film due to my lack of familiarity with the connotations that each accent brings to the table: Which accents are the aristocratic accents, the working-class accen...

Aug 23, 2006
Post comments count 0
Post likes count 3

Environment variable expansion occurs when the command is read

Raymond Chen

On the command line (and in batch files), environment variable expansion occurs when the command is read. This sounds obvious at first, but it has its own consequences. In the online documentation for , one such consequence is spelled out: would never display the message, since the in both "" statements is substituted when the first "" statement is read, since it logically includes the body of the "", which is a compound statement. In other words, the "" command is not complete until the closing parenthesis is read. You can see this if you type the commands interactively: Notice that the "" command di...

Aug 22, 2006
Post comments count 0
Post likes count 0

Raymond's excursions into East Asian pop music, episode 2: China Dolls (中國娃娃)

Raymond Chen

The wife of one of my colleagues took a trip through the Far East as part of her work. One of the things she did was buy a bunch of music CDs from the various countries she visited. But not just any CDs. To decide which ones to get, she used a very scientific method that didn't require knowing how to read or speak the local language: She would go into a music store and just observe the teenage girls as they did their shopping. Based on this sampling, she would buy the CDs that appeared to be the most popular. One of the CDs she loaned me is of a Thai pop duo called China Dolls (中國娃娃)...