Presenting the user with many error messages is often a sign of a shortcoming in your program. Your goal should be to provide enough functionality to make most error messages unnecessary by preventing the user from making errors in the first place. It is always better to prevent an error than to report it. The most common ways of preventing errors are
TIP
Prevent invalid input to eliminate error messages.
What if you can't prevent the error? Another possibility is to fix the problem automatically. This is a good approach if
For example with Microsoft Word, if I type hte, Word automatically replaces it with the. It is fairly safe to assume that the user doesn't want to create a document with typos in it, so you can be sure this is what the user wants to happen. It is obvious when the automatic change occurs because the user can see the text change. If correctly implemented, there should be a fixed time lapse between the typo and the change so that the change is obvious even on the fastest computer. Lastly, the user can easily override the change. If the user then replaces the with hte, Word leaves it alone. Alternatively, the user can override the change with the Undo command. If the user never wants to do this change at all, he can remove this word from the AutoCorrect list.
TIP
If you fix problems automatically, make it obvious.
If you don't satisfy these three requirements, you run the risk of automatically "fixing" problems incorrectly and with potentially disastrous consequences.
TIP
Use automatic features to help the user, but leave the user in control.