Coding Standards (was Re: Indentation...)

Jef Poskanzer pokey at well.UUCP
Wed Dec 14 12:36:28 AEST 1988


In the referenced message, nelson at clutx.clarkson.edu wrote:
>The general advice that I got was to, when modifying existing code,
>stick to the existing style, and when creating new code, use a
>consistent style.

Yes, I agree with that.  But I have to add one more: when modifying
existing code that does not consistently use any one style, it's a
judgement call.  If you think you can figure out what style was intended,
it may be easier to modify the code to conform to that; otherwise, you
have no choice but to modify the code to conform to your own consistent
style.

I get a lot of code sent to me for inclusion in the Portable Bitmap
package.  In almost every case, I end up modifying it to conform to my
own style.  This is *good* code, I almost never find bugs in the stuff
I get, but the indentation and punctuation usually remind me of when I
used to see how drunk I could get and still write BASIC.

A lot of good programmers think they have better things to do than get
the indentation consistent.  They are wrong, but in my case I can't be
choosy.
---
Jef

             Jef Poskanzer   jef at rtsg.ee.lbl.gov   ...well!pokey
                    Fools rush in and get the best seats.



More information about the Comp.unix.wizards mailing list