Effective Code Review¶
Date: | 2012-07-18 |
---|---|
Speaker: | Dan Menard |
Slides: | http://cdn.oreillystatic.com/en/assets/1/event/80/Effective%20Code%20Review%20Presentation.ppt |
Everyone should do code review!
- Everyone who codes should be involved
Why?¶
- You write better code when you know it will be judged
- More than one person understands the code
- A great way to learn the codebase
What to look for¶
- Bad design
- Lack fo clarity or conformity (style)
- Performance hazards (iterators, leaks)
What’s not important¶
- Optimization (premature!)
- Skill & experience gaps (e.g. novice reviewing expert’s code)
- Personal style (“that’s now how I would have done it”)
When¶
- Fit code review into the dev cycle
- Ad hoc (“is there a better way to ...”)
- Fisheye is a great tool
Remote Teams¶
- Acts as a REAL status update
- Helps manage async coding
- Builds trust & morale
How to sell it to others¶
- Not as hard as unit tests!
- Bottom-up approach (“hey check this code, let me know”)
- JUST DO IT
Tips¶
- Solo projects are no exception!
- Try providing feedback to others and asking for feedback in trade
- Don’t try to define goals, but rather track your direction
- “This is the direction we’re going... are we ok with it?” vs.
- “We should have 173 lines of code per developer per day”