Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Regex (lookahead) Confusionby halley (Prior) |
on Feb 06, 2004 at 14:49 UTC ( [id://327090]=note: print w/replies, xml ) | Need Help?? |
Think of the UserI don't know if you're trying to balk at user-supplied information, or not, but just in case, I thought I'd rant for a minute. I am thoroughly annoyed at any web form which gives me an error like the following:
It makes me want to vote the rascals out, whenever an online tax form quibbles about dashes in government identifiers.
I want to hang up on telephone systems when they whisper this nonsense in my ear: Or conversely, The security camera is the only thing stopping me from punching an ATM which requires me to enter the extra fraction zeros, when the machine is only equipped to dispense $20 bills.
If your system can accept the input as it is, then ACCEPT THE INPUT. If your system can weed out the obviously extraneous information, then weed it out, and ACCEPT THE INPUT. If your system can weed out the extraneous information, but it might not be what the user intended, then weed it out, and ACCEPT THE INPUT. In critical cases, confirm the input with an alternative display, and allow them to re-enter the information if it was interpreted incorrectly. If your system can detect the difference between extraneous and possibly mistaken input, then show the user how your code interpreted their input, and ask for confirmation.
Lastly, I have seen people try to associate 'H' for Thursday but never 'A' for Saturday. I don't think people will remember either one reliably, especially if they're not native English writers. Think of what your users want to see and specify, not what would fit in a single letter uniquely. These clever one-letter abbreviations should just be an implementation detail, not a user interaction plan. Writing user interaction code is more labor-intensive on your part, and more demanding in terms of design consideration. However, you're going to foist any of these frustrations on each one of your users, every time they use it. In aggregate, that's a lot of frustration to dispense for just a few minutes of design time you save. Be forgiving in what you accept, and strict in what you produce. --
In Section
Seekers of Perl Wisdom
|
|