Re: software with surprising depths of superficiality

[prev] [thread] [next] [lurker] [Date index for 2003/08/28]

From: David Cantrell
Subject: Re: software with surprising depths of superficiality
Date: 21:52 on 28 Aug 2003
Simon Wistow wrote:

> Currently it is a rag tag collection of shell and Perl scripts. Some of 
> the Perl scripts obviously used to be shell scripts to the extent that 
> they actually SHELL OUT TO OTHER PERL SCRIPTS.

Gosh, that sounds familiar. [looks around, hopes $colleague isn't on 
this list] One of the many things on my to-do list at work is replacing 
such an abortion.  Well, actually it's to re-jig it so that it does a 
whole bunch more, but I'm damned if I'm hacking on that mess, so a 
re-write it is.  And the re-write will not involve any of that XML crap.

But in the mean time, I have far more interesting things to do, thank 
$deity.

> 2. It's amazingly hard to follow. 
> There are several reasons for this?- my particular favourite being the
> lack of indenting, the terse variable names, the overuse of hash
> references (which are normally fine but become incredibly difficult to
> follow when nested 8 deep 

Are deeply nested data structures that naughty?  With sensible keys I 
find them easy to use, even if you do things like ...

$foop->{boing}->{$foop->{wibbles}->{$wibble}}

Provided the keys are sensible - which does not preclude being terse - I 
see little to be gained from creating temporary variables to hold the 
individual bits of that just to make that one little bit of data access 
shorter.  It certainly won't make the code easier to read IMO.

-- 
David Cantrell | Benevolent Dictator | http://www.cantrell.org.uk/david

   " Norton Wipe Info uses hexadecimal values to wipe files.  This
     provides more security than wiping with decimal values. "
             -- from the manual of Norton Systemworks 2002, pg 160

Generated at 14:02 on 01 Jul 2004 by mariachi 0.52