21.4
Explain why program inspections are an effective technique for discovering errors in a program. What types of error are unlikely to be discovered through inspections?Program inspections are extremely effective because they allow a developer who wasn’t involved in writing the program to look at it. I’ve personally had numerous code errors discovered by formal and informal code inspections. Most of the time, program inspections catch errors that I overlook after looking at the same program for a long time such as simple syntax errors, incorrect logic, etc. Formal program inspections, such as reviewing pull requests on GitHub, tend to reveal more nuanced errors such as web page styling that doesn’t meet the program’s requirements.
Despite being an effective technique for discovering errors, program inspections do not usually reveal runtime errors. Sometimes it's easy to spot what might happen at runtime, but not all runtime errors are easy to see. It's not until the program is actually run that runtime errors might become visible.