Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • It's more of a problem in a language like Perl where the source is available and inspectable at runtime. Imagine if your webhost (or sysadmin) accidentally changes the error reporting behavior to allow exceptions to become visible to the user, and now they see the few lines of code around the exception... and it says something they find offensive or unprofessional. Heck, what if it says:

    # The following code is totally insecure and we
    # probably lose lots of customer credit card
    # info because of it!
    I try to always write comments with the assumption that someone will see them who should not. So:

    # The code below should be rewritten to avoid
    # format injections.  (see #1234)
    In, say, C, this is less of a problem because comments have been stripped already and the people who see opened source are different than the people who see the interface.

    As for the f-bomb (and associated ordinance), there's a more pragmatic reason to avoid it. Once, I saw someone accidentally commit profanity to a page and push it into production; it was an accident, the equivalent of leaving debugging statements in code. Obviously, it would've been just as useful to the designer to write "IT WORKS" as to write "IT FUCKING WORKS" (or whatever), but it didn't occur to him that it might get into production.

    With something like t/bowdlerize.t, you can fail a test if any source file contains bad words. Testing for this made me realize that some proprietary JavaScript code that we'd bought contained a functioned called something like eliminate_stupid_fucking_khtml_bug -- good work, guys!

    It's funny, even though I'm a coder and know the urge to write something like that, I immediately had a gut reaction that the authors were less professional than I had thought. Huh!