Effective Code Reviews
-
Upload
frank-sons -
Category
Technology
-
view
205 -
download
0
Transcript of Effective Code Reviews
code-quality.de @FrankS
Effective Code Reviews
Moin moin!
Frank SonsFrank Sons FrankS FrankS
http://code-quality.dehttp://code-quality.de
code-quality.de @FrankS
Please!
Feel free to ask questions!Feel free to ask questions!
And share your own experiences!And share your own experiences!
code-quality.de @FrankS
My list for today...
The bigger picture of code reviewsThe bigger picture of code reviews
Improving your code reviewsImproving your code reviews
code-quality.de @FrankS
Let's start with the basics...
The two ways of code reviewsThe two ways of code reviews
Expectations vs. The real worldExpectations vs. The real world
A well hidden problemA well hidden problem
code-quality.de @FrankS
Are you doing code reviews?
code-quality.de @FrankS
Review tools - asynchronous
code-quality.de @FrankS
Code reviews as a team
code-quality.de @FrankS
Bigger screen helps ;-)
code-quality.de @FrankS
Let's take a look at the motivation
The two ways of code reviewsThe two ways of code reviews
Expectations vs. The real worldExpectations vs. The real world
A well hidden problemA well hidden problem
code-quality.de @FrankS
Why are you doing code reviews?
code-quality.de @FrankS
Motivation for code reviews (study)
code-quality.de @FrankS
The results are a bit surprising
code-quality.de @FrankS
There is something else...
The two ways of code reviewsThe two ways of code reviews
Expectations vs. The real worldExpectations vs. The real world
A well hidden problemA well hidden problem
code-quality.de @FrankS
Does this sound familiar?
Not structured and no real goalsNot structured and no real goals
It's working fine (somehow...)It's working fine (somehow...)
Favorite reviewersFavorite reviewers
code-quality.de @FrankS
The main problem:
Results depend on experience, timing andmotivation of the reviewing developer!
Results depend on experience, timing andmotivation of the reviewing developer!
code-quality.de @FrankS
Well...
code-quality.de @FrankS
Let's see what we can do!
The bigger picture of code reviewsThe bigger picture of code reviews
Improving your code reviewsImproving your code reviews
code-quality.de @FrankS
Forget about the tools for a moment
Establishing a common mindsetEstablishing a common mindset
Setting the right focusSetting the right focus
Creating a checklistCreating a checklist
code-quality.de @FrankS
Code reviews meetings are a good start
Assign moderator and readerAssign moderator and reader
The goal is not to cover all codeThe goal is not to cover all code
Create a shared understanding a code qualityCreate a shared understanding a code quality
code-quality.de @FrankS
The reader explains the code...
code-quality.de @FrankS
A moderator can help a lot!
code-quality.de @FrankS
Be sure to focus on the important parts
Establishing a mindsetEstablishing a mindset
Setting the right focusSetting the right focus
Creating a checklistCreating a checklist
code-quality.de @FrankS
What do you check?
Code quality metricsCode quality metrics
Code improvements and understandingCode improvements and understanding
code-quality.de @FrankS
Do you have to understand the code?
code-quality.de @FrankS
Readability and Understanding
„You can only find defects,if you are able to understand the code!“
„You can only find defects,if you are able to understand the code!“
code-quality.de @FrankS
A small, but important difference!
Coding Style GuideCoding Style Guide
Coding GuidelineCoding Guideline
code-quality.de @FrankS
Do you have guidelines?
code-quality.de @FrankS
So, what should you put in a guideline?
Anything that can not be validated automatically!Anything that can not be validated automatically!
code-quality.de @FrankS
Guidelines make a good start
Establishing a mindsetEstablishing a mindset
Setting the right focusSetting the right focus
Creating a checklistCreating a checklist
code-quality.de @FrankS
Create a checklist for your reviews
code-quality.de @FrankS
Checklists improve your reviews
Reviewers know what they are looking forReviewers know what they are looking for
Does not depend on that much luck anymoreDoes not depend on that much luck anymore
Always keep them updated!Always keep them updated!
code-quality.de @FrankS
Make sure you do code reviews – effectively!
„Peer code reviews are the single biggestthing you can do to improve your code.“„Peer code reviews are the single biggestthing you can do to improve your code.“
Jeff Atwood – @codinghorror
code-quality.de @FrankS
Some final things to keep in mind
Make sure everyone knows the real goalsMake sure everyone knows the real goals
Establish a common mindset for code qualityEstablish a common mindset for code quality
Code reviews need to be part of your processCode reviews need to be part of your process
code-quality.de @FrankS
Questions? Feedback?