Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Any tips for a group needing to start code reviews? We have no real software engineering processes currently. I have been working as software engineer for 7 years and have never seen any real processes implemented at the various places I have worked, though many books espouse all kinds of engineering methodologies. The management supports the idea of enabling new processes, though there is some resistance from the senior engineer who has over 20 years of software engineering experience.

We are a set of two programmers, with no software engineering manager. We report direct to the managing director of the Company. But we work on numerous software projects. The real reason why we have to begin performing code reviews is because of PA-DSS requirements. Therefore, I am pushing for us to do code reviews all around - not just on the payment application software.

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

Since there are only two of you, theoretically you do not really need a formal review process. What should be happening is that when one of you finishes a piece of code he should simply say to the other: "Here's what I did. Please take a look."

This, of course, assumes that both of you are reasonable, sufficiently disciplined, and that you both have a sufficient grip on your own egos. If these assumptions are false, then you do need a formal process enforced from the top. The simplest thing to do is to make a rule that all commits or merges to the trunk must be looked at and approved by the other person, or at least one other person, in case your team grows.

This does not apply to you yet, but in my experience formal code reviews by even a team of 4 people end up taking way too much time, and 90% of the comments from individual reviewers are the same. That's why we switched to this one-reviewer system.

share|improve this answer
1  
On your last paragraph: if you're doing multi-person reviews it should be in series, not in parallel. Tools such as Atlassian Crucible can make it easy to annotate code with review comments to allow this in a nice way, (although if you don't want things too formal the default config does need altering). (Probably many of the tools in Andrew's answer can do the same - not tried any of those myself). –  Peter Boughton Nov 11 '10 at 16:01
add comment

You want code reviews to be a positive exercise! Here are some tips:

  • Code review early by pair programming! Even if this is only for 30 minutes a day.

  • Use static code analysis tools, style checkers and templates to get rid of the fluff. You can then concentrate on the meatier issues (SRP, design patterns, exception handling, coding to interfaces etc etc) which is what code reviews should be really about (IMHO).

  • Get an agreed checklist between you on what's important and what's not

  • Some sort of Test Driven approach (forces better upfront design) is recommended further down the track

  • There are some really good code review tools out there - I use Crucible personally

  • Make sure that an attitude of 'improve the code' as opposed to 'crticise the coder'. This is vital in keeping everyone's egos happy.

  • Do it regularly, don't skimp on it. Either after a group of commits or 1/day or whatever you agree on.

Good luck!

share|improve this answer
add comment

Easiest way to start code review: just start doing it with one of open-source review tool. http://ostatic.com/blog/open-source-code-review-tools You may start from simple process: every day one developer review code of second developer and vice versa. If review will help you improve your code, than you may think about "real tech process"

share|improve this answer
    
I have never used any of these tools.. I assume they look at your code to figure out what changed and produce a sort of diff so the reviewer can easily review and comment? This seems like it would be a good start. –  staticx Nov 11 '10 at 23:09
1  
Yes. They are working that way. And remember about only one valid metric of code quality :) telio.be/blog/wp-content/uploads/2008/10/wtf-metric-3.jpg –  Andrew Frolov Nov 12 '10 at 11:43
    
@AndrewFrolov Please note, your JPG link is broken (404). –  Zoran Pavlovic Dec 10 '13 at 12:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.