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,15890893c0618a8a X-Google-Attributes: gid103376,public From: Bob Crispen Subject: Re: [Q] Tools for Ada Quality and Style Date: 1996/04/30 Message-ID: <9604301327.AA12571@eight-ball>#1/1 X-Deja-AN: 152225337 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU newsgroups: comp.lang.ada Date: 1996-04-30T00:00:00+00:00 List-Id: Robert Dewar sez: >Bob Crispen was looking for pretty printing tools to enforce a standard. Uh, no, actually I was *offering* a rather limited set of pretty printing tools to someone who wanted to use them to automate a process improvement based on AQ&S. I believe you'll search in vain for any words of mine that say the way to implement this process improvement is exclusively or even chiefly through a prettyprinter. Since someone else has already said that he disagrees with me, based on your representation of what I said, I felt it was reasonably important to set the record (and my reputation) straight. And, too, it does give me an opportunity to go on a bit about style. >I must say I do not like this approach. For uniform style rules to work, >everyone has to buy into them, and buying into them means getting >completely familiar with them and not considering writing code in any >other style. > >If you rely on pretty printing tools, then there is a danger of continuing >to foster a sloppy attitude to the style rules. I believe (and I'll bet you do too) that the most important thing that can eventuate from a coding standards process is an agreement by the participants that readability is important, and that uniformity is *nearly* as important. The only negative about AQ&S is that foolish people can use it to say, "Right, this is our coding standard. We don't need to waste time on a coding standards process." Abusus non tolit usum, though. While we're at it, I'd like to offer that I'd rather use punch cards than some tools I could mention that enforce their own standards which are *not* based on our group process, and which are not based on any sort of international standard (like AQ&S), *and* which produce code that looks damned odd to these tired old eyes. No product names, because I suspect that we're just using this particular product wrong or using an obsolete version -- or perhaps this is just wishful thinking that the product I have in mind just *can't* be that bad. I think I've defined Prettyprinter Hell reasonably well, though. I've also given up on prettyprinters that have more option flags than gcc. >I *do* like tools that enforce style rules, to the extent that this is >possible. Many style rules are simply too indefinite to enforce >mechanically. Add the word "tiny" and I think we're completely in synch. Please take a peek at the two (count 'em, two) tools I pointed to on my website. One aligns colons, a tedious process whose fruit is often improved readability. The other puts reserved words in lowercase, attribute names in uppercase and everything else in mixed case, and adds or subtracts the odd space -- all acting on a single line of code (or at any rate, without reference to preceding and following lines, and without adding or taking away newlines). I respectfully suggest that the appropriate use of these tiny tools at http://hiwaay.net/~crispen/us/our_computer.html, suitably modified to reflect your way of doing things (and to fix leftover bugs ;-), might very well be just the sort of thing you described. Note that the authors of AQ&S quite rightly added "quality" to their title and to their magnificent book. In fact, they put it first. Nothing either of us has said has touched on that issue, which I think we both agree is considerably more important -- though my experience has been that people have more violent disagreements about style than about quality. And, btw, Robert, I think your bragging above about your large collection of nude gifs of Orson Welles isn't in the best taste ;-) Bob Crispen revbob@eight-ball.hv.boeing.com Speaking for myself, not my company