Practical pointers for better code review

K
Welcome
Practical pointers
for better code review
Introduction
● About me: Python dev at Four Digits
– Web stuff
– Python, Django, Wagtail CMS, React
● Slides will be linked from Twitter @keeshink
Code review goals
● Find bugs
● Check if it solves the problem
● Check maintainability
● Share knowledge / onboard people
More goals
● Discuss alternative approaches
● Make less experienced developers learn
● Link to documentation and other sources
● Avoid unwanted new dependencies on external packages
● Check team members’ understanding
● Recognize when (end user) documentation needs update
● Record reasons for code changes
● Recognize when external parties need to be informed
Goal: Check if it solves the problem
● Ask until problem is entirely clear
● Ask until proposed solution is clear
Example: Problem+solution
unclear
● Customer: “When I try
logging in with my
username in CAPITALS, I
get this message in red:
● Developer: OK
Goal: Share knowledge, onboard people
● Ask a “control question”
● Ask questions instead of suggesting changes
● Also comment on what is good in the MR
● As submitter: Put in a TBD, ask for suggestions
● Have agreements / rules for MRs
Goal: Maintainability (1)
● Pretend it’s yours from now on
● Ask until code is clear to you
● Split large MR into small ones
● Review one commit at a time
Goal: Maintainability (2)
● Actively look for similar code elsewhere in the
project
● Consider the name of each class / method /
variable / file
● Follow the code across referenced methods
● Check dependencies’ repo: #devs, last release,
open issues
Example: Code unclear
Goal: Find bugs (1)
● There is no recipe
● Discuss the “interface”
Goal: Find bugs (2: read tests)
● If A B, also test !A !B
→ →
● Run test without fix (should fail)
● Test with edge case inputs
Know the kind of review to do
● Know your project
● Know the timeline
● Know yourself
Thank you
● Thank you for being here
● Thanks to my colleagues for their MRs...
● ...and for reviewing mine!
1 of 14

Recommended

The automation of the process of caring for the quality of the code in PHP an... by
The automation of the process of caring for the quality of the code in PHP an...The automation of the process of caring for the quality of the code in PHP an...
The automation of the process of caring for the quality of the code in PHP an...Krzysztof (Chris) Ozog
192 views21 slides
jSession#6 - Adam Bieńkowski - JGiven - BDD testing in plain Java by
jSession#6 - Adam Bieńkowski - JGiven - BDD testing in plain JavajSession#6 - Adam Bieńkowski - JGiven - BDD testing in plain Java
jSession#6 - Adam Bieńkowski - JGiven - BDD testing in plain JavajSession
159 views44 slides
Is your code ready for testing? by
Is your code ready for testing?Is your code ready for testing?
Is your code ready for testing?Ralph Ligtenberg
198 views15 slides
Technical screening .Net Developer by
Technical screening  .Net DeveloperTechnical screening  .Net Developer
Technical screening .Net DeveloperTom Henricksen
588 views15 slides
Elixir Brasil 2019 - Quality: A Panacéia para seu código Elixir by
Elixir Brasil 2019 - Quality:  A Panacéia para seu código ElixirElixir Brasil 2019 - Quality:  A Panacéia para seu código Elixir
Elixir Brasil 2019 - Quality: A Panacéia para seu código ElixirWeverton Timoteo
532 views48 slides
Test driven development_and_puppet-cfgmgmtcamp_eu-20140402 by
Test driven development_and_puppet-cfgmgmtcamp_eu-20140402Test driven development_and_puppet-cfgmgmtcamp_eu-20140402
Test driven development_and_puppet-cfgmgmtcamp_eu-20140402Johan De Wit
1.2K views32 slides

More Related Content

What's hot

Test Driven Development en Go con Ginkgo y Gomega by
Test Driven Development en Go con Ginkgo y GomegaTest Driven Development en Go con Ginkgo y Gomega
Test Driven Development en Go con Ginkgo y GomegaSoftware Guru
312 views17 slides
Tdd in practice by
Tdd in practiceTdd in practice
Tdd in practiceAndrew Meredith
247 views27 slides
The Psychology of C# Analysis by
The Psychology of C# AnalysisThe Psychology of C# Analysis
The Psychology of C# AnalysisCoverity
35.1K views61 slides
Basics of writing clean code by
Basics of writing clean codeBasics of writing clean code
Basics of writing clean codeKnoldus Inc.
57 views34 slides
Android Frameworks: Highlighting the Need for a Solid Development Framework  by
Android Frameworks: Highlighting the Need for a Solid Development Framework Android Frameworks: Highlighting the Need for a Solid Development Framework 
Android Frameworks: Highlighting the Need for a Solid Development Framework Mutual Mobile
1.9K views19 slides
Code Reviews in Python - PyZh by
Code Reviews in Python - PyZhCode Reviews in Python - PyZh
Code Reviews in Python - PyZhCesar Cardenas Desales
575 views33 slides

What's hot(20)

Test Driven Development en Go con Ginkgo y Gomega by Software Guru
Test Driven Development en Go con Ginkgo y GomegaTest Driven Development en Go con Ginkgo y Gomega
Test Driven Development en Go con Ginkgo y Gomega
Software Guru312 views
The Psychology of C# Analysis by Coverity
The Psychology of C# AnalysisThe Psychology of C# Analysis
The Psychology of C# Analysis
Coverity35.1K views
Basics of writing clean code by Knoldus Inc.
Basics of writing clean codeBasics of writing clean code
Basics of writing clean code
Knoldus Inc.57 views
Android Frameworks: Highlighting the Need for a Solid Development Framework  by Mutual Mobile
Android Frameworks: Highlighting the Need for a Solid Development Framework Android Frameworks: Highlighting the Need for a Solid Development Framework 
Android Frameworks: Highlighting the Need for a Solid Development Framework 
Mutual Mobile1.9K views
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto by Opti Network
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCryptoBitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Opti Network32 views
Last Month in PHP - June through Mid-July 2017 by Eric Poe
Last Month in PHP - June through Mid-July 2017Last Month in PHP - June through Mid-July 2017
Last Month in PHP - June through Mid-July 2017
Eric Poe167 views
SubTests are the Best by Caktus Group
SubTests are the BestSubTests are the Best
SubTests are the Best
Caktus Group106 views
The working architecture of node js applications open tech week javascript ... by Viktor Turskyi
The working architecture of node js applications   open tech week javascript ...The working architecture of node js applications   open tech week javascript ...
The working architecture of node js applications open tech week javascript ...
Viktor Turskyi527 views
Java User Groups in Austria (2013) by Peter Kofler
Java User Groups in Austria (2013)Java User Groups in Austria (2013)
Java User Groups in Austria (2013)
Peter Kofler1.6K views
Acceptance testing with codeception by Deniz Zoeteman
Acceptance testing with codeceptionAcceptance testing with codeception
Acceptance testing with codeception
Deniz Zoeteman173 views
Sphinx options to make training documentation easier to understand by Alexander Loechel
Sphinx options to make training documentation easier to understandSphinx options to make training documentation easier to understand
Sphinx options to make training documentation easier to understand
Alexander Loechel532 views
What is-pmd by 3trg
What is-pmdWhat is-pmd
What is-pmd
3trg753 views
Deliberate Practice, New Learning Styles (2015) by Peter Kofler
Deliberate Practice, New Learning Styles (2015)Deliberate Practice, New Learning Styles (2015)
Deliberate Practice, New Learning Styles (2015)
Peter Kofler1.7K views
How to Review your Translation with 2 Free and Open Source QA Tools by Qabiria
How to Review your Translation with 2 Free and Open Source QA ToolsHow to Review your Translation with 2 Free and Open Source QA Tools
How to Review your Translation with 2 Free and Open Source QA Tools
Qabiria4.5K views
GDCR15 in Las Palmas, Gran Canaria by Peter Kofler
GDCR15 in Las Palmas, Gran CanariaGDCR15 in Las Palmas, Gran Canaria
GDCR15 in Las Palmas, Gran Canaria
Peter Kofler986 views

Similar to Practical pointers for better code review

Effective Code Review by
Effective Code ReviewEffective Code Review
Effective Code ReviewEyal Kenig
25 views11 slides
Overcoming the Fear of Contributing to Open Source by
Overcoming the Fear of Contributing to Open SourceOvercoming the Fear of Contributing to Open Source
Overcoming the Fear of Contributing to Open SourceAll Things Open
94 views35 slides
DockerCon US 2016 - Scaling Open Source operations by
DockerCon US 2016 - Scaling Open Source operationsDockerCon US 2016 - Scaling Open Source operations
DockerCon US 2016 - Scaling Open Source operationsArnaud Porterie
3.3K views27 slides
Kickstarting career as an Android developer.pdf by
Kickstarting career as an Android developer.pdfKickstarting career as an Android developer.pdf
Kickstarting career as an Android developer.pdfShreyaDhurde
14 views50 slides
Code review best practice by
Code review best practiceCode review best practice
Code review best practiceOren Digmi
120 views28 slides
Upstreaming 1013 by
Upstreaming 1013Upstreaming 1013
Upstreaming 1013Linaro
768 views21 slides

Similar to Practical pointers for better code review(20)

Effective Code Review by Eyal Kenig
Effective Code ReviewEffective Code Review
Effective Code Review
Eyal Kenig25 views
Overcoming the Fear of Contributing to Open Source by All Things Open
Overcoming the Fear of Contributing to Open SourceOvercoming the Fear of Contributing to Open Source
Overcoming the Fear of Contributing to Open Source
All Things Open94 views
DockerCon US 2016 - Scaling Open Source operations by Arnaud Porterie
DockerCon US 2016 - Scaling Open Source operationsDockerCon US 2016 - Scaling Open Source operations
DockerCon US 2016 - Scaling Open Source operations
Arnaud Porterie3.3K views
Kickstarting career as an Android developer.pdf by ShreyaDhurde
Kickstarting career as an Android developer.pdfKickstarting career as an Android developer.pdf
Kickstarting career as an Android developer.pdf
ShreyaDhurde14 views
Code review best practice by Oren Digmi
Code review best practiceCode review best practice
Code review best practice
Oren Digmi120 views
Upstreaming 1013 by Linaro
Upstreaming 1013Upstreaming 1013
Upstreaming 1013
Linaro768 views
LCA13: Upstreaming 101 by Linaro
LCA13: Upstreaming 101LCA13: Upstreaming 101
LCA13: Upstreaming 101
Linaro465 views
How to review a pull request by rouanw
How to review a pull requestHow to review a pull request
How to review a pull request
rouanw447 views
Pull requests do's and don'ts by Arie Bregman
Pull requests do's and don'tsPull requests do's and don'ts
Pull requests do's and don'ts
Arie Bregman415 views
LCE12: Intro Training: Upstreaming 101 by Linaro
LCE12: Intro Training: Upstreaming 101LCE12: Intro Training: Upstreaming 101
LCE12: Intro Training: Upstreaming 101
Linaro357 views
Getting started contributing to Apache Spark by Holden Karau
Getting started contributing to Apache SparkGetting started contributing to Apache Spark
Getting started contributing to Apache Spark
Holden Karau178 views
Hidden sides of Code Review (Do-iOS) by Dmitrii Ivanov
Hidden sides of Code Review (Do-iOS)Hidden sides of Code Review (Do-iOS)
Hidden sides of Code Review (Do-iOS)
Dmitrii Ivanov56 views
Software Engineering Primer by Georg Buske
Software Engineering PrimerSoftware Engineering Primer
Software Engineering Primer
Georg Buske46 views
Code Review Best Practices by Trisha Gee
Code Review Best PracticesCode Review Best Practices
Code Review Best Practices
Trisha Gee4.3K views
Software Defect Prevention via Continuous Inspection by Josh Gough
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous Inspection
Josh Gough1.6K views

More from khink

Easy User Interaction testing with Webtest.pdf by
Easy User Interaction testing with Webtest.pdfEasy User Interaction testing with Webtest.pdf
Easy User Interaction testing with Webtest.pdfkhink
16 views38 slides
The Tale of Oscar and the API by
The Tale of Oscar and the APIThe Tale of Oscar and the API
The Tale of Oscar and the APIkhink
497 views17 slides
Mosaic - flexibele layouts voor Plone by
Mosaic - flexibele layouts voor PloneMosaic - flexibele layouts voor Plone
Mosaic - flexibele layouts voor Plonekhink
679 views12 slides
Presentatie gebruikersdag by
Presentatie gebruikersdagPresentatie gebruikersdag
Presentatie gebruikersdagkhink
432 views15 slides
Plone multi language by
Plone multi languagePlone multi language
Plone multi languagekhink
976 views11 slides
Der Freitag, A Use Case by
Der Freitag, A Use CaseDer Freitag, A Use Case
Der Freitag, A Use Casekhink
1.3K views23 slides

More from khink(8)

Easy User Interaction testing with Webtest.pdf by khink
Easy User Interaction testing with Webtest.pdfEasy User Interaction testing with Webtest.pdf
Easy User Interaction testing with Webtest.pdf
khink16 views
The Tale of Oscar and the API by khink
The Tale of Oscar and the APIThe Tale of Oscar and the API
The Tale of Oscar and the API
khink497 views
Mosaic - flexibele layouts voor Plone by khink
Mosaic - flexibele layouts voor PloneMosaic - flexibele layouts voor Plone
Mosaic - flexibele layouts voor Plone
khink679 views
Presentatie gebruikersdag by khink
Presentatie gebruikersdagPresentatie gebruikersdag
Presentatie gebruikersdag
khink432 views
Plone multi language by khink
Plone multi languagePlone multi language
Plone multi language
khink976 views
Der Freitag, A Use Case by khink
Der Freitag, A Use CaseDer Freitag, A Use Case
Der Freitag, A Use Case
khink1.3K views
Hardening Plone, a military-strength CMS by khink
Hardening Plone, a military-strength CMSHardening Plone, a military-strength CMS
Hardening Plone, a military-strength CMS
khink1.5K views
Deliverance for Plone, a use case by khink
Deliverance for Plone, a use caseDeliverance for Plone, a use case
Deliverance for Plone, a use case
khink906 views

Recently uploaded

Copilot Prompting Toolkit_All Resources.pdf by
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdfRiccardo Zamana
10 views4 slides
360 graden fabriek by
360 graden fabriek360 graden fabriek
360 graden fabriekinfo33492
122 views25 slides
Headless JS UG Presentation.pptx by
Headless JS UG Presentation.pptxHeadless JS UG Presentation.pptx
Headless JS UG Presentation.pptxJack Spektor
8 views24 slides
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDeltares
9 views23 slides
Airline Booking Software by
Airline Booking SoftwareAirline Booking Software
Airline Booking SoftwareSharmiMehta
6 views26 slides
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...Deltares
12 views24 slides

Recently uploaded(20)

Copilot Prompting Toolkit_All Resources.pdf by Riccardo Zamana
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdf
Riccardo Zamana10 views
360 graden fabriek by info33492
360 graden fabriek360 graden fabriek
360 graden fabriek
info33492122 views
Headless JS UG Presentation.pptx by Jack Spektor
Headless JS UG Presentation.pptxHeadless JS UG Presentation.pptx
Headless JS UG Presentation.pptx
Jack Spektor8 views
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares9 views
Airline Booking Software by SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta6 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares12 views
Sprint 226 by ManageIQ
Sprint 226Sprint 226
Sprint 226
ManageIQ5 views
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... by sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik7 views
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller40 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller41 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMIPorts-and-Adapters Architecture for Embedded HMI
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert21 views
AI and Ml presentation .pptx by FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8712 views
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports by Ra'Fat Al-Msie'deen
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug ReportsBushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
BushraDBR: An Automatic Approach to Retrieving Duplicate Bug Reports
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
Myths and Facts About Hospice Care: Busting Common Misconceptions by Care Coordinations
Myths and Facts About Hospice Care: Busting Common MisconceptionsMyths and Facts About Hospice Care: Busting Common Misconceptions
Myths and Facts About Hospice Care: Busting Common Misconceptions
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok6 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
DSD-INT 2023 Process-based modelling of salt marsh development coupling Delft... by Deltares
DSD-INT 2023 Process-based modelling of salt marsh development coupling Delft...DSD-INT 2023 Process-based modelling of salt marsh development coupling Delft...
DSD-INT 2023 Process-based modelling of salt marsh development coupling Delft...
Deltares7 views

Practical pointers for better code review

  • 2. Introduction ● About me: Python dev at Four Digits – Web stuff – Python, Django, Wagtail CMS, React ● Slides will be linked from Twitter @keeshink
  • 3. Code review goals ● Find bugs ● Check if it solves the problem ● Check maintainability ● Share knowledge / onboard people
  • 4. More goals ● Discuss alternative approaches ● Make less experienced developers learn ● Link to documentation and other sources ● Avoid unwanted new dependencies on external packages ● Check team members’ understanding ● Recognize when (end user) documentation needs update ● Record reasons for code changes ● Recognize when external parties need to be informed
  • 5. Goal: Check if it solves the problem ● Ask until problem is entirely clear ● Ask until proposed solution is clear
  • 6. Example: Problem+solution unclear ● Customer: “When I try logging in with my username in CAPITALS, I get this message in red: ● Developer: OK
  • 7. Goal: Share knowledge, onboard people ● Ask a “control question” ● Ask questions instead of suggesting changes ● Also comment on what is good in the MR ● As submitter: Put in a TBD, ask for suggestions ● Have agreements / rules for MRs
  • 8. Goal: Maintainability (1) ● Pretend it’s yours from now on ● Ask until code is clear to you ● Split large MR into small ones ● Review one commit at a time
  • 9. Goal: Maintainability (2) ● Actively look for similar code elsewhere in the project ● Consider the name of each class / method / variable / file ● Follow the code across referenced methods ● Check dependencies’ repo: #devs, last release, open issues
  • 11. Goal: Find bugs (1) ● There is no recipe ● Discuss the “interface”
  • 12. Goal: Find bugs (2: read tests) ● If A B, also test !A !B → → ● Run test without fix (should fail) ● Test with edge case inputs
  • 13. Know the kind of review to do ● Know your project ● Know the timeline ● Know yourself
  • 14. Thank you ● Thank you for being here ● Thanks to my colleagues for their MRs... ● ...and for reviewing mine!