Standards (was Re: indentation: enough already!)

Paul Sander paul at athertn.Atherton.COM
Sun Dec 18 16:47:55 AEST 1988


In article <3245 at ingr.com.>, crossgl at ingr.com. (Gordon Cross) writes:
> Regarding my posting on the "indentation" debate:
> In article <253 at athertn.Atherton.COM> paul at athertn.Atherton.COM (Paul Sander) writes:
> >
> >Your points are well taken, and I admit I agree with them to a degree.  But
> >let me quote from DOD-STD-2167A, Military Standard, Defense System Software
> >Development:
> >
> >   [lengthy excerpt deleted]
> >
> >So it would seem that for many of us (especially those who work for
> >government contractors), coding standards are there and will not go away.
> 
> Well, well.  At last I've learned something new!!  I wonder how many MILLIONS
> OF DOLLARS (of your money as well as mine) the government is spending on this
> stuff.  Think about the savings if the government would just keep their hands
> out of the pot and let the defense contractors deliver the finished product!!
> What should they care so long as it works??!!!

Unfortunately, there have been too many times when government 
contracts were delivered (behind schedule and over budget) where 
the code did not work.  The DOD saw as the best way of solving
this problem a standard that carefully sketched out the software
development process from requirements analysis to integration and
testing.  By insisting that its contractors follow the standard,
the quality of the software has gone up, and the amount of money
spent on purchasing and maintaining defective software has
decreased.

>                                                 As an end user of something
> like "ksh", I couldn't care less about the style of the source code because
> the program works.

The point is that all too often, the program didn't work.  The
difference between our (say) $10,000 software and their $10,000,000 
software is that their software is bigger and harder to maintain.  
Removing as many variables as possible can only make that job easier.

> [Budget balancing omitted]
> 
> [Discussion of maintenance problems omitted]
>
> [In maintaining other people's code],
>                              I found that the majority produced very readable
> and well documented code.  Although each person clearly had his/her own 
> coding style, the similarities were quite remarkable.  Any programmer at all
> knowledgable about the C language should not have that much difficulty
> deciphering other coding styles.  On the flip side, I must admit that I
> have also seen some VERY poorly written code (no comments, one letter global
> variables, etc).

So have we all.  Not all programmers are as disciplined as we (the Net)
are.  But keep in mind that entry-level programmers are usually given
some sort of maintenance job, and they may not be as knowledgeable
about C as we are.

>                   The point I am trying to make here is that left alone good
> programmers write good code and bad programmers write bad code.

I agree.

>                                                                  What is
> needed instead of stringent "standards" is a well thought out education plan
> whose goal is to make good programmers out of bad ones...
>

But where will it come from?  The Universities are teaching so many
other things that discipline cannot be emphasized enough; and with
students' deadlines, any emphasis made would be lost.  The taxpayers
won't spring for it.  That leaves the private sector; though companies
like to send selected people off to school for advanced degrees, they
don't usually allocate resources for basic education.

As this is no longer a C or Unix topic, I suggest moving this discussion
to comp.software-eng .

-- 
Paul Sander        (408) 734-9822       | Do YOU get nervous when a
paul at Atherton.COM                       | sys{op,adm,prg,engr} says
{decwrl,sun,hplabs!hpda}!athertn!paul   | "oops..." ?



More information about the Comp.unix.wizards mailing list