From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7dd9b82cd363f55b X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Re: Coding Standards Date: 1996/05/29 Message-ID: <9605291821.AA10842@most>#1/1 X-Deja-AN: 157396279 sender: Ada programming language comments: To: info-ada%listserv.nodak.edu@vm1.nodak.edu mailer: Elm [revision: 70.85] newsgroups: comp.lang.ada Date: 1996-05-29T00:00:00+00:00 List-Id: I (Wes) wrote: >> Now if they are going to >> change it, yes, I will vigorously defend the current coding standards of >> the project. Ken Garlington then asked: >Do you defent the _current_ coding standards of the project, or the >standards under which the code was originally written? It seems to me that, >if you follow Mr. Duff's approach to coding standards, two things happen: The CURRENT standards. In maintaining and/or re-using code, I have two rules: 1. If it ain't broke, don't fix it. 2. If it ain't easy to understand, it's broke. The hard part is defining "easy" :-) Most people only want to go by rule #1; a few of us (myself included) have to be restrained from applying rule # 2 to 90 per cent of existing code! :-) >[valid objections skipped] Those objections are why I agree with you that >It seems to me that it is not a good idea to have things in coding standards >that (a) relate to the meaning of the program and (b) are not obvious >without referring to those standards. Bob Duff asked why expecting code readers to know the coding standard was different from expecting them to know the LRM. To which I (not very clearly) stated I want READERS to not need ANY outside source--not even the LRM. But WRITERS had better know the LRM, the local standards, accepted practice, and much more. >Here's one common coding standard example which I think violates this rule (and which I don't like). Many coding standards have a comment in their prologue that says: I'll spare you folks my strong opinions on unnecessary duplication. -- --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Magnavox - Mail Stop 10-40 Home: 219-471-7206 Fort Wayne, IN 46808 elm (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------