2. Code Review for Busy Teams
A guide for chronically time-poor developers
Brendan Humphreys, Atlassian
2
2
3. Who am I?
• @brendanh
• Team Lead, FishEye & Crucible
• 12+ years experience doing code review
• 12+ years of trying to do code review better
•
3
3
4. Topics
• Back to basics
• How to we got to where we are
• Three steps towards code review
• Strategies & hurdles
• Some tips for better reviews
•
4
4
19. blocky:~ brendan$ javac hello.java
hello.java:6: cannot find symbol
symbol : variable length
location: class java.lang.String
for (int i = 0; i < s.length; i++) {
^
1 error
19
27. Formal Code Inspection
Fagan, 1976
Finds Defects Early!
Great for mentoring, knowledge sharing
Printed Source code!
Rigid process,
Face-to-face meetings!
Very slow
Impractical for large
codebases
27
28. Pair Programming
Very effective code review, finds
defects early
Great for sharing knowledge,
mentoring
Requires two developers,
co-located
Transient discussion
Personalities
28
46. How to get started
•Go slow
•Just the diffs
•Review the scariest code!
•On demand
•On assignment
46
46
47. Common Hurdles to Adoption
• “It takes too much time”
• "Code reviews can get nasty"
• "We have to stick to XYZ process"
• "I don't want to leave my IDE"
47
47
58. blocky:~ brendan$ ./a.out
On the first day of Christmas my true love gave to me
a partridge in a pear tree.
On the second day of Christmas my true love gave to me
two turtle doves
and a partridge in a pear tree.
On the third day of Christmas my true love gave to me
three french hens, two turtle doves
and a partridge in a pear tree.
On the fourth day of Christmas my true love gave to me
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the fifth day of Christmas my true love gave to me
five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the sixth day of Christmas my true love gave to me
58