From: Uri Guttman <[EMAIL PROTECTED]>
Date: Sat, 11 Sep 2004 16:11:42 -0400
>>>>> "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.
Actually, you never used that word -- if you had, I probably wouldn't
have picked on it.
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.
I guess that brings us full circle; your original bit on whitespace:
ever heard of vertical whitespace or comments?
remember that code is what and comments are why.
was taking me to task on code that was poorly commented because of my
haste to get it posted. Haste to be dissed, as it turns out. ;-}
. . .
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
BR> is 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
I don't have much time for reading random code these days, but I will
make a point of looking up Sort::Maker to get a fair sample of your
current coding style. (But probably not before producing a next draft
of Pod::CLOD.)
-- Bob
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm