code quality

Mike Lutz mjl at ritcv.UUCP
Sun Oct 13 00:24:01 AEST 1985


In article <2012 at brl-tgr.ARPA> glenn at LL-XN.ARPA (Glenn Adams) writes:
>... It is on this aesthetic level that code is often judged fish
>or fowl.  But, one may argue that code really doesn't "work" when it "looks"
>bad.  This often comes into play when someone, usually not the original
>author, must "look" at such code, and "fix" it.  Usually, the "fix" involves
>serious mastication resulting in a different "look" found to be more pleasing
>to the person performing the "fix".

Of course anyone who doesn't follow *my* style is a troglodyte (and probably
a tool of the military-industrial complex to boot) ;-)

My rule-of-thumb in fixing others' code is to adopt whatever style they
used so that the result is at least consistent.  If there is no
identifiable style (unfortunately, true of all too many student
programs), or the style makes me ill, I rearrange *everything* to
follow *my* style.

This isn't a perfect solution, especially if I rearrange code that
comes from the net, and later see "diff listing" bug fixes.  So, I
rearrange as infrequently as my highly discriminatory aesthetics
permit.  The result: tempering of my professional hubris.
-- 
Mike Lutz	Rochester Institute of Technology, Rochester NY
UUCP:		{allegra,seismo}!rochester!ritcv!mjl
CSNET:		mjl%rit at csnet-relay.ARPA



More information about the Comp.unix.wizards mailing list