- Introduced by
- Michael Fagan
- Year
- 1976
- Type
- Formal inspection process
- Family
- Quality Review
What does it do?
Fagan Inspection is a formal, structured code review process developed by Michael Fagan at IBM and described in 1976.
A team examines software against defined roles, entry criteria and checklists to find defects before testing. Fagan (1986) describes inspection as a static review that usually detects more defects, at lower cost, than machine testing.
The intuition behind the method
Finding defects by reading code is often cheaper than finding them through testing and debugging later. Formalising the review, with fixed roles, entry criteria, inspection meetings and defect logs, makes the process repeatable and lets its results be measured. Fagan (1976) proposes analysing those results to improve the development process over time.
History
Michael Fagan published the process in 1976 in the IBM Systems Journal. He summarised advances in software inspections in 1986 in IEEE Transactions on Software Engineering. The cited sources describe the process and its results but not its adoption over subsequent decades, and the cost-benefit figures in the original page are not confirmed by them and are therefore omitted. Lighter-weight and asynchronous review variants exist, but the cited sources do not describe them.
When to use it
Choose Fagan inspection for complex or high-consequence code, such as algorithms, security-sensitive modules and safety-relevant software, where a defect found late would be costly to fix. It suits modules large enough to justify a planned meeting and a trained moderator. Do not use it for trivial changes or exploratory prototypes, where the preparation and meeting overhead exceeds the benefit. If the team cannot staff defined roles or keep to a disciplined process, the expected benefit is unlikely to be realised.
Limitations and considerations
- Each module needs planning, individual preparation and a meeting, so the calendar cost is substantial and grows with the number of modules; large modules must be split across several sessions.
- The method depends on trained moderators and on keeping to the defined procedure; informal variants lose the structure that gives the process its results.
- Group settings can suppress honest critique when personalities or seniority conflict with the goal of open defect finding.
- Passing an inspection does not guarantee the absence of subtle logical errors, so the review does not replace testing.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Fagan (1986) reports that inspection usually detects more defects than machine testing.
- Fagan (1986) reports significant quality improvements in organisations that use inspection, accompanied by lower development costs and greatly reduced maintenance effort.
- Defined roles and checklists give reviewers a common structure, so that the review does not depend only on individual habit.
- Fagan (1976) separates the operations (overview, preparation, inspection, rework, follow-up) and assigns each its own objective, which keeps the team focused on one task at a time.
- Classifying errors by type and ranking their frequency lets inspectors concentrate on the most common types (Fagan, 1976).
Applications
- Safety-critical systems, such as aerospace, medical device and nuclear control software
- Financial systems, including high-stakes transaction processing and compliance code
- Security-sensitive code, such as authentication, cryptography and access control
- Complex or performance-critical algorithms and novel techniques
- Settings where a documented review record is required, such as audit trails for certification
How it works
How it works
The author prepares the code and supporting material, such as design documents and checklists. The moderator checks the entry criteria to confirm that the material is complete and ready for review.
The team meets to inspect the material, with defined roles. The inspector checks for defects, the reader walks through the code, the author answers questions, and the moderator keeps the meeting focused on finding defects.
Each defect is logged with its type, following the error classification that Fagan (1976) describes. The team then carries out rework, and a follow-up step checks that the fixes were applied correctly.
Inspection results, such as the types and frequencies of errors found, are analysed to improve the process. Fagan (1976) describes using the results for constant process improvement until process averages are reached, and then for process control. The cited sources do not give formulas for effectiveness or other metrics.
Common pitfalls
- The meeting drifts into design discussion; the moderator should keep it on defect finding and log design questions for separate follow-up.
- The author reacts defensively to criticism, which reduces candour in later reviews; the process works better when criticism is directed at the code.
- Checklists become outdated; they should be revised using the defect data the project actually produces.
- The time cost is underestimated; if inspections are squeezed into spare time, preparation is shortened and the defect yield falls.
Frequently asked questions
What are the roles in a Fagan inspection meeting?
The moderator owns the process, the author wrote the code, the inspector looks for defects, the reader explains the code, and the recorder logs the findings. The roles and their responsibilities are defined in advance, and the moderator keeps the meeting focused on the defined objective.
What should inspection checklists include?
Checklists typically list common defect types, such as undefined variables, array bounds, null pointers, error handling, performance and thread safety, together with domain-specific issues such as cryptography, SQL injection or race conditions. Fagan (1976) recommends classifying errors and ranking their frequency, so checklists should be revised using the defects found in the project.
How long should an inspection take?
The inspection meeting is typically about 60–90 minutes, and larger modules are split across several meetings. Planning and individual preparation take additional time. The sources cited here do not establish a fixed reading rate, so none is given.
What happens if an inspection finds many defects?
The code receives a conditional pass or a fail, and the author reworks it. The team then chooses between re-inspecting the whole module, which is the more formal option, and checking only the fixes, which is lighter. Re-inspection is the step that confirms the fixes have not introduced new defects.
Sources
Fagan, M. E. (1976). Design and code inspections to reduce errors in program development. IBM Systems Journal, 15(3), 182–211.
Open DOI referenceFagan, M. E. (1986). Advances in software inspections. IEEE Transactions on Software Engineering, SE-12(7), 744–751.
Open DOI referenceGilb, T., & Graham, D. (1993). Software Inspection. Addison-Wesley.
ISBN: 0201631814