Thinking of the user is what prompted this post. OK, it was really about my lack of experience when it comes to lookahead assertions. However, I was thinking that the user may not be as familiar with the config files that will be managed by this application. Instead of forcing the user to know all the syntax rules for the config files, I check to make sure the syntax is correct. If it is not correct, I don't think I would want to take a guess at what the user meant. I'm not a mind reader. And if I simply accept the user input without being sure that the syntax and parameters are correct, there is a high probability that the program will fail due to the incorrect config information.
Let's say you dial a phone number and enter a 1 then area code then the number. You then get the recorded response informing you that you don't have to dial a 1 first. My guess is that you are thinking the phone company should understand that you don't know how to use a telephone and are not willing to learn. Therefore they should just connect you to the number you dialed. OK. Perhaps you misdialed the area code and you really did have to dial a one. Well now the phone company has connected you but not to the number you dialed and not to the number you intended to dial. Now two people are frustrated (you and the person you just disturbed for no reason).
I think it is very important that we understand most people will say the same thing in different ways. At the same time, we must understand that many software applications only understand the information if it is presented in a specific manner. I'm, sorry if this is offensive to you but I will never trust the user input implicitly and will always strive to be sure the data conforms to its pre-defined parameters.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.