I'm always leery of these "this other guys code was a mess" comments. Certainly it's sometimes (mostly?) true, but "messy" is in the eye of the beholder.
For example, I tend to use lots of temporary variables where they probably aren't needed. I've gotten negative feedback on that. I think, however, that they make the code more maintainable:
Now, the @chars and $salt variables aren't really needed, and I could have done something like:# crypt the password my @chars=(a..z,A..Z,0..9,'.','/'); my $salt= $chars[rand(@chars)] . $chars[rand(@chars)]; my $crypted=crypt($password,$salt);
which is more compact, but less readable, IMO.my $crypted = crypt( $password, join( '', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]));
I've also gotten negative feedback on code reviews for overly defensive programming, which again, adds lines of code and generally makes for more "mess". ( additional eval blocks, lots of defined() calls, etc).
In reply to Re: Tact and the Monastery
by kschwab
in thread Tact and the Monastery
by FoxtrotUniform
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |