home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.software-eng
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!max.fiu.edu!serss0!feathers
- From: feathers@serss0 (Michael Feathers)
- Subject: Re: C CODE LAyout
- Organization: Florida International University, Miami
- Date: Tue, 15 Dec 1992 00:35:40 GMT
- Message-ID: <Bz9yzH.M97@fiu.edu>
- References: <MARTINC.92Dec11214534@hatteras.cs.unc.edu> <1992Dec14.084405@eklektix.com> <MARTINC.92Dec14120615@hatteras.cs.unc.edu>
- Sender: news@fiu.edu (Usenet Administrator)
- Lines: 32
-
- In article <MARTINC.92Dec14120615@hatteras.cs.unc.edu>
- someone, .. I_do_not_know _if_it_is_ martinc@hatteras.cs.unc.edu (Charles R. Martin) writes:
-
- > I don't see any objection to comments
- > describing difficult points, unusual constructs, etc.--although I'm led to
- > a feeling that I have, that the way to fix obscure code is to remove the
- > obscurity, and that therefore commenting around it is an admission of
- > defeat. Better to comment than to leave it obscure and unexplained, of
- > course!
- >
-
- I am a firm believer in minimal commenting of code. I try to write every
- method in a self-explanatory manner and I have a sure-fire way of discovering
- whether the meaning of the code is explicit enough to not require commenting:
-
- I reach into the next cubicle at work and grab a fellow programmer by
- the lapels and ask him if he can understand what I'm doing with a
- cursory glance. Since we work on different projects, I know that he
- is not bringing background knowledge to the viewing. I listen to what
- he says that he does not understand and I listen what I am motivated to
- tell him (anything that is non-obvious) then I document accordingly.
-
-
- Right now I feel that comments are only for learning what is not obvious in the
- code, and that comments can never be a substitute for reading the code when
- learning a system. In spite of this, I'd like to try a web system sometime
- if one is developed for C++.
-
- feathers@fiu.edu
-
-
-
-