Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Eons ago, when I worked in the student lab for a bunch of VMS terminals, I'd ask the approaching student "What's the problem?" and often get "I'm getting all of these errors." Only a couple of times, I responded that "If the errors are the problem, then let's get rid of those" and then typed1:

$ set message/nofac/noid/nosev/notext

and walked away and waited for "That worked great. But now I can't get it to produce the output that I want."

It is my experience that most computer users don't appear to attempt to understand the error message they are given. Ever notice that many root nodes mention that errors are produced but don't actually say anything about the contents of those errors? Many nodes don't even mention the presense of errors despite it turning out that error messages were output. Many people don't bother to include $! in their own error messages (in large part, I believe, because many people don't attempt to understand the error reasons that $! provides).

Of course, many error messages are hard to understand. So eventually giving up at trying to understand error messages is not too surprising of a result.

People turn off "use strict" because they don't understand the "noise" (a telling word choice) that results.

So you have to help people learn how they are supposed to try to understand an error message. And sometimes you just have to help them understand the specific error message that is right in front of them.

For strict, I'd show them a simple example of mistyping a variable name and provide the two ways to "fix" the error: 1) correct the spelling of the variable name, 2) comment out use strict. If they actually pick (2), then show them that the program doesn't work. More likely, they pick (1) and then you can explain that the error message was helpfully pointing out a problem and that is the purpose of error messages. Then you can discuss how pointing out mistyped variable names doesn't work unless you declare every variable you use and skipping that step only makes sense for quick hacks.

But, yes, watching people ignore error messages can get frustrating. (:

Update: And in your particular case, I suggest getting "use strict" added to the company's coding standard practices so you can just leave as soon as you see it commented out.

- tye        

1 This command turns off all parts of system error messages, which is a bit like persistently doing 2>/dev/null.

In reply to Re: On Commenting Out 'use strict;' (errors) by tye
in thread On Commenting Out 'use strict;' by Old_Gray_Bear

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-19 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found