Archive

Archive for July, 2009

Pointless error messages

Once in a while, I try to send an email in Outlook and I get an error

An internal support function returned an error.

How is this error helpful in any way?

What function and what error and what can I do about it? If you’re not going to tell me that, then why bother telling me anything?

It tells me, the user, that the email wasn’t sent, but beyond trying it again, there’s absolutely nothing useful this error tells me. It’s not telling me a reason for the error and it’s not giving me any information for improving what I did to improve the outcome the next time I try to do the same thing.


So, what do I take away from this experience as a programmer?

  • If I create an end-user type of message, I’ll try to limit the amount of technical information in the message and try to tell the user what to do to resolve the error if that is not apparent from the message itself.

    For example, for a typical end-user, a more appropriate message might have been:

    An error occurred when trying to send this message. Try sending it again.

  • If I create a more technical message, one that contains more useful information for the programmer (me), I’ll try to expose enough technical detail information so that when the message gets back to me, I’ll know where to look in my code to find the problem.

    For example, a better technical message might have been:

    Internal function XYZ returned error 1234. Please report this error detail to your developer. Try sending the message again.


Tip: You don’t need a screen shot to capture an error message

I get a lot of screen shots in my email, most of error messages. Don’t even get me started on Word documents containing 4 MB BMP screen shots and then attached to an email. Or better yet, a Word document with a bunch of screen shots, which are then discussed in the email, so I have to keep switching back and forth.

The apparently best kept secret of a standard Windows error message is that it can be captured as plain text using Ctrl+C, since at least Windows XP. This is far better for emailing off to report an error, since it produces a far smaller email message, and it allows the recipient to select and copy text.

Typically, when someone sends me an error message screen shot, the first thing I do is to search for the exact error message text in one or more places (e.g. help, KBase, forums, etc.) If the error was sent to me as a screen shot, I now have to type in the whole error message. If it was sent as text, I can simply select and copy it, reducing the time it takes and the likelihood of transcription errors.

This works for any Windows message box. For example, this line of C# code

MessageBox.Show("This is error # ZAV45273###Y: you forgot to finagle the gizmo", "ERROR");

Displays this Windows message box:

When this message box has the focus, you can press Ctrl+C to copy it, resulting in this text:

—————————
ERROR
—————————
This is error # ZAV45273###Y: you forgot to finagle the gizmo
—————————
OK  
—————————

Now, if someone sends me the text version of the above error, it’s really easy to copy the complex error number and be sure I got it right.

Can I replace my keyboard’s Scroll Lock with an Insert Lock?

I never use my keyboard’s Insert key; well, not never, but never on purpose. Usually if I use it, it’s like this:

type type type, type type type, type (accidentally hit Insert) type, type type oh man!

Then I wind up doing one of these:

  • Undo undo undo, press Insert again (intentionally this time to un-toggle over type mode), then retype what I just undid, then continue typing normally.
  • Copy what I just typed because I don’t want to lose it, then undo undo undo, press Insert again, then paste what copied from before, then continue typing normally.

So this is usually a wonderful way to derail my train of thought.

My Cyberpower PC came with this great Logitech Y-SU61 keyboard, which is quite simplistic (no extra function keys, lit-up buttons, just a nice, full size keyboard, yet light with a small footprint) and replaces the typical Insert-above-Delete key arrangement with an extra tall Delete key. I love it! When I got it, I had high hopes this would become the new keyboard standard; however, this PC and keyboard are probably around 4 years old now, so it appears a new standard has not taken root.

Yet, I’ve been to cheap and lazy to go out and buy 2 more for the other 2 PCs I use on a daily basis. When I searched for this keyboard today, it appears to be discontinued, but there must be others with this feature.

The other alternative would be some way to simply disable (like the Caps Lock and Scroll Lock keys, neither of which I ever use) or reprogram the Insert key.