Code Reviews

jmcada on 2005-06-21T03:50:15

At our company Perl users group meeting this month we got into a small discussion about code reviews. We push out a lot of code internally and are now in the process of creating a repository of useful modules and scripts that we can share between developers across solutions. However, before we actually release the code, we've decided to have two others sign-off on the code. This leads to the question of what all a review entails?

Some suggestions were to read through the code and make sure that:

  • The code doesn't repeat something that is already available
  • The code does what it says it will
  • The code is it extendable and maintainable
Some things that we didn't get into, but that probably still need to be done include:
  • Make sure the code is properly documented
  • Make sure the code installs cleanly
  • Make sure every function works
How deep do you guys go in your code reviews? Should you go as far as suggesting alternative methods of getting things done and risk stepping on toes? Should you just trust that the other person had their shit together and sign off if it looks like it should work?