How not to run code reviews

Victor Maliy
Victor MaliyIdeator and founder
How not to run
Code Reviews
Viktor Malyi
Software Testing Engineer
Garmin Würzburg GmbH, Germany
2
Hallo!
Software Testing
Engineer Würzburg (Germany)
Earlier:
Web-apps testing
Backend testing
Performance testing
iOS, Android apps testing
Leading testing teams
3
What I do?
4
Today
What do we think code review is?
What is code review in reality?
What to avoid?
What to pursue?
5
Why doing Code Reviews?
Of course to
find bugs!
6
Other reasons for doing
Code Reviews?
• To help
• To teach/learn
• Or to criticize?
7
Code Review meetings
8
„Over the shoulder“
9
Remote reviews
(tools-assisted)
10
It’s not only about the code…
11
Resistance to code review
12
„Ego-Effect“
13
Core Developers…
… get their reviews
approved quicker*…
Impact of Developer Reputation on Code Review Outcomes in OSS Projects: An Empirical Investigation
Amiangshu Bosu, Jeffrey C. Carver. Department of Computer Science, University of Alabama
14
… and more often*
Impact of Developer Reputation on Code Review Outcomes in OSS Projects: An Empirical Investigation
Amiangshu Bosu, Jeffrey C. Carver. Department of Computer Science, University of Alabama
15
There is a
problem
16
You’re judged each time
17
Do you feel that the
code reviews you
do for other people
are constructive
and clear?*
No
2 %
I don't know
31 %
Yes
67 %
*International online survey among IT-Professionals, November 2014, 310 participants
18
Do you feel that
code reviews
you do for other
people have
been considered
picky?*
No
21 %
I don't know
56 %
Yes
23 %
*International online survey among IT-Professionals, November 2014, 310 participants
19
Why do you think your reviews
are considered picky?*
*International online survey among IT-Professionals, November 2014, 310 participants
Not constructive and clear
“-1” numerous times
Too many emotions
Bad personal relations
0% 5% 10% 15% 20% 25% 30% 35% 40%
Multiple answers allowed
20
Have you ever had a
feeling that the one
who reviews your
code criticizes you
personally and not
your code?*
Yes
15 %
No
85 %
*International online survey among IT-Professionals, November 2014, 310 participants
21
Which implications it
has?
*International online survey among IT-Professionals, November 2014, 310 participants
Hard to get "+1"
0% 5% 10% 15% 20% 25% 30% 35%
Multiple answers allowed
Non-constructive and
emotional comments
I have to wait for review
too long
22
Words can hurt
„Never do this in
such a way!“
„Why it’s used
here at all?“
„It’s all wrong!“
„WTF!?!“
„It’s obvious!“
23
What to pursue?
24
Ask questions rather than
make statements
You did it wrong…
What was the reason of…
25
Don’t ask „Why?“
Why the variable is not local?
It seems that the variable…
26
Praise/Reward/Honour
Well done!
Good job! Let’s add this
to our coding standards!
27
Use code conventions
28
Project-specific checklist
• Based on experience
• Includes critical programming issues
• Includes common mistakes
• Great source for teaching newcomers
29
Review less, find more
Smart Bear case study on informal code reviews, 2006, 2500 reviews, 3.2 MLOC, 50 developers
30
Explain more first
Smart Bear case study on informal code reviews, 2006, 2500 reviews, 3.2 MLOC, 50 developers
31
Reviews must identify as
many defects as possible,
regardless of personality
who „caused“ or found
them
32
PS
by SmartBear Software
Thanks!
v.stratus@gmail.com
@victormalyy
1 of 33

More Related Content

Viewers also liked(8)

Code review psyhologyCode review psyhology
Code review psyhology
Oleksiy Rezchykov1.3K views
Code Review - DevOn2013Code Review - DevOn2013
Code Review - DevOn2013
호정 이7.8K views
TDD for DB integrationTDD for DB integration
TDD for DB integration
Mikalai Alimenkou9.3K views
Continuous DeliveryContinuous Delivery
Continuous Delivery
Mikalai Alimenkou7.5K views
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
Natasha Murashev389K views

How not to run code reviews