Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!mintaka!bloom-beacon!deccrl!news.crl.dec.com!decvax.dec.com!zinn!jjmhome!smds!rh From: rh@smds.UUCP (Richard Harter) Newsgroups: comp.software-eng Subject: Re: Code inspections Summary: Reality check indeed. Message-ID: <309@smds.UUCP> Date: 30 Jan 91 02:22:09 GMT References: <14964@megatest.UUCP> <1991Jan28.225231.19444@ico.isc.com> Organization: SMDS Inc., Concord, MA Lines: 50 In article <1991Jan28.225231.19444@ico.isc.com>, rcd@ico.isc.com (Dick Dunn) writes: > pat@megatest.UUCP (Patrick Powers) writes: > ... > > Though there is plenty of evidence that code inspections are cost > > effective, I believe they would tend to be boring and stressful. > > Boring because they are a time consuming and non-creative activity -- > > current issue of IEEE Software recommends 150 lines of code reviewed > > per man-day as a good figure... > Well, we all know that lines of code is a lousy measure of anything except > the number of newlines (don't we?:-), but still, if this measure is any- > where close to real, it's a much stronger argument that Powers suggests > against code inspections. A halfway-decent programmer can produce several > times that 150 l/d figure...proceeding through anything at 20 lines/hour > (that's 3 minutes per line, effectively???) is too slow to feel productive. Reality check time. One can write several hundred lines of code in one session. However that is exceptional. Typical industry figures are 5-10 thousand lines of delivered code per year which is 25-50 lines/day. Programmers who can average 100 lines/day are quite exceptional. Interestingly enough these figures don't seem to vary a great deal with language. The rate is somewhat higher for assembly language and for verbose languages such as COBOL, but enough to compensate for the reduced expressiveness. Since many of us can and have written several hundred lines of code at one sitting, why is the average rate so low? One obvious reason is that once you have written the code you have to compile and debug it. Another is that a fair percentage of ones time gets eaten up in non-programming activities. Still another is that there is always a certain amount of low level design work that must be done while writing code. (Anywhere from 20-70% of the design work is done at coding time, depending upon the methodology used.) Still another factor is that quite a fair percentage of the code that is written ends up not being deliverable. Let's check. 150 lines is 3-5 procedures worth of structured modular code, i.e. about 1 low level modules every two hours *on average*. In a decent code review you have to verify that all external interfaces are correctly referenced and used, that each line of code is correct, and that the code makes sense. You also want to verify that the modular decomposition is appropriate and that the modules fit into the over-all design. Granted that some reviews will go quite quickly. However the average will probably be closer to that 150 lines/day. structure is correct. -- Richard Harter, Software Maintenance and Development Systems, Inc. Net address: jjmhome!smds!rh Phone: 508-369-7398 US Mail: SMDS Inc., PO Box 555, Concord MA 01742 This sentence no verb. This sentence short. This signature done.