>>>>> "BR" == Bob Rogers <[EMAIL PROTECTED]> writes:
BR> The Parse sub is a prime example of what I would consider BR> counterproductive code decoration. It violates the first rule of BR> commenting, namely that comments should say something about the code BR> that is not obvious: as i said, i am ashamed of the code quality. i have worked on coding rules (and espoused them often around boston.pm) and the one that applies here is "code is what, comments are why". and i broke it completely here. i was probably so much into getting my perl5 stuff that i wrote lousy comments. BR> The vertical space is mostly wasted, since the line count has been BR> doubled with mostly redundant comments, and redoubled it with equally BR> pointless blank lines. The last comment that pertains to a sub call is BR> the only one that actually adds information that can't be deduced from BR> the sub name. In fact, you'd have been better off if you had used the BR> comment text as the sub names: i agree. horrible code. :) and the names could be better as well. as i said, it needs a full rewrite but it still shows some interesting ideas. but no one wants another arg parser even if it might be better. then again, i wrote a specialized one for stem and i know of several others outside of getopt::* BR> Even so, I have cut the number of lines in half without losing much BR> information (if any), which means the information density is twice as BR> high. If done for the rest of the code, I suspect the amount of BR> scrolling I would need in order to study it would be cut by more than BR> half. And less time scrolling means more time reading, which ought to BR> be an advantage even if you do not agree that the "condensed" version is BR> easier to read. in this case i would agree. the comments were useless and the high level calls are self documenting. in other cases, i would keep some of the vertical white space. see some of my more recent code such as in Sort::Maker for better styling IMO. the comments are why in almost all cases and aren't useless. the logic needs to be explained due to the complex nature of the data munging and code generation. uri -- Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org _______________________________________________ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm

