[comp.software-eng] C Programming Stds/Procedures

donm@margot.Eng.Sun.COM (Don Miller) (02/22/91)

In article <1991Feb19.145843.2842@ukpoit.co.uk> ian@ukpoit.co.uk (Ian Spare) writes:
>I have been approached by a member of our Quality Assurance group with a view 
>to setting up some of C programming standards iand procedures for internal use.
>

   I just came across a book which should prove an excellent resource
   for the questions posed.

   Frakes, William B., Fox, Christopher J., and Nejmeh, Brian A.
   Software Engineering in the UNIX/C Environment.  Prentice-Hall, Inc.
   1991.

   Frakes is from the Software Productivity Consortium,  Fox is
   at Bell Labs, and Nejmeh is from someplace called Instep Incorporated.
   
>We feel these standards/procedures should cover the following areas:
>
>    o - Use of utilities such as make , lint etc ( other suggestions 
>        are welcome).

   Although it doesn't provide enough information on any one utility to 
   use as an instruction handbook, it contains references to and example
   uses of make, lint, cat, grep, cut, sort, awk, grep, egrep, bc, cpp,
   sed, time, vi, emacs, cscope, cb (indent), diff, lex, yacc, sdb, dbx,
   dbxtool, ctrace. lprof, tcov, etc., etc., etc., as well
   as many utilities whose availability is restricted.  They describe
   the operation and use of these restricted tools as well so they can
   be written if need be (or grabbed from a friendly neighborhood ftp
   site).  

   It does all this in the context of a prototype software development 
   effort for a metrics tool called "ccount", which they provide the
   source for at the end of the book.  I don't know about electonic
   availability of the source.

   It also addresses some areas where you may want to investigate tools 
   from CASE vendors (it uses Software through Pictures from IDE as an 
   example).

>
>    o - Some guidelines for programming style.

   It does a reasonable job of presenting C issues to be aware of;
   not only style, but usage as well.

>
>    o - Operating system interaction.

   See the section on utilities above.  The C part addresses such nasty
   stuff as testing code which handles system call failures such as
   a null pointer returned from malloc. 

>
>    o - Use of standard libaries and system calls.

   It addresses functions available on a general level and uses thereof.

>
>    o - Implications of standards such as POSIX and X-OPEN.

   Nobody's perfect.  I'd like a reference to standards programs if
   you find a good one.

>
>    o - How to do it - production of zero defect software.

   The greatest thing about this book is that all the tools are
   presented in the context of actual use.  Although such a presentation
   is not ideal for becoming an expert on any individual tool, it provides
   an excellent framework for understanding the implication of this
   environment across the entire range of software engineering functions.


   I think those of us lucky enough ;-) to be working in the UNIX/C
   environment have found a reference that can serve as a springboard
   to a productive process.

   A good place to continue this discussion is probably comp.software-eng,
   so I've cross-posted there.

--
Don Miller                              |   #include <std.disclaimer>
Software Quality Engineering            |   #define flame_retardent \
Sun Microsystems, Inc.                  |   "I know you are but what am I?"
donm@eng.sun.com                        |