Eurostaff Connect(s) meetup, 10.03.2016, betahaus Hamburg
Code Reviews are a de facto standard for most teams. Either as a general four eyes principle, via pull requests or as a real team meeting. Each and every of these methods has their own pros and cons. Avoiding bugs and is typically the main reason why code reviews are introduced, but how often do you really find serious bugs in your code reviews? This talk will give some insights into how to use code reviews as a method to establish a common understanding of code quality in your team. Using reviews tools is usually the second step in that process, after the developers have established a mindset for good quality.
4. 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
5. 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
10. 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
14. 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
15. 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
16. code-quality.de
@FrankS
The main problem:
Results depend on experience, timing and
motivation of the reviewing developer!
Results depend on experience, timing and
motivation of the reviewing developer!
18. 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
19. 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
20. 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
23. 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
24. code-quality.de
@FrankS
What do you check?
Code quality metricsCode quality metrics
Code improvements and understandingCode improvements and understanding
26. 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!“
29. 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!
30. 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
32. 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!
33. code-quality.de
@FrankS
Make sure you do code reviews – effectively!
„Peer code reviews are the single biggest
thing you can do to improve your code.“
„Peer code reviews are the single biggest
thing you can do to improve your code.“
Jeff Atwood – @codinghorror
34. 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