Prevent Errors

本文探讨了如何通过改进用户界面设计来减少错误输入的发生。提出的方法包括提供日期选择器而非让用户自由输入日期、接受多种格式的日期输入、使用提示帮助用户正确输入数据、设置合理的默认值以及增加系统的容错能力。理解用户的思维模式对于设计更加友好的交互至关重要。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Prevent Errors

Giles Colborne

ERROR MESSAGES are the most critical interactions between the user and the rest of the system. They happen when communication between the user and the system is near the breaking point.
It is easy to think of an error as being caused by a wrong input from the user. But people make mistakes in predictable, systematic ways. So it is possible to “debug” the communication between the user and the rest of the system just as you would between other system components.
For instance, say you want the user to enter a date within an allowed range. Rather than letting the user enter any date, it is better to offer a device such as a list or calendar showing only the allowed dates. This eliminates any chance of the user entering a date outside of the range.
Formatting errors are another common problem. For instance, if a user is pre- sented with a Date text field and enters an unambiguous date such as “July 29, 2012,” it is unreasonable to reject it simply because it is not in a preferred format (such as “DD/MM/YYYY”). It is worse still to reject “29 / 07 / 2012” because it contains extra spaces—this kind of problem is particularly hard for users to understand, as the date appears to be in the desired format.
This error occurs because it is easier to reject the date than parse the three or four most common date formats. These kinds of petty errors lead to user frus- tration, which in turn lead to additional errors as the user loses concentration. Instead, respect users’ preference to enter information, not data.
Another way of avoiding formatting errors is to offer cues—for instance, with a label within the field showing the desired format (“DD/MM/YYYY”). Another cue might be to divide the field into three text boxes of two, two, and four characters.
132 97 Things Every Programmer Should Know

Cues are different from instructions: cues tend to be hints; instructions are verbose. Cues occur at the point of interaction; instructions appear before the point of interaction. Cues provide context; instructions dictate use.
In general, instructions are ineffective at preventing error. Users tend to assume that interfaces will work in line with their past experience (“Surely everyone knows what ‘July 29, 2012’ means?”). So instructions go unread. Cues nudge users away from errors.
Another way of avoiding errors is to offer defaults. For instance, users typically enter values that correspond to today, tomorrow, my birthday, my deadline, or the date I entered last time I used this form. Depending on context, one of these is likely to be a good choice as a smart default.
Whatever the cause, systems should be tolerant of errors. You can facilitate this by providing multiple levels of undo to all actions—and, in particular, actions that have the potential to destroy or amend users’ data.
Logging and analyzing undo actions can also highlight where the interface is drawing users into unconscious errors, such as persistently clicking on the “wrong” button. These errors are often caused by misleading cues or interac- tion sequences that you can redesign to prevent further error.
Whichever approach you take, most errors are systematic—the result of mis- understandings between the user and the software. Understanding how users think, interpret information, make decisions, and input data will help you debug the interactions between your software and your users.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值