The Old New Thing

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

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 ...

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

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. ...

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...

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...

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 "" ...

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...

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 ...