CS 372 Spring 2016  >  Notes for February 26, 2016


CS 372 Spring 2016
Notes
for February 26, 2016

Code Review

What Code Review Is

Code review, or more properly peer code review, is the process by which one developer checks the code that another developer has written or changed.

Typically, it goes something like this. Developer A is working on some issue. When this work is finished, Developer B look at Developer A’s work, without Developer A being present. Developer B asks questions like the following.

When Developer B with the review, the results are communicated to Developer A.

The Value of Code Review

It is widely agreed that code review is a highly beneficial practice. A quote from Jeff Atwood.

I believe that peer code reviews are the single biggest thing you can do to improve your code.

GGC adds: it can improve your coding skills as well.

From Code Complete, 2nd ed. by Steve McConnell, pp 480–481.

Technical reviews have been studied much longer than pair programming, and their results, as described in case studies and elsewhere, have been impressive.

...

See the book for citations for the above claims.

Best Practices

How best to do code review has been studied a great deal, and much has been written about it. There is general agreement on the following ideas.

Variations

There are other practices that are similar to code review, and have similar benefits.

It should be noted, however, that the above are not code review. They can be beneficial, but they are not the same.

Lastly, we note that some code review is tool assisted. Any number of software tools are available, that are intended to facilitate the code-review process.

*See The Pragmatic Programmer: From Journeyman to Master, by Andrew Hunt and David Thomas.

Code Review will be continued next time.