The Software inspection reference article from the English Wikipedia on 24-Apr-2004
(provided by Fixed Reference: snapshots of Wikipedia from wikipedia.org)

Software inspection

For thoughtful child sponsors
Inspection in software engineering, is a variety of techniques for improving the quality of software.

It has been long noticed that when code will be reviewed by someone else, programmers are motivated to polish their code to a higher shine: making style consistent, improving clarity, and so on. When noone else looks at code, programmers often leave these small niceties undone. Since these niceties can mask or reveal subtle problems in code, reviewing code improves quality by encouraging programmers to work harder.

Formal inspection

Software inspection is usually thought of as the same thing as formal inspection. There are a variety of formal inspection methodologies. In most, code is read by a group, often 5 to 9 people, and they discuss the meaning and structure of it.

Usually, there is a checklist of things to look for.

IBM was renowned for it. NASA was renowned for it.

One disadvantage is that inspections usually take place after the code is complete, which means that flaws in the design which are discovered and fixed may require substantial rework. This is frustrating for all.

Another disadvantage is that this formal inspections are confrontational. The programmer who is undergoing the inspection feels picked on and rarely does anyone say anything positive about the code. This tends to increase alienation by programmers.

Informal inspection

This include pair programming, where every line of code is reviewed by a partner as it is being written.

One advantage of this is that the design of the software is discussed while the software is being written, which means that the design is also being inspected.

Another advantage is that the review is cooperative, in that both programmers have a stake in producing good code.

Open source

Open source code is not really even an informal inspection, but it has some interesting results. When projects are worked on collaboratively, such as Linux or gcc the code receives excellent peer review. However, most open source projects do not get much attention, and the peer review may not actually exist for much of the open source code.

Studies

Many studies have shown that having someone else review code makes a huge improvement in code quality. The studies have also shown that having more people review a piece of code improves quality even more, but with diminishing returns.

One study concluded that having someone else review code is always worthwhile, and having more people review code may be worthwhile, depending on how critical the code is.

See also