On Thu, Oct 10, 2002 at 10:15:01PM -0400, Matthew Brooks wrote:
> GREG: Check out Kurt Starsinic's B::Fathom module
> 
> This is what John Tobey's latest code scores:
> 
> $ perl -MO=Fathom -le'$_=1;for$n(2..9){s/\S+/$&$n $&+$n
> $&*$n/g}2002-eval||print for split'
>    48 tokens
>    15 expressions
>     7 statements
>     1 subroutine
> readability is 2.92 (very readable)

FWIW, if I catch somebody where I work doing any of the following in
real code, I will become upset and talk with him/her:

- omit all whitespace following a statement or block
- omit whitespace between "for" and a loop variable name
- use $&
- use postfix "for"
- uncommented algorithm of this complexity

The following practices would disturb me, but I might let them slide:

- eval with implicit $_
- numeric operation on the left side of ||
- assign to $_ without local($_) or an equivalent
- omit final ;
- use O(3^n) memory when O(n) will do

Obviously, I was playing golf, not trying to be readable.

Best
-John
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to