Why Error Messages Are Poorly Done

Unfortunately, error messages are often poorly done. Sometimes the message doesn't make any sense. Other times the message identifies a problem but gives no clue how to solve the problem. Occasionally the error message is completely wrong or misleading. Reasons for these problems include the following:

  • Crafting quality error messages is not a priority during program development. Just as receiving an error message while using a program breaks the user's train of thought, writing an error message while programming breaks the programmer's train of thought. As a result, programmers often write an error message as quickly as possible without giving it much thought.
  • Making sure that an error message is helpful is not a priority during quality assurance. QA testers try to find bugs and perhaps make sure that the program includes error messages when necessary, but, interestingly, finding problems in error messages doesn't receive much attention.
  • A good error message is simply hard to write. A good error message notifies the user that there is a problem, explains why the problem occurred, and recommends how to solve the problem. The message is clear, consistent, and specific. A good error message is also brief so that the user will bother to read it. Writing an error message that has all these attributes can be quite a challenge.
  • While modern exception handling makes it easy to detect problems—in fact, C++ exceptions don't give you a choice since they can't be ignored—it is often much harder to determine the true cause of the problem. While it is fairly easy to put a try statement around a block of code, it's often difficult to know all of the different exceptions that the code can receive and their significance. This difficulty often results in generic error messages that basically say, "I know I can't perform the command you gave, but I have no idea why."
  • The ability to create good error messages isn't highly regarded. It doesn't make good résumé material.

In the remainder of this chapter, I'll explore the attributes of a good error message, give you tips on how to make your error messages helpful, and give some examples of typical error message problems.



Developing User Interfaces for Microsoft Windows
Developing User Interfaces for Microsoft Windows
ISBN: 0735605866
EAN: 2147483647
Year: 2005
Pages: 334

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net