SlideShare a Scribd company logo
Trisha Gee (@trisha_gee)
Maria Khalusova (@mariaKhalusova)
JetBrains
Code Review
Matters and Manners
Matters
Code Review Matters and Manners
Code Review Matters and Manners
Code Review Matters and Manners
What To Look For
• Formatting
• Naming Conventions
• “Final” Keyword
• Line Length
• Empty Statements
• Modifier Order
• Javadoc comments
• ….
Automate these checks
Don’t Sweat the Little Things
Design: Details
• Is the code in the right place?
• Appropriate data structures used?
• Have opportunities for code re-use been
taken?
• Have new dependencies been introduced?
• Is the code making use of existing libraries?
• Is it utilising new idioms?
Design: High Level
• Does the new code fit with the overall
architecture?
• Does this new code follow the current design
practices?
• Have appropriate design patterns been used?
• Does the code follow SOLID principles, Domain
Driven Design or other preferred approaches?
• Is the code overly complex or over-engineered?
Do it in advance, or as you go
Code Review is Too Late For Design
Usability
• UI
• API
Design
• UI
• API
Usability
• Readability
• Maintainability
• Extensibility
Functionality
• Does it do what it’s supposed to?
• Does it meet performance requirements?
• Does it meet security requirements?
• Are there other regulatory requirements?
Decide on priorities, apply consistently
Understand what’s important
Code Review Matters and Manners
Automate these checks
Don’t Sweat the Little Things
Code Review Matters and Manners
Code Review Matters and Manners
Code Review Matters and Manners
Code Review Matters and Manners
Decide on priorities, apply consistently
Understand what’s important
Code Review Matters and Manners
Code Review Matters and Manners
Do it in advance, or as you go
Code Review is Too Late For Design
Don’t Sweat the Little Things
Understand What’s Important
• Functionality
• Does it do what it’s supposed to?
• Does it meet “non-functional” requirements?
• Usability
• Readability
• Maintainability
• Extensibility
Understand What’s Important
• Is the code in the right place?
• Are the data structures that have been used
appropriate?
• Have opportunities for code re-use been taken?
• Is the code overly complex or over-engineered?
• Have new dependencies been introduced?
• Is the code making use of existing libraries?
• Is it utilising new idioms from language updates?
Code Review is Too Late for Design
• Is the code in the right place?
• Are the data structures that have been used
appropriate?
• Have opportunities for code re-use been taken?
• Is the code overly complex or over-engineered?
• Have new dependencies been introduced?
• Is the code making use of existing libraries?
• Is it utilising new idioms from language updates?
Code Review is Too Late for Design
• Does the new code fit with the overall
architecture?
• Does this new code follow the current design
practices?
• Which design patterns are used in the new
code? Are these appropriate?
• Does the code follow SOLID principles, Domain
Driven Design etc?
Does it do what it’s supposed to?
Is anything wildly wrong with it?
Manners
How to have code review discussions without starting a
war in the comments?
Code Review Matters and Manners
This happens…
“Instead of touching other people’s code, do something useful with your life”
“Look at the bullshit you wrote”
“The above code is shit, and it generates shit code. It looks bad and there’s no reason for it”
Code Review Matters and Manners
Project Aristotle:
Psychological safety first
It’s not only about being polite…
“Comments must end with a period”
“Something is wrong. I’m not sure what it is. It just doesn’t feel right, you know what I mean?”
Why do you leave feedback?
There’s a problem
To help someone improve
To start a discussion
To praise good work
Because of the pressure to find a problem
To boost own ego
Basic code review manners
Appropriate timing and place
Indicate when you’re done with a review
Discuss changes, not people
Be specific
Don’t demand, ask questions
Don’t use sarcasm
Suggest alternatives
A few tips on wording
Don’t be rude.
“WTF is this?” “That’s a dumb idea…”
Who, What, Where, How, And Why?
“This will not work if…” vs “What happens if..?”
Avoid using “obviously”, “simply”, “just”
Avoid possessive adjectives
“Your method returns…” vs “This method returns…”
Never say never (and “always”, “nothing”, etc.)
There’s a catch :)
“Look at the bullshit you wrote”
“A fool thinks himself to be wise, but a wise man knows himself to be a fool.”
William Shakespeare
“Everyone you will ever meet knows something you don't.”
Bill Nighy
Receiving feedback
Invite teammates to review your code
Separate criticism from self
Immediate reaction isn’t always the best one
Ask questions
Be grateful for the feedback
Trisha Gee (@trisha_gee)
Maria Khalusova (@mariaKhalusova)
JetBrains
Questions?
http://bit.ly/CR-MM/

More Related Content

What's hot

Clean code - Getting your R&D on board
Clean code - Getting your R&D on boardClean code - Getting your R&D on board
Clean code - Getting your R&D on board
Ruth Sperer
 
Staying Ahead of the Curve
Staying Ahead of the CurveStaying Ahead of the Curve
Staying Ahead of the Curve
Trisha Gee
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012
Alan Christensen
 
Writing Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designsWriting Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designs
lachlandonald
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
Excella
 
Adopting Agile
Adopting AgileAdopting Agile
Adopting Agile
Coverity
 
Unit Test Lab - Why Write Unit Tests?
Unit Test Lab - Why Write Unit Tests?Unit Test Lab - Why Write Unit Tests?
Unit Test Lab - Why Write Unit Tests?
Danny van Kasteel
 
Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
Jason Nocks
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
MaslowB
 
The problem with tdd
The problem with tddThe problem with tdd
The problem with tdd
Dror Helper
 
Agile testingandautomation
Agile testingandautomationAgile testingandautomation
Agile testingandautomation
jeisner
 
TDD — Are you sure you properly test code?
TDD — Are you sure you properly test code?TDD — Are you sure you properly test code?
TDD — Are you sure you properly test code?
Dmitriy Nesteryuk
 
OSS Java Analysis - What You Might Be Missing
OSS Java Analysis - What You Might Be MissingOSS Java Analysis - What You Might Be Missing
OSS Java Analysis - What You Might Be Missing
Coverity
 
@LinkingNote annotation in YATSPEC
@LinkingNote annotation in YATSPEC@LinkingNote annotation in YATSPEC
@LinkingNote annotation in YATSPEC
Wojciech Bulaty
 
Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014
Pedro Santos
 
clean code - uncle bob
clean code - uncle bobclean code - uncle bob
clean code - uncle bob
saber tabatabaee
 
Four Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley TempleFour Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley Temple
QA or the Highway
 
Code review
Code reviewCode review
Code review
Aleksey Solntsev
 
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
Igor Bronovskyy
 
Finding Defects in C#: Coverity vs. FxCop
Finding Defects in C#: Coverity vs. FxCopFinding Defects in C#: Coverity vs. FxCop
Finding Defects in C#: Coverity vs. FxCop
Coverity
 

What's hot (20)

Clean code - Getting your R&D on board
Clean code - Getting your R&D on boardClean code - Getting your R&D on board
Clean code - Getting your R&D on board
 
Staying Ahead of the Curve
Staying Ahead of the CurveStaying Ahead of the Curve
Staying Ahead of the Curve
 
TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012TDD - Christchurch APN May 2012
TDD - Christchurch APN May 2012
 
Writing Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designsWriting Better Tests - Applying Clean-Code TDD at 99designs
Writing Better Tests - Applying Clean-Code TDD at 99designs
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
Adopting Agile
Adopting AgileAdopting Agile
Adopting Agile
 
Unit Test Lab - Why Write Unit Tests?
Unit Test Lab - Why Write Unit Tests?Unit Test Lab - Why Write Unit Tests?
Unit Test Lab - Why Write Unit Tests?
 
Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
The problem with tdd
The problem with tddThe problem with tdd
The problem with tdd
 
Agile testingandautomation
Agile testingandautomationAgile testingandautomation
Agile testingandautomation
 
TDD — Are you sure you properly test code?
TDD — Are you sure you properly test code?TDD — Are you sure you properly test code?
TDD — Are you sure you properly test code?
 
OSS Java Analysis - What You Might Be Missing
OSS Java Analysis - What You Might Be MissingOSS Java Analysis - What You Might Be Missing
OSS Java Analysis - What You Might Be Missing
 
@LinkingNote annotation in YATSPEC
@LinkingNote annotation in YATSPEC@LinkingNote annotation in YATSPEC
@LinkingNote annotation in YATSPEC
 
Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014
 
clean code - uncle bob
clean code - uncle bobclean code - uncle bob
clean code - uncle bob
 
Four Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley TempleFour Stages of Automated Testing by Bradley Temple
Four Stages of Automated Testing by Bradley Temple
 
Code review
Code reviewCode review
Code review
 
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)03 -  chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
03 - chomu prohramisty ne testuiut - yurii chulovskyi - it event 2013 (5)
 
Finding Defects in C#: Coverity vs. FxCop
Finding Defects in C#: Coverity vs. FxCopFinding Defects in C#: Coverity vs. FxCop
Finding Defects in C#: Coverity vs. FxCop
 

Viewers also liked

Real World Java 9 (QCon London)
Real World Java 9 (QCon London)Real World Java 9 (QCon London)
Real World Java 9 (QCon London)
Trisha Gee
 
Migrating to IntelliJ IDEA from Eclipse
Migrating to IntelliJ IDEA from EclipseMigrating to IntelliJ IDEA from Eclipse
Migrating to IntelliJ IDEA from Eclipse
Trisha Gee
 
Java 9 Functionality and Tooling
Java 9 Functionality and ToolingJava 9 Functionality and Tooling
Java 9 Functionality and Tooling
Trisha Gee
 
Refactoring to Java 8 (QCon New York)
Refactoring to Java 8 (QCon New York)Refactoring to Java 8 (QCon New York)
Refactoring to Java 8 (QCon New York)
Trisha Gee
 
Staying Ahead of the Curve
Staying Ahead of the CurveStaying Ahead of the Curve
Staying Ahead of the Curve
Trisha Gee
 
Refactoring to Java 8 (Devoxx UK)
Refactoring to Java 8 (Devoxx UK)Refactoring to Java 8 (Devoxx UK)
Refactoring to Java 8 (Devoxx UK)
Trisha Gee
 
Java SE 8 library design
Java SE 8 library designJava SE 8 library design
Java SE 8 library design
Stephen Colebourne
 
Agile Austin - Peer Code Review An Agile Process
Agile Austin -  Peer Code Review An Agile ProcessAgile Austin -  Peer Code Review An Agile Process
Agile Austin - Peer Code Review An Agile Process
gsporar
 
Code generating beans in Java
Code generating beans in JavaCode generating beans in Java
Code generating beans in Java
Stephen Colebourne
 
Staying Ahead of the Curve
Staying Ahead of the CurveStaying Ahead of the Curve
Staying Ahead of the Curve
Trisha Gee
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
Trisha Gee
 
Workshop: Introduction to the Disruptor
Workshop: Introduction to the DisruptorWorkshop: Introduction to the Disruptor
Workshop: Introduction to the Disruptor
Trisha Gee
 
Concurrent Programming Using the Disruptor
Concurrent Programming Using the DisruptorConcurrent Programming Using the Disruptor
Concurrent Programming Using the Disruptor
Trisha Gee
 
Java 8 and 9 in Anger
Java 8 and 9 in AngerJava 8 and 9 in Anger
Java 8 and 9 in Anger
Trisha Gee
 
Introduction to the Disruptor
Introduction to the DisruptorIntroduction to the Disruptor
Introduction to the Disruptor
Trisha Gee
 
Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)
Trisha Gee
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
Stephen Colebourne
 
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
Roman Elizarov
 

Viewers also liked (18)

Real World Java 9 (QCon London)
Real World Java 9 (QCon London)Real World Java 9 (QCon London)
Real World Java 9 (QCon London)
 
Migrating to IntelliJ IDEA from Eclipse
Migrating to IntelliJ IDEA from EclipseMigrating to IntelliJ IDEA from Eclipse
Migrating to IntelliJ IDEA from Eclipse
 
Java 9 Functionality and Tooling
Java 9 Functionality and ToolingJava 9 Functionality and Tooling
Java 9 Functionality and Tooling
 
Refactoring to Java 8 (QCon New York)
Refactoring to Java 8 (QCon New York)Refactoring to Java 8 (QCon New York)
Refactoring to Java 8 (QCon New York)
 
Staying Ahead of the Curve
Staying Ahead of the CurveStaying Ahead of the Curve
Staying Ahead of the Curve
 
Refactoring to Java 8 (Devoxx UK)
Refactoring to Java 8 (Devoxx UK)Refactoring to Java 8 (Devoxx UK)
Refactoring to Java 8 (Devoxx UK)
 
Java SE 8 library design
Java SE 8 library designJava SE 8 library design
Java SE 8 library design
 
Agile Austin - Peer Code Review An Agile Process
Agile Austin -  Peer Code Review An Agile ProcessAgile Austin -  Peer Code Review An Agile Process
Agile Austin - Peer Code Review An Agile Process
 
Code generating beans in Java
Code generating beans in JavaCode generating beans in Java
Code generating beans in Java
 
Staying Ahead of the Curve
Staying Ahead of the CurveStaying Ahead of the Curve
Staying Ahead of the Curve
 
2015 Java update and roadmap, JUG sevilla
2015  Java update and roadmap, JUG sevilla2015  Java update and roadmap, JUG sevilla
2015 Java update and roadmap, JUG sevilla
 
Workshop: Introduction to the Disruptor
Workshop: Introduction to the DisruptorWorkshop: Introduction to the Disruptor
Workshop: Introduction to the Disruptor
 
Concurrent Programming Using the Disruptor
Concurrent Programming Using the DisruptorConcurrent Programming Using the Disruptor
Concurrent Programming Using the Disruptor
 
Java 8 and 9 in Anger
Java 8 and 9 in AngerJava 8 and 9 in Anger
Java 8 and 9 in Anger
 
Introduction to the Disruptor
Introduction to the DisruptorIntroduction to the Disruptor
Introduction to the Disruptor
 
Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)Refactoring to Java 8 (Devoxx BE)
Refactoring to Java 8 (Devoxx BE)
 
Java SE 8 best practices
Java SE 8 best practicesJava SE 8 best practices
Java SE 8 best practices
 
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems ReviewACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
ACM ICPC 2016 NEERC (Northeastern European Regional Contest) Problems Review
 

Similar to Code Review Matters and Manners

XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
 XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D... XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
The Linux Foundation
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentation
Bhavin Gandhi
 
Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019
Hannes Lowette
 
Software Design
Software DesignSoftware Design
Software Design
Ahmed Misbah
 
Stop punching yourself in the face!
Stop punching yourself in the face!Stop punching yourself in the face!
Stop punching yourself in the face!
Hannes Lowette
 
"Software Architecture for Humans!", Eberhard Wolff
"Software Architecture for Humans!", Eberhard Wolff "Software Architecture for Humans!", Eberhard Wolff
"Software Architecture for Humans!", Eberhard Wolff
Fwdays
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
rsebbe
 
Code Review for iOS
Code Review for iOSCode Review for iOS
Code Review for iOS
KLabCyscorpions-TechBlog
 
TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)
Ahmed Misbah
 
The 360 Developer
The 360 DeveloperThe 360 Developer
The 360 Developer
enteritos
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
Ahmet Bulut
 
Three pillars of components in the design system
Three pillars of components in the design systemThree pillars of components in the design system
Three pillars of components in the design system
Czech Design Systems Community
 
Do we need testers on agile teams?
Do we need testers on agile teams?Do we need testers on agile teams?
Do we need testers on agile teams?
TEST Huddle
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
The Linux Foundation
 
On to code review lessons learned at microsoft
On to code review lessons learned at microsoftOn to code review lessons learned at microsoft
On to code review lessons learned at microsoft
Michaela Greiler
 
50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16
Christian Berg
 
SubmitJS: Is react + redux + typescript a good combination? Dmytro Beseda
SubmitJS: Is react + redux + typescript a good combination? Dmytro BesedaSubmitJS: Is react + redux + typescript a good combination? Dmytro Beseda
SubmitJS: Is react + redux + typescript a good combination? Dmytro Beseda
Binary Studio
 
"How do I Architect?" - Quick Introduction to Architecture for Salesforce Ad...
"How do I Architect?"  - Quick Introduction to Architecture for Salesforce Ad..."How do I Architect?"  - Quick Introduction to Architecture for Salesforce Ad...
"How do I Architect?" - Quick Introduction to Architecture for Salesforce Ad...
Steven Herod
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
Benjamin Baumann
 
Visualization Requirements Speech
Visualization Requirements SpeechVisualization Requirements Speech
Visualization Requirements Speech
garnerg
 

Similar to Code Review Matters and Manners (20)

XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
 XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D... XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
XPDS16: Patch review for non-maintainers - George Dunlap, Citrix Systems R&D...
 
Clean code presentation
Clean code presentationClean code presentation
Clean code presentation
 
Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019
 
Software Design
Software DesignSoftware Design
Software Design
 
Stop punching yourself in the face!
Stop punching yourself in the face!Stop punching yourself in the face!
Stop punching yourself in the face!
 
"Software Architecture for Humans!", Eberhard Wolff
"Software Architecture for Humans!", Eberhard Wolff "Software Architecture for Humans!", Eberhard Wolff
"Software Architecture for Humans!", Eberhard Wolff
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
 
Code Review for iOS
Code Review for iOSCode Review for iOS
Code Review for iOS
 
TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)TDD Anti-patterns (2022 edition)
TDD Anti-patterns (2022 edition)
 
The 360 Developer
The 360 DeveloperThe 360 Developer
The 360 Developer
 
Agile Software Development
Agile Software DevelopmentAgile Software Development
Agile Software Development
 
Three pillars of components in the design system
Three pillars of components in the design systemThree pillars of components in the design system
Three pillars of components in the design system
 
Do we need testers on agile teams?
Do we need testers on agile teams?Do we need testers on agile teams?
Do we need testers on agile teams?
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
 
On to code review lessons learned at microsoft
On to code review lessons learned at microsoftOn to code review lessons learned at microsoft
On to code review lessons learned at microsoft
 
50 Shades of Fail KScope16
50 Shades of Fail KScope1650 Shades of Fail KScope16
50 Shades of Fail KScope16
 
SubmitJS: Is react + redux + typescript a good combination? Dmytro Beseda
SubmitJS: Is react + redux + typescript a good combination? Dmytro BesedaSubmitJS: Is react + redux + typescript a good combination? Dmytro Beseda
SubmitJS: Is react + redux + typescript a good combination? Dmytro Beseda
 
"How do I Architect?" - Quick Introduction to Architecture for Salesforce Ad...
"How do I Architect?"  - Quick Introduction to Architecture for Salesforce Ad..."How do I Architect?"  - Quick Introduction to Architecture for Salesforce Ad...
"How do I Architect?" - Quick Introduction to Architecture for Salesforce Ad...
 
Eurosport's Kodakademi #2
Eurosport's Kodakademi #2Eurosport's Kodakademi #2
Eurosport's Kodakademi #2
 
Visualization Requirements Speech
Visualization Requirements SpeechVisualization Requirements Speech
Visualization Requirements Speech
 

More from Trisha Gee

Career Advice for Architects
Career Advice for Architects Career Advice for Architects
Career Advice for Architects
Trisha Gee
 
Is boilerplate code really so bad?
Is boilerplate code really so bad?Is boilerplate code really so bad?
Is boilerplate code really so bad?
Trisha Gee
 
Career Advice for Programmers - ProgNET London
Career Advice for Programmers - ProgNET LondonCareer Advice for Programmers - ProgNET London
Career Advice for Programmers - ProgNET London
Trisha Gee
 
Is Boilerplate Code Really So Bad?
Is Boilerplate Code Really So Bad?Is Boilerplate Code Really So Bad?
Is Boilerplate Code Really So Bad?
Trisha Gee
 
Real World Java 9 - JetBrains Webinar
Real World Java 9 - JetBrains WebinarReal World Java 9 - JetBrains Webinar
Real World Java 9 - JetBrains Webinar
Trisha Gee
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
Trisha Gee
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
Trisha Gee
 
Career Advice for Programmers
Career Advice for Programmers Career Advice for Programmers
Career Advice for Programmers
Trisha Gee
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
Trisha Gee
 
Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)
Trisha Gee
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx France
Trisha Gee
 
Speaker Clinic (Novice Speakers)
Speaker Clinic (Novice Speakers)Speaker Clinic (Novice Speakers)
Speaker Clinic (Novice Speakers)
Trisha Gee
 
Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)
Trisha Gee
 
Working in Open Source
Working in Open SourceWorking in Open Source
Working in Open Source
Trisha Gee
 
Building a web application with MongoDB & Java
Building a web application with MongoDB & JavaBuilding a web application with MongoDB & Java
Building a web application with MongoDB & Java
Trisha Gee
 

More from Trisha Gee (15)

Career Advice for Architects
Career Advice for Architects Career Advice for Architects
Career Advice for Architects
 
Is boilerplate code really so bad?
Is boilerplate code really so bad?Is boilerplate code really so bad?
Is boilerplate code really so bad?
 
Career Advice for Programmers - ProgNET London
Career Advice for Programmers - ProgNET LondonCareer Advice for Programmers - ProgNET London
Career Advice for Programmers - ProgNET London
 
Is Boilerplate Code Really So Bad?
Is Boilerplate Code Really So Bad?Is Boilerplate Code Really So Bad?
Is Boilerplate Code Really So Bad?
 
Real World Java 9 - JetBrains Webinar
Real World Java 9 - JetBrains WebinarReal World Java 9 - JetBrains Webinar
Real World Java 9 - JetBrains Webinar
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
 
Career Advice for Programmers
Career Advice for Programmers Career Advice for Programmers
Career Advice for Programmers
 
Real World Java 9
Real World Java 9Real World Java 9
Real World Java 9
 
Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)Java 8 in Anger (JavaOne)
Java 8 in Anger (JavaOne)
 
Java 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx FranceJava 8 in Anger, Devoxx France
Java 8 in Anger, Devoxx France
 
Speaker Clinic (Novice Speakers)
Speaker Clinic (Novice Speakers)Speaker Clinic (Novice Speakers)
Speaker Clinic (Novice Speakers)
 
Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)Java 8 in Anger (QCon London)
Java 8 in Anger (QCon London)
 
Working in Open Source
Working in Open SourceWorking in Open Source
Working in Open Source
 
Building a web application with MongoDB & Java
Building a web application with MongoDB & JavaBuilding a web application with MongoDB & Java
Building a web application with MongoDB & Java
 

Recently uploaded

The Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdfThe Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdf
paysquare consultancy
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
Eric D. Schabell
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Torry Harris
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
The Evolution of Remote Server Management
The Evolution of Remote Server ManagementThe Evolution of Remote Server Management
The Evolution of Remote Server Management
Bert Blevins
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
aakash malhotra
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
SynapseIndia
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
Priyanka Aash
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
bhumivarma35300
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
maigasapphire
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
BrainSell Technologies
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
ishalveerrandhawa1
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
HackersList
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
LINUS PROJECTS (INDIA)
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdfARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
Inglês no Mundo Digital
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Bert Blevins
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
Shiv Technolabs
 

Recently uploaded (20)

The Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdfThe Role of Technology in Payroll Statutory Compliance (1).pdf
The Role of Technology in Payroll Statutory Compliance (1).pdf
 
Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...Evolution of iPaaS - simplify IT workloads to provide a unified view of  data...
Evolution of iPaaS - simplify IT workloads to provide a unified view of data...
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
The Evolution of Remote Server Management
The Evolution of Remote Server ManagementThe Evolution of Remote Server Management
The Evolution of Remote Server Management
 
Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024Three New Criminal Laws in India 1 July 2024
Three New Criminal Laws in India 1 July 2024
 
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptxUse Cases & Benefits of RPA in Manufacturing in 2024.pptx
Use Cases & Benefits of RPA in Manufacturing in 2024.pptx
 
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
(CISOPlatform Summit & SACON 2024) Keynote _ Power Digital Identities With AI...
 
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
High Profile Girls call Service Pune 000XX00000 Provide Best And Top Girl Ser...
 
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
Girls Call Churchgate 9910780858 Provide Best And Top Girl Service And No1 in...
 
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdfAcumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
Acumatica vs. Sage Intacct vs. NetSuite _ NOW CFO.pdf
 
Calgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptxCalgary MuleSoft Meetup APM and IDP .pptx
Calgary MuleSoft Meetup APM and IDP .pptx
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
How Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdfHow Social Media Hackers Help You to See Your Wife's Message.pdf
How Social Media Hackers Help You to See Your Wife's Message.pdf
 
Pigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending PlantPigging Unit Lubricant Oil Blending Plant
Pigging Unit Lubricant Oil Blending Plant
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdfARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
ARTIFICIAL INTELLIGENCE (AI) IN MUSIC.pdf
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
 
The Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF GuideThe Role of IoT in Australian Mobile App Development - PDF Guide
The Role of IoT in Australian Mobile App Development - PDF Guide
 

Code Review Matters and Manners

  • 1. Trisha Gee (@trisha_gee) Maria Khalusova (@mariaKhalusova) JetBrains Code Review Matters and Manners
  • 6. What To Look For • Formatting • Naming Conventions • “Final” Keyword • Line Length • Empty Statements • Modifier Order • Javadoc comments • ….
  • 7. Automate these checks Don’t Sweat the Little Things
  • 8. Design: Details • Is the code in the right place? • Appropriate data structures used? • Have opportunities for code re-use been taken? • Have new dependencies been introduced? • Is the code making use of existing libraries? • Is it utilising new idioms?
  • 9. Design: High Level • Does the new code fit with the overall architecture? • Does this new code follow the current design practices? • Have appropriate design patterns been used? • Does the code follow SOLID principles, Domain Driven Design or other preferred approaches? • Is the code overly complex or over-engineered?
  • 10. Do it in advance, or as you go Code Review is Too Late For Design
  • 14. Functionality • Does it do what it’s supposed to? • Does it meet performance requirements? • Does it meet security requirements? • Are there other regulatory requirements?
  • 15. Decide on priorities, apply consistently Understand what’s important
  • 17. Automate these checks Don’t Sweat the Little Things
  • 22. Decide on priorities, apply consistently Understand what’s important
  • 25. Do it in advance, or as you go Code Review is Too Late For Design
  • 26. Don’t Sweat the Little Things
  • 27. Understand What’s Important • Functionality • Does it do what it’s supposed to? • Does it meet “non-functional” requirements? • Usability • Readability • Maintainability • Extensibility
  • 28. Understand What’s Important • Is the code in the right place? • Are the data structures that have been used appropriate? • Have opportunities for code re-use been taken? • Is the code overly complex or over-engineered? • Have new dependencies been introduced? • Is the code making use of existing libraries? • Is it utilising new idioms from language updates?
  • 29. Code Review is Too Late for Design • Is the code in the right place? • Are the data structures that have been used appropriate? • Have opportunities for code re-use been taken? • Is the code overly complex or over-engineered? • Have new dependencies been introduced? • Is the code making use of existing libraries? • Is it utilising new idioms from language updates?
  • 30. Code Review is Too Late for Design • Does the new code fit with the overall architecture? • Does this new code follow the current design practices? • Which design patterns are used in the new code? Are these appropriate? • Does the code follow SOLID principles, Domain Driven Design etc?
  • 31. Does it do what it’s supposed to?
  • 32. Is anything wildly wrong with it?
  • 34. How to have code review discussions without starting a war in the comments?
  • 36. This happens… “Instead of touching other people’s code, do something useful with your life” “Look at the bullshit you wrote” “The above code is shit, and it generates shit code. It looks bad and there’s no reason for it”
  • 39. It’s not only about being polite… “Comments must end with a period” “Something is wrong. I’m not sure what it is. It just doesn’t feel right, you know what I mean?”
  • 40. Why do you leave feedback? There’s a problem To help someone improve To start a discussion To praise good work Because of the pressure to find a problem To boost own ego
  • 41. Basic code review manners Appropriate timing and place Indicate when you’re done with a review Discuss changes, not people Be specific Don’t demand, ask questions Don’t use sarcasm Suggest alternatives
  • 42. A few tips on wording Don’t be rude. “WTF is this?” “That’s a dumb idea…” Who, What, Where, How, And Why? “This will not work if…” vs “What happens if..?” Avoid using “obviously”, “simply”, “just” Avoid possessive adjectives “Your method returns…” vs “This method returns…” Never say never (and “always”, “nothing”, etc.)
  • 43. There’s a catch :) “Look at the bullshit you wrote”
  • 44. “A fool thinks himself to be wise, but a wise man knows himself to be a fool.” William Shakespeare “Everyone you will ever meet knows something you don't.” Bill Nighy
  • 45. Receiving feedback Invite teammates to review your code Separate criticism from self Immediate reaction isn’t always the best one Ask questions Be grateful for the feedback
  • 46. Trisha Gee (@trisha_gee) Maria Khalusova (@mariaKhalusova) JetBrains Questions? http://bit.ly/CR-MM/