Reviewing Code with Perforce Page 1 of 8
Reviewing Code with Perforce
Jason Cohen, Smart Bear Software
Executive Summary
Code review is an efficient and cost-effective way to find software defects and improve code quality. Fortunately, Perforce is
designed to facilitate peer code review. Combining features in Perforce with modern techniques, it’s easy and fast to do. This
paper describes several ways to conduct code reviews with Perforce and examines the implications of each. It also discusses
best practices and considerations for reviewing code as quickly, painlessly and successfully as possible.
Why Review Code?
Most programmers detest code reviews, especially formal inspections in the traditional sense. Reviews have the bad rap of
taking an inordinate amount of time, and they take time away from task programmers enjoy most… writing code! At the
same time, most folks also know that the benefits of code review are undeniable and well-proven. If you think through the
concept, common sense tells you how important reviews are.
You wouldn’t write a book or even an article without having someone else review it – usually several people. Why would
you even consider writing code without at least one extra pair of eyeballs to do a sanity check?!
The most obvious result of having someone else look at your code is better software quality. You won’t just ship fewer bugs,
you’ll improve design, structure, documentation, maintainability, testing, and even comments. But code review provides a
number of other important benefits too:
! It improves team communication. Code review gets people talking, collaborating, and building trust in addition to
better code. Once the “ice is broken,†many teams report vast improvements in how they work together.
! Code review provides a safe opportunity to mentor and teach junior team members. Newer folks can still work on
‘real’ pro