Computer Science › Section H · Software engineering › Topic H.8

The human-machine interface

To a user, the interface is the software: nobody admires a clever algorithm hidden behind a confusing screen. Designing interfaces that fit human bodies and minds, and measuring how well they do, has become a field of its own.

The interface is what users see

Requirements analysis must decide how a system will interact with the outside world, and when that world is a person, the interaction deserves special care. Users judge software by how easy it is to learn and use, not by how cleverly it works inside, so when two products do the same job, the interface often decides which one wins. A good interface is designed around human abilities and limits, not around whatever was easiest to program, and keeps misunderstandings and errors to a minimum. Its study is called human-computer interaction (HCI), and it draws on psychology as much as on computing.

Fitting bodies and minds

Interface design draws on two areas. Ergonomics fits systems to people's physical abilities: hand size, reach, eyesight, posture. On touch screens, for example, Apple's design guidelines recommend tap targets of at least 44 by 44 points so that fingertips hit them reliably. The cognitive side, sometimes called cognetics, fits systems to mental abilities: memory, attention, habits and expectations. Ergonomics is the older field, because people have shaped tools for thousands of years. Some popular ergonomic stories are shaky: the claim that the QWERTY layout was designed to slow typists down is widely repeated, but historians dispute it.

Habits and consistency

People form habits, which makes them fast but also causes errors. A dialog asking "Are you sure you want to delete this file?" seems a safe guard, yet after a few weeks most users click Yes automatically, and the two-step action becomes one. A more reliable design makes actions reversible: deleted files go to a recycle bin, and Undo is always available. Habits also carry between programs. If two applications use one shortcut for different actions, a habit learned in one causes mistakes in the other, so designers follow platform conventions, such as Ctrl+C or Cmd+C to copy, and keep their own screens consistent.

Attention and modes

Attention narrows as concentration rises, and an absorbed person can miss signals in plain view. In a 1972 airliner crash in Florida, the crew became so focused on a faulty landing-gear indicator light that they did not notice the aircraft losing height. A mode is a state in which the same action does something different, and mode errors are common on a small scale: with Caps Lock on, every letter comes out in capitals, but the small keyboard light is easily missed, so the user is puzzled until the typing looks wrong. Designers avoid modes where they can and make any mode impossible to miss.

Memory limits

In a famous 1956 paper, the psychologist George A. Miller suggested that people hold about seven items, plus or minus two, in short-term memory; later research puts the limit for unrelated items nearer four. Either way, an interface should never rely on users remembering details from an earlier screen. Show the information needed for each decision at the moment of decision. Prefer recognition to recall: a menu listing the choices is easier than a command that must be remembered. In deep navigation, show where the user is, with a trail of links such as Home > Courses > Physics.

Measuring usability and GOMS

Interfaces can be measured: learnability, the time to learn; efficiency, the time to perform tasks; error rate; memorability, how well skill survives a break; and satisfaction. The GOMS family of models, introduced by Stuart Card, Thomas Moran and Allen Newell in the early 1980s, analyses a task into Goals, Operators, Methods and Selection rules. Its simplest form, the keystroke-level model, gives typical times to basic actions, from the original research: K, a keystroke or mouse-button press, about 0.2 s; P, pointing with the mouse, 1.1 s; H, moving a hand between keyboard and mouse, 0.4 s; M, mentally preparing, 1.35 s. Adding them estimates a skilled user's time.

Worked example: two ways to delete a word

Compare deleting a word with the mouse against a keyboard shortcut. Method A, hands starting on the keyboard: H to reach the mouse, M to decide, P to point at the word, K K to double-click it, H back to the keyboard, K to press Delete. 1. Total: \(0.4 + 1.35 + 1.1 + 0.2 + 0.2 + 0.4 + 0.2 = 3.85\) s. Method B, cursor already just after the word: M, then K K for Ctrl+Backspace. 2. Total: \(1.35 + 0.2 + 0.2 = 1.75\) s. 3. B saves 2.1 s per deletion, over half. 4. Caution: the model assumes skilled, error-free users, and B works only for users who know the shortcut, a learnability cost.

Fitts's law

In 1954 the psychologist Paul Fitts found that the time to point at a target depends on its distance, D, and its width, W. A widely used form is

T = a + b\log_2\left(\frac{D}{W} + 1\right)

where a and b are constants measured for a particular device and user, and the logarithm, the index of difficulty, is measured in bits. Doubling a target's width helps about as much as halving its distance. This explains common choices: important buttons are large, pop-up menus appear at the pointer so D is small, and targets at a screen's edge are easy to hit because the pointer stops there.

Worked example: comparing two buttons

Button A is 8 cm wide and 24 cm from the pointer; button B is 2 cm wide and 30 cm away. Assume, for this mouse and user, a = 0.2 s and b = 0.1 s per bit. 1. Index of difficulty for A: \(\log_2\left(\frac{24}{8} + 1\right) = \log_2 4 = 2\) bits. 2. For B: \(\log_2\left(\frac{30}{2} + 1\right) = \log_2 16 = 4\) bits. 3. Times: A takes \(0.2 + 0.1 \times 2 = 0.4\) s, and B takes \(0.2 + 0.1 \times 4 = 0.6\) s. 4. Check: B is smaller and farther, so it should be slower, and it is. 5. Lesson: a frequently used button should be large and close.

Accessibility and new interfaces

Good design includes people with disabilities. The World Wide Web Consortium's Web Content Accessibility Guidelines, WCAG 2.2, published in 2023, set testable rules: at the widely required AA level, normal-size text needs a contrast ratio of at least 4.5 to 1 with its background, images need text alternatives that screen readers can speak, videos need captions, and everything must work from a keyboard. Many countries' laws require accessibility for some services. Meanwhile interfaces keep changing, as touch gestures, voice assistants, predictive keyboards and virtual reality raise new questions about bodies, attention and memory.

Common mistakes to avoid

First, designing for the programmer's convenience rather than the user's. Second, relying on confirmation dialogs when Undo would protect users better. Third, hidden modes, such as a Caps Lock light out of view. Fourth, making users remember information from an earlier screen. Fifth, treating keystroke-level times as exact: they estimate skilled, error-free performance. Sixth, making frequent targets small and distant, which Fitts's law predicts will be slow.

Key takeaways

Users judge software by its interface, so it must suit human bodies, through ergonomics, and minds, through cognetics. Habits make confirmations unreliable, so prefer Undo and consistency. Attention narrows and modes cause errors. Short-term memory holds only a few items, so show information when it is needed. Usability is measured by learnability, efficiency, errors, memorability and satisfaction. The keystroke-level form of GOMS estimates task times, Fitts's law relates pointing time to distance and width, and WCAG 2.2 sets accessibility rules.

Flashcards

Flashcard

HCI

Human-computer interaction: the study of how people and computers interact

Draws on psychology.

Test your understanding

Question 1 of 5

Using the keystroke-level times from the reading, how long does it take a skilled user to decide (M), point at a button (P) and click it once (K)?

Question 2 of 5

A target is 15 cm away and 1 cm wide. What is its index of difficulty under Fitts's law?

Question 3 of 5

Users of a photo app often delete pictures by mistake, even though the app asks "Are you sure?" each time. What is the best fix?

Question 4 of 5

A ticket app makes users write down a booking code on one screen and type it in three screens later. Which principle does this break?

Question 5 of 5

What does the GOMS family of models do?

← Previous topicNext topic →