Code Inspection vs. Code Review -- what's the difference?

At the risk of pissing off the language police: There's no difference.

What I mean is, when normal people talk about looking at each others work they use words like "inspect" and "review" interchangeably, and for me, that's okay.

But.

For some people there's a big difference.  Michael Fagan first popularized the idea of the "Formal Inspection" with a 1976 paper at IBM (PDF here).  This is a lengthy, heavy-weight process (described here) with seven phases, several meetings, and four people specifically trained in different roles.

I was once reprimanded by Eileen Fagan (then-wife of Michael) for saying "review" when referring to an "inspection."  Ahhh the insolence of youth!

The definition of a "Formal Inspection" or "Software Inspection" varies a bit depending on who you ask, but it's always a small variant on the Fagan Inspection, including a "reading" phase (where participants examine code separately), an "inspection" phase (everyone together in a room), and strict roles and data collection.

Although the benefits of Inspections (with a big-I) are well-documented, so is the massive amount of time it takes to do them.  Think of it -- just the inspection meeting is 4 people times 2 hours equals an entire on-task person-day worth of time!  Even if it finds bugs, none of us have that kind of time.

That's why almost everyone (who does code review at all) does lightweight "reviews."  This could mean a variety of different things -- just looking over someone's shoulder, automatically sending emails after code is checked into version control, pair programming, and using one of the specifically-designed tools for code review including our company's Collaborator, Atlassian's Crucible, and the open source CodeStriker and Review Board.

So in the end, I admit it's useful to distinguish "inspections" from "reviews."  In fact, one of the reasons anyone cares about our tool is exactly because it frees you from Inspection (with a big-I)!

But I'm not going to reprimand anyone for it.

P.S. Some say Michael Fagan "invented" inspections, but like everything else there was a lot of prior art.  He does deserve credit for yelling about it the most loudly.


Close

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox

By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading