Code Reviewas a Great Tool in the Agile ToolboxMatthias Sohn,Stefan Lay (SAP)Matthias.sohn@sap.com, stefan.lay@sap.comTwit...
AgendaHow we became agileWhat we learned from Open SourceWhy we embraced Code ReviewHow we scale up agile with Open Source...
Agile Feedback cyclesSource: http://en.wikipedia.org/wiki/Extreme_Programming
Agile Feedback cyclesPair ProgrammingRalph and Karsten hacking on E4
Agile Feedback cyclesTest Driven Development
Agile Feedback cyclesContinuous IntegrationQ: Who is who?
Agile Feedback cyclesCode Review?Sometimes formal Code Review (Fagan style inspection)Pair Programming is considered to be...
Agile Software EngineeringEngineering practices are keySAP trained its developers• > 4000 participants• 1 week training• 3...
Code Review in Open SourceMaintainer Hierarchy / ContributorsPublic peer review on mailing listCommitter / Contributor mod...
Code Review vs. Pair Programming
Code Review vs. Pair ProgrammingCode Review• leads to small, self-contained increments• ensures that ideas can be understo...
Code Review is asynchronousCan be done when there is timeThe whole team can review (also external reviewers)Review takes t...
Code Review Best Practices - AuthorSmall changes are much easier to reviewA change should logically do one thing (not many...
Code Review Best Practices - AuthorNo change shall break build or testsCommit message should explain Why- The What should ...
Code Review Best Practices - ReviewerComment everything you observeClassify comments: style nit, optional, can be fixedlat...
Code Review Best Practices - ReviewerConstructive feedback: Propose alternativesDon’t submit if there are unanswered comme...
Code Review Best Practices - TeamSelf organized team:All team members feel responsible to reviewExplicit invitations for- ...
Code Review and ScrumSuccessful code review required for a task to be finishedMany Done Criteria already checked during co...
Code Review and ScrumScrum BoardStory Bug Fix Review Story A Story B Story C …OpenInProgressInReviewDone
Code Review with Git and GerritGerrit is a Code Review system based on JGithttp://code.google.com/p/gerrit/Also serves as ...
Code Review with Git and Gerrit
Code Review with Git and GerritGerrit usage at SAP started 2010Projects: > 2.000Users: > 4.000Changes: > 300.000Run by a s...
Scaling Agile with Open Source ProcessesAgile processes work great for small teamsCollaboration between teams of a large p...
Contributions between teamsFind project information easilyStandardized infrastructureContributor Guide
Finding project info
Finding project info
Standardized infrastructuregit clone <URL>mvn clean installEclipse CBI: http://wiki.eclipse.org/CBI
Project specificStandardizedContributor GuideWhere to get the sourcesHow to setup the projectHow to buildReview processCom...
ConclusionCode Review brings additional value to agile teamsGit and Gerrit help a lotImproves collaboration within and bet...
Questions & Answers
Agile ManifestoIndividuals and interactions over processes and toolsWorking software over comprehensive documentationCusto...
Upcoming SlideShare
Loading in...5
×

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

969

Published on

Talk held 2013 at EclipseCon Boston and EclipseCon France

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
969
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Focus on thecorevalue „feedback“Letsfocus on theloops relevant forcoding
  • DirectfeedbackFoureyesprincipleKnowledgetransfer
  • Feedback: DoesthecodewhatisexpectedCode ismostimportantartefactGood designTests asdocumentationGoodtestcoverage
  • Feedback: Doesmychangework after integration?StablebuildEarlyintegration -&gt; solvemergeproblemsasearlyaspossibleBuildpipeline
  • Matthias:Review takesplacebefore a changeisintegrated
  • Often PP isconsideredas a good form of Code Review-&gt; But Real Code Review in OS ismore
  • Code isread 10 timesmoreoftenthanwritten
  • Stefan:Asynchronous?Hu…
  • Value-Stream baseddailyscrum -&gt;talk also aboutreviewcolumnReview columnisfor external reviews (mostlyunplanned) -&gt; Open Source andInner Source
  • Maybe
  • Maybe
  • Maybe
  • StandardizedReleasebuild
  • It's all about feedback - code review as a great tool in the agile toolbox

    1. 1. Code Reviewas a Great Tool in the Agile ToolboxMatthias Sohn,Stefan Lay (SAP)Matthias.sohn@sap.com, stefan.lay@sap.comTwitter: @masohn @stefanlay
    2. 2. AgendaHow we became agileWhat we learned from Open SourceWhy we embraced Code ReviewHow we scale up agile with Open Source processes
    3. 3. Agile Feedback cyclesSource: http://en.wikipedia.org/wiki/Extreme_Programming
    4. 4. Agile Feedback cyclesPair ProgrammingRalph and Karsten hacking on E4
    5. 5. Agile Feedback cyclesTest Driven Development
    6. 6. Agile Feedback cyclesContinuous IntegrationQ: Who is who?
    7. 7. Agile Feedback cyclesCode 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. 8. Agile Software EngineeringEngineering practices are keySAP trained its developers• > 4000 participants• 1 week training• 3 weeks coachingFocus on• Scrum• Pair programming• Test Driven Development• Continuous Integration• Acceptance Tests
    9. 9. Code Review in Open SourceMaintainer Hierarchy / ContributorsPublic peer review on mailing listCommitter / Contributor modelPublic peer review• Patch in Bugzilla• Gerrit• Github
    10. 10. Code Review vs. Pair Programming
    11. 11. Code Review vs. Pair ProgrammingCode 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 solutionsIdeal complement to Pair Programmingwhich is great to• explore unknown terrain• onboard new developer• combine complementary skills
    12. 12. Code Review is asynchronousCan be done when there is timeThe whole team can review (also external reviewers)Review takes time, but also leaves timeThis leads to parallel workflowGit perfectly supports thisSome aspects can be automated• Rule checking• Build and test• Deployment to staging environmentAll checks happen before submit
    13. 13. Code Review Best Practices - AuthorSmall changes are much easier to reviewA 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. 14. Code Review Best Practices - AuthorNo change shall break build or testsCommit message should explain Why- The What should be obvious from the code changeClassify maturity of change: POC, WIP, RFC
    15. 15. Code Review Best Practices - ReviewerComment everything you observeClassify comments: style nit, optional, can be fixedlater, unrelated change
    16. 16. Code Review Best Practices - ReviewerConstructive feedback: Propose alternativesDon’t submit if there are unanswered comments
    17. 17. Code Review Best Practices - TeamSelf organized team:All team members feel responsible to reviewExplicit invitations for- specific topics- reviewers from other teamsInvited review has high priorityLeave enough time for others to review
    18. 18. Code Review and ScrumSuccessful code review required for a task to be finishedMany Done Criteria already checked during code reviewMake review visible on Scrum BoardReserve time for reviewEverybody should review
    19. 19. Code Review and ScrumScrum BoardStory Bug Fix Review Story A Story B Story C …OpenInProgressInReviewDone
    20. 20. Code Review with Git and GerritGerrit is a Code Review system based on JGithttp://code.google.com/p/gerrit/Also serves as a Git serverAdding access control and workflowUsed by• Android https://android-review.googlesource.com/• Eclipse https://git.eclipse.org/r/• Google, QualComm, SAP, WikiMedia…
    21. 21. Code Review with Git and Gerrit
    22. 22. Code Review with Git and GerritGerrit usage at SAP started 2010Projects: > 2.000Users: > 4.000Changes: > 300.000Run by a small team of developers (us)Training is important (> 400 developers)Recently Git and Gerrit were approved as standard infrastructure
    23. 23. Scaling Agile with Open Source ProcessesAgile processes work great for small teamsCollaboration between teams of a large project?• Contribute to components owned by other teams• Review relevant changes of other teams
    24. 24. Contributions between teamsFind project information easilyStandardized infrastructureContributor Guide
    25. 25. Finding project info
    26. 26. Finding project info
    27. 27. Standardized infrastructuregit clone <URL>mvn clean installEclipse CBI: http://wiki.eclipse.org/CBI
    28. 28. Project specificStandardizedContributor GuideWhere to get the sourcesHow to setup the projectHow to buildReview processCommunication channelsCorrection ProcessCoding conventionsHow to testReview rules…
    29. 29. ConclusionCode Review brings additional value to agile teamsGit and Gerrit help a lotImproves collaboration within and between teamsStandardization helps to scale
    30. 30. Questions & Answers
    31. 31. Agile ManifestoIndividuals and interactions over processes and toolsWorking software over comprehensive documentationCustomer collaboration over contract negotiationResponding to change over following a planIn a complex and changing environment feedback is key!

    ×