Topic: Need Opinions on C++ code inspection


Author: scullard@interport.net (Rand or Mary Ellen Scullard)
Date: 20 Oct 1994 00:29:32 GMT
Raw View
In article <380i3o$66m@athos.cc.bellcore.com>, cetin@seas.bellcore.com (Cetin Seren) says:

>I need some opinions, results of studoes done, discussions on former
>FAQ files, etc.. About the usefullness of code inspection in C++-based
>systems.  My personal inclination is that code inspection as a means of
>achieving quality code is a thing of the past.  As far as my experience goes,
>the real benefit comes from design inspections, and using code inspection
>on specific (and very small) areas that the design inspections point to
>as being critical.   Just starting out with a code inspection is essentially
>"shooting in the dark," whereas a decent design inspection may be analogous
>to using night vision gogles before you shoot...

At my Co. we inspect EVERYTHING from requirements to code. This takes a LOT of
time, and it's hard to do well. Nevertheless, it works. We find lots of problems
early on in the process, when they're cheaper to fix. The process is far from
perfect, but it is MUCH better than not doing it at all.

Yes, design inspections are critically important. I also believe that code
inspections are important.

One of the properties of our group is widely disparate levels of C++ experience.
Code inspections are an excellent way for the newer programmers to get a look at
code "done right" (we hope), and are a good time for those more experienced to
give a nudge in the right direction ("that method should be virtual"). Teach a
man to fish, etc...

With this in mind, the earlier inspections are done, the better. My personal
theory (untested as yet) is that you should have frequent, informal, quick,
highly focused inspections early in the coding phase. Have each team member
pick a small, manageable chunk of their code (especially header files!) and
go over it together. I want to start using this approach, but haven't had the
chance so far. This would overcome a large problem with the "big bang" approach
to inspections, which is that the effectiveness of the team doing the inspection
is inversely proportional to the number of pages being inspected. By the end of
the document, your brains are so numb, you just want to get it over with.

If you inspect only one thing, inspect the class headers.

...Rand Scullard




Author: mat@mole-end.matawan.nj.us
Date: Wed, 19 Oct 1994 10:55:35 GMT
Raw View
In article <380i3o$66m@athos.cc.bellcore.com>, cetin@seas.bellcore.com (Cetin Seren) writes:

> I need some opinions, results of studoes done, discussions on former
> FAQ files, etc.. About the usefullness of code inspection in C++-based
> systems.  My personal inclination is that code inspection as a means of
> achieving quality code is a thing of the past.  As far as my experience goes,
> the real benefit comes from design inspections, and using code inspection
> on specific (and very small) areas that the design inspections point to
> as being critical.  ...

Is this because we no longer make coding errors?

Is this because we no longer misunderstand the interfaces of components
provided by others?

Is this because we will inevitably find every contradiction and every
missed case before we get to coding?
--
 (This man's opinions are his own.)
 From mole-end    Mark Terribile
 mat@mole-end.matawan.nj.us, Somewhere in Matawan, NJ
 (Training and consulting in C, C++, UNIX, etc.)




Author: cetin@seas.bellcore.com (Cetin Seren)
Date: 18 Oct 1994 13:20:56 GMT
Raw View
Hello Netters...

I need some opinions, results of studoes done, discussions on former
FAQ files, etc.. About the usefullness of code inspection in C++-based
systems.  My personal inclination is that code inspection as a means of
achieving quality code is a thing of the past.  As far as my experience goes,
the real benefit comes from design inspections, and using code inspection
on specific (and very small) areas that the design inspections point to
as being critical.   Just starting out with a code inspection is essentially
"shooting in the dark," whereas a decent design inspection may be analogous
to using night vision gogles before you shoot...

Anyway, I still have some of my peers and my management to convince, so
I'll appreciate any and all help pointing me to well-known articles,
any studies done, etc...


Thanks,
Cetin Seren
cetin@seas.bellcore.com






Author: dhayes@onramp.net (David Hayes)
Date: Tue, 18 Oct 1994 19:54:51 -0600
Raw View
In article <380i3o$66m@athos.cc.bellcore.com>, cetin@seas.bellcore.com
(Cetin Seren) wrote:

> I need some opinions, results of studoes done, discussions on former
> FAQ files, etc.. About the usefullness of code inspection in C++-based
> systems.
> Just starting out with a code inspection is essentially
> "shooting in the dark," whereas a decent design inspection may be analogous
> to using night vision gogles before you shoot...

I worked recently at DSC Communications, a maker of telecomm switching
equipment. DSC recently converted to using Fagan Inspections, a
particularly rigorous form of inspection. One of the interesting points of
the Fagan process is that inspection starts at the Requirements document.
All levels of the design are inspected, and the code itself.

Test plans are inspected, but they are much shorter than you would expect.

I personally believe that the Fagan process works. In my own work with a
small group of people developing our own software product, I convinced my
team that Fagan inspections were worth the effort.

Study results and other information can be obtained from:
        Michael Fagan Associates
        9401 Wing Foot Court
        Potomac, MD 20854  USA
        voice:  301-299-3933
        fax:    301-299-3934

Good luck.

--
David Hayes                   PGP public key available on request, or send
dhayes@onramp.net        mail subject: help to pgp-public-keys@demon.co.uk
I pay for this connection, so these must be my opinions.