SlideShare una empresa de Scribd logo
1 de 32
Descargar para leer sin conexión
Code Reviews
What, why and how.
-Code review is systematic examination of
computer source code.
!
It is intended to find and fix mistakes overlooked
in the initial development phase, improving both the
overall quality of software and the developers'
skills.
!
Reviews are done in various forms such as pair
programming, informal walkthroughs, and formal
inspections.
Kolawa, Adam; Huizinga, Dorota (2007).
Automated Defect Prevention: Best Practices in Software Management.
Wiley-IEEE Computer Society Press. p. 260.
W H AT
-
The most pessimistic empirical studies show that
code reviews improve error detection on 60%.
[Boehm and Basili 2001] citation from Glass, Robert
Facts and Fallacies of Software Engineering
!
McConnell, Steve
Code Complete
W H Y
-The same studies show that the cost of
inspections is less than the cost of the testing
that would be necessary to find the same errors.
!
Jason Cohen, Steven Teleki & Eric Brown The Case for Peer Review
W H Y
100
200
300
400
500
after dev after CR after QA customer
32
113
180
463
194
321
463463
no CR $368k w/ CR $152k
.
..
-Code Reviews also…
!
enforce accountability
make people write better code in the first time
spread knowledge on product, code…
make developers grow by having feedback
make developers desidentify with the code
enhance team spirit
are fun
W H Y
..
.
.
-
1 push your feature branch with your ninja code
2 send the review
3 add all relevant info to help the reviewers
4 don’t expect immediate feedback, do something else
5 reply to the comments; fix the todos

6 never ever push without having the minimum “shipits” agreed
7 close the review
L I F E C Y C L E
-
Must

can’t go to production without


Question

doubts about the logic, the story…
!
Suggestion
may be implemented on this feature on in another story,
add to the backlog and reference the review
C O M M E N T S
.
.
.
-
1
Time
Take time to review
H O W
-H O W
2
Understand
Try to read everything before commenting
Start by unit tests if there are any
Is it simple? Is it readable?
-H O W
3
Basics
Coding Standards
Indentation
Naming
Simple algorithm improvements
…
We’ll automate most of it once we know it
-H O W
4
Requirement
Does the code do what is in the
requirements?
-H O W
5
Bigger picture
Think about things the developer may not be
taking into consideration
Question the value
-H O W
6
NIH
Is the code reinventing the wheel?
Are there gems/solutions out there?
PFE™
-H O W
7
Errors
Both on logic and business
-H O W
8
Security
XSS
SQL Injection
Encryption
…
-H O W
9
Performance
SQL Overkill
DB Indexes
Slow processes not in background
…
-H O W
10
Architecture
Hardest part IMO, we’ll
focus on learning that later
-H O W
11
Teach
Not only point, try to be didactic
Share things that may not even
be related to the code itself
-H O W
12
Learn
About software, about the project,
about the people
-H O W
13
Be constructive
Code reviews are team work
-H O W
14
Review again
If you sent comments check that they were
fixed or replied
-H O W
Basics
Security
Performance
Errors
Bigger Picture
Requirements
NIH
Architecture
Avoid mistakes
that may be damaging
Get things right
Complex
Simple
Long term maintainability
& productivity boosts
_‫ף‬‫הסו‬

Más contenido relacionado

La actualidad más candente

Symptoms of Bad Quality Software
Symptoms of Bad Quality SoftwareSymptoms of Bad Quality Software
Symptoms of Bad Quality Software
ashokguduru
 

La actualidad más candente (18)

Clean Software Design - DevNot Summit Istanbul 2017
Clean Software Design - DevNot Summit Istanbul 2017Clean Software Design - DevNot Summit Istanbul 2017
Clean Software Design - DevNot Summit Istanbul 2017
 
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 201810 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
10 Faulty Behaviors of Code Review - Developer Summit Istanbul 2018
 
Dude, I just stepped into your code
Dude, I just stepped into your codeDude, I just stepped into your code
Dude, I just stepped into your code
 
Clean Code and Common Engineering Practices
Clean Code and Common Engineering PracticesClean Code and Common Engineering Practices
Clean Code and Common Engineering Practices
 
DevOps & Technical Agility: From Theory to Practice
DevOps & Technical Agility: From Theory to PracticeDevOps & Technical Agility: From Theory to Practice
DevOps & Technical Agility: From Theory to Practice
 
A Pragmatic Introduction to Unit Testing
A Pragmatic Introduction to Unit TestingA Pragmatic Introduction to Unit Testing
A Pragmatic Introduction to Unit Testing
 
Portrait of professional developer 2.0
Portrait of professional developer 2.0Portrait of professional developer 2.0
Portrait of professional developer 2.0
 
Code reviews: a short introduction
Code reviews: a short introductionCode reviews: a short introduction
Code reviews: a short introduction
 
How to review a pull request
How to review a pull requestHow to review a pull request
How to review a pull request
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016
 
Keynote: Lightning Strikes the Keynotes
Keynote: Lightning Strikes the KeynotesKeynote: Lightning Strikes the Keynotes
Keynote: Lightning Strikes the Keynotes
 
Scrum Events and Artifacts in Action
Scrum Events and Artifacts in ActionScrum Events and Artifacts in Action
Scrum Events and Artifacts in Action
 
I Don't Code, Am I No Longer Useful
I Don't Code, Am I No Longer UsefulI Don't Code, Am I No Longer Useful
I Don't Code, Am I No Longer Useful
 
Big Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance NightmaresBig Ball of Mud: Software Maintenance Nightmares
Big Ball of Mud: Software Maintenance Nightmares
 
Symptoms of Bad Quality Software
Symptoms of Bad Quality SoftwareSymptoms of Bad Quality Software
Symptoms of Bad Quality Software
 
Clean code and Coding Standards
Clean code and Coding StandardsClean code and Coding Standards
Clean code and Coding Standards
 
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
Code Review for Teams Too Busy to Review Code - Atlassian Summit 2010
 
Programming the Programmer
Programming the ProgrammerProgramming the Programmer
Programming the Programmer
 

Destacado

Would Static Analysis Tools Help Developers with Code Reviews?
Would Static Analysis Tools Help Developers with Code Reviews?Would Static Analysis Tools Help Developers with Code Reviews?
Would Static Analysis Tools Help Developers with Code Reviews?
Sebastiano Panichella
 

Destacado (13)

Scaling your code review
Scaling your code reviewScaling your code review
Scaling your code review
 
WordCamp US 2016 - Ryan Markel: Code Review
WordCamp US 2016 - Ryan Markel: Code ReviewWordCamp US 2016 - Ryan Markel: Code Review
WordCamp US 2016 - Ryan Markel: Code Review
 
Why you should integrate peer code reviews in your software company
Why you should integrate peer code reviews in your software companyWhy you should integrate peer code reviews in your software company
Why you should integrate peer code reviews in your software company
 
Would Static Analysis Tools Help Developers with Code Reviews?
Would Static Analysis Tools Help Developers with Code Reviews?Would Static Analysis Tools Help Developers with Code Reviews?
Would Static Analysis Tools Help Developers with Code Reviews?
 
Code review
Code reviewCode review
Code review
 
Fix Your Broken Windows With Code Reviews - phpist14
Fix Your Broken Windows With Code Reviews - phpist14Fix Your Broken Windows With Code Reviews - phpist14
Fix Your Broken Windows With Code Reviews - phpist14
 
Code Review
Code ReviewCode Review
Code Review
 
Effective code reviews
Effective code reviewsEffective code reviews
Effective code reviews
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review Process
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool Evaluation
 
How to build a great coding culture
How to build a great coding cultureHow to build a great coding culture
How to build a great coding culture
 
Code reviews - Leave your ego at the door
Code reviews - Leave your ego at the doorCode reviews - Leave your ego at the door
Code reviews - Leave your ego at the door
 
Sass Code Reviews - How one code review changed my life #SassConf2015
Sass Code Reviews - How one code review changed my life #SassConf2015Sass Code Reviews - How one code review changed my life #SassConf2015
Sass Code Reviews - How one code review changed my life #SassConf2015
 

Similar a Code reviews

Code Review
Code ReviewCode Review
Code Review
Ravi Raj
 
11 best practices_for_peer_code_review
11 best practices_for_peer_code_review11 best practices_for_peer_code_review
11 best practices_for_peer_code_review
SmartBear Software
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
Svetlin Nakov
 

Similar a Code reviews (20)

Code Review
Code ReviewCode Review
Code Review
 
Four myths about peer code reviews - 7. ebay tech talk
Four myths about peer code reviews - 7. ebay tech talkFour myths about peer code reviews - 7. ebay tech talk
Four myths about peer code reviews - 7. ebay tech talk
 
11 best practices_for_peer_code_review
11 best practices_for_peer_code_review11 best practices_for_peer_code_review
11 best practices_for_peer_code_review
 
Software Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous Inspection
 
SCA in an Agile World | June 2010
SCA in an Agile World | June 2010SCA in an Agile World | June 2010
SCA in an Agile World | June 2010
 
BsidesMCR_2016-what-can-infosec-learn-from-devops
BsidesMCR_2016-what-can-infosec-learn-from-devopsBsidesMCR_2016-what-can-infosec-learn-from-devops
BsidesMCR_2016-what-can-infosec-learn-from-devops
 
Let's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) reviewLet's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) review
 
Successful Software Projects - What you need to consider
Successful Software Projects - What you need to considerSuccessful Software Projects - What you need to consider
Successful Software Projects - What you need to consider
 
Advanced Python Skills for Data Scientists
Advanced Python Skills for Data ScientistsAdvanced Python Skills for Data Scientists
Advanced Python Skills for Data Scientists
 
Agile Methodologies And Extreme Programming
Agile Methodologies And Extreme ProgrammingAgile Methodologies And Extreme Programming
Agile Methodologies And Extreme Programming
 
What designers can learn from (code) review
What designers can learn from (code) reviewWhat designers can learn from (code) review
What designers can learn from (code) review
 
Agile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin NakovAgile Methodologies And Extreme Programming - Svetlin Nakov
Agile Methodologies And Extreme Programming - Svetlin Nakov
 
Design for Testability in Practice
Design for Testability in PracticeDesign for Testability in Practice
Design for Testability in Practice
 
GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...
GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...
GDG Cloud Southlake 31: Santosh Chennuri and Festus Yeboah: Empowering Develo...
 
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...Beyond Technical Debt: Unconventional techniques to uncover technical and soc...
Beyond Technical Debt: Unconventional techniques to uncover technical and soc...
 
How to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOpsHow to Embed Codeless Test Automation Into DevOps
How to Embed Codeless Test Automation Into DevOps
 
20070921 Uni Softwareengineering
20070921 Uni Softwareengineering20070921 Uni Softwareengineering
20070921 Uni Softwareengineering
 
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
Let the Elephants Leave the Room: Tips for Making Development Life Leaner by ...
 
Automated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps NextAutomated Code Reviews with AI and ML - DevOps Next
Automated Code Reviews with AI and ML - DevOps Next
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
 

Más de Juan Maiz

Reasoning about Code with React
Reasoning about Code with ReactReasoning about Code with React
Reasoning about Code with React
Juan Maiz
 
Ruby para-programadores-php
Ruby para-programadores-phpRuby para-programadores-php
Ruby para-programadores-php
Juan Maiz
 
Ruby para-programadores-php
Ruby para-programadores-phpRuby para-programadores-php
Ruby para-programadores-php
Juan Maiz
 
Ruby para programadores PHP
Ruby para programadores PHPRuby para programadores PHP
Ruby para programadores PHP
Juan Maiz
 
SaaS - RubyMastersConf.com.br
SaaS - RubyMastersConf.com.brSaaS - RubyMastersConf.com.br
SaaS - RubyMastersConf.com.br
Juan Maiz
 
Background Jobs - Com BackgrounDRb
Background Jobs - Com BackgrounDRbBackground Jobs - Com BackgrounDRb
Background Jobs - Com BackgrounDRb
Juan Maiz
 
Introdução ao Ruby on Rails
Introdução ao Ruby on RailsIntrodução ao Ruby on Rails
Introdução ao Ruby on Rails
Juan Maiz
 
rails_and_agile
rails_and_agilerails_and_agile
rails_and_agile
Juan Maiz
 

Más de Juan Maiz (10)

Reasoning about Code with React
Reasoning about Code with ReactReasoning about Code with React
Reasoning about Code with React
 
Ruby para-programadores-php
Ruby para-programadores-phpRuby para-programadores-php
Ruby para-programadores-php
 
Ruby para-programadores-php
Ruby para-programadores-phpRuby para-programadores-php
Ruby para-programadores-php
 
Ruby para programadores PHP
Ruby para programadores PHPRuby para programadores PHP
Ruby para programadores PHP
 
SaaS - RubyMastersConf.com.br
SaaS - RubyMastersConf.com.brSaaS - RubyMastersConf.com.br
SaaS - RubyMastersConf.com.br
 
Saas
SaasSaas
Saas
 
Tree top
Tree topTree top
Tree top
 
Background Jobs - Com BackgrounDRb
Background Jobs - Com BackgrounDRbBackground Jobs - Com BackgrounDRb
Background Jobs - Com BackgrounDRb
 
Introdução ao Ruby on Rails
Introdução ao Ruby on RailsIntrodução ao Ruby on Rails
Introdução ao Ruby on Rails
 
rails_and_agile
rails_and_agilerails_and_agile
rails_and_agile
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

Code reviews

  • 2. -Code review is systematic examination of computer source code. ! It is intended to find and fix mistakes overlooked in the initial development phase, improving both the overall quality of software and the developers' skills. ! Reviews are done in various forms such as pair programming, informal walkthroughs, and formal inspections. Kolawa, Adam; Huizinga, Dorota (2007). Automated Defect Prevention: Best Practices in Software Management. Wiley-IEEE Computer Society Press. p. 260. W H AT
  • 3. - The most pessimistic empirical studies show that code reviews improve error detection on 60%. [Boehm and Basili 2001] citation from Glass, Robert Facts and Fallacies of Software Engineering ! McConnell, Steve Code Complete W H Y
  • 4. -The same studies show that the cost of inspections is less than the cost of the testing that would be necessary to find the same errors. ! Jason Cohen, Steven Teleki & Eric Brown The Case for Peer Review W H Y 100 200 300 400 500 after dev after CR after QA customer 32 113 180 463 194 321 463463 no CR $368k w/ CR $152k
  • 5. . .. -Code Reviews also… ! enforce accountability make people write better code in the first time spread knowledge on product, code… make developers grow by having feedback make developers desidentify with the code enhance team spirit are fun W H Y .. . .
  • 6. - 1 push your feature branch with your ninja code 2 send the review 3 add all relevant info to help the reviewers 4 don’t expect immediate feedback, do something else 5 reply to the comments; fix the todos
 6 never ever push without having the minimum “shipits” agreed 7 close the review L I F E C Y C L E
  • 7.
  • 8. - Must
 can’t go to production without 
 Question
 doubts about the logic, the story… ! Suggestion may be implemented on this feature on in another story, add to the backlog and reference the review C O M M E N T S . . .
  • 9. - 1 Time Take time to review H O W
  • 10. -H O W 2 Understand Try to read everything before commenting Start by unit tests if there are any Is it simple? Is it readable?
  • 11. -H O W 3 Basics Coding Standards Indentation Naming Simple algorithm improvements … We’ll automate most of it once we know it
  • 12.
  • 13. -H O W 4 Requirement Does the code do what is in the requirements?
  • 14. -H O W 5 Bigger picture Think about things the developer may not be taking into consideration Question the value
  • 15.
  • 16. -H O W 6 NIH Is the code reinventing the wheel? Are there gems/solutions out there? PFE™
  • 17. -H O W 7 Errors Both on logic and business
  • 18.
  • 19. -H O W 8 Security XSS SQL Injection Encryption …
  • 20.
  • 21. -H O W 9 Performance SQL Overkill DB Indexes Slow processes not in background …
  • 22.
  • 23. -H O W 10 Architecture Hardest part IMO, we’ll focus on learning that later
  • 24.
  • 25. -H O W 11 Teach Not only point, try to be didactic Share things that may not even be related to the code itself
  • 26.
  • 27. -H O W 12 Learn About software, about the project, about the people
  • 28. -H O W 13 Be constructive Code reviews are team work
  • 29.
  • 30. -H O W 14 Review again If you sent comments check that they were fixed or replied
  • 31. -H O W Basics Security Performance Errors Bigger Picture Requirements NIH Architecture Avoid mistakes that may be damaging Get things right Complex Simple Long term maintainability & productivity boosts