comp.lang.ada
 help / color / mirror / Atom feed
From: jcm@hgc.edu (James McKim)
Subject: Re: The Last Word on Comments (was Re: Hungarian notation)
Date: 1996/06/17
Date: 1996-06-17T00:00:00+00:00	[thread overview]
Message-ID: <1996Jun17.155645.28063@merlin.hgc.edu> (raw)
In-Reply-To: dewar.834584583@schonberg


In article <dewar.834584583@schonberg> dewar@cs.nyu.edu (Robert Dewar) writes:
>Darius said
>
>"Please excuse me for not feeling concerned about the 'ignorant' adjective,
>but I kind of disagree with you here. We try to promote an approach where
>comments should be formal as far as possible, hence, executable. Assertions
>(pre and post-conditions, etc...) are often understood as a quality insurance
>feature, while we consider it as a way for the code to express the implicit
>knowledge he (or she) has about how things are supposed to happen in
>a formal, standardized, and executable way."
>
>This seems quite bogus to me. The only kind of comments that can be
>formalized this way are rather trivial ones that say what the code does,
>and the danger of trying to formalize even these is that you end up
>overspecifying and cannot describe things at the right level of

Based on previous posts of yours I suspect you didn't think this one all
the way through. Comments that describe what the code does without giving 
away how it does it are hardly trivial or bogus. In fact these are the 
basis for information hiding and specified public interfaces of classes.
You _must_ provide these kinds of comments if you expect people to use
your class correctly without actually looking at your code. Overspecifying
(and underspecifying for that matter) is a danger whether the comments 
are compilable or not. OTOH, one of the many advantages of compilable specifications is that it is often trivial to discover when a change in
the code has introduced an error wrt the spec.
  

>abstraction. For example, a comment that says
>
>  "Give the error message now, in case later processing bombs, to be sure
>   that the error message will be seen"
>
>is not easily formalized. Actually this comment has two parts. The first
>is the "what" [give error message now) and that is rather trivial, it may
>help by abstracting what is there but it still is nly saying what the code
>is doing. The rest of the comment is the WHY
>
>The WHY is a critical part of comments, and good WHY comments are what to
>me distiguishes good code. To the extent that the no-comment or lo-comment
>school wants to eliminate WHY comments, they are damaging code quality in
>my opinion.
>
>Even more subtle, and difficult to formalize, but often crucial is he
>the WHY NOT comment (why you didn'
>t do something).

I agree that the above are important and are not easily formalized and
I didn't catch the original article, but I doubt that Darius was arguing 
that compilable pre/postconditions be the _only_ form of documentation.
I think you (Robert) are concentrating too much on documentation that
is useful only to the implementors, present and future, of the software.
Rigorous assertions are useful to both implementors _and clients_ of a
class. Continuing to think as a client, in addition to the above I would 
want documentation showing me sample uses of the class in question, yet
another form that would be difficult to formalize.

Hope this helps,
-- Jim

>


-- 

*------------------------------------------------------------------------------*
Jim McKim  (860)-548-2458     Co-editor of Eiffel Outlook 
Internet:  jcm@hgc.edu        Subscribe early and often!




  reply	other threads:[~1996-06-17  0:00 UTC|newest]

Thread overview: 216+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4adem2$b5s@mercury.IntNet.net>
     [not found] ` <4ahka7$o9m@inrou.erno.de>
1996-05-13  0:00   ` Hungarian notation Roger Merritt
1996-05-14  0:00     ` David Priest
1996-05-14  0:00     ` The Right Reverend Colin James III
1996-05-15  0:00       ` Graham Perkins
1996-05-15  0:00         ` Peter Seebach
1996-05-16  0:00           ` Pete Becker
1996-05-14  0:00     ` Keith Whittingham
1996-05-14  0:00       ` Peter Seebach
1996-05-14  0:00         ` Pete Becker
     [not found]           ` <4ndb2j$1p0q@uni.library.ucla.edu>
1996-05-16  0:00             ` Scott
1996-05-16  0:00               ` Giuliano Carlini
1996-05-18  0:00                 ` Warren Young
1996-05-16  0:00             ` Steve Branam
1996-05-16  0:00             ` Mark Chu-Carroll
1996-05-16  0:00               ` Jay Martin
1996-05-17  0:00                 ` Scott
1996-05-23  0:00                 ` G.O.Visser
1996-05-16  0:00         ` Matt Kennel
1996-05-14  0:00       ` Dave Mikesell
1996-05-14  0:00       ` Dr S.J. Harris
1996-05-15  0:00         ` Gerolf Wendland
1996-05-16  0:00           ` mAg
1996-05-17  0:00             ` Arne W Flones
1996-05-21  0:00               ` Norman L. Reitzel   
1996-05-21  0:00                 ` Bob Rodgers
1996-05-22  0:00                   ` Matt Kennel
1996-05-23  0:00                     ` Steve Willer
1996-05-23  0:00                       ` Richard A. O'Keefe
1996-05-23  0:00                         ` Steve Willer
1996-05-23  0:00                     ` Bob Rodgers
1996-05-23  0:00                       ` Peter Seebach
1996-05-22  0:00                   ` Slander (was: Hungarian notation) Graham Perkins
1996-05-23  0:00                     ` Richard A. O'Keefe
1996-05-24  0:00                       ` Tucker Taft
1996-05-22  0:00                   ` Hungarian notation Michael Furman
1996-05-23  0:00                   ` Peter Moylan
1996-05-21  0:00                 ` Richard A. O'Keefe
1996-05-22  0:00                   ` Peter Moylan
1996-05-23  0:00                     ` Robert Dewar
1996-05-23  0:00                       ` Steve Willer
1996-05-28  0:00                         ` Richard A. O'Keefe
1996-05-29  0:00                           ` Kevin Cline
1996-05-24  0:00                       ` Kevin Cline
1996-05-25  0:00                         ` Steve Willer
1996-05-25  0:00                           ` Hungarian notation: the thread of choice for consummate boors The Right Reverend Colin James III
1996-05-27  0:00                             ` Ken Nicolson
     [not found]                             ` <HFsHoD96w165w@bwalk.dm.com>
1996-05-28  0:00                               ` Jon Hornstein
1996-06-05  0:00                         ` Hungarian notation Ralph Silverman
1996-06-06  0:00                           ` Richard A. O'Keefe
1996-06-06  0:00                           ` James McKim
1996-06-07  0:00                             ` Ralph Silverman
1996-05-24  0:00                       ` Jeff Dege
1996-05-26  0:00                       ` Warren Young
1996-05-23  0:00                     ` Andy Ho-Fan Chan
1996-05-23  0:00                       ` Robert Dewar
1996-05-24  0:00                         ` Bob Rodgers
1996-05-24  0:00                         ` Robert A Duff
1996-05-28  0:00                           ` Richard A. O'Keefe
1996-05-28  0:00                             ` Jeff Dege
1996-05-28  0:00                             ` Janus
1996-05-29  0:00                             ` Chris Kuan
1996-05-29  0:00                               ` Bob Rodgers
1996-05-30  0:00                                 ` Chris Kuan
1996-05-29  0:00                             ` Michael Furman
1996-05-31  0:00                               ` Richard A. O'Keefe
1996-05-31  0:00                                 ` Commenting (was Re: Hungarian notation) Alan Bowler
1996-05-31  0:00                                   ` Robert Dewar
1996-06-03  0:00                                     ` Ken Garlington
1996-06-01  0:00                                 ` Hungarian notation Warren Young
1996-06-01  0:00                                 ` Steve Willer
1996-06-03  0:00                                   ` Warren Young
1996-05-31  0:00                             ` Will Rose
1996-06-05  0:00                               ` Ralph Silverman
1996-06-07  0:00                                 ` Michael Furman
1996-06-01  0:00                             ` Heinz Hemken
1996-06-02  0:00                               ` Matt Kennel
1996-06-02  0:00                               ` Jeff Dege
1996-06-05  0:00                               ` Ralph Silverman
1996-06-06  0:00                                 ` Jeff Dege
1996-05-27  0:00                       ` Peter Moylan
1996-05-27  0:00                         ` Jeff Dege
1996-05-27  0:00                           ` The Amorphous Mass
1996-05-28  0:00                             ` Jeff Dege
1996-05-28  0:00                               ` The Amorphous Mass
1996-05-29  0:00                               ` Comments was: " Bob Lang 3P21 x3172
1996-05-30  0:00                                 ` Kevin Cline
     [not found]                           ` <4odgjh$6o@carrera.intergate.bc.ca>
1996-05-28  0:00                             ` try to run this! - try_me.exe [3/4] Otmar Conradus
1996-05-28  0:00                       ` Hungarian notation Richard A. O'Keefe
1996-05-31  0:00                         ` The Last Word on Comments (was Re: Hungarian notation) Clark L. Coleman
1996-06-03  0:00                           ` Robert A Duff
1996-06-13  0:00                             ` Kevin D. Quitt
1996-06-13  0:00                               ` Richard Riehle
1996-06-15  0:00                                 ` Train
1996-06-18  0:00                                 ` Sandy McPherson
1996-06-18  0:00                                   ` David Zink
1996-06-19  0:00                                     ` Michael Furman
1996-06-20  0:00                                       ` Robert Dewar
1996-06-23  0:00                                         ` David Zink
1996-06-23  0:00                                           ` Robert Dewar
1996-06-28  0:00                                         ` Ralph Silverman
1996-06-28  0:00                                           ` Robert Dewar
1996-07-11  0:00                                             ` Ralph Silverman
1996-07-11  0:00                                               ` Robert Dewar
1996-07-12  0:00                                               ` steidl
1996-07-12  0:00                                                 ` Peter Seebach
1996-07-12  0:00                                                 ` Robert Dewar
1996-06-29  0:00                                           ` steidl
1996-06-29  0:00                                           ` Lawrence Kirby
1996-06-20  0:00                                   ` The Last Word on Comments (was Re: Hun Ian Ward
1996-06-05  0:00                           ` The Last Word on Comments (was Re: Hungarian notation) Peter Moylan
1996-06-05  0:00                             ` Mike Fulton
1996-06-05  0:00                               ` Shane Badham
1996-06-13  0:00                                 ` Steve Sobol
1996-06-14  0:00                                   ` Re-designing CS (long) (Was: Re: The Last Word on Comments) Warren Young
1996-06-21  0:00                                   ` Re-designing CS (long) Warren Young
1996-06-24  0:00                                     ` Brian J. Quandt
1996-06-05  0:00                               ` The Last Word on Comments (was Re: Hungarian notation) Steve Howard
1996-06-06  0:00                                 ` Jeff Dege
1996-06-06  0:00                               ` Bob Lang 3P21 x3172
1996-06-08  0:00                             ` Bill Hay
1996-06-11  0:00                               ` Derek Lee Beatty
1996-06-11  0:00                           ` Darius Blasbans
1996-06-11  0:00                           ` Darius Blasbans
1996-06-11  0:00                           ` Darius Blasbans
1996-06-11  0:00                           ` Darius Blasbans
1996-06-11  0:00                           ` Darius Blasbans
1996-06-11  0:00                             ` Kevin J. Weise
1996-06-13  0:00                               ` Kevin Cline
1996-06-13  0:00                               ` Kevin D. Quitt
1996-06-12  0:00                             ` Robert Dewar
1996-06-17  0:00                               ` James McKim [this message]
1996-06-18  0:00                                 ` Robert Dewar
1996-06-06  0:00                       ` Hungarian notation Sam Hunting
1996-06-06  0:00                       ` Ralph Silverman
1996-06-06  0:00                         ` David Hopkins
1996-06-07  0:00                         ` Richard A. O'Keefe
1996-06-07  0:00                           ` Steve Willer
1996-06-10  0:00                             ` Michael Furman
1996-06-12  0:00                               ` Warren Young
1996-06-07  0:00                         ` Hungarian notation (an aside) Bob Lang 3P21 x3172
1996-06-11  0:00                       ` I wish it was "The Last Word on Comments (was Re: Hungarian notation)" Blair MacIntyre
1996-06-03  0:00                     ` Hungarian notation Norman H. Cohen
1996-06-10  0:00                 ` Ralph Silverman
1996-05-18  0:00             ` Richard Riehle
1996-05-23  0:00             ` Robert I. Eachus
1996-05-23  0:00             ` James Kanze US/ESC 60/3/141 #40763
1996-05-23  0:00               ` Paul J. Kossick
1996-05-25  0:00                 ` Raoul De Kezel
1996-05-23  0:00             ` Laurent Guerby
1996-05-23  0:00               ` Please keep Hungarian notation thread OUT of comp.lang.modula3 Tim Mann
1996-06-05  0:00             ` Hungarian notation Ralph Silverman
1996-06-05  0:00               ` jthorpe
1996-06-06  0:00               ` Richard A. O'Keefe
1996-06-07  0:00                 ` Chris Kuan
1996-06-07  0:00                 ` Ralph Silverman
1996-06-07  0:00                   ` The Amorphous Mass
1996-06-10  0:00                   ` Michael Furman
1996-06-11  0:00                   ` Richard A. O'Keefe
1996-06-11  0:00                     ` Kevin Cline
1996-06-11  0:00                       ` Ralph Silverman
1996-06-11  0:00                       ` Chris Engebretson
1996-06-12  0:00                       ` Bob Rodgers
1996-06-12  0:00                         ` Matt Kennel
1996-06-13  0:00                           ` Jeff Dege
1996-06-13  0:00                           ` Giuliano Carlini
1996-06-22  0:00                       ` Richard Green
1996-06-11  0:00                     ` Will Rose
1996-06-05  0:00           ` Ralph Silverman
1996-05-16  0:00       ` Dave Toland
1996-05-21  0:00       ` mAg
1996-05-21  0:00         ` Bob Lang 3P21 x3172
1996-05-21  0:00         ` Peter Seebach
1996-05-23  0:00           ` Steve Willer
1996-05-23  0:00             ` Richard A. O'Keefe
1996-05-23  0:00               ` Robert Dewar
1996-05-28  0:00                 ` Richard A. O'Keefe
1996-05-23  0:00               ` Train
1996-05-23  0:00                 ` jeffos2
1996-05-23  0:00               ` Bob Rodgers
1996-05-23  0:00                 ` Bob Kitzberger
1996-05-23  0:00             ` Robert Dewar
1996-05-24  0:00               ` Steve Willer
1996-05-24  0:00               ` slary61
1996-05-24  0:00                 ` Jos A. Horsmeier
1996-05-26  0:00                   ` Richard Riehle
1996-05-27  0:00                     ` Warren Young
1996-06-03  0:00                     ` Eva
1996-05-28  0:00                   ` Paul D. DeRocco
1996-05-24  0:00                 ` Jeff Dege
1996-05-24  0:00                 ` Dave Toland
1996-05-24  0:00                 ` Jerry Kuch
1996-05-24  0:00                 ` Ian Ward
1996-05-27  0:00                 ` Norman L. Reitzel   
1996-05-27  0:00                   ` Matt Kennel
1996-05-28  0:00                 ` Richard A. O'Keefe
1996-05-28  0:00                   ` Jay Martin
1996-05-29  0:00                     ` Richard A. O'Keefe
1996-06-01  0:00                     ` Michael Feldman
1996-05-29  0:00                 ` AJ Musgrove
1996-06-05  0:00                 ` Ralph Silverman
1996-06-06  0:00                 ` Ralph Silverman
1996-05-23  0:00             ` Peter Seebach
1996-05-21  0:00         ` Mark A Biggar
1996-05-21  0:00           ` slary61
1996-05-24  0:00         ` Oleg Kagan
1996-06-05  0:00           ` Ralph Silverman
1996-05-23  0:00     ` James Kanze US/ESC 60/3/141 #40763
1996-05-28  0:00     ` Homonnai Misi
1996-05-28  0:00     ` Brian Rogoff
1996-05-20  0:00   ` James Kanze US/ESC 60/3/141 #40763
1996-05-20  0:00     ` Tom Wheeley
1996-05-23  0:00     ` Steve Willer
1996-05-22  0:00   ` James Kanze US/ESC 60/3/141 #40763
1996-05-23  0:00   ` James Kanze US/ESC 60/3/141 #40763
1996-05-23  0:00     ` Richard Kenner
1996-06-01  0:00   ` Jim Kingdon
replies disabled

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