SlideShare a Scribd company logo
1 of 39
MASTERING CODE REVIEWS
DERIK WHITTAKER
DERIK.WHITTAKER@GMAIL.COM
@DERIKWHITTAKER
HTTP://DERIKWHITTAKER.BLOG
SENIOR SOFTWARE ENGINEER @ QUICKEN LOANS
PLAN OF ACTION
Why do Code Reviews?
What Makes a GOOD Code Review?
What Makes a BAD Code Review?
Explore different TYPES of Code Reviews!
Rules of ENGAGEMENT for Code Reviews!
WHAT IS A CODE REVIEW?
An examination of code which is intended to find
overlooked mistakes which can cause future bugs. With
the goal to improve overall quality of code and to share
knowledge
WHY DO CODE REVIEWS?
WHY DO CODE REVIEWS?
Find potential bugs
WHY DO CODE REVIEWS?
Improve System Design
WHY DO CODE REVIEWS?
Increase Knowledge Sharing
WHAT MAKES FOR A GOOD CODE REVIEW?
WHAT MAKES FOR A GOOD CODE REVIEW?
Have a check list
JAVASCRIPT CHECKLIST IDEAS
 Does is pass linting?
 Is the code well factored?
 Using Promises (or async) vs callbacks
 Are variables scoped correctly?
 No use of `var`, use Const or Let as appropriate
 Has Unit test coverage
WHAT MAKES FOR A GOOD CODE REVIEW?
Time Box the Review
WHAT MAKES FOR A GOOD CODE REVIEW?
Put in the Effort
WHAT MAKES FOR A GOOD CODE REVIEW?
Critique the code, not the coder
WHAT MAKES FOR A GOOD CODE REVIEW?
Keeping it Positive
WHAT MAKES FOR A GOOD CODE REVIEW?
Attempt to see through the eyes of the Coder
WHAT MAKES FOR A GOOD CODE REVIEW?
Ask Productive Questions
WHAT MAKES FOR A BAD CODE REVIEW
WHAT MAKES FOR A BAD CODE REVIEW?
Not having a plan
WHAT MAKES FOR A BAD CODE REVIEW?
Getting lost in the weeds.
(aka focusing on the wrong items)
WHAT MAKES FOR A BAD CODE REVIEW?
Attacking the Coder
WHAT MAKES FOR A BAD CODE REVIEW?
Talking in Absolutes
WHAT MAKES FOR A BAD CODE REVIEW?
Negative Words
WHAT MAKES FOR A BAD CODE REVIEW?
Debating Coding Styles
EXPLORE DIFFERENT TYPES OF CODE REVIEWS
EXPLORE DIFFERENT TYPES OF CODE REVIEWS
Async Code Reviews!
EXPLORE DIFFERENT TYPES OF CODE REVIEWS
Group/Online Review
WHAT THE RULES OF ENGAGEMENT FOR CODE REVIEWS
WHAT THE RULES OF ENGAGEMENT FOR CODE REVIEWS
Have a checklist
WHAT THE RULES OF ENGAGEMENT FOR CODE REVIEWS
Determine type of code review
WHAT THE RULES OF ENGAGEMENT FOR CODE REVIEWS
Determine Comment/Feedback Strategy
WHAT THE RULES OF ENGAGEMENT FOR CODE REVIEWS
Determine Requirements for Adopting Feedback
THINGS TO LOOK FOR IN CODE REVIEWS
THINGS TO LOOK FOR IN CODE REVIEWS
Logic/Business Bugs
THINGS TO LOOK FOR IN CODE REVIEWS
Performance Issues
THINGS TO LOOK FOR IN CODE REVIEWS
Overly Complicated/Duplicated Code
THINGS TO LOOK FOR IN CODE REVIEWS
Security Concerns
THINGS TO LOOK FOR IN CODE REVIEWS
Simplicity over cleverness
THINGS TO LOOK FOR IN CODE REVIEWS
Following Existing Patterns
Mastering Code Reviews

More Related Content

What's hot

Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and WhenPaul Gower
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelinesLalit Kale
 
BDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityBDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityJohn Ferguson Smart Limited
 
성공적인코드리뷰 문화 사내 발표
성공적인코드리뷰 문화 사내 발표성공적인코드리뷰 문화 사내 발표
성공적인코드리뷰 문화 사내 발표Byoenghan Baek
 
BDD and Test Automation Tech Talk - Atlogys Academy Series
BDD and Test Automation Tech Talk - Atlogys Academy SeriesBDD and Test Automation Tech Talk - Atlogys Academy Series
BDD and Test Automation Tech Talk - Atlogys Academy SeriesAtlogys Technical Consulting
 
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 2018Lemi Orhan Ergin
 
Effective Code Reviews
Effective Code ReviewsEffective Code Reviews
Effective Code ReviewsFrank Sons
 
Being Test-Driven: It's not really about testing
Being Test-Driven: It's not really about testingBeing Test-Driven: It's not really about testing
Being Test-Driven: It's not really about testingRaj Indugula
 

What's hot (16)

BDD: There's more to it than you think
BDD: There's more to it than you thinkBDD: There's more to it than you think
BDD: There's more to it than you think
 
Code Review: How and When
Code Review: How and WhenCode Review: How and When
Code Review: How and When
 
Help! My Legacy Application is Unmaintainable!
Help! My Legacy Application is Unmaintainable!Help! My Legacy Application is Unmaintainable!
Help! My Legacy Application is Unmaintainable!
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelines
 
BDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and SerenityBDD in Action - Automated Web Testing with WebDriver and Serenity
BDD in Action - Automated Web Testing with WebDriver and Serenity
 
성공적인코드리뷰 문화 사내 발표
성공적인코드리뷰 문화 사내 발표성공적인코드리뷰 문화 사내 발표
성공적인코드리뷰 문화 사내 발표
 
Code Quality Assurance
Code Quality AssuranceCode Quality Assurance
Code Quality Assurance
 
BDD and Test Automation Tech Talk - Atlogys Academy Series
BDD and Test Automation Tech Talk - Atlogys Academy SeriesBDD and Test Automation Tech Talk - Atlogys Academy Series
BDD and Test Automation Tech Talk - Atlogys Academy Series
 
While You Are Coding
While You Are CodingWhile You Are Coding
While You Are Coding
 
Code detox
Code detoxCode detox
Code detox
 
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
 
BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014
 
BDD in Action - building software that matters
BDD in Action - building software that mattersBDD in Action - building software that matters
BDD in Action - building software that matters
 
Effective Code Reviews
Effective Code ReviewsEffective Code Reviews
Effective Code Reviews
 
Its testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxxIts testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxx
 
Being Test-Driven: It's not really about testing
Being Test-Driven: It's not really about testingBeing Test-Driven: It's not really about testing
Being Test-Driven: It's not really about testing
 

Similar to Mastering Code Reviews

The Anatomy of a Code Review
The Anatomy of a Code ReviewThe Anatomy of a Code Review
The Anatomy of a Code ReviewGuilherme Garnier
 
Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020
Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020
Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020Andrew Lavers
 
How to successfully grow a code review culture
How to successfully grow a code review cultureHow to successfully grow a code review culture
How to successfully grow a code review cultureNina Zakharenko
 
Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)David Stockton
 
Code review best practice
Code review best practiceCode review best practice
Code review best practiceOren Digmi
 
Code Review Best Practices
Code Review Best PracticesCode Review Best Practices
Code Review Best PracticesTrisha Gee
 
Revisiting Refactoring
Revisiting RefactoringRevisiting Refactoring
Revisiting RefactoringNick Harrison
 
Revisiting refactoring
Revisiting refactoringRevisiting refactoring
Revisiting refactoringNick Harrison
 
Voxxed days 2015-hakansaglam-codereview
Voxxed days 2015-hakansaglam-codereviewVoxxed days 2015-hakansaglam-codereview
Voxxed days 2015-hakansaglam-codereviewHakan Saglam
 
Code quality as a built-in process
Code quality as a built-in processCode quality as a built-in process
Code quality as a built-in processElad Maimon
 
ESLint Plugin for UI Tests
ESLint Plugin for UI TestsESLint Plugin for UI Tests
ESLint Plugin for UI TestsApplitools
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practicesKevin Peterson
 
caring_about_code_quality
caring_about_code_qualitycaring_about_code_quality
caring_about_code_qualityKetan Patel
 
Waste Driven Development - Agile Coaching Serbia Meetup
Waste Driven Development - Agile Coaching Serbia MeetupWaste Driven Development - Agile Coaching Serbia Meetup
Waste Driven Development - Agile Coaching Serbia MeetupLemi Orhan Ergin
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucksPeter Gfader
 
高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUUSu Jan
 
Peer Code Review An Agile Process
Peer Code Review An Agile ProcessPeer Code Review An Agile Process
Peer Code Review An Agile Processgsporar
 

Similar to Mastering Code Reviews (20)

The Anatomy of a Code Review
The Anatomy of a Code ReviewThe Anatomy of a Code Review
The Anatomy of a Code Review
 
Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020
Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020
Are your interns reviewing code? Andrew Lavers, ConFoo Montreal 2020
 
How to successfully grow a code review culture
How to successfully grow a code review cultureHow to successfully grow a code review culture
How to successfully grow a code review culture
 
Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)Increasing code quality with code reviews (poetry version)
Increasing code quality with code reviews (poetry version)
 
Code review best practice
Code review best practiceCode review best practice
Code review best practice
 
Code Review Best Practices
Code Review Best PracticesCode Review Best Practices
Code Review Best Practices
 
Revisiting Refactoring
Revisiting RefactoringRevisiting Refactoring
Revisiting Refactoring
 
Revisiting refactoring
Revisiting refactoringRevisiting refactoring
Revisiting refactoring
 
Voxxed days 2015-hakansaglam-codereview
Voxxed days 2015-hakansaglam-codereviewVoxxed days 2015-hakansaglam-codereview
Voxxed days 2015-hakansaglam-codereview
 
Code quality as a built-in process
Code quality as a built-in processCode quality as a built-in process
Code quality as a built-in process
 
ESLint Plugin for UI Tests
ESLint Plugin for UI TestsESLint Plugin for UI Tests
ESLint Plugin for UI Tests
 
Automating good coding practices
Automating good coding practicesAutomating good coding practices
Automating good coding practices
 
caring_about_code_quality
caring_about_code_qualitycaring_about_code_quality
caring_about_code_quality
 
Refactoring legacy code
Refactoring legacy codeRefactoring legacy code
Refactoring legacy code
 
Effective Code Review
Effective Code ReviewEffective Code Review
Effective Code Review
 
Waste Driven Development - Agile Coaching Serbia Meetup
Waste Driven Development - Agile Coaching Serbia MeetupWaste Driven Development - Agile Coaching Serbia Meetup
Waste Driven Development - Agile Coaching Serbia Meetup
 
You cant be agile if your code sucks
You cant be agile if your code sucksYou cant be agile if your code sucks
You cant be agile if your code sucks
 
高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU高品質軟體的基本動作 101 + 102 for NUU
高品質軟體的基本動作 101 + 102 for NUU
 
Code reviews
Code reviewsCode reviews
Code reviews
 
Peer Code Review An Agile Process
Peer Code Review An Agile ProcessPeer Code Review An Agile Process
Peer Code Review An Agile Process
 

Recently uploaded

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Recently uploaded (20)

Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

Mastering Code Reviews

Editor's Notes

  1. Questions to the audience Who does code reviews? When do you do them? Who enjoys doing them? Who has had a bad experience with them?
  2. - Multiple reasons but all of them revolve about betterment of the code and the team
  3. We all right code, none of us right code with the intent to introduce bugs, but it just happens. Having more eyes on the code will help us to reduce possible bugs
  4. When working on business applications we are normally working on non-trival code bases. Often times these applications are too large to fully commit to memory Sometimes when developing code we think we found the best way to solve an issue. But often times there may be a simpler way. There may be a more performant way.
  5. All teams have code that only 1 person wants to, or can maintain. Code Reviews can help remove this Allows others to be able to help support
  6. We now know the WHY, lets learn about the what
  7. How can you perform a review without having an idea of what you are looking for Create a checklist for different type of code. - UI code - API code - Javascript vs compiled languages Use the checklist to be consistant
  8. If doing a group review make sure to setup a time box. This will force you to be on point and not get lost in the weeds
  9. Don’t just go through the motions Stay engaged Act as if you care Treat the review as you would hope they would treat yours
  10. The review is about the code, not the CODER Too many times I hear people who hate code reviews and it is due the fact that they have felt personally attacked in prior review sessions
  11. Use Positive words Be just as willing to praise as you are to knock down Give suggestions but avoid telling people they are doing something ‘wrong’
  12. There must have been a reason the code was written. Attempt to see the coders POV. Seek to understand Assume the code was written with good intent
  13. Ask questions about the thought process – seek to understand Ask questions about alternatives solutions
  14. Sadly it is far to easy to experience a bad code review. But why?
  15. Nothing good tends to happen when you wing it
  16. Never Always You Must
  17. Unless your team has an established and documented styles document it is often not worth debating style. Everyone has their own style and often times there is no meaningful difference between styles.
  18. - Suggest you leave feedback as close to the code as possible. If possible create comments in the PR
  19. Do all comments/suggestions need to be implemented If implementing comments/feedback are they done in the same PR or as separate PR? I suggest same PR if related to code under review I suggest new PR if enhancements
  20. We know what makes good and bad reviews. Lets turn to talking about what to look for while doing our reviews
  21. Having another set of eyes on the code will allow things to be found Safe to say that everyone of us have had a problem that we struggled to solve but the second we asked someone else for help we saw the solution. Code reviews can do the same thing
  22. Lets face it, sometimes we write overly complicated code without meaning to. This code could work, but is likely a maintenance issue going forward. CR’s can help find and elimate this type of code.
  23. PII PFI Hippa Data Corruption (sql injection)
  24. As yourself, is this code easy to read? Will the ‘next guy’ know what is intended?
  25. Often times when dealing with larger applications comment patterns will emerge. Make sure your solution follows these patterns when possible. It is ok to not follow existing patterns, but make sure you have a reason