comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <mcondic.nospam@acm.org>
Subject: Re: Bad coding standards
Date: Tue, 19 Dec 2000 11:36:25 -0500
Date: 2000-12-19T16:34:41+00:00	[thread overview]
Message-ID: <3A3F8E88.317C9FDB@acm.org> (raw)
In-Reply-To: 91o028$vp2$1@nnrp1.deja.com

Robert Dewar wrote:

> Yes, that is of course true, nevertheless it is an advantage
> if everyone, or at least most folks, agree on a consistent
> style, as it makes discussion easier (it has for example
> been a consistent annoyance in C that there are several
> conventions for the use of {}
>

Oh sure. If there was a well defined and accepted standard for Ada
programming in general, it is better for people to stick with that than
go off inventing something of their own for every given project. I
recall looking at the Software Productivity Consortium's efforts in this
area and adopted many of the style guides in my efforts. However, my
comment to my boss at that time was: "Nice standard. I'd really hate to
get audited against it though." That pretty much burried it for our
projects. Just way too much detail for being enforceable. I circulated
it with other developers and strongly recommended that they look it over
and try to utilize it. I just didn't want an internal or external
auditor to start going through reams of our code and ding us at every
violation. That can get very costly and all you're doing is dealing with
cosmetic things that don't impact The Bottom Line as much as a slipped
delivery date would.

IMHO, if you have a style guide that can be written in - say - oh... ten
pages or less? - then you probably have something that can reasonably be
utilized and enforced on a project. The SPC's style guide was well over
this page limit.

>
> The fact that indentation is strongly suggested by the RM
> has meant that pretty much everyone uses the same indentation
> style, which is an advantage.
>

Definitely. Syntactically, Ada tends to indent better than C/C++ -
especially when you look at the kinds of "tricks" that your garden
variety C programmer likes to pull. (Doing all the work of a loop in the
iteration scheme, for example) The standard sets an example which
generally tends to get followed. But I've seen programs where
indentation may vary from 2..3..4 spaces. No clear agreement about how
many are required. Does it matter? Maybe a little. Are other ARM
conventions important - such as character case or where to break long
statements or parameter lists, etc? I think that most Ada code I've seen
tends to at least be reminicent of the ARM, but some of the code
examples there are not to my liking and I wouldn't blame developers for
establishing different ones. We may never get full agreement on what
style looks best, so I'd still go with at least having a consistent
standard on a project by project basis. And the standard should not be
long or rigid or it simply won't get followed. (Remember "The
Mandate"... :-)

MDC
--
======================================================================
Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/
Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m
Visit my web site at:  http://www.mcondic.com/

    "Giving money and power to Government is like giving whiskey
    and car keys to teenage boys."

        --   P. J. O'Rourke
======================================================================





  reply	other threads:[~2000-12-19 16:36 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-14  2:32 Bad coding standards Beard, Frank
2000-12-14 12:19 ` Robert Dewar
2000-12-14 13:03   ` OT ae [was Re: Bad coding standards] Philip Anderson
2000-12-14 14:08     ` Ken Garlington
2000-12-14 14:19   ` American English (was: Bad coding standards) John English
2000-12-14 15:07     ` Graeme
2000-12-15 13:16       ` The Design Zone (was Re: American English) Marc A. Criley
2000-12-14 15:14     ` American English (was: Bad coding standards) Marin David Condic
2000-12-14 17:38     ` Brian Rogoff
2000-12-15 16:12       ` John English
2000-12-14 14:03 ` Bad coding standards Ken Garlington
2000-12-14 20:14   ` Robert Dewar
2000-12-15  1:10     ` Ken Garlington
2000-12-18 16:09     ` Tucker Taft
2000-12-18 18:59       ` Marin David Condic
2000-12-18 22:20         ` Georg Bauhaus
2000-12-19 15:51           ` Tucker Taft
2000-12-19 16:12             ` Marin David Condic
2000-12-19 16:01           ` Robert Dewar
2000-12-19 15:49         ` Robert Dewar
2000-12-19 16:36           ` Marin David Condic [this message]
2000-12-20  1:52             ` Ken Garlington
2000-12-20 12:58               ` Marin David Condic
2000-12-20 14:27                 ` Ken Garlington
2000-12-21 23:19                   ` Marin David Condic
2001-01-03 19:49                     ` Wes Groleau
2001-01-06 19:45                       ` Lao Xiao Hai
2000-12-20 11:56             ` Mario Amado Alves
2000-12-19 18:05           ` Larry Kilgallen
2000-12-19 15:42       ` Robert Dewar
2000-12-15  0:52 ` Georg Bauhaus
  -- strict thread matches above, loose matches on Subject: below --
2000-12-19 17:46 Beard, Frank
2000-12-15  5:00 Beard, Frank
2000-12-15 14:14 ` Ken Garlington
2000-12-16  1:28 ` Robert Dewar
2000-12-18 20:00 ` Robert L. Spooner
2000-12-13 22:23 Beard, Frank
2000-12-13 23:56 ` Ken Garlington
2000-12-14  0:37   ` Ken Garlington
2000-12-14  4:08 ` Robert Dewar
2000-12-14 14:06   ` Ken Garlington
2000-12-14 20:15     ` Robert Dewar
2000-12-15  5:55 ` Keith 
     [not found] <910u3p$v9j$1@nnrp1.deja.com>
     [not found] ` <3A3445A8.8FC404D5@acm.org>
     [not found]   ` <912ut9$fga$1@nnrp1.deja.com>
2000-12-12  4:56     ` constant string array Jeff Carter
2000-12-12 20:57       ` Beard, Frank
2000-12-13  0:39         ` Robert Dewar
2000-12-13  2:02           ` Beard, Frank
2000-12-13  2:33             ` Robert Dewar
2000-12-13  2:55               ` Beard, Frank
2000-12-13  4:00                 ` Ken Garlington
2000-12-13 13:38                   ` Bad coding standards Marc A. Criley
2000-12-13 13:54                     ` Ken Garlington
2000-12-13 20:55                     ` David Emery
2000-12-14 13:07                       ` Robert Dewar
2000-12-14 14:21                         ` Ken Garlington
2000-12-15  0:08                           ` Wayne Magor
2000-12-15  1:40                             ` Ken Garlington
2000-12-15  3:18                         ` DuckE
2000-12-15  4:45                           ` Ed Falis
2000-12-15 15:44                           ` Robert C. Leif, Ph.D.
2000-12-15 16:34                             ` Ted Dennison
2000-12-16  6:08                               ` Robert C. Leif, Ph.D.
2000-12-16  1:16                             ` Robert Dewar
2000-12-16  1:19                             ` Robert Dewar
2000-12-17  5:49                               ` Robert C. Leif, Ph.D.
2000-12-17  8:24                                 ` Robert Dewar
2000-12-15 15:56                       ` Charles H. Sampson
2000-12-15 20:43                         ` Wayne Lydecker
2000-12-16  4:31                           ` Ken Garlington
2000-12-16 11:36                           ` Robert Dewar
2000-12-15 21:36                         ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox