Phoenix.pm: Please help, my brain is fried
Mark Pease
Mark.Pease at motorola.com
Thu Jan 27 15:27:59 CST 2000
Kevin Buettner wrote:
>
>> > No dillemma, understandablility should always win over brevity.
>
> Yes, but which code is more understandable, code which is brief
> and to the point, or code which is heavily commented with lots
> of intermediate variables thrown in?
>
And I agree. I "code" that I use in the reply was not how I would
normally
write something. If a chunk of code is not easily self explanatory, I
first
try to re-write it, and then comment it if I can't.
If I were to write this sub to use, it would have somewhat similar to
the
one you wrote with the comments that you used, but I might not have
used the map, which seems to be the thing that confuses people. This
example is a simple used of map, so I might have done it the same way.
For the most part, I avoid map because I have spent to much time trying
to decode what I wrote two, or more, months earlier!
--
Mark Pease Mark.Pease at mototorola.com
Motorola DigitalDNA(tm) Laboratories perl at perl.sps.mot.com
2100 E. Elliot Rd. Phone:(602)413-8191 Mail Stop: AZ34 EL701
Tempe, AZ 85284 Pager:(800)381-3304 FAX:(602)413-8183
Co-Author (with Carl Dichter) of "Software Engineering with Perl"
More information about the Phoenix-pm
mailing list