The *ART* of Computer Programming
David Elliott
dce at smsc.sony.com
Sat Mar 3 14:59:38 AEST 1990
In article <18084 at rpp386.cactus.org> jfh at rpp386.cactus.org (John F. Haugh II) writes:
>Moral is, always put your best algorithm forward ;-)
Not only that, but think about maintainers.
I spent my first 3 years out of college fixing bugs in and generally
cleaning up Unix code from BSD, AT&T, and just about every other
place imaginable.
It may sound like a simple style issue, but putting braces inside of
things like "if" statements can really help out the person fixing
your broken code.
Another thing: If you use the shell by any method, learn how to use it.
I don't know how many times I've had to fix things like
grep $* /usr/local/lib/phones
and
sprintf(buf, "/foo/bar %s", file_given_by_user);
system(buf);
(If you don't know why these examples are broken, learn!)
--
David Elliott
dce at smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"...it becomes natural, like a third sense." -- Homer Simpson
More information about the Comp.unix.wizards
mailing list