December, 2008

  • The Old New Thing

    Neuroscience can be used for good or for evil; this one might fall in the evil bucket

    • 5 Comments

    Marketplace radio interviews Martin Lindstrom, author of Buyology: Truth and Lies About Why We Buy (another book in the series Short catchy title: Long boring subtitle) about how stores get people to buy more stuff by taking advantage of how our brains are wired.

    (Unfortunately, at the time I checked, the Smell and Beer bonus tracks were broken. You can try to console yourself with Paddy Hirsch's explanation of margin calls in terms of Girl Scout Cookies.)

    Update: The Smell and Beer links work now.

  • The Old New Thing

    When you start getting in-page errors on your hard drive, it's time to go shopping for a new hard drive

    • 32 Comments

    The STATUS_IN_PAGE_ERROR describes itself as "The instruction at XXX referenced memory at YYY. The required data was not placed into memory because of an I/O error status of ZZZ." What does this mean?

    It means that the memory manager needed to read some memory from the disk, but the disk returned an error. (Namely, error ZZZ.) Since it has no way to return an error code to your program—I mean, after all, all your program did was read a variable from memory; there's no way to return an error code from int x = y if y cannot be read off the disk—it is reduced to raising an exception.

    When you see this message, and the I/O operation was coming from your hard drive, then you need to go shopping for a new hard drive. (You will also be alerted to a dying drive if your drive supports S.M.A.R.T.)

    Now.

    You can see this error for sources other than hard drives. For example, if you're running a program over the network and the network connection dies, and the memory manager needs to demand-page some code from the program image, then you'll get this error because the code couldn't be loaded off the network. Similarly, if you yank a CD out of the drive while a program is executing from it (or your CD is damaged), there's a good chance that you'll get this error.

    Naturally, the loss of a network connection or removal of a CD does not mean that your network card or CD-ROM drive is failing; it's a failure of the underlying connection or medium. But if your hard drive starts generating I/O errors, then there's not much that can be blamed aside from the drive itself. (Okay, it might be a failing controller, but it's more likely to be the drive itself.)

  • The Old New Thing

    The struggle against those annoying plastic packages gains a few allies

    • 33 Comments

    Some companies are switching to easy-to-open packaging. Not a moment too soon, in my opinion.

  • The Old New Thing

    High Contrast Mode is not the same as High Contrast Scheme

    • 15 Comments

    "High Contrast Mode" is an accessibility state controlled by the HCF_HIGHCONTRASTON flag in the dwFlags member of the HIGHCONTRAST structure. You can retrieve this structure programmatically by calling the SystemParametersInfo function with the SPI_GETHIGHCONTRAST parameter; conversely, you update the setting programmatically with SPI_SETHIGHCONTRAST parameter. Programs are on their honor to query the "High Contrast Mode" flag and, if set, simplify their display so as to be more usable to people with low visual acuity. For example, gradients and background bitmaps should be turned off and system colors should be used for screen elements.

    End users can enter and exit "High Contrast Mode" by going to the Accessibility control panel and checking or unchecking the "High Contrast" box. Alternative, users can use the High Contrast Mode hotkey, LeftShift+LeftAlt+PrtSc. As an added bonus (and here's where the confusion begins), if users employ the hotkey, then the system will also switch to or from the "High Contrast" color scheme automatically.

    The "High Contrast" color scheme (or more accurately, schemes, since there are a few of them) is a collection of colors and metrics that are suitable for users with low visual acuity. You can manually select this color scheme from the Display control panel's "Appearance" page.

    These two concepts, "High Contrast Mode" and the "High Contrast Color Scheme" are independent. You can be in High Contrast Mode with normal colors. (This means that programs will remove visual distractions even though your screen colors aren't black and white.) Or you can use the High Contrast Color Scheme without being in High Contrast Mode. (This means that your screen colors are predominantly black and white, but programs are still welcome to use gradients and background bitmaps.)

    It turns out that these "mixed states" are very confusing to end users. When users go to the Display control panel and select a High Contrast color scheme, they almost certainly want to go into High Contrast Mode as well, but that doesn't happen because the Display control panel says, "Well, you're choosing some colors that are very heavy on black and white. Maybe you just like those colors? Perhaps you're a fan of penguins, or maybe you're just into goth fashion. I'm just the Display control panel; I change colors. I don't do accessibility stuff. For that, use the Accessibility control panel. Not my job. Clear delineation of responsibility."

    It's perfectly logical and completely counter-intuitive.

    Most often, I see this when somebody sets their color scheme to High Contrast from the Display control panel, and yet they find that programs are not recognizing High Contrast Mode and are still using gradients and background bitmaps.

    As a result of this confusion, many programs don't trust SPI_GETHIGHCONTRAST. Or, more accurately, if SPI_GETHIGHCONTRAST says, "No, High Contrast Mode is not enabled," the programs say, "Well, okay, we're not in High Contrast Mode, but maybe we're in the mixed case where users chose the High Contrast color scheme and think that they are in High Contrast Mode even though they technically aren't." These programs study your current colors, do some math, and decide if they are "high contrast-y". If so, then they go into "virtual High Contrast Mode", where they act as if HCF_HIGHCONTRASTON were set even though it really isn't.

    As a result of these programs "trying to guess what you really want", I occasionally see somebody complaining, "After I set my colors to my personal preferences (stark black and white because I like it that way), some programs think I'm a person with visual impairments and go into a simplified visual mode."

    Windows Vista attempts to resolve this confusion by violating the "architectural purity" of the Display control panel and having it set and clear the High Contrast Mode flag depending on what color scheme you picked. If you pick a High Contrast color scheme, then the Display control panel will automatically set you into High Contrast Mode. Because it's almost certainly what you wanted anyway.

  • The Old New Thing

    That guy in the neighborhood who has way too many Christmas lights

    • 20 Comments

    Weekend America profiles Dominic Luberto, that guy with his house so covered in Christmas lights that you're sure it's a fire hazard or something.

    I like how he pulls out the classic argument stopper when challenged that his display is too much. "Whoever comes against me - listen - goes against the kids." There you go. In the United States, all you have to do is accuse your opponent of hating children and you have instantly won the argument.

  • The Old New Thing

    Raymond's technique for getting people to leave a meeting room when their meeting runs over

    • 30 Comments

    It's certainly common at Microsoft, and probably common at many places, that a meeting runs over. The next group who has booked the room gathers outside waiting for the previous meeting to wrap up. Sometimes they wait timidly outside the door, and the group inside never realizes that they are running over. Late meetings have a cascade effect on the rest of the day, and not just for the specific conference room. Of course, if the 9am meeting runs late, then the 10am meeting in the same conference room will start late and consequently run late. But it also makes late the 10am meeting that one of the 9am participants needs to attend.

    I learned this technique from a colleague: Barge into the room at the official start time, even if there are remnants of the previous meeting still in the room. Depending on my mood, I will then employ one of these two tactics:

    • I'll take a few steps into the room, then look around and say, "Sorry, I must be in the wrong room," and leave.
    • I'll pull up a chair and sit down and apologize for being late, on the assumption that the meeting started without me and the people in the room are the actual meeting attendees. I might even start introducing myself, acting as if I was added to the meeting roster as an outside participant.

    The second technique works only if the room is filled with people who don't know you.

  • The Old New Thing

    Oh, I feel so bad for those poor Wall Street folks who have to have a normal party instead of a ridiculously lavish one

    • 24 Comments

    Ah December, the Christmas Holiday Winter Party season. (Even though winter doesn't start until the 21nd, but who's counting?) Last year, the Wall Street event planning industry suffered a downturn. (Not that they're doing all that great this year either.) Apparently, given the softening of the economy, companies aren't quite willing to spend the money on parties as lavish as they once did. No more models hired to just walk around. No limo ride home. No going-home gift.

    The poor babies. I bet they just cried themselves to sleep.

  • The Old New Thing

    Don't be helpless: You can find information too, if you try (episode 2)

    • 14 Comments

    Commenter Joshua Blake wonders why Word's status bar says "Word is preparing to background print the document", wondering whether there used to be other types of printing like foreground.

    Well, first of all, this is a question about Office, something I explicitly deny any special knowledge of:

    Topics I am not inclined to cover: [...]
    • Microsoft software that isn't Windows. (Exchange, Office, ...)

    But I'm going to take this opportunity to teach you how to use information already available to you to answer this question yourself.

    First, let's see what the Internet says about Word and background printing. A search for ‹Word background printing› turns up pages that tell you how to turn background printing on and off. Well, that tells you right off the bat that there are other types of printing, and if you read the text of the page, it even tells you what happens if you turn off background printing: You can't do anything with the program while it is printing.

    There you go, an explanation of the other type of printing.

Page 4 of 4 (38 items) 1234