SlideShare a Scribd company logo
Code Review
as a Great Tool in the Agile Toolbox
Matthias Sohn,
Stefan Lay (SAP)
Matthias.sohn@sap.com, stefan.lay@sap.com
Twitter: @masohn @stefanlay
Agenda
How we became agile
What we learned from Open Source
Why we embraced Code Review
How we scale up agile with Open Source processes
Agile Feedback cycles
Source: http://en.wikipedia.org/wiki/Extreme_Programming
Agile Feedback cycles
Pair Programming
Ralph and Karsten hacking on E4
Agile Feedback cycles
Test Driven Development
Agile Feedback cycles
Continuous Integration
Q: Who is who?
Agile Feedback cycles
Code Review?
Sometimes formal Code Review (Fagan style inspection)
Pair Programming is considered to be more agile
• Higher bandwidth (Faster feedback)
• Leads to faster integration than Code Review
• “Individuals and interactions over processes and tools”
Agile Software Engineering
Engineering practices are key
SAP trained its developers
• > 4000 participants
• 1 week training
• 3 weeks coaching
Focus on
• Scrum
• Pair programming
• Test Driven Development
• Continuous Integration
• Acceptance Tests
Code Review in Open Source
Maintainer Hierarchy / Contributors
Public peer review on mailing list
Committer / Contributor model
Public peer review
• Patch in Bugzilla
• Gerrit
• Github
Code Review vs. Pair Programming
Code Review vs. Pair Programming
Code Review
• leads to small, self-contained increments
• ensures that ideas can be understood from code
• leads to review discussions visible to everybody
• leaves room to develop alternative solutions
Ideal complement to Pair Programming
which is great to
• explore unknown terrain
• onboard new developer
• combine complementary skills
Code Review is asynchronous
Can be done when there is time
The whole team can review (also external reviewers)
Review takes time, but also leaves time
This leads to parallel workflow
Git perfectly supports this
Some aspects can be automated
• Rule checking
• Build and test
• Deployment to staging environment
All checks happen before submit
Code Review Best Practices - Author
Small changes are much easier to review
A change should logically do one thing (not many)
Split big changes into series of digestible changes
- These changes depend on each other
- Last change should switch the new feature on
Code Review Best Practices - Author
No change shall break build or tests
Commit message should explain Why
- The What should be obvious from the code change
Classify maturity of change: POC, WIP, RFC
Code Review Best Practices - Reviewer
Comment everything you observe
Classify comments: style nit, optional, can be fixed
later, unrelated change
Code Review Best Practices - Reviewer
Constructive feedback: Propose alternatives
Don’t submit if there are unanswered comments
Code Review Best Practices - Team
Self organized team:
All team members feel responsible to review
Explicit invitations for
- specific topics
- reviewers from other teams
Invited review has high priority
Leave enough time for others to review
Code Review and Scrum
Successful code review required for a task to be finished
Many Done Criteria already checked during code review
Make review visible on Scrum Board
Reserve time for review
Everybody should review
Code Review and Scrum
Scrum Board
Story Bug Fix Review Story A Story B Story C …
Open
In
Progress
In
Review
Done
Code Review with Git and Gerrit
Gerrit is a Code Review system based on JGit
http://code.google.com/p/gerrit/
Also serves as a Git server
Adding access control and workflow
Used by
• Android https://android-review.googlesource.com/
• Eclipse https://git.eclipse.org/r/
• Google, QualComm, SAP, WikiMedia…
Code Review with Git and Gerrit
Code Review with Git and Gerrit
Gerrit usage at SAP started 2010
Projects: > 2.000
Users: > 4.000
Changes: > 300.000
Run by a small team of developers (us)
Training is important (> 400 developers)
Recently Git and Gerrit were approved as standard infrastructure
Scaling Agile with Open Source Processes
Agile processes work great for small teams
Collaboration between teams of a large project?
• Contribute to components owned by other teams
• Review relevant changes of other teams
Contributions between teams
Find project information easily
Standardized infrastructure
Contributor Guide
Finding project info
Finding project info
Standardized infrastructure
git clone <URL>
mvn clean install
Eclipse CBI: http://wiki.eclipse.org/CBI
Project specific
Standardized
Contributor Guide
Where to get the sources
How to setup the project
How to build
Review process
Communication channels
Correction Process
Coding conventions
How to test
Review rules
…
Conclusion
Code Review brings additional value to agile teams
Git and Gerrit help a lot
Improves collaboration within and between teams
Standardization helps to scale
Questions & Answers
Agile Manifesto
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
In a complex and changing environment feedback is key!

More Related Content

What's hot (20)

KEY
Gerrit Workshop
Steffen Gebert
 
PDF
GitLab webcast - Release 8.4
GitLab, Inc
 
PPTX
Git and Gerrit Code Review - Tech Talk - 2010_09_23
msohn
 
PPTX
GitLab 8.5 Highlights and Step-by-step tutorial
Heather McNamee
 
PPTX
Gerrit & Jenkins Workflow: An Integrated CI Demonstration
vanoorts
 
ODP
You shall not pass - Control your code quality gates with a wizard.
Eryk Szymanski
 
PPTX
Git Lab Introduction
Krunal Doshi
 
PPT
Flex and .NET Integration
icaraion
 
PPTX
Git & GitLab
Gaurav Wable
 
PDF
Introducing GitLab (September 2018)
Noa Harel
 
PDF
What's New for GitLab CI/CD February 2020
Noa Harel
 
PPTX
GitLab 8.6 - Release Webcast
GitLab, Inc
 
PPTX
Using Git/Gerrit and Jenkins to Manage the Code Review Processord
Marc Karasek
 
PPTX
Using Github Insight as metric for the Developer collaboration and work metri...
Najib Radzuan
 
PDF
Gerrit Code Review
Johannes Barop
 
PDF
Introducing GitLab (June 2018)
Noa Harel
 
PPTX
Devops and git basics
Sourabh Saxena
 
PPTX
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
Luca Milanesio
 
PDF
Introducing GitLab (September 2018)
Noa Harel
 
PPTX
Gerrit Code Review
Luca Milanesio
 
Gerrit Workshop
Steffen Gebert
 
GitLab webcast - Release 8.4
GitLab, Inc
 
Git and Gerrit Code Review - Tech Talk - 2010_09_23
msohn
 
GitLab 8.5 Highlights and Step-by-step tutorial
Heather McNamee
 
Gerrit & Jenkins Workflow: An Integrated CI Demonstration
vanoorts
 
You shall not pass - Control your code quality gates with a wizard.
Eryk Szymanski
 
Git Lab Introduction
Krunal Doshi
 
Flex and .NET Integration
icaraion
 
Git & GitLab
Gaurav Wable
 
Introducing GitLab (September 2018)
Noa Harel
 
What's New for GitLab CI/CD February 2020
Noa Harel
 
GitLab 8.6 - Release Webcast
GitLab, Inc
 
Using Git/Gerrit and Jenkins to Manage the Code Review Processord
Marc Karasek
 
Using Github Insight as metric for the Developer collaboration and work metri...
Najib Radzuan
 
Gerrit Code Review
Johannes Barop
 
Introducing GitLab (June 2018)
Noa Harel
 
Devops and git basics
Sourabh Saxena
 
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
Luca Milanesio
 
Introducing GitLab (September 2018)
Noa Harel
 
Gerrit Code Review
Luca Milanesio
 

Similar to It's all about feedback - code review as a great tool in the agile toolbox (20)

PDF
Code Review Tool Evaluation
Kate Semizhon
 
PPTX
Code_Review_Presentation_v22222_LLM.pptx
SofienBoutaib
 
PDF
Learning Gerrit Code Review 1st Edition Milanesio 2024 scribd download
tapangdieya
 
PDF
Agile & ALM tools
Larry Cai
 
PPT
Code review
dqpi
 
PPTX
Code Review to the Rescue
Andrei Sviridov
 
PDF
FUG Agile software engineering practices
Serena Software
 
PDF
Learning Gerrit Code Review 1st Edition Milanesio
qrjnysbvs275
 
PDF
Code reviews
Raúl Araya Tauler
 
PDF
Code-Review-Principles-Process-and-Tools (1)
Aditya Bhuyan
 
PDF
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
VincitOy
 
PPTX
Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Dharmesh Sheta
 
PDF
Automated Code Reviews with AI and ML - DevOps Next
Perfecto by Perforce
 
PDF
Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020
Andrew Lavers
 
PDF
Agile Code Reviews for Better Software—Sooner
TechWell
 
PDF
Code Reviews @ Quatico
Jan Wloka
 
PDF
Software Defect Prevention via Continuous Inspection
Josh Gough
 
PPTX
How to successfully grow a code review culture
Danylenko Max
 
PPTX
Никита Манько “Code review”
EPAM Systems
 
PDF
Run your project like it's an OpenSource project
Ian Bull
 
Code Review Tool Evaluation
Kate Semizhon
 
Code_Review_Presentation_v22222_LLM.pptx
SofienBoutaib
 
Learning Gerrit Code Review 1st Edition Milanesio 2024 scribd download
tapangdieya
 
Agile & ALM tools
Larry Cai
 
Code review
dqpi
 
Code Review to the Rescue
Andrei Sviridov
 
FUG Agile software engineering practices
Serena Software
 
Learning Gerrit Code Review 1st Edition Milanesio
qrjnysbvs275
 
Code reviews
Raúl Araya Tauler
 
Code-Review-Principles-Process-and-Tools (1)
Aditya Bhuyan
 
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
VincitOy
 
Marrying Jenkins and Gerrit-Berlin Expert Days 2013
Dharmesh Sheta
 
Automated Code Reviews with AI and ML - DevOps Next
Perfecto by Perforce
 
Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020
Andrew Lavers
 
Agile Code Reviews for Better Software—Sooner
TechWell
 
Code Reviews @ Quatico
Jan Wloka
 
Software Defect Prevention via Continuous Inspection
Josh Gough
 
How to successfully grow a code review culture
Danylenko Max
 
Никита Манько “Code review”
EPAM Systems
 
Run your project like it's an OpenSource project
Ian Bull
 
Ad

Recently uploaded (20)

PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Ad

It's all about feedback - code review as a great tool in the agile toolbox

  • 1. Code Review as a Great Tool in the Agile Toolbox Matthias Sohn, Stefan Lay (SAP) [email protected], [email protected] Twitter: @masohn @stefanlay
  • 2. Agenda How we became agile What we learned from Open Source Why we embraced Code Review How we scale up agile with Open Source processes
  • 3. Agile Feedback cycles Source: http://en.wikipedia.org/wiki/Extreme_Programming
  • 4. Agile Feedback cycles Pair Programming Ralph and Karsten hacking on E4
  • 5. Agile Feedback cycles Test Driven Development
  • 6. Agile Feedback cycles Continuous Integration Q: Who is who?
  • 7. Agile Feedback cycles Code Review? Sometimes formal Code Review (Fagan style inspection) Pair Programming is considered to be more agile • Higher bandwidth (Faster feedback) • Leads to faster integration than Code Review • “Individuals and interactions over processes and tools”
  • 8. Agile Software Engineering Engineering practices are key SAP trained its developers • > 4000 participants • 1 week training • 3 weeks coaching Focus on • Scrum • Pair programming • Test Driven Development • Continuous Integration • Acceptance Tests
  • 9. Code Review in Open Source Maintainer Hierarchy / Contributors Public peer review on mailing list Committer / Contributor model Public peer review • Patch in Bugzilla • Gerrit • Github
  • 10. Code Review vs. Pair Programming
  • 11. Code Review vs. Pair Programming Code Review • leads to small, self-contained increments • ensures that ideas can be understood from code • leads to review discussions visible to everybody • leaves room to develop alternative solutions Ideal complement to Pair Programming which is great to • explore unknown terrain • onboard new developer • combine complementary skills
  • 12. Code Review is asynchronous Can be done when there is time The whole team can review (also external reviewers) Review takes time, but also leaves time This leads to parallel workflow Git perfectly supports this Some aspects can be automated • Rule checking • Build and test • Deployment to staging environment All checks happen before submit
  • 13. Code Review Best Practices - Author Small changes are much easier to review A change should logically do one thing (not many) Split big changes into series of digestible changes - These changes depend on each other - Last change should switch the new feature on
  • 14. Code Review Best Practices - Author No change shall break build or tests Commit message should explain Why - The What should be obvious from the code change Classify maturity of change: POC, WIP, RFC
  • 15. Code Review Best Practices - Reviewer Comment everything you observe Classify comments: style nit, optional, can be fixed later, unrelated change
  • 16. Code Review Best Practices - Reviewer Constructive feedback: Propose alternatives Don’t submit if there are unanswered comments
  • 17. Code Review Best Practices - Team Self organized team: All team members feel responsible to review Explicit invitations for - specific topics - reviewers from other teams Invited review has high priority Leave enough time for others to review
  • 18. Code Review and Scrum Successful code review required for a task to be finished Many Done Criteria already checked during code review Make review visible on Scrum Board Reserve time for review Everybody should review
  • 19. Code Review and Scrum Scrum Board Story Bug Fix Review Story A Story B Story C … Open In Progress In Review Done
  • 20. Code Review with Git and Gerrit Gerrit is a Code Review system based on JGit http://code.google.com/p/gerrit/ Also serves as a Git server Adding access control and workflow Used by • Android https://android-review.googlesource.com/ • Eclipse https://git.eclipse.org/r/ • Google, QualComm, SAP, WikiMedia…
  • 21. Code Review with Git and Gerrit
  • 22. Code Review with Git and Gerrit Gerrit usage at SAP started 2010 Projects: > 2.000 Users: > 4.000 Changes: > 300.000 Run by a small team of developers (us) Training is important (> 400 developers) Recently Git and Gerrit were approved as standard infrastructure
  • 23. Scaling Agile with Open Source Processes Agile processes work great for small teams Collaboration between teams of a large project? • Contribute to components owned by other teams • Review relevant changes of other teams
  • 24. Contributions between teams Find project information easily Standardized infrastructure Contributor Guide
  • 27. Standardized infrastructure git clone <URL> mvn clean install Eclipse CBI: http://wiki.eclipse.org/CBI
  • 28. Project specific Standardized Contributor Guide Where to get the sources How to setup the project How to build Review process Communication channels Correction Process Coding conventions How to test Review rules …
  • 29. Conclusion Code Review brings additional value to agile teams Git and Gerrit help a lot Improves collaboration within and between teams Standardization helps to scale
  • 31. Agile Manifesto Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan In a complex and changing environment feedback is key!

Editor's Notes

  • #4: Focus on thecorevalue „feedback“Letsfocus on theloops relevant forcoding
  • #5: DirectfeedbackFoureyesprincipleKnowledgetransfer
  • #6: Feedback: DoesthecodewhatisexpectedCode ismostimportantartefactGood designTests asdocumentationGoodtestcoverage
  • #7: Feedback: Doesmychangework after integration?StablebuildEarlyintegration -&gt; solvemergeproblemsasearlyaspossibleBuildpipeline
  • #10: Matthias:Review takesplacebefore a changeisintegrated
  • #11: Often PP isconsideredas a good form of Code Review-&gt; But Real Code Review in OS ismore
  • #12: Code isread 10 timesmoreoftenthanwritten
  • #19: Stefan:Asynchronous?Hu…
  • #20: Value-Stream baseddailyscrum -&gt;talk also aboutreviewcolumnReview columnisfor external reviews (mostlyunplanned) -&gt; Open Source andInner Source
  • #21: Maybe
  • #22: Maybe
  • #23: Maybe
  • #28: StandardizedReleasebuild