Are Your Code Reviews Effective?
For many people in the software industry the term Code Reviews is automatically interpreted as an activity done internally within a development team. Some see it as an activity done by peers – reviewing each other’s code. Others see it as the job of the development team leader to review his team members’ code.
Is this approach to code reviews the most effective one?
In order to answer this question, we first have to define our goals and expectations from code reviews. Many consider code reviews as a tool for early identification of bugs (and enforcing some sort of technical coding standard). According to this view, the benefit of code reviews is in the low fixing cost of bugs detected early in the development process.
This is, of course, a fine goal. But why settle for that? Consider code reviews as a tool for improving the overall quality of the design and code. Think about using code reviews for making the code more maintainable and extensible. Let code reviews reduce future development costs by making the code simpler, clearer, and easier to work with. And while we are at it, why not use code reviews a tool for mentoring developers, improving their skills and building their experience in a guided manner?
If you agree these are important goals, it is now easier to answer the question above. The fact that most code reviews deal only with functional defects is not accidental. It is derived from the way reviews are conducted. And you can certainly do better…
Imagine…
Imagine reviews as a mentoring platform. Think of reviews being conducted by a professional mentor – an expert software developer who knows how to create good designs and write good code, and also has mentoring skills. Think about reviews conducted in small increments throughout the development process, from the first day of the project. Think about reviews as a tool not only for identifying functional defects, but also for improving the quality of design and code in order to increase the future value of the product. Think about reviews guiding the developer towards preventing problems, not merely fixing existing ones. Imagine reviews used as a tool to improve the product while gradually improving the skills of the developer literally at the same time.
I call such reviews: Professional Reviews.
Why Professional Reviews?
Reviewing is a skill – Not everyone can conduct an effective code review. Not even every experienced software developer can conduct an effective review. Reviewing code requires a different set of skills.
Mentoring is a skill – Teaching developers the art of producing good designs and writing good code is a mentoring activity. Mentoring also requires certain skills. To be a mentor, you have to be a professional software developer. But, you must also have a mentoring mindset. Working with people on improving their skills is not a trivial task.
In-depth reviewing – A professional mentor (/reviewer) can analyze the code thoroughly. Peers on your team, and most of the time even the team leader, cannot afford “spending” much time on such a profound analysis. Without an in-depth analysis, chances are that the reviewer will only be able to identify outstanding functional defects. More subtle issues, and especially non-functional issues such as issues concerning the design and structure of the code, will probably evade him. This of course is also related to the issue of reviewing skills.
Less context switching – To be effective, code reviews must be frequent. When done by peers, this requires a high level of context switching: the developer must jump between his code and the reviewed code. This introduces an overhead to the process, and might cause the frequency of the reviews to drop, thus making this activity even less effective. A professional reviewer, on the other hand, frees the team members from the need to switch their work context so frequently.
The Benefit of Professional Reviews
A professional reviewer, walking developers throughout the project from day one, helping them create better code that will last longer, and improving their skills at the same time, is by far more effective then regular peer reviews.
With the same investment you probably make in peer reviews you can make your code better and turn your developers into professionals.
***
You might want to have a look at this sample chapter draft from The Quality Within, and at an overview of The Lucid Quality Approach.
***
[Update: May 2nd, 2006]
A follow-up post discussing the issue of sharing project-knowledge was posted.












April 11th, 2006 at 11:15 am
How does this look in the context of an agile project with pair programming and collective code ownership?
April 12th, 2006 at 5:41 am
It does not contradict it. Pair programming and/or peer reviews are a good tool for collective code ownership. I argue that they are not optimal as a reviewing tool.
Professional reviews conducted in a mentoring atmoshpere are able to reveal a wider variety of code quality problems and teach developers how to avoid them. A professional mentor can do this better than any course or book, because code and design quality is extremely context sensitive.
If you are looking for collective code ownership you can still practice pair programming or informal peer reviews within your team in addition to the professional review/mentoring process. If anything, the code will be simpler and clearer when reviewed professionaly, so collective code owenership could be achieved more easily.
April 30th, 2006 at 1:11 am
[…] Are Your Code Reviews Effective? - Lidor Wyssocky asks the question and gives some advice on how to make them better […]
April 30th, 2006 at 8:11 am
You missed some important points.
1. One of the great benefits of code reviews is that the reviewer learns how the software is designed. If “prefessional reviewers” are the only folks who review code, then they’re the only ones who get that benefit of seeing what developers are doing, and learning how the design is changing. Developers who aren’t allowed to wear the reviewer hat are deprived this learning opportunity.
2. Reviewing code is something that takes practice. You say, “Not even every experienced software developer can conduct an effective review,” and you use that as an argument that most developers should never review one line of code. Nonsense. If you’re not a good reviewer, you’ll get better at it with practice, and by reviewing more code, you’ll learn more about the design so you can make better informed comments during the reivews. And all the while, all that knowledge will strengthen your own development skills.
May 1st, 2006 at 2:58 am
Hi Rufus,
Please see my comment above (second comment in this thread).
Sharing knwoledge about the code and design of the product is a great thing. It is a must. However, it is better to collectively own good code and good design. A professional mentor has the ability to improve both developers’ skills and the design and code of the concrete product. Then, you can choose whatever method you like to create a better collective ownership.
These are two methods for achieving two different things.
Most peer reviews (assuming they are really conducted during the entire development period in minimal intervals) focus on functionality. It is rare to see peers reviewing the quality of the code and the quality of the design. Most reviews stress the functionality aspects of the code. This might leave you with code which is hard to understand and maintain, so although everyone seems to "know" the code, many developers will not be confident in changing and extending it.
As for your second argument, you are right. With practice developers can become better code readers. But this again requires professional mentoring. Merely reading code will not turn you into a professional reviewer.
The focus of what I suggest is on mentoring developers to help them become professionals. Not every developer can be a good mentor. This requires certain skills which are not necessarily part of the developer’s job description. A good reviewer for me is a good mentor. These are two aspects of the same activity. Peer reviews are a great complementary tool. They will probably not create a profound change in the quality of the code, but they will help spread the knowledge…
Lidor
May 2nd, 2006 at 2:49 pm
See a follow-up on the issue of knowledge sharing at:
http://blog.qualityaspect.com/2006/05/02/sharing-project-knowledge-with-your-peers/
Lidor
July 10th, 2006 at 9:10 pm
[…] When I first wrote about professional reviews as a mentoring platform, some people responded with the question: what’s wrong with peer reviews anyway? Why do we need a person specializing in code and design reviews instead of assigning this task to peer developers within the development team? […]
October 8th, 2006 at 5:24 pm
I like the idea. I’m not so sure you need to exclude the other peer reviewers from that process though. But I do like the idea that you put the focus back upon improvement.
A common problem in many reviews is simply that no one reads the documents before some meeting, and that meeting turns into a walkthrough. That problem alone is what prevents most developers from conducting a professional review of their own. I think your idea would fix that, since a dedicated reviewer is going to have a hard time justifying, “I didn’t have time to read it, why don’t you read it to me?”
It’d be nice however if you gave some perspective on what a professional reviewer should be doing.
October 9th, 2006 at 1:59 am
You forgot one important aspect of code reviews. They make more people understand how a system works. Too many times, a component/class is only known by one person, and when that person leaves nobody wants to touch that stuff with a 10-foot stick. Code reviews helps people in understanding other parts of the system. They will not become experts, but they will have a hunch of what some components do and how. A hunch is 100% better than no understanding of a component at all.It helps to build a “collective code ownership”, which is an important part of XP.
I wish we could have more positiv code reviews, but at my current place code reviews trickle down to, this is “bad”, “import variable name”, “ugly” and “do that again”. That is not productive.
October 9th, 2006 at 2:48 am
Hi Ryan,
Thanks for your feedback. The lack of preparation before a review is indeed a common problem. Having a professional reviewer/mentor does help addressing this problem.
As for your question on what a professional reviewer should be doing, my upcoming book [b]The Quality Within[/b] will provide an extensive answer to this question.
In short, a professional reviewer is in fact a professional mentor accompanying the development team from the first day of development, and providing developers with professional guidance and mentoring. This is done in different forms, but professional reviews are a primary platform for this mentoring effort.
Have a look at http://lucidquality.qualityaspect.com/Overview/ for an overview of this approach.
Redsolo,
The issue you brought up (sharing product knowledge among team members) is a valid concern. This is indeed something that should be encouraged. But people often tend to confuse code reviews with a knowledge sharing activity. Each of these activities have a different goal and a different target audience. Trying to merge these activities into a single one is not effective.
Please see http://blog.qualityaspect.com/2006/05/02/sharing-project-knowledge-with-your-peers/ for an elaborated discussion on this issue.
Lidor
April 28th, 2007 at 12:06 am
A professional mentor has the ability to improve both developers’ skills and the design and code of the concrete.
August 5th, 2007 at 12:18 am
People just don’t like to write comments, they like to read posts therefore there is no need to fake posts. Take ProBlogger for an example sometimes he is left with 20 comments a day sometimes he is left with 200 comments a day even tho he is getting 25K-30K visitors . http://www.averagepenisenlargement.com
August 5th, 2007 at 12:19 am
Among these important things there’s one thing which is been negleted by many of peoples which is the rest engiens.I will say that don’t neglect all the other engines listed on the page. Be sure that your website is constructed well, with good meta tags, keyword density and relevant content. It’s well worth all the effort! http://www.penisenlargementc.com
August 5th, 2007 at 12:20 am
If you’re a blogger (or a blog reader), you’re painfully familiar with people who try to raise their own websites’ search engine rankings by submitting linked blog comments like “Visit my discount pharmaceuticals site.” This is called comment spam, we don’t like it either, and we’ve been testing a new tag that blocks it. From now on, when Google sees the attribute (rel=”nofollow”) on hyperlinks, those links won’t get any credit when we rank websites in our search results. This isn’t a negative vote for the site where the comment was posted; it’s just a way to make sure that spammers get no benefit from abusing public areas like blog comments, trackbacks, and referrer lists. http://www.gordoniihoodia.net
August 5th, 2007 at 12:21 am
My main concern is that you can’t guarantee every page of your website will be included in the SERPs. Considering I’m constantly adding new products to my company’s website, I need to be sure that customers can find them as soon as possible.http://www.seoptimizerz.com
August 14th, 2007 at 10:06 pm
VigRX is a natural herbal formula for penis enhancement that works to increase penis size, improve sexual health and strengthen erections when you are aroused. VigRX , a carefully calibrated supplement for men’s full sexual health, penis enhancement and peak performance. http://www.vigrxpillz.com
August 29th, 2007 at 1:03 am
penis enlargement | Sizomax penis enlargement pills © for enlarge 3-4 inch penis size.SizeOmax proudly has over 1 million men around the world who are completely satisfied about the quality and effectiveness of SizeOmax penis growth pills. www.penizenlargementz.com
September 4th, 2007 at 12:35 am
Blogs are mean to give you somethingworthy and practical,wholesomewords,beneficial ideas and successfull tricks and tactics,i think i have with quite much things while reading this one.
September 19th, 2007 at 11:17 pm
” Penis health ralated articles and penis enlargement reviews by some Top Class Organization Like BBC, Oprah, ABC, CNN and found some best top rated penis enlargement medicines.www.penisenlargementmedicine.com
“
September 26th, 2007 at 5:37 am
290154687607
I plan to check it out
October 1st, 2007 at 7:19 am
penis enlargement and breast enlargement products reviews like vigrx, magnarx, natural gain plus, sizomax, vp-rx, breast gain plus, breast sucess, penis enlargement extenders, devices and penis enlargement pumps that enlarge penis size naturally up 3-4 inch in a month. www.enlargementt.com
October 14th, 2007 at 11:39 am
Vigrx plus is the latest offering from the manufacturers of vigRX. It’s an improved and further more effective version of the original pill is an improved formulation of their original VigRX™. VigRX™ is a natural herbal formula for penis enhancement that works to increase penis size, improve sexual health and strengthen erections when you are aroused. Users have found that no other penis enhancemeVigrx plus is the latest offering from the manufacturers of vigRX. It’s an improved and further more effective version of the original pill is an improved formulation of their original VigRX™. VigRX™ is a natural herbal formula for penis enhancement that works to increase penis size, improve sexual health and strengthen erections when you are aroused. Users have found that no other penis enhanceme penis enhancement product provides the results that VigRX™ delivers.www.aboutvigrxplus.com”
October 24th, 2007 at 6:26 am
penis enlargement products reviews like vigrx, magnarx, natural gain plus, sizomax, vp-rx, penis enlargement extenders, devices and penis enlargement pumps that enlarge penis size naturally up 3-4 inch in a month. www.penisenlargementmedicine.com
November 17th, 2007 at 11:46 pm
Viagra is used to treat impotence in men. Viagra increases the body’s ability to achieve and maintain an erection during sexual stimulation. Viagra does not protect you from getting sexually transmitted diseases, including HIV. www.gordoniihoodia.net
November 22nd, 2007 at 12:40 am
I don’t think that the above given description exactly fits the title of the topic. :) http://penisenlargement.pk
November 22nd, 2007 at 10:36 am
Vigrx plus is the latest offering from the manufacturers of vigRX. It’s an improved and further more effective version of the original pill is an improved formulation of their original VigRX™. www.gordoniihoodia.net
November 28th, 2007 at 3:01 am
penis enlargement pills reviews from all natural FDA approved penis enlargement pills store and chart comparisons at www.gordoniihoodia.net
December 5th, 2007 at 2:54 am
I am Very thank full the owner of this blog. Becouse of this blog is very imformative for me.. And I ask u some thiing You make more this type blog where we can get more knowledge. http://www.penisenlargementz.com
and any one tell me how can I find this type blog.
December 11th, 2007 at 10:57 am
fgh
December 12th, 2007 at 2:15 am
It’s very good article. Great site with very good look and perfect information.
December 12th, 2007 at 2:17 am
Interesting article!
Thanks
December 12th, 2007 at 2:18 am
Thanks for help, Keep up the good work.
December 13th, 2007 at 4:27 am
Keep up the good work.
December 18th, 2007 at 3:20 am
Thanks
December 22nd, 2007 at 4:04 pm
I am Very thank full the owner of this blog. Becouse of this blog is very imformative for me.. And I ask u some thiing You make more this type blog where we can get more knowledge.
http://www.cesurturk.org/index.php?ind=kureselisinma
December 28th, 2007 at 6:45 am
I am Very thank full the owner of this blog. Becouse of this blog is very imformative for me.. And I ask u some thiing You make more this type blog where we can get more knowledge.
thanks you very high work..
http://www.saboces.gen.tr
January 2nd, 2008 at 9:41 am
Vigrx plus is answer for your erectile dysfunction, anti impotence, penis enlargement, and hard rock erections. www.vig-rxplus.com
January 8th, 2008 at 3:29 pm
thanksss..
January 15th, 2008 at 2:49 am
Wow nice layout. can i suggest you one more thing for yoru blog.
January 20th, 2008 at 12:16 am
Penis enlargement productz, Natural herbal productz store for penis enlargement,Which increase your size 4-6 inches, Double the size Double the fun.(Yes No Pain ALL Gain) And more productslike weight loss, male enhancement, skin care, acne solutions, breast enlargement, hairLoss for men and women , multi Vitamin for men and women, optimum Diabetics, eazol Pain Relief , stretch mark prevention, revitol skin brightener, revitol hair removal cream, revitol anti-aging
solution. http://www.naturalherbalproductz.com
January 20th, 2008 at 3:14 am
Penis enlargement products reviews that works best to gain 2-3 inches to your penis size naturally and produces hard rock erections in demand. www.penissizeenlargement.net
January 20th, 2008 at 12:46 pm
great site, this is what i am looking for
January 31st, 2008 at 11:01 pm
No one is here for help all want just money money and money.
January 31st, 2008 at 11:02 pm
All for fun and all for money.
February 1st, 2008 at 4:33 pm
Thanks very good all for fun money
February 2nd, 2008 at 10:08 am
thanks very good.
February 2nd, 2008 at 2:55 pm
thanks for the post.
February 3rd, 2008 at 9:28 am
Dont suffer in silence get the average penis enlargement gain through best and effective penis enlargement source. www.naturalherbalz.com/menshealth/penis-enlargement/index.html
February 3rd, 2008 at 5:51 pm
i am best working to webmaster.
many thanks
February 5th, 2008 at 6:36 pm
I enjoyed to be at here because one of my point has been cleared here.
Blogs are becoming the main source of knowing about things certainty,its
importance,idolizing,either in a marketing way that one can differentiate.
http://www.naturalherbalproduct.com
February 7th, 2008 at 12:49 am
Blogs are becoming the main source of knowing about things certainty,its
importance,idolizing,either in a marketing way that one can differentiate.I
enjoyed to be at here because one of my point has been cleared here.
http://www.naturalherbalproductz.com
February 11th, 2008 at 9:20 am
Nice blog.
February 15th, 2008 at 2:29 am
Mony is mony and all we need is mony
February 15th, 2008 at 2:29 am
wow every one want mony mony and mony.
February 23rd, 2008 at 1:29 am
thx..
February 23rd, 2008 at 1:30 am
thx…
February 25th, 2008 at 2:50 am
Nothing can stop me by posting these comments.
February 25th, 2008 at 9:47 am
Natural herbal health care medicines, Articles, informations and daily updated health concerns issues and their solutions for better health and better life. www.naturalherbalz.com
February 29th, 2008 at 1:53 am
All fine plus nine equal to not fine.
March 1st, 2008 at 1:05 pm
dank u veel
March 1st, 2008 at 1:06 pm
thanks
March 1st, 2008 at 1:10 pm
thanks
March 5th, 2008 at 5:39 pm
Thanks!
April 6th, 2008 at 12:51 am
thanks…
April 6th, 2008 at 12:55 am
thanks…
April 6th, 2008 at 12:57 am
thanks…
April 6th, 2008 at 12:59 am
thanks…aaa thanks…aaa
April 7th, 2008 at 8:26 am
Penis enlargement products, American Most Trustworthy Natural herbal productz store for penis enlargement,Which increase your size 4-6 inches, Double the size Double the fun.(Yes No Pain ALL Gain) And more productslike weight loss, male enhancement, skin care, acne solutions, breast enlargement, hairLoss for men and women , multi Vitamin for men and women, optimum Diabetics, eazol Pain Relief , stretch mark prevention, revitol skin brightener, revitol hair removal cream, revitol anti-aging solution. http://www.naturalherbalproductz.com
April 8th, 2008 at 9:26 am
This blog is very very informative. I would also like to add information to this. “Herbal Products” available on this website helps in curing medical problems, for example, there are various products ready for purchase (with money back guarantee) which help in breast or penis enlargement.
http://free.7host05.com/herbals/
April 9th, 2008 at 4:48 am
I am glad to post my views and points in this blog, but I must say that webmaster of this blog has done a very great job to make his blog more informative and more discussable but unfortunately everything is same here that more than 80% in this and other blogs post their comments for making spam!!!, so i will really all this spam links to google band tool, because webmaster makes blogs for making discuss and for sloving each other problems. thanks
April 9th, 2008 at 8:53 am
[…][…]Penis enlargement products, American Most Trustworthy Natural herbal productz store for penis enlargement,Which increase your size 4-6 inches, Double the size Double the fun.(Yes No Pain ALL Gain) And more productslike weight loss, male enhancement, skin care, acne solutions, breast enlargement, hairLoss for men and women , multi Vitamin for men and women, optimum Diabetics, eazol Pain Relief , stretch mark prevention, revitol skin brightener, revitol hair removal cream, revitol anti-aging solution.
http://www.naturalherbalproductz.com
[…][…]
April 9th, 2008 at 9:07 am
[…][…]Penis enlargement products, American Most Trustworthy Natural herbal productz store for penis
enlargement,Which increase your size 4-6 inches, Double the size Double the fun.(Yes No Pain ALL Gain) And more
productslike weight loss, male enhancement, skin care, acne solutions, breast enlargement, hairLoss for men and
women , multi Vitamin for men and women, optimum Diabetics, eazol Pain Relief , stretch mark prevention, revitol skin
brightener, revitol hair removal cream, revitol anti-aging solution.
http://www.naturalherbalproductz.com
[…][…]
April 15th, 2008 at 11:11 am
MAXWILLY” has a 100% success rate! All users in the study of 100 men, who used our device, for a period of 6 months, showed length increases from 1 inch to 6 inches, and .5 to 2.5 inches in girth. 10 men in the study with severe penile curvature, had an Improvement that ranged from 50% to 90% correction
The way MAXWILLY works is to stretch the penis over time. The more you wear the device, the faster your gains. For optimal results, you would wear the device 8hrs per day, But even at less amounts the gains are reasonably fast, only 3hrs/day, can get you to almost an 1 inch in just 2 months. Thanks to MAXWILLY size gains are nolonger a fantacy but a reality.
April 15th, 2008 at 11:13 am
MAXWILLY is the fastest way to increase your size perminantly. Whether, you have 1 inch or 8 inches… MAXWILLY can help. Since its invention in 1994 Maxwilly has sold over 1 million devices to men in over 100 countries
“MAXWILLY” is Is totally safe, extremly easy to use, and is suitable to fit all penis lengths from 1 inch to 18 inches.
“MaxWilly” was developed by, medical doctor Jorn Ege Siana, who specializes in penis lengthening. After extensive research he came up with the first prototype of MAXWILLY device in 1994. Since that time the product has undergone many different clinical studies and has won the trust of thousands of Doctors worldwide. Clinics worldwide use our product as a safe alternative to penis surgery. You can stop dreaming of having a larger penis and finally achieve the results, you have only dreamed of.
April 29th, 2008 at 12:13 am
Nobody can stop me by posting these comments.
http://www.businesswebhostings.net
May 2nd, 2008 at 11:36 am
Yes ı want to use my code with effect
May 2nd, 2008 at 10:40 pm
MoreNiche affiliate program, the worlds best affiliate network. Start your own home based business and make a success out of niche affiliate marketing and visit our affiliate marketing forum for advice and tips.
http://www.moreniche.tk
May 2nd, 2008 at 10:41 pm
Men who need penis enlargement solutions like penis enlargement pills penis enlargement oil and women needing breast enlargement pills can get an easy guide
http://www.skincarefairy.com
May 6th, 2008 at 12:17 am
thanks ..
May 6th, 2008 at 12:18 am
thanks ..
May 6th, 2008 at 12:19 am
toplistk.com thanks ..
May 6th, 2008 at 12:20 am
thanks ..
May 6th, 2008 at 12:22 am
thanks ..
May 6th, 2008 at 11:08 pm
All kind of herbal products hair loss, wright loss , penis and breast enlargement , viagra pills for increasing your erection , Pills for making more sperm and many more all are available here on the cheapest prices and our all products are approved by American labs .
Regards
Venessa
http://www.penisenlargementu.com
May 10th, 2008 at 12:17 pm
Our penis enlargement and Penis Enlargement techniques
products will increase your size and improve your sex life.