|Think about Loose Coupling|
Re^2: knowing your audienceby Rhandom (Curate)
|on May 09, 2007 at 14:51 UTC||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.
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?
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.
my @a=qw(random brilliant braindead); print $a[rand(@a)];