|
Re: The Value of Code Reviews
|
Posted: Jun 5, 2007 7:57 AM
|
|
Lame discussion. A short audio interview about code reviews.
a. I would have spent less time reading this interview as an article then listening to the interview, but I guess writing it down takes effort, hence the audio.
b. Multiple techniques exist to code quality, like simply turning all the compiler warnings.
c. Finding bugs are not the only reason for code reviews.
Some reason include: · Coaching: Many peer/code reviews deal with developers learning and applying technology (coaching). Modern tools look at code and provide insights into fixing code. For instances is a developer misusing the set/get feature in C#? Is a class in canonical form? Is the class missing hashCode, equals, and toString methods? Is the hashCode method properly implemented? In many instances, the tools do a better job of coaching than peer/code reviews.
· Knowledge transfer: I can think of dozens of examples where just showing my code, or just talking out load, has presented improvements. However, does code review have to be the point of knowledge transfer? I have gotten a great deal just out of informal conversations and whimsical white board drawings than any code review had produced. These are more peer conversations than reviews, and I consider more effective. Real purpose of reviews Once a developer knows that their code will be reviewed, the developer changes their psychological behavior to writing code. (This is true in every profession. Once someone knows they will be audited, people change behavior. The concept is even part of the judgment day in the Bible.) However, I don't like the approach. Why not setup measurements that will reflect on the strength of the code over time, not just the number of lines of code, or the elegance of design, but measurements that reflect reality of the business. Let the developer decide on the best processes based on their abilities, problem space, and technology. As General Patton said, "Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity."
|
|