• The Old New Thing

    Why is it even possible to disable the desktop anyway?


    Some time ago, I mentioned the dangers of disabling the desktop window. But why is it even possible to disable the desktop anyway?

    This is simply an artifact of the history of philosophy of Windows operating system design.

    Back in the old days, memory was tight, hard drives were luxuries, the most popular CPU for the IBM PC didn't have memory protection, and software development was reserved for the rarefied elite who could afford to drop a few thousand dollars on an SDK. This had several consequences:

    • Tight memory means that anything optional had to be left behind.
    • Software developers were trusted not to be stupid.
    • Software developers were trusted not to be malicious.
    • Software developers were trusted to do the right thing.

    Certainly there could have been a check in all the places where windows can be disabled to reject attempts to disable the desktop window, but that would have made one window "more special" than others, undermining the "simplicity" of the window manager. Anything optional had to be left behind.

    Software developers were trusted not to make the sort of stupid mistakes that led to the desktop being disabled, the heap being corrupted, or any of the other "don't do that" types of mistakes lurking in the shadows Windows programming. If such a serious mistake were to creep in, certainly their testing department would have caught it before the program was released. Software development was hard because nobody said this was going to be easy.

    Software developers were trusted to treat their customers with respect. Because, after all, software developers who abuse their customers won't have customers for very long. If a program put itself in the Startup group, then it was doing so not for selfish reasons but rather because the customer actually wanted it.

    The window manager was left fairly exposed, granting software developers the power to do things like install hooks, subclass windows that were owned by other processes, and manipulate the contents of the Startup group, with the assumption that software developers would use the power for good, not for evil. Don't bother stopping a program from disabling the desktop window, because maybe that program is doing it for a good reason that we hadn't thought of.

    The world of software has changed much since those simpler days. I had a nice chat with my colleague Zeke where we discussed how philosophy has changed over the years. Maybe he'll write a few words on the subject...

  • The Old New Thing

    The things in the PDC 2005 introductory video


    I remarked earlier that the creative director for the PDC rummaged through our offices looking for stuff which was to be used in the opening PDC video to decorate a developer's cubicle. It all flashed by really quickly, but if you were paying attention, you might have been able to make out the following:

    One thing you won't find in the developer's cubicle, however, is a can of soda. That's because none of the soda companies would give permission for their product to appear in this video.

    Later in the video, several pages from the web site tastingmenu.com are flashed across the screen. Puzzle: Why was this site chosen?

    (For legal reasons, I can't provide a link to the video. Any comments that claim to include a link to the video will be deleted, sorry.)

  • The Old New Thing

    Quick and dirty buzzword bingo cards in Excel


    Jensen Harris's brief example of using Excel's random number generator reminded me that I had need for the random number generator recently myself: Generating buzzword bingo cards.

    At the Battlestar Galactica party, our hosts needed to create some Battlestar Galactica-themed buzzword bingo cards and asked me to help out. Here's how I did it:

    1. Build a list of words and phrases in column A.
    2. In column B, next to each word or phrase, enter "=rand()". You can use Jensen's "block entry" trick.
    3. Build your bingo card elsewhere on the sheet.
    4. In the upper left square of the bingo card, enter "=A1"; in the next square, "=A2", and so on.
    5. Highlight cell B1.
    6. Click the "Sort ascending" button on the toolbar.
    7. Print your bingo card.
    8. Repeat steps 6 and 7 until satisfied.

    It's not beautiful, but it gets the job done.

  • The Old New Thing

    Follow-up: Portsmouth Spinnaker Tower now open, but maybe you should take the stairs


    Portsmouth's ever-delayed Millennium Tower (since renamed Spinnaker Tower) has finally been completed, five years late and £11 million over budget. But even opening day couldn't escape without its own glitches, for the project manager was trapped in a glass-walled lift for over an hour, requiring abseiling engineers to come and rescue him.

  • The Old New Thing

    There's something about Rat Poker


    When performing usability tests, one of the standard tasks we give people is to install a game, and the game we usually use is The Puzzle Collection. (Yes, it's an old game, but continually updating the game makes it less valid to compare results from one year to the next.)

    One of the things that the game's Setup does that always confuses people is that it asks you where you want to install it and suggests a directory. If you accept the default, a warning box appears that reads, "The directory C:\Program Files\Microsoft Puzzle Collection does not exist. Do you wish to create it?"

    People see this dialog box and panic.


    Because it's an unexpected dialog, and unexpected dialogs create confusion and frustration. From a programming perspective, this is a stupid dialog, because of course the directory doesn't exist. You're installing a new program! From a usability point of view, this is a stupid dialog, because it makes users second-guess themselves. "Gosh, did I do something wrong? The computer is asking me if I'm sure. It only does that when I'm about to do something really stupid." They then click "No" (it's always safest to say No), which returns them to the dialog asking them to specify an installation directory, and they'll poke around trying to find a directory that won't generate an "error message". I've seen users install the Puzzle Collection into their Windows directory because that was the first directory they could think of that didn't generate the "error message".

    Anyway, after the program is installed (one way or another), we tell them to relax and play a game. We say it as if we're giving them a reward for a job well done, but it's actually still part of the test. We want to see how easily users can find whatever it is they just installed.

    One thing you can count on is that when faced with the collection of games available, for some reason, they always pick Rat Poker.


    Each of us has our own pet theory why people always pick Rat Poker. Personally, I think it's that the Rat Poker icon is the most friendly-looking of the bunch. Many of them are abstract, or they depict scary creatures, but awww look at that cute rat with the big nose. He looks so cheerful!

    Click. Another vote for Rat Poker.

  • The Old New Thing

    Answering the phone, a classic rookie mistake


    I had taken yesterday off from work just to take a breather, but I stopped by the office in the morning to pick up my bicycle helmet. (How I managed to leave my bicycle helmet at the office is not important.) My office telephone rang and I answered it.

    As my colleague Ken described it later, "Ah, classic rookie mistake."

    The call was from an emergency meeting in another group. They called to put me on the hook for a problem with Windows Vista Setup because they believed that my group was responsible, being among those that recently RI'd. I ended up staying until 4pm, then resuming the investigation at home for another few hours until the problem was identified. (The problem was introduced by another group, but they want my group to change its code to work around the problem.)

    Now I need to take a day off from my day off.

  • The Old New Thing

    Be careful what you name your product group


    They thought they were so clever when they named the Desktop Applications Division. "And the abbreviation is 'DAD', isn't that cute? Complements the Microsoft Office Manager toolbar (MOM)."

    And then the troubles started.

    Shortly after the new product group was formed, everybody in the product group started getting email talking about strange non-business things. How's the garden doing? Did you get my letter? When will the twins be coming home from college?

    The reason is that the email address for sending mail to the entire division was—naturally—"DAD". But it so happens that many people have a nickname for their father in their address book, named—of course—"dad". People thought they were sending email to their dad, when in fact it was going to DAD.

    The email address for sending mail to the entire division was quickly changed to something like "deskapps" or "dappdiv".

  • The Old New Thing

    The undeletable Outlook folder


    For a while, I've had a few "undeletable Outlook folders". Even after deleting all the messages from them, Outlook just complains when I try to delete them. There was some sort of error message, but of course I didn't read it. The only option was OK, so I clicked it. As I recall, the message said something about "Can't delete because blah blah pending synchronization blah blah." I don't know what "pending synchronization" is, but it must be important if Outlook won't let me delete a folder because of it.

    Meanwhile, I also noticed that my Sync Issues folder grew by about a dozen error messages every day, and I had to go clean them out every so often. The messages looked something like this:

    9:26:59 Synchronizer Version 11.0.6352
    9:26:59 Synchronizing Mailbox 'Raymond Chen'
    9:26:59 Synchronizing local changes in folder '0618'
    9:26:59 Error synchronizing folder
    9:26:59		 [80004005-501-4B9-0]
    9:26:59		 The client operation failed.
    9:26:59		 Microsoft Exchange Server Information Store
    9:26:59		 For more information on this failure, click the URL below:
    9:26:59		 http://www.microsoft.com/support/prodredirect/outlook2000_us.asp?err=80004005-501-4b9-0
    9:27:00 Synchronizing local changes in folder '0611'
    9:27:00 Error synchronizing folder
    9:27:00		 [80004005-501-4B9-0]
    9:27:00		 The client operation failed.
    9:27:00		 Microsoft Exchange Server Information Store
    9:27:00		 For more information on this failure, click the URL below:
    9:27:00		 http://www.microsoft.com/support/prodredirect/outlook2000_us.asp?err=80004005-501-4b9-0
    9:27:01 Done

    I clicked the link to obtain further information, but the instructions there didn't solve my problem. I just chalked this up to "Outlook gets that way sometimes," and ignored the messages, since they didn't seem to be hurting me. I had almost resigned myself to carrying these two undeletable folders with me until I die.

    Then today I randomly stumbled across the solution.

    I right-clicked one of the "stuck" folders and selected "Clear Offline Items", even though there were no offline items in the folder. (I deleted all the messages from it; the folder was empty. How do you clear something that is empty?) I got a warning dialog that said something like, "Hey, there's some unfinished synchronization here, do you want to clear the items anyway?" I said, "Go for it."

    And then Outlook let me delete the folder.

    My guess is that Outlook's synchronization engine got wedged up on these two folders because there was some unfinished business that it just couldn't reconcile, and it said, "Eh, maybe it'll work tomorrow, but in the meantime, don't delete it yet. I'm still working on it." Repeat for several months, because tomorrow never comes. By telling Outlook, "Oh just give up already, trust me, I don't care any more," the synchronization engine released its objections to deleting the folder and let me finally wipe it out.

    If you have a mysteriously undeletable folder, you could try this, see if it helps.

    Update: I just hit the problem again. The error message is

    Outlook hat die Synchronisierung der lokalen Änderungen an Elementen in diesem Ordner noch nicht abgeschlossen. Der Order kann erst nach Abschluss der Synchronisierung mit dem Server gelöscht werden.

    Yes, I run Outlook in German. This translates to "Outlook has not yet completed the synchronization of local changes to items in this folder. The folder can only be deleted after completion of the synchronization with the server."

    This time, deleting the offline items wasn't good enough. Even though the Properties dialog says "Server folder contains: 0 items" and "Offline folder contains: 0 items", I nevertheless had to trigger a manual synchronization to reconfirm that zero equals zero before it would let me delete the folder.

    (Watch, people are now going to start sending me Outlook product support questions. Hey, I don't work on Outlook. I'm a hapless victim like you!)

  • The Old New Thing

    The history of the path separator in Japanese and Korean Windows


    Why is the path separator on Japanese Windows the ¥ character? And why is it the ₩ character on Korean Windows? I've been prodding Michael Kaplan to delve into the history of this quirk, and he finally gave in to my repeated badgering. (Additional discussion on the Korean Won sign, the Japanese Yen sign, and currency symbols in general.)

  • The Old New Thing

    Thread affinity of user interface objects, part 5: Object clean-up


    The window manager and GDI objects as a general rule will automatically destroy objects created by a process when that process terminates. (The window manager also destroys windows when their owner threads exit.) Note, however, that this is a safety net and not an excuse for you to leak resources in your own program with the attitude of "Oh, it doesn't matter, the window manager will clean it up for me eventually." Since it's a safety net, you shouldn't use it as your primary means of protection.

    For one thing, leaving junk behind to be cleaned up is just plain sloppy. It suggests that your program is too lazy (or stupid) to keep track of its own resources and has abdicated this to the safety net. It's like throwing your clothes on the floor because you know your mother will eventually come by to pick it up and put it away.

    For another thing, this clean-up happens inside the window manager and no other window manager activity will occur until the clean-up is complete. If you leaked hundreds or thousands of objects, the system will seem visually unresponsive because the window manager is busy. (The system is still running, though. Operations that do not rely on the user interface, such as computation-intensive operations or network activity will still proceed normally while the window manager is cleaning up.)

    Why didn't the window manager optimize the "massive clean-up" scenario? Because when you design a system, you focus on optimizing the case where people are using your system responsibly and in the manner intended. You don't want to reward the people who are abusing you. Imagine what kind of message you'd be sending if you designed the system so that people who abuse the system get better performance than people who follow the rules!

Page 371 of 464 (4,636 items) «369370371372373»