September, 2003

  • The Old New Thing

    Why do some people call the taskbar the "tray"?


    Short answer: Because they're wrong.

    Long answer:

    The official name for the thingie at the bottom of the screen is the "taskbar". The taskbar contains a variety of elements, such as the "Start Button", a collection of "taskbar buttons", the clock, and the "Taskbar Notification Area".

    One of the most common errors is to refer to the Taskbar Notification Area as the "tray" or the "system tray". This has never been correct. If you find any documentation that refers to it as the "tray" then you found a bug.

    In early builds of Windows 95, the taskbar originally wasn't a taskbar; it was a folder window docked at the bottom of the screen that you could drag/drop things into/out of, sort of like the organizer tray in the top drawer of you desk. That's where the name "tray" came from. (Some might argue that this was taking the desktop metaphor a bit too far.)

    Artist's conception (i.e., Raymond sat down with Paint and tried to reconstruct it from memory) of what the tray looked like at this time:

    The tray could be docked to any edge of the screen or it could be undocked and treated like any other window.

    Then we ditched the tray and replaced it with the taskbar. We went through a doc scrub to change all occurrences of "tray" to "taskbar". If you go through the shell documentation, you should not find the word "tray" anywhere.

    A little while later, we added notification icons to the taskbar.

    I think the reason people started calling it the "system tray" is that on Win95 there was a program called "systray.exe" that displayed some icons in the notification area: volume control, PCMCIA (as it was then called) status, battery meter. If you killed systray.exe, you lost those notification icons. So people thought, "Ah, systray must be the component that manages those icons, and I bet its name is 'system tray'." Thus began the misconception that we have been trying to eradicate for over eight years...

    Even worse, other groups (not the shell) picked up on this misnomer and started referring it to the tray in their own documentation and samples, some of which even erroneously claim that "system tray" is the official name of the notification area.

    "But why do you care? That's what everybody calls it now, may as well go with the flow."

    How would you like it if everybody started calling you by the wrong name?

    Summary: It is never correct to refer to the notification area as the tray. It has always been called the "notification area".

  • The Old New Thing

    The end of the scrollbar series


    Okay, that's basically the end of the scrollbar series.

    Do people actually like the idea of a coding series? It gets very few comments, and it's a lot of work to write, so if nobody actually cares I can just write about quick little things and not try to be coherent from day to day.

    I guess that's what most blogs are like anyway.

    If you like the idea of a coding series, what other topics would you like covered?
  • The Old New Thing

    Why is there no programmatic access to the Start menu pin list?


    We learned our lesson the hard way.

    In Windows 95, we gave programmatic access to the Start menu "Fast items" list - the items that appear at the top of the Start menu above the Programs list. This area was meant for the user to customize with their favorite links, but programs quickly saw the opportunity and spammed themselves into it every chance they got.

    In IE, we gave programmatic access to the Favorites menu, and once again, programs spammed themselves into it.

    In Windows XP we intentionally did not give programmatic access to the bold list of items at the top of the Start menu (the "pin list"). The pin list is for users to put their favorite icons. It is not the place for a program to decide unilaterally, "I am so cool. I am your favorite icon. I just know it. So I'll put myself there because, well, I'm so cool."

    Because we knew that the moment we let people mess with the pin list, everybody would install themselves into it and it would become meaningless (and annoying).

    What's particularly galling are the programs that, as part of their install, decide that they are so cool they want to be everywhere to make sure you don't miss out on the coolest most amazing program ever written in the history of mankind, so they go into the Start menu, into the Fast items, onto the desktop, into the Quick Launch, onto your Favorites, take over as your default autoplay handler, and even hang out as an icon next to the clock on the taskbar just in case you somehow missed all those other places - and each time you run them, they go and recreate those icons and settings in case you "accidentally lost them".

    I hate those programs.

  • The Old New Thing

    The default answer to every dialog box is "Cancel"


    The problem with displaying UI is that people will take every opportunity to ignore it. This story of how people deal with virus warning dialogs (via Don Browning) is a template for how users treat any unexpected dialog: They try to get rid of it.

    We see this time and time again. If you are trying to accomplish task A, and in the process of doing it, an unexpected dialog box B appears, you aren't going to stop and read and consider B carefully. You're going to try to find the quickest path to getting rid of dialog B. For most people, this means minimizing it or clicking "Cancel" or just plain ignoring it.

    This manifests itself in many ways, but the basic idea is, "That dialog box is scary. I'm afraid to answer the question because I might answer it incorrectly and lose all my data. So I'll try to find a way to get rid of it as quickly as possible."

    Here are some specific examples, taken from real customers:

    • "How do I make this error message go away? It appears every time I start the computer."

      "What does this error message say?"

      "It says, 'Updates are ready to install.' I've just been clicking the X to make it go away, but it's really annoying."

    • "Every time I start my computer, I get this message that says that updates are ready to install. What does it mean?"

      "It means that Microsoft has found a problem that may allow a computer virus to get into your machine, and it's asking for your permission to fix the problem. You should click on it so the problem can be fixed."

      "Oh, that's what it is? I thought it was a virus, so I just kept clicking No."

    • "When I start the computer I get this big dialog that talks about Automatic Updates. I've just been hitting Cancel. How do I make it stop popping up?"

      "Did you read what the dialog said?"

      "No. I just want it to go away."

    • "Sometimes I get the message saying that my program has crashed and would I like to send an error report to Microsoft. Should I do it?"

      "Yes, we study these error reports so we can see how we can fix the problem that caused the crash."

      "Oh, I've just been hitting Cancel because that's what I always do when I see an error message."

      "Did you read the error message?

      "Why should I? It's just an error message. All it's going to say is 'Operation could not be performed because blah blah blah blah blah.'"

    When most people buy a car, they don't expect to have to learn how an engine works and how to change spark plugs. They buy a car so they can drive it to get from point A to point B. If the car makes a funny noise, they will ignore it as long as possible. Eventually, it may bother them to the point of taking it to a mechanic who will ask incredulously, "How long has it been doing this?" And the answer will be something like, "Oh, about a year."

    The same goes for computers. People don't want to learn about gigabytes and baud and security zones. They just want to send email to their friends and surf the web.

    I myself have thrown out a recall notice because I thought it was junk mail. And computers are so filled with pop-up messages that any new pop-up message is treated as just another piece of junk mail to be thrown away.

    Automobile manufacturers have learned to consolidate all their error messages into one message called "Check engine". People are conditioned to take the car in to a mechanic when the "Check engine" light goes on, and let the mechanic figure out what is wrong. Can we have a "Check engine" light for computers? Would it be feasible?

  • The Old New Thing

    Why you can't rotate text

    In a previous entry, I said that the word "Start" disappears because the alternative is worse.

    Somebody in a comment asked, "Why not draw the text vertically?"

    Ah, now you get to learn about the exciting world of vertical text.

    We originally intended to run text vertically in the new XP Start menu. In original designs for the menu, your name ran vertically up the left side of the menu instead of running across the top.

    Rotating text is problematic in languages that traditionally run vertically, such as Chinese. Since you probably don't have Chinese fonts installed, pretend that %, &, and ' are the Chinese characters for your name. In traditional vertical text, it would be written as shown in Example 1 below. Notice that the English text is rotated clockwise. This preserves the top-to-bottom reading order.

    (Amy Smith)
    Amy Smith
    %&' (Amy Smith)
    Example 1 Example 2 Example 3

    As a concession to Western influences, it is permissible to render Chinese characters left-to-right, in which case your name would be written as "%&' (Amy Smith)".

    Compare this to the traditional Western way of rotating text. Text which would normally be rendered as "Amy Smith" is rotated counter-clockwise and rendered as shown in Example 2.

    Now consider what happens if you take a Chinese name rendered the Western way, "%&' (Amy Smith)", then rotate the Western way, resulting in Example 3. Notice that from a Chinese point of view, everything is upside-down! The character that is supposed to be at the top (%) is now at the bottom.

    Windows for many years now has been multilingual. This means that the same underlying code runs regardless of language. Changing a language merely changes the strings being displayed. This means that there can be no language-specific UI. In this case, it means that we can't have separate rotation rules for Chinese as opposed to English or German.

    (And even if we were allowed to have separate rotation rules, we would have to be able to tell whether the name was in the form above or was in the form "Amy Smith (%&')". In this form, we should rotate it as in example 2, since this is an English string with Chinese characters embedded; as opposed to our example above where we had a Chinese string with English characters embedded. Those of you who have seen Arabic and English mixed together get to see punctuation marks bandied about with similar degrees of confusion.)

    Multilingual support also explains why you see things like "1 folder(s)" instead of "1 folder" and "2 folders". Why not have two format strings, one for when the number of items is exactly one, and one for when the number of items is two or more?

    Well, for one, that would significantly increase the number of strings we would have to carry around. (If you say "just add s to make the plural" then you really need to get out more!)

    For two, some languages (such as Slovene) have a "dual" number in addition to singular and plural. The Lahir language has singular (one), dual (two), trial (three), paucal (a few), and plural (many). So now you have to have perhaps five versions of every string that contains a replacable number.

    This also explains why you see a lot of strings of the form "Property: Value" (for example, "Last modified: Monday, September 29, 2003") instead of a phrase ("Last modified on Monday, September 29, 2003"). This is necessary to avoid problems caused by grammar. If you attempt to compose a phrase, you have to worry about subject/verb agreement, gender and number agreement, declensions, all sorts of things that computers aren't good at. The only safe solution is to avoid it entirely and use the "Property: Value" notation instead.

    We did get one special exception to the "grammar independence" rule: Personalized folders. When you view somebody else's "My Documents" folder, it says "Chris's Documents". We made this request to the translators and they worked really hard to make sure that the templates for possessive forms were accurate in all the languages we support. (Fortunately, we didn't have to deal with languages where the form of the template depended on us knowing whether Chris is a man or a woman.)

  • The Old New Thing

    How much is that gigabyte in the window?


    Slashdot is in an uproar over a lawsuit charging computer manufacturers for misleading consumers over hard drive capacity.

    The manufacturers use the ISO definition, wherein a "gigabyte" is one billion bytes, even though most people consider a gigabyte to be 1024 megabytes.

    This is a tricky one. The computer industry is itself inconsistent as to whether the "kilo", "mega", etc. prefixes refer to powers of ten or powers of two. The only place you see powers of two is when describing storage capacity. Everything else is powers of ten: Your 1GHz processor is running at one billion cycles per second, not 1,073,741,824 cycles per second. Your 28.8K modem runs at 28,800 bytes per second, not 29,491. And your 19" monitor measures only 17.4" inches diagonally.

    There do exist IEC standard designations for power-of-two multipliers. A kibibyte (KiB) is 1024 bytes, a mebibyte (MiB) is 1024 KiB, and a gibibyte (GiB) is 1024 MiB. Good luck finding anybody who actually uses these terms.
  • The Old New Thing

    In case people got the wrong impression


    I really did enjoy my trip. I just like talking about the goofy things.

    I intend to go back to Sweden in the spring. I'm currently enrolled in Swedish lessons but this trip came far too soon for me to have learned anything useful aside from "tack", "ursäkta" and "Jag taler inte svenska." Though the lady behind the register was exceedingly pleased to see a blatant foreigner buying Swedish children's books. Everybody in Sweden speaks perfect English (it's quite embarrassing, actually), so Swedes are honored when a foreigner actually bothers to learn Swedish. I'm told that one of the factors contributing to astounding English-language abilities in Sweden is that American TV shows and movies are not dubbed into Swedish when imported; they are merely subtitled.

    The Øresund bridge is totally awesome.

    Amusingly, when you take the ferry from Denmark to Germany, the toll booth agent speaks Danish and expects you to speak Danish. When you take the same ferry in the reverse direction, the toll both agent speaks German and expects you to speak German.

    The ferry schedules are published only in Danish. Just our luck, of all the languages of all the countries we were visiting, that's the only one none of us knew. We had a choice of two ferries, and we were unable to determine with confidence what times each one ran, how much time the crossing lasted, and when the last ferry of the day was.

    I studied German for five years, but that was a long time ago and my vocabulary has decayed heavily since then. Actually, my listening ability never got very good. On all the exercise tapes, they talk painfully slowly and clearly, whereas in real life, people talk rapidly and don't enunciate clearly. I could usually follow about two or three sentences before the rate of input exceeded my ability to process it. I got around okay, but it was slow going. I've also been told that my German is overly formal and stilted. (Is there such a thing as "overly stilted"? As opposed to what, "just stilted enough"?)

    I am myself not a vegetarian, but my two travelling companions are. We discovered the secret to finding vegetarian food: find an Indian restaurant or an Italian restaurant. An Indian restaurant will have an extensive vegetarian menu. ("Scharf" is a good word to know, too.) An Italian restaurant will have a few vegetarian options. We weren't sure about German or French restaurants. We concluded that, while a French restaurant is more likely to have vegetarian dishes or be able to convert an existing dish to vegetarian, a German restaurant would be less likely to be annoyed at the request. (We only tested this theory once: I stopped at a German restaurant and asked if they had any vegetarian entrees; the answer was no.)

    It's a good thing the glockespiel at the Marienplatz is so badly out of tune - it sets expectations for the show that follows.

    The important lessons at Oktoberfest were not learned by me firsthand, thank goodness.

    The Deutsches Museum is ridiculously huge. We spent an entire day there.

    We did not get to spend as much time in Berlin as the city deserved. Berlin is a "real city" as opposed to Munich, which is a "tourist city".
  • The Old New Thing

    An insight into the Windows 95 startup sound


    Doo, dudududingggggg.... ding.... ding... ding...

    In an interview with Joel Selvin at the San Francisco Chronicle, Brian Eno explains.

    Q: How did you come to compose "The Microsoft Sound"?

    A: The idea came up at the time when I was completely bereft of ideas. I'd been working on my own music for a while and was quite lost, actually. And I really appreciated someone coming along and saying, "Here's a specific problem -- solve it."

    The thing from the agency said, "We want a piece of music that is inspiring, universal, blah-blah, da-da-da, optimistic, futuristic, sentimental, emotional," this whole list of adjectives, and then at the bottom it said "and it must be 3 1/4 seconds long."

    I thought this was so funny and an amazing thought to actually try to make a little piece of music. It's like making a tiny little jewel.

    In fact, I made 84 pieces. I got completely into this world of tiny, tiny little pieces of music. I was so sensitive to microseconds at the end of this that it really broke a logjam in my own work. Then when I'd finished that and I went back to working with pieces that were like three minutes long, it seemed like oceans of time.

    The Windows 95 CD contained extra multimedia toss-ins. The ones I remember are a cartoon or two by Bill Plympton, a Weezer music video, and music video of Edie Brickell singing Good Times.

    For some reason, everybody wanted to know the artist from the Good Times video. Nobody was interested in the artists who did any of the other stuff. (Okay, probably nobody asked about Weezer because, well, that's the group right there in the filename.)

    Hint: Right-click and select Properties. That will tell you the artist.

    Oh, and the question nobody asked but I'm going to answer it anyway: The composer of the Windows 95 Easter Egg theme is Brian Orr. Here's his story of how it came to be.

  • The Old New Thing

    Why does the taskbar default to the bottom of the screen?


    It didn't always.

    The original taskbar didn't look at all like what you see today. It defaulted to the top of the screen and looked something like this.

    This is definitely not what it actually looked like. It has been so long I forgot precisely what it looked like (I didn't realize there was going to be a quiz ten years later), but this captures the basic flavor, at least for the purpose of this discussion.

    The point is that the bar took the form, not of buttons, but of tabs. Each tab corresponded to a running window, which melded into the tab. You switched window by clicking the corresponding tab.

    You can see vestiges of this style in the TCS_BUTTONS style in the tab control. When we switched to the button-look for the taskbar, we still had a lot of switching code based on the tabs metaphor, and it was less work to add a button-look to the tab control than it was to rewrite all the switching code.

    The tabbed look was abandoned for various reasons, one of which was what everybody else has already noticed: If you put the taskbar at the top of the screen, lots of windows end up sliding under it, because they assumed that the usable area of the screen began at (0,0). Other windows would "creep" up the screen because they used GetWindowPlacement to save their window position (which returns workspace coordinates, where (0,0) is the first usable pixel) but use SetWindowPos to restore it (which uses screen coordinates, where (0,0) is the upper left pixel of the primary monitor).

    There were too many apps that kept sliding under the top-docked taskbar so we had to abandon that idea and move it to the bottom.

    It's somewhat disheartening to observe that now, eight years later, apps still mess up their coordinate systems and keep sliding under a top-docked or left-docked taskbar.

  • The Old New Thing

    Pre-travel insomnia

    I can't sleep the night before an airplane flight. Certainly I'm not the only person with this problem, right?
Page 1 of 4 (38 items) 1234