SlideShare a Scribd company logo
1
1
Code Review for Busy Teams
A guide for chronically time-poor developers


Brendan Humphreys, Atlassian




                                               2
                                                   2
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
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
#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %dn"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l 
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# 
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' 
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c 
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')#

}'+}##(!!/")
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
  :0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}




                                                                               5
What is it that we do all day?




                                 6
7
8
    8
9
Relative cost of fixing a bug

$$$




      Req.    Design   Coding   Testing   QA   Production


                                                            10
$500 million
payload
               1 line
               software
               defect
$8 billion
rocket



                          11
12
 12
The Rise of Agile




                    13
14
15
16
17
 17
Machines vs Humans




                     18
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
20
21
Smarter Tools
•Checkstyle, Lint, PMD
•Findbugs
•Clover


                         22
                          22
Continuous Feedback




                      23
                       23
Tougher Questions




                       }
• Meet requirements?
• Architecturally sound?
• Futureproof?             Code
• Coding idioms correct?   Review
• Potential reuse
• Domain knowledge
                                    24
                                     24
25
Code Review
• “Systematic review of code by peers”
 • reduce defects
 • spread code ownership
 • mentor developers




                                         26
                                          26
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
Pair Programming
            Very effective code review, finds
            defects early
            Great for sharing knowledge,
            mentoring
            Requires two developers,
            co-located
            Transient discussion
            Personalities

                                                28
Tool-assisted Code Review
•Managed workflow and notification
•Record of discussion
•Asynchronous
•Change team culture?

                                   29
                                    29
3 steps towards a code review
culture
•Make activity visible
•Make code sharable
•Encourage discussions around code


                                     30
                                      30
Making Activity Visible




                          31
FishEye: Unlock your repository




                                  32
                                   32
Making Activity Visible

• The FishEye
  Activity Stream
  • Web
  • RSS
  • Watches
  • JIRA
•                              33
                                33
34
Making Code Sharable

• FishEye makes it easy to share code
  pointers
  • File revisions
  • Source Lines
  • Diffs
  • ChangeSets
•                                       35
                                         35
Encouraging
Discussions
Around code




              36
               36
Crucible: Lightweight Code Review




                                    37
                                     37
Crucible: ChangeSet Discussions



                                  38
                                   38
39
ChangeSet Discussions
• Simple way to provide ad-hoc feedback
• Threaded discussions
• ChangeSet author notified
• Appear in Activity Stream
• Preserved as annotation to ChangeSet
•                                         40
                                           40
Crucible: Snippets



                     41
                      41
42
Snippets
• Simple “paste-bin” service
• Anyone can comment, reply, raise defect
• All participants notified
• Appear in activity stream
• Durable, sharable

                                            43
                                             43
Crucible: “formal” review

• Simple workflow
  • draft, review, summarize, close
• Manage review workload
  • target particular reviewers
• Advanced features
  • Pre-commit, Iterative, create from JIRA
                                              44
                                               44
45
How to get started

•Go slow
•Just the diffs
•Review the scariest code!
•On demand
•On assignment
                             46
                              46
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
Four tips for better reviews




                               48
                                48
#1:
Strive for
Ego-Free
Reviews
             49
#1: Ego-Free Reviews
• No personal Pronouns
• No point scoring
• Moderator to police



                           50
#2:
Don’t be a
 Pedant

             51
#2: Don’t be a Pedant

 • Use tools to enforce errors
   style, catch common
                        coding


 • Look for the forest, not the
   trees




                                  52
#3: Find
 Problems,
Not Solutions

                53
#3: Find Problems, Not Solutions

• Except for trivial fixes
• Pair program instead


                                          54
#4: Embrace Feedback
                       55
#4: Embrace Feedback

• You will learn from it!
• You will learn to love it!



                               56
#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %dn"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l 
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# 
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' 
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c 
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')#

}'+}##(!!/")
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
  :0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}




                                                                               57
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
#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %dn"):9:16:t<0?t<-72?main(_,t,
"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#
;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l 
q#'+d'K#!/+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# 
){nl]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#n'wk nw' 
iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c 
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;#'rdq#w! nr'/ ') }+}{rl#'{n' ')#

}'+}##(!!/")
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=='/')+t,_,a+1)
  :0<t?main(2,2,"%s"):*a=='/'||main(0,main(-61,*a,
"!ek;dc i@bK'(q)-[w]*%n+r3#l,{}:nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}




                                                                               59
60
 60

More Related Content

PDF
On to code review lessons learned at microsoft
PPTX
Improving Code Quality Through Effective Review Process
DOCX
Code review guidelines
PPTX
Code Review
PDF
Performance Wins with eBPF: Getting Started (2021)
PPTX
Code review
PPTX
Code Review Best Practices
PDF
Introduction to eBPF
On to code review lessons learned at microsoft
Improving Code Quality Through Effective Review Process
Code review guidelines
Code Review
Performance Wins with eBPF: Getting Started (2021)
Code review
Code Review Best Practices
Introduction to eBPF

What's hot (20)

PPTX
01 - Git vs SVN
PPTX
Agile code quality metrics
PPT
Spring Batch 2.0
PPTX
Getting started with Jenkins
PDF
Stream Processing using Apache Flink in Zalando's World of Microservices - Re...
PDF
UNYOUG - APEX 19.2 New Features
PDF
Git 101: Git and GitHub for Beginners
PDF
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
PDF
Amazon EKS - security best practices - 2022
PDF
Accelerating Envoy and Istio with Cilium and the Linux Kernel
PDF
Basic Kong API Gateway
PPTX
Tuning Apache Kafka Connectors for Flink.pptx
PPTX
Exploring Java Heap Dumps (Oracle Code One 2018)
PPTX
Autoscaling Flink with Reactive Mode
PPTX
A topology of memory leaks on the JVM
PDF
Linux Profiling at Netflix
PDF
Flink SQL: The Challenges to Build a Streaming SQL Engine
PPTX
Jenkins tutorial for beginners
PDF
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
PPTX
Kibana overview
01 - Git vs SVN
Agile code quality metrics
Spring Batch 2.0
Getting started with Jenkins
Stream Processing using Apache Flink in Zalando's World of Microservices - Re...
UNYOUG - APEX 19.2 New Features
Git 101: Git and GitHub for Beginners
Jenkins Pipeline Tutorial | Continuous Delivery Pipeline Using Jenkins | DevO...
Amazon EKS - security best practices - 2022
Accelerating Envoy and Istio with Cilium and the Linux Kernel
Basic Kong API Gateway
Tuning Apache Kafka Connectors for Flink.pptx
Exploring Java Heap Dumps (Oracle Code One 2018)
Autoscaling Flink with Reactive Mode
A topology of memory leaks on the JVM
Linux Profiling at Netflix
Flink SQL: The Challenges to Build a Streaming SQL Engine
Jenkins tutorial for beginners
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Kibana overview
Ad

Viewers also liked (9)

PDF
Who Should Review My Code?
PDF
Code Review: How and When
PDF
Why you should integrate peer code reviews in your software company
PPT
Code Review
PDF
Code review
PDF
Code reviews
PDF
Takeaways From Migrating to Git and Bitbucket Server
PDF
Code Review Tool Evaluation
PPTX
Code reviews - Leave your ego at the door
Who Should Review My Code?
Code Review: How and When
Why you should integrate peer code reviews in your software company
Code Review
Code review
Code reviews
Takeaways From Migrating to Git and Bitbucket Server
Code Review Tool Evaluation
Code reviews - Leave your ego at the door
Ad

Similar to Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010 (20)

PPTX
Software Quality via Unit Testing
PDF
Tooling for the JavaScript Era
PDF
Effective code reviews
PDF
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
PPTX
Quickly and Effectively Testing Legacy c++ Code with Approval Tests mu cpp
PPTX
Simple Ruby DSL Techniques: Big Project Impact!
PDF
Effective code reviews
PPTX
Clean code, Feb 2012
PDF
Polyglot and Poly-paradigm Programming for Better Agility
PPTX
Coding Standard And Code Review
PDF
ScalaClean at ScalaSphere 2019
PDF
Git and GitHub for Documentation
PPTX
Cleaning Code - Tools and Techniques for Large Legacy Projects
PDF
A look inside pandas design and development
PPTX
Art of refactoring - Code Smells and Microservices Antipatterns
PPT
Code reviews: a short introduction
PDF
PDF
Core Principles Of Ci
PDF
優化開發環境 無料提升戰鬥力
PPTX
Executing for Every Screen: Build, launch and sustain products for your custo...
Software Quality via Unit Testing
Tooling for the JavaScript Era
Effective code reviews
Technical Excellence Doesn't Just Happen--Igniting a Craftsmanship Culture
Quickly and Effectively Testing Legacy c++ Code with Approval Tests mu cpp
Simple Ruby DSL Techniques: Big Project Impact!
Effective code reviews
Clean code, Feb 2012
Polyglot and Poly-paradigm Programming for Better Agility
Coding Standard And Code Review
ScalaClean at ScalaSphere 2019
Git and GitHub for Documentation
Cleaning Code - Tools and Techniques for Large Legacy Projects
A look inside pandas design and development
Art of refactoring - Code Smells and Microservices Antipatterns
Code reviews: a short introduction
Core Principles Of Ci
優化開發環境 無料提升戰鬥力
Executing for Every Screen: Build, launch and sustain products for your custo...

More from Atlassian (20)

PPTX
International Women's Day 2020
PDF
10 emerging trends that will unbreak your workplace in 2020
PDF
Forge App Showcase
PDF
Let's Build an Editor Macro with Forge UI
PDF
Meet the Forge Runtime
PDF
Forge UI: A New Way to Customize the Atlassian User Experience
PDF
Take Action with Forge Triggers
PDF
Observability and Troubleshooting in Forge
PDF
Trusted by Default: The Forge Security & Privacy Model
PDF
Designing Forge UI: A Story of Designing an App UI System
PDF
Forge: Under the Hood
PDF
Access to User Activities - Activity Platform APIs
PDF
Design Your Next App with the Atlassian Vendor Sketch Plugin
PDF
Tear Up Your Roadmap and Get Out of the Building
PDF
Nailing Measurement: a Framework for Measuring Metrics that Matter
PDF
Building Apps With Color Blind Users in Mind
PDF
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
PDF
Beyond Diversity: A Guide to Building Balanced Teams
PDF
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
PDF
Building Apps With Enterprise in Mind
International Women's Day 2020
10 emerging trends that will unbreak your workplace in 2020
Forge App Showcase
Let's Build an Editor Macro with Forge UI
Meet the Forge Runtime
Forge UI: A New Way to Customize the Atlassian User Experience
Take Action with Forge Triggers
Observability and Troubleshooting in Forge
Trusted by Default: The Forge Security & Privacy Model
Designing Forge UI: A Story of Designing an App UI System
Forge: Under the Hood
Access to User Activities - Activity Platform APIs
Design Your Next App with the Atlassian Vendor Sketch Plugin
Tear Up Your Roadmap and Get Out of the Building
Nailing Measurement: a Framework for Measuring Metrics that Matter
Building Apps With Color Blind Users in Mind
Creating Inclusive Experiences: Balancing Personality and Accessibility in UX...
Beyond Diversity: A Guide to Building Balanced Teams
The Road(map) to Las Vegas - The Story of an Emerging Self-Managed Team
Building Apps With Enterprise in Mind

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
cuic standard and advanced reporting.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
KodekX | Application Modernization Development
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
MIND Revenue Release Quarter 2 2025 Press Release
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Spectroscopy.pptx food analysis technology
Review of recent advances in non-invasive hemoglobin estimation
MYSQL Presentation for SQL database connectivity
Understanding_Digital_Forensics_Presentation.pptx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
cuic standard and advanced reporting.pdf
sap open course for s4hana steps from ECC to s4
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
KodekX | Application Modernization Development
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Network Security Unit 5.pdf for BCA BBA.
MIND Revenue Release Quarter 2 2025 Press Release

Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010