What techniques can I use to always display user friendly error messages? I guess I'm looking for programming, testing, and management techniques that produce user friendly messages.
-
3Context: OS, programming framework, application type (service, standalone, web-app?) – EFraim Feb 12 '10 at 13:58
-
I mean for anything that has a "human" as a user, but you make an interesting point. I guess it would be a different API if the user was a machine – yazz.com Feb 12 '10 at 18:07
-
EFraim's point is that "friendly" has a very different meaning if the person reading it is a skilled programmer that if it is a random user. Likewise sysadmins and DBAs need different types of information from failure messages. All writing should start with an awareness of who the audience is. – dmckee --- ex-moderator kitten Feb 14 '10 at 05:18
4 Answers
Not sure what you are aiming at, but if it is user friendly:
- Speak the users language.
- Don't surprise the user.
- Provide clear exit messages (if it is a dialog).

- 31,569
- 22
- 122
- 174

- 795,719
- 175
- 1,089
- 1,143
- Always use human language, no tech speak (unless your audience is technically minded)
- Always provide the user with an action to take, even if that action is go back
- Always clearly seperate the error message from rest of the GUI e.g. modal popup window
- If you are logging errors, always provide a reference number for the user to quote if there is a direct feedback mechanism
- If the error occurs during a step-by-step process always preserve the previous selections
- If the error is one of validation, clearly explain why the user input has failed validation, display the error message next to the invalid field (not all listed at the bottom) and set focus on the invalid field

- 11,970
- 11
- 45
- 58
In addition to the answers here, I always find that keeping your error messages "calm" is helpful. Don't frighten the user by saying in big caps "THERE WAS A CRITICAL ERROR AND THE PROGRAM MUST SHUT DOWN!" The user, especially if he is not tech savvy, will think that he did something wrong and will likely freak out.
Keep your messages calm, explain the situation, and provide the user with steps to take to either correct the issue or contact someone who can.

- 7,431
- 12
- 35
- 37
This is just one part of it, but I recommend using TDD (test driven development). Write tests that expose errors and make sure that the program responds in the correct fashion.
To put it another way, emphasize the importance of error messages by making them part of your user stories.

- 31,569
- 22
- 122
- 174
-
I liked this answer the best as it says to make the error messages part of the "user stories". That way they are part of requirements, and don't get pushed to the side because of time constraints. – yazz.com Feb 12 '10 at 18:09