Newsgroups: comp.software-eng Path: utzoo!utgpu!cunews!bnrgate!bigsur!bcars305!ppblais From: ppblais@bcars305.bnr.ca (Pierre P. Blais) Subject: Re: Code inspections Message-ID: <1991Jan31.151559.16415@bigsur.uucp> Sender: news@bigsur.uucp Reply-To: ppblais@bcars305.bnr.ca (Pierre P. Blais) Organization: Bell-Northern Research, Ottawa, Canada References: <14964@megatest.UUCP> <156342@felix.UUCP> Date: Thu, 31 Jan 91 15:15:59 GMT I have had some experience with code inspections which I would like to relate to you. From my experience, I think that code inspections should be started after a certain amount of (sanity) testing is done. This prevents wasting the inspector's time in uncovering (obvious) defects. This is the same argument as using the compiler to find syntax errors instead of having a human spend time reading the code looking for them. Now, how do you decide when enough testing has been done and code inspection should start? From empirical data, one can determine how many defects are detected per person-hour of testing and code inspection. When less defects are detected in one hour of testing than there would be during an inspection, it is time to start in- specting. Code inspections have the advantage that they spread the knowledge about the software to people other than the author. Selection of inspectors should done on that basis. In addition, code comments are reviewed for usability; there is no way to test for that by running the code. The main drawback to inspections is the drain on human resources. If a code inspection team consists of four people including the author, the author usually ends up "owing" three people. In this case, developers usually spend three times more time inspecting other people's code than theirs. Also, some projects may be so large that a pace of 150 lines of code per hour makes it impossible to inspect all code within a reasonable period of time (taking into account no more than one three hour inspection session per day to combat fatigue and bore- dom). All in all, when used judiciously, at the right time, and when they are planned properly, code inspections are well worth their time. -- Pierre P. Blais Bell-Northern Research ----------------------------------------------------------------------- BITNET: ppblais@bnr.ca VOICE: (613) 763-4270 UUCP: uunet!bnrgate!bcars305!ppblais FAX: (613) 763-2626 LAND: P.O. Box 3511, Station C, Ottawa, Canada, K1Y 4H7 ----------------------------------------------------------------------- "Design defect fixes; don't just throw code at them."