Archive for July 2007

caps lock

July 28, 2007

The Caps Lock key is an ill-conceived mistake for computer keyboards. However, it is also a fascinating example of the power of inertia. Even though it clearly hurts people, it is still around. Because it is familiar, its absence scares people, and so they ask for it when it is missing.

We all know that Caps Lock causes problems. If you have used a computer, then you have had to retype what you wrote because Caps Lock RUINED it. Normally, hitting the wrong key types one wrong letter. But if you hit Caps Lock, it messes up everything else you type, until you notice the problem and turn Caps Lock off. Accidentally hitting Caps Lock is the #1 reason for seeing “Incorrect Password” several times.

I have never heard a good argument for the Caps Lock key. Any system where text must be entered in uppercase is a non-starter. If the text needs to be in uppercase, then it is trivial for the system to convert any lowercase text to uppercase as it is entered. The problem is that the system is poorly designed, not that the capslock key is necessary. Software development is complex, this feature is not. The point of software is to make user’s jobs easier. Anyone who is paying for software that forces users to toggle Caps Lock, when the software could do the work instead, is being ripped off.

Unfortunately, because keyboards have always had Caps Lock, people expect it. If it is missing, or moved, they feel uncomfortable. Sun keyboards have the Ctrl and Caps Lock buttons swapped. (picture) The often-used Ctrl button is large, while the seldom-used-and-never-for-a-good-reason Caps Lock button is small and down in the lower-left of the keyboard. People press Ctrl key more often then Caps Lock, so making it larger and easier to hit is an improvement to the keyboard design.

I first used a Sun keyboard the summer after my Freshman year in college. I only used it for a few hours, then I swapped it out for a “normal” keyboard, because I was not used to it. In retrospect that was stupid. I would have had an ergonomically better time If I’d kept the Sun keyboard. But I didn’t know any better back then. I just knew that I didn’t like it because it was different.

Fast forward a few years, and a lot of learning. During my summer at Microsoft, I took a pocket-knife and popped off the Caps Lock, and Insert keys from my keyboard. Suddenly, my typos only affected one or two letters, not whole sentences. When programming I occasionally had to type things that LOOK_LIKE_THIS, and I would find my pinky hovering over the hole where the Caps Lock used to be. But I would just shift it down a fraction of an inch, to press Shift, and keep typing. The gaping hole gave good tactile feedback when I tried to press it, which made learning to avoid it easy. After about a month I only used the Shift key. I never had a hard time holding it down with my pinky while typing with my other 9 fingers. Of all the ways I customized my workstation, removing the Caps Lock and Insert did the most to lower my frustration, because they dramatically lowered the number of typos I had to correct.

I can understand why people think they need a Caps Lock key. I used to think I did. Unfortunately, some ‘professional designers’ who should know better do not understand the problem ether:

“I don’t see (the Caps Lock key) being a problem at all,” says Joel East, a technical designer at Ikey, a company that manufactures custom keyboards and pointing devices for industrial applications. “The Caps Lock key is there, and people can choose to use it or not.”

Death to Caps Lock from Wired.com

That’s bullshit. People can’t choose never to use it, because they can’t stop themselves from accidentally hitting it. If you put a big button next to a very commonly used key like Shift, people will inevitably hit it accidentally — especially if they are pressing buttons without looking — which is exactly what touch typing is. That’s basic industrial design. It truly scares me that people like Mr. East are considered professional keyboard designers.

If you are using Mac OS X, you can disable or remap Caps Lock by pressing the “Modifier keys…” button under the Keyboard tab in the “Keyboard and Mouse” System Preferences. If you are not using a laptop, I recommend physically taking the key off. The sensation of finding a hole instead of a key gives superior feedback that Caps Lock has been disabled. It can be confusing if you are used to having a Caps Lock key, and suddenly it does not work when you hit it. Removing the actual key avoids the confusion, and helps you adjust quickly and painlessly to your improved keyboard layout.

Try one month without Caps Lock, you will be pleasantly surprised.

EDITED TO ADD (2007-10-04): Apparently Appleā€™s latest keyboards have a bias against accidentally activating Caps Lock, and another bias to turn it off as soon as possible. Great news!

Advertisements

Creating a UUID (GUID) in Cocoa

July 16, 2007

This article has been updated, and moved here.

Fact: Warning and Confirmation Dialogs Do *NOT* Work

July 10, 2007

Confirmation dialogs are not a “safety net”. They do not make people stop and think. They do not warn people about dangerous actions. The reason is simple, people will unconsciously form the habit of dismissing them because, through hundreds of repetitions, they have been trained to hit “OK” automatically.

People form habits, and they perform then automatically. When I leave my apartment I close the front door and lock it. I don’t close the door, then decide to get my key out and lock it. I do it all on autopilot. Shutting and locking the door is one continues action, not two distinct actions.

Habits can be very useful — I never worry if I’ve locked my door or not, and I’ve never come home to find it unlocked. It goes without saying that bad habits cause problems. What is important to realize is that people will form habits when you expose them to a repetitive task, and there is no way to stop this. Always following action A with action B trains people to perform A and B every time. They become inseparable, and automatic.

One police officer gave another example of learning to do the wrong thing. He took it upon himself to practice disarming an attacker. At every opportunity, he would have his wife, a friend or a partner hold a pistol on him so he could practice snatching it away. He would snatch the gun, hand it back and repeat several more times. One day he and his partner responded to an unwanted man in a convenience store. He went down one isle, while his partner went down another. At the end of the first aisle, he was taken by surprise when the suspect stepped around the corner and pointed a revolver at him. In the blink of an eye, the officer snatched the gun away, shocking the gunman with his speed and finesse. No doubt this criminal was surprised and confused even more when the officer handed the gun right back to him, just as he had practiced hundreds of times before. Fortunately for this officer, his partner came around the corner and shot the subject.

On Combat chapter 2 by Lt. Col Dave Grossman.

What happened here is that because the officer always practiced handing the gun back after a disarm, it became a habit, and he did it without thinking, even though it was clearly the wrong thing to do. When users click “OK” after doing an operation for a few dozen times, they will start to do it out of habit. Their muscle memory will “hand the gun to the bad guy” by clicking “yes”, even though their conscious mind is screaming at them not to do it.

The point to all this is that the ubiquitous confirmation/warning/”are you sure?” dialogs provably do not work.

areyousure.jpg

This is the dialog I get wheneve I empty the trash on my computer. Every time it comes up, I hit enter to confirm. If you look at Apple’s documentation, they will tell you that the command to empty the trash is command + shift + delete, but they are wrong. The command is command + shift + delete + hit enter to dismiss the dialog that they have trained the operator to ignore. The first dozen times I emptied the trash, the dialog made me pause and consider what I was doing (the first few times I even read it). The next thousand times, it meant nothing because I was trained to dismiss it reflexively. I have accidentally deleted files, and the dialog did not stop me. I was not even aware of it until after I had closed it.

The solution is to let users undo common destructive actions. You can not warn them that they are about to break something, but you can let them unbreak it. If MacOSX let me undo deleting my work, then the problem would be solved. Actually, MacOS X 10.5 Tiger’s does just this.

If you think your program does something special that can’t be undone, you are almost certainly wrong. Apple did not need to invent a time machine just to let me undo deleting a few megabytes of pictures and text — that level of engineering was to address a larger, more general, issue. It’s nearly a decade into the 21st century, computers now come with hard disks measured in terabytes, so much ram that we need 64 bit machines to see it all, and multi-core 3 GHz processors with 128 bit vector units. Compare the Mac Pro of today with the Original “Mac Pro” Today there is enough space to temporarily store the information needed to make any operation invertible. Exceptions to this rule are very rare.

If you can’t undo something, it’s probably because the software maker didn’t want to devote the engineering resources to make undo work. In their defense, there is only so much that can be done. Sometimes trading undo for improving a more commonly used feature is the best option given limited developers and unreasonable deadlines. Unfortunately, most of the time they don’t understand the need for undo, and why their warning dialogs are not just sub-opimal, but totally ineffective.

Even an undo that mostly works, and the occasional warning, is infinitely better then unvarying warning dialogs. This is because the warnings are no longer repetitive. If Mac OS X let me undo the routine deletion of small files, and only warned me when I was deleting something (like that Twilight Zone marathon I recorded) which couldn’t be “remembered” for a few minutes, then the confirmation dialog would mean something. This is because I wouldn’t be exposed to it often enough to form the habit of automatically dismissing it. Of course, someone in video-production who routinely works with huge files would be constantly exposed to this warning. Ultimately the best answer to any destructive operation is still undo.

The important thing to remember is that it is simply impossible for confirmation dialogs to work if the user is exposed to them repeatedly, and that undo is the best solution.