Book "python programming patterns". anybody read this??

Cliff Wells logiplexsoftware at earthlink.net
Fri Dec 28 16:12:59 EST 2001


On Mon, 24 Dec 2001 06:59:21 +1100
"Peter Milliken" <peter.milliken at gtech.com> wrote:

> Generally the standard of maintenance programmer is just
> not as good as developers (otherwise they would be developing, wouldn't
> they? :-)) and so it is a well recognised tenant that I attempt to follow
-
> code for the lowest common denominator. 

Ugh!  That hits a little too close too home for me.  While it sounds
reasonable, it flies in the face of my current situation:  I'm forced to
maintain thousands of lines of C code written by a man who was clearly very
intelligent but a horrible programmer.  He knew what he needed to do but
didn't bother to learn the common idioms of C.  I understand he learned C
by reading a book on an airplane trip.

<bitch> 

Worse, since he was "developing" this system, he of course ran into
unexpected customer demands (as will anyone), but rather than rework the
system to support these extensions, he hacked them into place using #if
defined(SOME_CUSTOMER).  These often appear in the middle of functions that
span literally hundreds of lines.  Global variables abound.  Maybe
one-third of the functions have correct prototypes.  When I started work
porting this mess to gcc, I got over 7000 warnings and errors.  Fixing many
of these resulted in /more/ warnings.  I discovered that he was simply
redirecting any non-fatal warnings in his build process to a file so they
wouldn't clutter his screen.  

</bitch>

Anyway, my point is, I think your statement is unfounded.  There are
undoubtedly cases where what you said is true, but to assume it's the
common case is wrong - especially when you consider that many people
(myself included) learned to program by developing applications, so the
quality of coding in those apps is poor (I would probably cringe if I were
to review code I wrote 10 years ago - some poor sod is probably cursing me
right now as he tries to decipher some mess I wrote =)

Besides, applications are often written without  a good specification (or
only a very basic one) so the developer is left winging it, adding
features, learning new toolkits, etc, until the original architecture is
obscured beyond comprehension.  Take a look at many of the open-source
projects around and you'll often find that one of the first things
"maintainers" do upon acquiring a system is recode large portions of it to
make it more readable/maintainable, etc. 

That said, I don't disagree with your tenant of coding for the LCD.  While
not always possible, it's good to keep in mind when one is tempted to write
"clever" code =)

Regards,

-- 
Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308




More information about the Python-list mailing list