The Old New Thing
Practical development throughout the evolution of Windows.
Latest posts
How did "Start Me Up" become the theme for the Windows 95 launch?
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.
Try to avoid having BOOL function parameters
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...
We know it's insecure, but we want to do it anyway
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...
Moving a file does not recalculate inherited permissions
Inherited permissions are established at creation.
Those folks from Birmingham talk funny, and I mean that in a scientific way
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...
Environment variable expansion occurs when the command is read
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...
Raymond's excursions into East Asian pop music, episode 2: China Dolls (中國娃娃)
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 (中國娃娃)...
Who says there's only one? There can be more than one logon session
An extension of the "What if two programs did this?" thought experiment is the "Who says there's only one?" question. A common question I see is, "From a service, how do I do X with the currently logged-on user?" (Where "X" can be a variety of things such as interact with them or impersonate them.) But who says that there's only one? With the introduction of Fast User Switching in Windows XP, the possibility for multiple logged-on users exists even in consumer scenarios. You might say, "Well, I mean that among all the users that are logged on, I want the one that's using the computer right now." Except tha...
[6] days since last monorail breakdown
It's soon going to come to the point where this is no longer news. The Seattle monorail broke down again, just six days since the previous breakdown, which was in turn just two days after operations resumed. I think they need to put up a big sign at the Monorail station at Seattle Center that reads 6 days since last breakdown. Well, except that today it would read "2".