October, 2006

  • The Old New Thing

    Why does Windows hide keyboard accelerators and focus rectangles by default?

    • 92 Comments

    The release of Windows 2000 introduced a new setting: "Hide underlined letters for keyboard navigation until I press the Alt key," which defaults on for most Western languages. What's the story behind this setting?

    I still have the rationale from the user interface designer who introduced this feature. Here's a redacted copy:

    To support our goal of greater simplicity, we plan to suppress keyboard navigation indicators by default. Don't be frightened...

    The idea is to reduce visual noise in Windows, namely focus indicators and access key underlines in menus and windows. Aesthetically, these things are distracting and intimidating. Functionally, they're only useful when you're navigating by keyboard. They don't add significant value when you're just using the mouse. In fact, they're often redundant.

    Why now? Every good thing must start somewhere. Windows will look cleaner and simpler.

    What's so bad about the way things are? Access key underlines are largely underutilized and are often redundant with Ctrl+ shortcuts within the same menu. There's no indication that you have to type the Alt key to use these shortcuts. Plus, it's just odd to see characters underlined within text all over your display. Focus rectangles lack graphic integrity, and they're often redundant with the highlight on selected items or the default button.

    Of course, the keyboard indicators will come back when there is any demonstration of keyboard navigation by the user. The indicators will appear and disappear appropriately. Finally, if you don't like the behavior at all, you can disable it from the Display control panel.

    For what it's worth, this is one of the things I [the interface designer] came to Microsoft to fix.

    An additional point not mentioned in the original rationale is that with the rise of the web browser as the primary use of a computer, users have increasingly been conditioned to treat underlined text as "Click me" rather than "Use me in conjunction with the Alt key to activate this item".

    The thing about seeing randomly-underlined letters all over the screen is a point many technically-inclined people miss. To a typical user, all these indicators scream "Entering a propeller-head zone!" and "You are not smart enough to use this computer."

    What does frustrate me about this setting, though, is not its design but its implementation. Using the arrow keys to navigate a pop-up menu doesn't appear to count as a "demonstration of keyboard navigation by the user", which is particularly frustrating since you can't use the Alt key to make that demonstration, for the Alt key dismisses the menu! To see what the keyboard accelerators are for a pop-up menu, you have to find a way to cause the menu to pop up based on a keyboard action (usually hitting Shift+F10 when focus is on the appropriate element). This is often harder than it sounds.

  • The Old New Thing

    Non-resolution of the dead home desktop problem

    • 90 Comments

    Last time, I told of attempting to upgrade my home computer and failing. I ultimately gave up and returned the parts to the store, telling them that I thought the IDE controller on the motherboard was dead. They refunded my money after a false step where they refunded me more than I paid for the components in the first place! (I bought the motherboard and CPU as a bundle, but the person who rang up the return treated them as two separate items and ended up refunding me the full price instead of the bundled price. It's one thing to return a defective product and get your money back. But to turn a profit doing so is downright wrong.)

    Thus bereft of computer equipment, I drove down to the local Fry's and bought a bottom-of-the-line computer which would merely serve as a shell for all my working equipment. I would be using the motherboard, CPU, memory, and case from the computer, but I didn't care for the other stuff since I would be performing an "instant upgrade" with the old computer's DVD drive and hard drives. It cost about $60 more than the parts I bought from the failed upgrade attempt, but the saved grief was well worth it.

    Skipping ahead in the story: After I got the machine up and running, I plugged one of my old hard drives into the machine and... the BIOS recognized it, and the volume mounted just fine.

    On the other hand, I can't access the files on the drive yet. I don't have a domain at home (I'm not that big of a geek), so my SID on the new computer is different from my SID on the old computer. My new account can't access files created by the old account. I would have to do some SID history magic to get access to the files protected by my old SID, but I'm just going to take the lazy way out and do a recursive "replace ACLs" on all the files on the old hard drives. (This requires multiple passes, though. First I have to take ownership, then I can change the ACLs after I become the owner.)

    Now about that new computer. It comes with Windows XP Media Center Edition, even though the video card doesn't have a DVI connector. I was kind of baffled by this. If you're going to run Media Center Edition, doesn't that mean you're highly likely to hook it up to some awesome flat-panel display for watching your videos? I don't quite understand why this bottom-of-the-line computer with an analog-only video card bothered to install Media Center Edition. Who are they fooling?

    Okay, so I'm going to have to upgrade the video card, too. That increases the cost delta over the parts to around $160. Still worth it though.

    One of the odd features of the new computer is that it has a 9-in-1 multi card reader built into the front panel. This is a cute feature, but it is also frustrating since it gobbles up four drive letters.

    But that's okay. I already described how you can fix this when I talked about the infinitely recursive directory tree. I created a directory called C:\CARDS and inside it created directories C:\CARDS\CF, C:\CARDS\SD, and so on. I then used the Disk Management snap-in to de-assign drive letters from each of those card readers and instead mounted each card reader into the corresponding folder I had created. Now I can access the contents of the CF reader by going to C:\CARDS\CF.

    One thing that really frustrates me about off-the-shelf computers is all the shovelware that comes with them. I fire up the computer and my notification area is filled with useless icons I don't want to see again, with more stupid programs jammed themselves into the Run key. No, I don't need an AOL monitor running. No, I don't need QuickTime pre-loaded. No, I don't need a program to monitor my card readers and do some evil icon chicanery.

    The evil icon chicanery is particularly gruesome because every time I log on, I get a dialog box that looks like this:

    ×
    fAIL

    Good job there, stupid evil icon program. I bet you assume the user is an administrator.

    The computer also came with a recovery partition. I hate those too.

    Today's status is that I'm not out of the woods yet. I have a working computer, I can mount my old hard drives (though it'll take work to get access to the files), I still have to upgrade the optical drive to the rewritable DVD drive that I had in the old computer. I still have to get rid of all the shovelware that came with the system. I still have to reinstall the drivers for my rewritable DVD drive and printer. (I'm sure I have that CD around here somewhere.) And I still have to get a new video card that supports digital output so I can use an LCD panel.

    Some improvements:

    • USB 2.0 ports. (My old computer had only 1.0.)
    • The fans shut off in standby mode. (My old computer left the fans running, which negated much of the benefit of standby mode.)
    • "Shut down and restart" actually works. (For some reason, my old computer was incapable of restarting.)
    • The new computer is a lot quieter.
  • The Old New Thing

    More tales of dead computers: My home desktop

    • 75 Comments

    Yes, I said that my next dead computer story would be the AlphaServer, but late-breaking news has forced me to shuffle the order a bit.

    My home computer has been circling the drain for several months. (The Northbridge fan would buzz and sometimes spin really slowly.) When the motherboard finally stopped powering on, I knew its time was up.

    Being the clueless geek I am, I figured, "No big deal. Swap out the motherboard and I'm back in business." Easier said than done. For you see, my computer is so old, nobody makes motherboards compatible with the one I had. According to Wikipedia, not only has Socket A been discontinued, its replacements, Socket 754 and 939, have themselves been superseded (by AM2). I was two generations obsolete.

    Therefore, with the motherboard upgrade came a CPU upgrade and of course a RAM upgrade since my old PC-2100 RAM doesn't work in the new motherboard (which wants PC-3200 but can slum it with PC-2700).

    After I got the new parts home, I realized that the new motherboard wants a PCI Express video card rather than my old AGP card, and it also needs a new power connector that my old ATX power supply doesn't have, so I'll need a new case and power supply, too.

    My simple "swap out the motherboard" has turned into a massive upgrade. I'm thinking I would have been better off just buying a Dell.

    I'm not out of the woods yet. I get everything all plugged in and hooked up, and the hard drives won't spin up. Well, they do spin up, as long as I don't plug in the IDE cable. But if I plug in the IDE cable, they refuse to spin. (Yes, I tried a different cable.) I don't think it's excessive power draw, because I get this even when I hook up just one hard drive, and when the IDE cable isn't plugged into the motherboard, the drives spin up just fine. I'm baffled on this one.

    Update: No, it's not bad cabling, since I used the cables intact from the old computer. The exact same cables in the exact same configuration worked on the other computer. And the cables are keyed so I'm not installing them backwards. And it's not lack of power. I fed power to the drive from the old computer's power supply, and the same thing: Spins up if IDE cable disconnected. (What's more: If the IDE cable is connected and the motherboard is powered off, the drive does not spin up.)

  • The Old New Thing

    Don't require your users to have a degree in philosophy

    • 61 Comments

    Help text is not the place to put logic puzzles.

    In Windows Vista, when you go to the System control panel, you are shown a number that describes your computer's rating. But are higher numbers better or worse? If I had a choice, would it be better to have a 1 rating or a 5 rating?

    In earlier betas of Windows Vista, you had to have a degree in philosophy to figure this out. If you clicked the "Help" button on the System control panel page, you were sent to a page of help text that tried to explain the performance rating. When it got around to explaining what the number means, the text said, paraphrased, "When looking for software to run on this computer, you should choose programs whose rating is less than or equal to the rating of this computer."

    So does this mean that bigger ratings are better?

    "Well, if a program's rating is small, then the computer's rating needs to be bigger than that, so a program wants its rating to be as small as possible so more computers can run it. If my computer's rating is small, programs will be fighting to get a rating low enough that I can run it. That's a good thing for me, right? No wait, but what if the program I want has a high rating? Then my computer will need a higher rating. If my computer had a low rating, then that wouldn't be less than or equal to the program's rating. No wait, I got it backwards, it's the program that needs to be less than or equal to the computer, not the other way around. If the program's rating needs to be less than or equal to the computer's rating, then that means that the computer's rating needs to be greater than or equal to the program's rating. If my computer rating were higher, than it could run more programs."

    "I think."

    "Why can't they just say, 'Bigger numbers are better'?"

  • The Old New Thing

    The great Polish Sea -or- We forgot Poland!

    • 56 Comments

    Open up the Date and Time control panel and go to the Time Zones tab. Notice anything wrong with the world map? Take a close look at northern Europe.

    Depending on what version of Windows you have, you might see a body of water where Poland should be. Windows 95 didn't have this problem, but Windows 2000 did. And whether your copy of Windows XP has this problem depends on precisely what version you have.

    Where did the great Polish Sea come from?

    This weekend marks the end of Summer Time in Europe, and the answer has to do with time zones.

    Recall that the Windows 95 control panel highlighted your current time zone on the map. To accomplish this, each time zone was assigned a different label in the time zone bitmap. To draw the map, the portions of the world whose label was the same as the selected time zone were drawn in bright green, and the parts that were different were drawn in dark green. So far so good.

    When the highlighting on the time zone map had to be disabled, all that happened was that the "color for the selected time zone" was set to dark green. The code still went through the motions of drawing the time zone in a "different" color, but since the colors were the same at the end of the day, the visual effect was that the highlighting was removed.

    To determine which parts of the world are land and which parts are sea, the time zone map enumerated all the time zones as well as the labels associated with each time zone. (You can see them in the registry under "MapID".) In this way, the land masses of the world gradually emerged from the ocean as the time zones claimed each spot of land one by one.

    The shell team did make one fatal mistake, however, obvious in retrospect: It assumed that the world's time zones would never change. But what happens when a country changes its time zone, as Poland did? At the time Windows 95 was released, Poland was on its own custom time zone, which Windows 95 called "Warsaw Standard Time/Warsaw Daylight Time", but it didn't stay that way for long. Just within Windows 95 and Windows 98, Poland's time zone went by the following names:

    • Windows 95: (GMT+01:00) Warsaw
    • Windows 95: (GMT+01:00) Lisbon, Warsaw
    • Windows 98: (GMT+01:00) Bratislava, Budapest, Ljubljana, Prague, Warsaw
    • Windows 98: (GMT+01:00) Sarajevo, Skopje, Sofija, Warsaw, Zagreb

    And that's not counting the changes that were made in Windows NT, Windows 2000 or Windows XP or their service packs. It's not that Poland's time zone actually changed that many times. Rather, the way it was grouped with its neighbors changed. I don't know why all these changes were made, but I suspect political issues played a major role.

    As a result of all this realignment, the "Warsaw Standard Time" time zone disappeared, and with it, its associated land mass. Consequently, the land corresponding to Poland remained underwater. And for some reason, nobody brought this problem to the attention of the shell team until a couple years ago.

    In order to fix this, a new world bitmap needed to be made with new labels (labeling the pixels corresponding to Poland as "Central European Time") so that Poland would once again emerge from the sea. Even though the highlighting is gone, the map code still needs to know where every time zone is so it can raise them from the ocean floor.

    Fortunately, all this will soon fall into the mists of history, because Windows Vista has a completely rewritten time zone control panel, so the mistakes of the past can finally be shed. Let's hope the people who wrote the new time zone control panel remembered Poland.

  • The Old New Thing

    How Raymond learns languages (and why it's not working)

    • 54 Comments

    Whenever I wander into the subject of languages here, a commenter will ask me what my language-acquisition technique is. I have refrained from describing it since it is very peculiar to my way of learning, and I doubt it will work for most people. But since people seem to be interested, here it is.

    I like to learn a language by learning its rules first, then converting the rules to instinct while picking up vocabulary. This is backwards from how children learn a language, which is entirely instinctual and heavy on vocabulary acquisition with the rules coming only much later when they reach school and need to fine-tune their skills.

    First, sign up for a language class. In addition to providing a structured environment for learning, it'll be the only place to get pronunciation practice without having to impose on friends and relatives. It also forces you to keep up. You might skip a week if you're just meeting with a friend, but you're not going to skip a week if you are attending a class, because the class is just going to keep going without you.

    Next, get a pocket grammar book. I picked up my Swedish grammar book for $2 at a used bookstore. It's called Simplified Swedish Grammar by Edwin J. Vickner, published by Augustana Book Concern in 1934. (That's right, 1934. Which means that it covers aspects of Swedish grammar that are now obsolete, such as plural forms of verbs like "Vi skrevo".) Read the grammar book and try to digest it. You don't have to get every last detail, but you should at least get the basic structure of the language. Don't worry so much about the fine points of adjective and verb endings, but do know how the past tense is formed, and learn the structural elements of the language like word order, prepositions, and conjunctions. The goal here is to learn enough so you can follow a sentence even if you don't know what all of the words mean.

    After a few weeks of the language class, you'll have a rough feel for the language. Get some children's books and try to work your way through them.

    Find the news for dummies and listen to it every day. It will be rough going at first. I remember when I started listening to Klartext, I had to concentrate really hard to understand just fragments of the first news story, at which point I was too tired to deal with the rest of the program. I would still listen to it, though, just to get a sense for the flow of the language, even though I wasn't trying to understand what they were saying. (Note: Proceeding with this step too soon will not accomplish anything. All you'll hear is gibberish.) Knowing the basic structure of the language will make it easier to understand the news for dummies. You can get by without the right adjective endings, but if you can't find the verb in a sentence, you're going to be in trouble.

    If you can find a transcript of the news for dummies, use it. It will make it much easier to follow along (assuming a language whose spelling is phonetic or nearly so), and it will also help train your ear to recognize the language as it is actually spoken, as opposed to how it is officially spoken, because there are many pronunciation rules that are simply invisible to native speakers. (For example, officially, the English word "what" has a "t" at the end, but in practice, the "t" often turns into a "d" or a glottal stop or vanishes entirely. Meanwhile, the leading consonant is often pronounced as a "w" instead of a "wh". As another example, the word "news" can be pronounced as "nooz" or "nyooz" or "neeooz", and most native speakers don't even realize that there's a difference.)

    As you become more comfortable with the sound of the language, go back and re-read the grammar points you skipped over, like the adjective endings. Learn the charts and listen for them in the news for dummies. Hopefully the audio reinforcement will help you develop an ear for them and eventually be able to use them properly without having to consciously refer to those charts. The goal is not to rely on the charts but rather to say the right thing because that's how you've always heard it said. But the charts are there when your instinct fails you.

    Listening is also the only way you will pick up "unwritten rules" such as the motion of weak pronouns in Swedish and German, which I picked up a sense for despite it being covered by no grammar book I own. (Though it is covered by the amazingly detailed Igloo Swedish Grammar page where it is given the name Long Object Shift.)

    You should also read the news. (This was a lot harder to find back in the pre-Internet days, but now it's ridiculously easy.) Reading is easier than listening in many respects, because you can read as slowly as you want, and all the word endings are right there in front of you. No matter how many different ways there are of saying "what", there is only one way of spelling it. Be careful, however, because the language of the news is typically more formal than everyday conversation. (And the language of headlines is even stranger. In English, German, and Swedish, for example, headlines tend to omit articles and helping verbs. "Ball hit into pond" is a valid headline but an awful English sentence.)

    If you do all this, you'll be far ahead of the class you signed up for. By the time they start learning noun plurals, you've already internalized the rules for formation of the past tense of regular verbs. (But still show up for class, for you can use the class to fill in gaps in your knowledge.)

    Anyway, that's how I taught myself Swedish in six months. Maybe it'll work for you, but probably not.

    Actually, I'm having much difficulty applying this technique to Mandarin Chinese because the language doesn't fall into the neat grammatical patterns of Western languages. I have yet to find a Chinese grammar book that takes a structural approach. I also haven't been able to find Mandarin Chinese news for dummies. I vaguely recall that VOA or some similar organization had a special version of the news in Mandarin Chinese, not for Chinese listeners, but for American servicemen who are studying Mandarin Chinese. But I can't find it.

    And I don't get much help from my parents. I remember asking my mother a question about word order, and she said, "Oh, there aren't any rules like that. You just say what makes sense." Well, yeah, you say what makes sense assuming you already know the language...

    I replied, "Oh, so I can say this," and spoke a sentence where I used both a time and place, and I think I put the time first.

    "Oh, no, you have to say it this way," and she restated the sentence with the place first.

    "Ah, so there are rules on word order after all," I pointed out.

    "Oh, yeah, I guess so. But I don't know what they are."

    Native speakers are not always the best choice for learning the grammar of a language because they don't understand their language formally, only instinctively. Consider the four sentences below.

    I took the ball home. I took it home.
    I took home the ball. I took home it.

    That last box is crossed out because "it" is acting as a weak pronoun and must remain close to the verb. Good luck finding a native English speaker who can explain weak pronouns. (Heck, good luck finding one who can explain what a finite verb is!)

    On other language topics:

    Commenter Michael Puff notes that in Germany, as a rule, hotel employees should speak English. While they may be true in general, the off-hours staff at the small hotel I stayed at in Munich a few years ago were clearly not comfortable with English. They seemed relieved that I was able to speak with them in (bad) German. And my friend who went on a vacation in Germany thought Michael's remark was just a cruel joke, for in her experience, practically nobody spoke English, not even in the cities. (She said that the hotel staff could usually speak "hotel English".)

    One of the places my friend and her husband visited during their stay in Munich was Das Deutsche Museum. I warned them about the mining exhibit (English), 900 meters of more than you really wanted to know about mining. I remember being absolutely drained by the experience, and I asked my friend what she thought. "It wasn't that bad. It goes a lot faster if you can't read German."

    Andreas Johansson points out that in Amsterdam, people will switch to English as soon as they recognize that you aren't Dutch. A different friend of mine lived in the Netherlands for a while and they way he described it, people "autodetected" the accent and instantly switched to English. His solution? Buy a one-way train ticket to a small town, have lunch there, explore the local attractions (maybe a small museum or something), then buy a return ticket. In the small towns, people are less likely to speak English, which forced my friend to carry out these simple transactions (ordering lunch, taking a museum tour, buying a train ticket) in Dutch.

    I don't like to talk about stuff like my family's native language because it leads to additions in Wikipedia that give it a creepy stalker-like feel. "He can often be found in the Tully's on 152nd St, typically on Wednesdays around 8pm, enjoying a venti no-whip mocha with vanilla. He tends to sit at the table near the fireplace facing away from the door."

    Note also that the picture of me in the Wikipedia article claims "The copyright holder allows anyone to use it for any purpose," and "Free to use as per http://channel9.msdn.com/termsofuse.aspx". I don't know how they came to that conclusion, because if you actually read the terms of use, you'll see that it says that it is permissible to use Documents "provided that (1) the below copyright notice appears in all copies" (no such copyright notice appears in the Wikipedia entry), and "(2) use of such Documents from the Services ... will not be copied or posted on any network computer or broadcast in any media" (I think Wikipedia counts as "posted on a network computer"). And then there's the clause, "No logo, graphic, sound or image from any Microsoft Web site may be copied or retransmitted unless expressly permitted by Microsoft."

    Or maybe terms of use don't apply to Wikipedia.

  • The Old New Thing

    640 x 480 is still not dead

    • 52 Comments

    Windows still has to worry about displays running at 640×480 resolution. Even though the default minimum resolution was bumped up to 800×600 for Windows XP, there are still 640×480 devices out there, typically tiny monitors on servers. One common set-up is to have a bank of tiny little monitors, each corresponding to one server in a cluster, with one large monitor that can "tap into" any of the tiny monitors for a closer look. Even though these servers typically are managed via remote administration, keeping actual monitors available acts as a safety net when remote administration proves insufficient, for example, if there is a networking problem.

    I don't know what the minimum video requirements will be for Vista, but I doubt they'll really affect these types of machines. These server monitors are not interested in any fancy new video features like Aero Glass or desktop composition.

    Running at 640×480 is not just for these server monitors, though. I believe Safe Mode runs at 640×480, so Explorer still needs to be usable at that resolution. This has design consequences, for it means that every component of the interface that a user might need when in Safe Mode (such as the Start menu, Explorer windows, Add or Remove Programs, possibly Windows Update I'm not sure) needs to remain usable under such low resolutions. For the Start menu, for example, this means making sure that the default Start menu will still fit on the screen even at 640×480.

    You might respond, "Well, that's stupid, letting this 640×480 limitation cramp your design. You should design for a high-resolution display, say something that is 1024×768 or greater, and have a special 'Safe Mode' version of the interface that runs in 640×480 for the cases where you have to squeeze into a smaller space."

    This approach has two drawbacks. First, it means that there are two versions of the user interface that have to be designed, implemented, and tested. The amount of work is disproportional to the benefit, since Safe Mode is used less than one tenth of one percent of the time (and that's probably grossly over-estimating). If you were in a position to decide where user interface resources should be spent, would you spend it on a special Safe Mode interface, or would you rather spend it on making the Aero interface even more solid?

    The second problem with a special Safe Mode interface is that, well, it's a special Safe Mode interface. When the user boots into Safe Mode, they're already anxious. Their computer doesn't work; they're trying to fix it. And then they boot up and are faced with a new interface that they're not familiar with. This doesn't do much to calm their anxiety.

  • The Old New Thing

    Invalidating the null window redux

    • 51 Comments

    The people who work on the next generation of the window manager, known as the Desktop Window Manager (DWM), told me that their original plan was to get rid of the compatibility hack that says that invalidating the null window invalidates the entire desktop, but by an amazing coincidence, two days after I posted that article, they received a report that the beta version of an upcoming product from a major vendor still relies on that behavior (albeit accidentally). They contacted the vendor who agreed to fix the bug, but the fact that a modern program still relies on this ancient behavior gave them pause. If a program written just this year relies on the null window hack, imagine how many programs written in years past also rely on that behavior. After some deliberation, they decided to put the compatibility hack back in, just to be safe.

    Some compatibility hacks never die, no matter how hard you try to kill them.

  • The Old New Thing

    How do I shut down a workstation via Remote Desktop?

    • 35 Comments

    When you are connected to a workstation via Remote Desktop, the "Turn Off Computer" option changes to "Disconnect". But what if you really want to turn off the computer, hibernate it, or put it on stand-by?

    Note: These tips work on Windows XP, but there is no guarantee that they will work in future versions of Windows.

    One way to do this is to run Task Manager and select your shutdown option from the "Shut Down" menu.

    Another trick is to click on the desktop and type Alt+F4. This will call up the shutdown dialog, where you get the usual shutdown options like "Shut down", "Shut down without installing updates", "Restart", "Stand by", and "Hibernate".

    These next two tricks are documented and will continue to work in future versions of Windows:

    If you're a command line person, you can run shutdown.exe, but that program supports only shutdown and restart; it doesn't do stand-by or hibernate. But the shutdown.exe program has a serious flaw: It requires you to have administrator privileges. If you are a limited user with shutdown privileges, the shutdown.exe program will complain. (Which means that I don't use it.)

    Finally, if your computer isn't using Fast User Switching, you can type the Ctrl+Alt+End hotkey, which is the Remote Desktop version of Ctrl+Alt+Del and consequently takes you to a dialog where you can do various system-type things, among them logging off and shutting down.

  • The Old New Thing

    What does the letter "T" in LPTSTR stand for?

    • 35 Comments

    The "T" in LPTSTR comes from the "T" in TCHAR. I don't know for certain, but it seems pretty likely that it stands for "text". By comparison, the "W" in WCHAR probably comes from the C language standard, where it stands for "wide".

Page 1 of 4 (36 items) 1234