comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@cs.nyu.edu (Robert Dewar)
Subject: Re: Language Choice and Coding style
Date: 1996/07/04
Date: 1996-07-04T00:00:00+00:00	[thread overview]
Message-ID: <dewar.836481475@schonberg> (raw)
In-Reply-To: 4rg3ph$2on4@info4.rus.uni-stuttgart.de


Peter Herman says

  "I like it to allow everyone to show his personal style.
  This is even important because the motivation is very much higher.
  They are and should keep to be individuals.
  And I like it when I see at first glance "Oh that is the typical
  style of Barbara". This holds for code production inside bodies."

Fascinating to see this point of view expressed so directly (it is I am
sure shared in practice by many programmers).

To me this "ego-centered" style of programming is deadly. It promotes a
situation where in a big project code is owned by individuals. Clearly
if you see that some code is "typical Barbara" style, then the next step
is that only Barbara touches that code, and a consequence is that only
Barbara really looks at that code.

This is not team work, this is a collection of individuals working together,
and you lose the advantages of working as a team. In particular:

   a) If Barbara starts polishing her resume, you can be in big trouble
   b) Only one pair of eyes looks at Barbara's code (other people don't
        because they have their own style they prefer to read).

Furthermore, anyone maintaining the system will find a collection of
different styles that will make it much harder to understand what is
going on.

It's certainly interesting that in the GNAT project, we work hard to achieve
the exact opposite of what Peter regards as acceptable or even desirable.
We work to get complete consistency of sources. This is partly done by
automatic tools (try turning on the -gnatg switch sometimes), and partly
by following a set of standards, which are then informally enforced by
modifications being read by multiple people. You absolutely cannot tell
who wrote code from its style, and indeed we strongly discourage the notion
of authorship (we never for example attach names to units). Sure in practice
certain people know certain code well and our informally the experts in
particular areas, but if you look at the revision histories, you will see
that all sorts of people work in all parts of the system.

In Peter's view of the world, I have too often seen the kind of code
ownership where the owner of the code resents anyone else looking at
their code, let alone modifying it. In GNAT, we strive for and generally
achieve an environment in which your reaction to someone fixing a problem
in code that you wrote is "great, one problem that *I* don't have to fix!"

As for motivation, I think Peter is quite wrong there too. We agree up
front to work as a team. We decide style rules by a vote, but once the
vote is taken that's that. Sometimes it takes a bit of time to get used
to rules. For example, I used to always WRITE_MY_IDENTIFIERS in Ada 83
upper case style (which was the Alsys coding standard), but everyone
else on the team preferred to Write_Their_Identifiers_This_Way, so I
had to change. It took a while to adjust, but now I HATE_THESE_CAPITALS
and Find_This_Style much more natural. The final result is that you
have a team that very much agrees on these style issues, and that
works together as a team. In my experience, as in sports, this team
spirit is a key factor in maintaining a high level of motivation.

Perhaps it is possible to operate a large complex project successfully
with Peter's view, but I have never seen it succeed. On the other hand,
I have seen the team view point work well, both in GNAT and other
projects I have worked on, though I have never seen a project where
the consistency of style achieved for GNAT was as pronounced.

Robert Dewar





  reply	other threads:[~1996-07-04  0:00 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-21  0:00 Language Choice and Coding style Nasser Abbasi
1996-06-21  0:00 ` Giuliano Carlini
1996-06-21  0:00 ` David Weller
1996-06-21  0:00 ` Robert Dewar
1996-06-24  0:00   ` Dr. John B. Matthews
1996-06-21  0:00 ` The Amorphous Mass
1996-06-23  0:00   ` Robert Dewar
1996-06-27  0:00     ` Adam Beneschan
1996-06-28  0:00       ` Peter Hermann
1996-06-28  0:00         ` Robert A Duff
1996-06-29  0:00           ` Samuel Mize
1996-06-29  0:00             ` Robert Dewar
1996-07-04  0:00               ` Peter Hermann
1996-07-04  0:00                 ` Robert Dewar [this message]
1996-07-05  0:00                   ` John McCabe
1996-07-05  0:00                   ` software engineering and the notion of authorship Fergus Henderson
1996-07-08  0:00                     ` Jakob Engblom
1996-07-08  0:00                       ` Fergus Henderson
1996-07-09  0:00                         ` Richard A. O'Keefe
1996-07-09  0:00                           ` Fergus Henderson
1996-07-11  0:00                           ` Paul Eggert
1996-07-08  0:00                       ` John Byerly
1996-07-08  0:00                       ` The Amorphous Mass
1996-07-08  0:00                         ` Robert Dewar
1996-07-08  0:00                     ` Peter Hermann
1996-07-15  0:00                     ` Ralph Silverman
1996-07-15  0:00                       ` Fergus Henderson
1996-07-17  0:00                       ` Robert Dewar
1996-07-19  0:00                         ` Mike Curtis
1996-07-04  0:00               ` Language Choice and Coding style Dan Evens
1996-07-04  0:00               ` John McCabe
1996-07-02  0:00             ` John McCabe
1996-07-02  0:00               ` Samuel Mize
1996-07-03  0:00                 ` Jeff Dege
1996-07-03  0:00                   ` Robert Dewar
1996-07-04  0:00                     ` Phil Howard
1996-07-04  0:00                       ` Peter Hermann
1996-07-04  0:00                     ` John McCabe
1996-07-03  0:00                 ` John McCabe
1996-06-28  0:00         ` John McCabe
1996-06-28  0:00         ` Robert Dewar
1996-07-02  0:00           ` John McCabe
1996-07-06  0:00       ` Laurent Guerby
1996-07-19  0:00       ` software engineering and the notion of authorship Andrew Gierth
1996-06-27  0:00     ` Language Choice and Coding style The Amorphous Mass
1996-06-23  0:00   ` mfinney
1996-06-23  0:00     ` Robert Dewar
1996-06-26  0:00       ` mfinney
1996-06-21  0:00 ` Louis Tribble
1996-06-21  0:00 ` Jerry van Dijk
1996-06-24  0:00   ` Adam Beneschan
1996-06-21  0:00 ` David Emery
1996-06-23  0:00 ` Darin Johnson
     [not found] ` <4qeu56$52r@news.interpath.net>
1996-06-23  0:00   ` Nasser Abbasi
1996-06-24  0:00 ` John McCabe
1996-06-24  0:00   ` Peter Hermann
1996-07-01  0:00     ` Alan Brain
1996-07-02  0:00       ` John McCabe
1996-06-24  0:00   ` Adam Beneschan
1996-06-26  0:00   ` Ian Ward
1996-06-26  0:00   ` Nasser Abbasi
1996-06-24  0:00 ` Michael R. Hartwig
1996-06-24  0:00 ` Theodore E. Dennison
1996-06-24  0:00 ` Andreas Schoter
1996-06-29  0:00 ` Rich Maggio
1996-06-29  0:00 ` Samuel Mize
1996-07-01  0:00   ` Richard A. O'Keefe
1996-07-02  0:00     ` Samuel Mize
1996-07-03  0:00       ` Robert Dewar
1996-07-08  0:00     ` ++           robin
1996-07-02  0:00 ` Nasser Abbasi
1996-07-03  0:00   ` steidl
1996-07-05  0:00     ` Samuel Mize
1996-07-06  0:00     ` N. L. Sizemore
1996-07-08  0:00       ` steidl
     [not found] ` <JSA.96Jun26141502@organon.com>
1996-07-01  0:00   ` Russel A Hill
1996-07-01  0:00     ` Robert Dewar
1996-07-08  0:00       ` Russel A Hill
1996-07-02  0:00     ` Richard A. O'Keefe
1996-07-02  0:00   ` Jon S Anthony
1996-07-03  0:00   ` Mark Eichin
     [not found] <835824850.11044.0@assen.demon.co.uk>
1996-06-27  0:00 ` Ian Ward
1996-06-27  0:00   ` John McCabe
  -- strict thread matches above, loose matches on Subject: below --
1996-07-05  0:00 Robert C. Leif, Ph.D.
replies disabled

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