|P is for Practical|
What makes a comment "obnoxious"?by papidave (Pilgrim)
|on Sep 08, 2007 at 14:48 UTC||Need Help??|
papidave has asked for the wisdom of the Perl Monks concerning the following question:
While perusing Perl::Critic::TODO, I found a request for the ability to detect "obnoxious" comments, where the description given is "Prohibit Excessive Hash Marks", e.g.:
Being a bit anal-retentive on such matters, I try to make my code as elegant as possible, and would like to avoid behaviors that are "obnoxious". So I'd like to understand, what is obnoxious about a "loud" comment, if used in moderation? For context, I have only been working in Perl for about 7 years, but at this point it's my language of choice professionally, and it's not unusual for me to compose thousand-plus line files of documented code* as part of a multi-man-week project. In said projects, I delimit my functions as explicitly as possible so that the reader can scan them more quickly, e.g. :
Are strings of hashmarks "obnoxious"? Or just when you embed them into the middle of a function, so it impedes the flow?
Not wanting to take myself too seriously on this, I have initiated a poll quest (Re: poll ideas quest 2007).
* Large files happen because of large object classes, since I try to stick to "one file, one module, one class".
* Update 22-Feb-08 - removed the prototype from my example. Please retest any code you have that uses it, as its behavior may have changed. :)