Episode 54: Code Review
Podcast: Play in new window | Download
Code review will decrease your bugs, but is it worth the cost?
Geek Tool
- 00:46 - Logitech Internet Chat Headset
Webapps
- 02:17 - LogMeIn Express – Free NAT traversing remote support tool
- 05:57 – FriendPaste - Past things to friends and comment on specific lines
- Submitted by Cedric Weatherly
Topic
- 09:06 – Code Review
- Why?
- Memory Leaks
- Security vulnerabilities
- Usability (DSL)
- Programmers tend to not like code review
- Give your own code out for review to encourage others to do the same
- Tempt the programmers ego by saying, “I dare you to find a fault in this code”
- Try to convince them that code review is not personal.
- 13:43 – Two main types
- Formal Code Review
- Formal Inspections catch 60% of bugs – Hewlett Packard
- Inspections improve programmer productivity by 20% and typically decrease overall project cost – Wiegers 2002
- Lightweight Code Review
- Over the shoulder or “Walk-Throughs” – One developer explains his code to one of his peers, 20-40%
- Email pass around – Automatic email when code is checked in
- Pair Programming – Two developers working together on one computer, 40-60%
- Tool-assisted Code review
- Formal Code Review
- 18:26 – Pair Programming (Episode 5)
- Keys to success
- Support pair programming with coding standards
- Don’t let it turn in to watching
- Don’t force pair programming of the easy stuff
- Rotate pairs and work assignments regularly
- Encourage pairs to match each other’s pace
- Don’t force people who don’t get along to pair program
- Avoid pairing people together that are new a pair programming
- Keys to success
February 2nd, 2010 at 10:33 am
“Google requires code review for any change to company code or configuration files; there are a few exceptions, but those are subject to review after deployment.”
– http://lwn.net/Articles/359489/
February 2nd, 2010 at 10:37 am
@Jeff, so does google do a formal code review process? Distributed snippets? I’m very curious what the work flow is.
February 4th, 2010 at 8:25 am
We have kicked around pair programming but we can’t get upper management to buy off on it.
February 4th, 2010 at 3:27 pm
That is a bummer, we find that it is pretty effective here!
February 16th, 2010 at 9:18 am
I can’t agree with coders’ emotions about their code. Personally, I generally hate code I’ve written after a short time.
Good programmers realize that their code is all crap.
December 23rd, 2010 at 6:00 pm
We have kicked around pair programming but we can’t get upper management to buy off on it.
December 30th, 2010 at 9:48 am
@Ruthie: Very difficult to do. Just make sure you have clear statements of the benefits and perhaps some scientific studies if you can. Also asking for just some time to try it, say 6 months, and then re-evaluating it with management could be beneficial.