Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
No. The point is, that comments CAN lie. But they usually don't.

By the same token code CAN lie -- either through complexity resulting in misinterpretation, or by function names that don't do what they say (such as a routine named die_with_errors that actually only warns). But code usually doesn't lie.

BrowserUK:
The first thing I do in most every piece of other peoples code I pick up is to throw away the comments (in a copy!). The second is to manually reformat the code to my personal preferences. The third is to 'fix' any obvious verbosities, by recoding them to use (my preferred) idiomatic constructs and discard any extraneous (used once intermediary) variables.

You're a contractor aren't you. You've broken the hippocratic oath of programming - you know - the one that says "First do no harm." At the places I work, which have been with teams of 5 to 20 perl programmers of various abilities and coding styles, that sort of attitude doesn't fly. At the very least it inflicts your choice of programming style on everybody else - even if your choice of programming style is the best. At slightly worse level it removes comments that other programmers may have been using for visual cues - even if you don't use them. Getting worse it kills CVS annotation which is actually a valuable thing to have when tracking changes. And potentially the worst is that you have refactored all of the code that was probably working just fine - now rather than testing just the broken bug, you have to test for all of the other errors that you may have introduced. Good thing you have a test suite, but sometimes you don't.

Patient: Blurp! (breathe) (wake)
Doctor: Oh - good morning glad to see you're waking up.
Doctor: How do you feel?
Patient: gack!
Doctor: Well, you're good to go now. We took care of your appendix.
Doctor: Oh and while we were in we lipo-suctioned your abdomen, removed your gall bladder, performed a bypass, refactored your nose, placed skin grafts over your tattoes, and shrunk your stomach.
Patient: But it was just my appendix.
Doctor: Don't worry. I figure you're 30 pounds lighter. Your much more refactored and simple now.
Patient: But it was just my appendix. (gasp)
Doctor: Oh - and we removed one of your kidneys.
Nurse: Doctor - he only had one kidney.
Patient: (die)


my @a=qw(random brilliant braindead); print $a[rand(@a)];

In reply to Re^2: knowing your audience by Rhandom
in thread Programming *is* much more than "just writing code". by BrowserUk

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 avoiding work at the Monastery: (7)
As of 2024-04-19 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found