how not to run code reviews

33
How not to run Code Reviews Viktor Malyi Software Testing Engineer Garmin Würzburg GmbH, Germany

Upload: victor-maliy

Post on 15-Jul-2015

361 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: How not to run code reviews

How not to run Code Reviews

Viktor Malyi Software Testing Engineer

Garmin Würzburg GmbH, Germany

Page 2: How not to run code reviews

2

Hallo!Software Testing Engineer Würzburg (Germany)

Earlier:Web-apps testing

Backend testingPerformance testing

iOS, Android apps testing

Leading testing teams

Page 3: How not to run code reviews

3

What I do?

Page 4: How not to run code reviews

4

Today

What do we think code review is?

What is code review in reality?

What to avoid?

What to pursue?

Page 5: How not to run code reviews

5

Why doing Code Reviews?

Of course to find bugs!

Page 6: How not to run code reviews

6

Other reasons for doing Code Reviews?

• To help• To teach/learn• Or to criticize?

Page 7: How not to run code reviews

7

Code Review meetings

Page 8: How not to run code reviews

8

„Over the shoulder“

Page 9: How not to run code reviews

9

Remote reviews (tools-assisted)

Page 10: How not to run code reviews

10

It’s not only about the code…

Page 11: How not to run code reviews

11

Resistance to code review

Page 12: How not to run code reviews

12

„Ego-Effect“

Page 13: How not to run code reviews

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

Page 14: How not to run code reviews

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

Page 15: How not to run code reviews

15

There is a problem

Page 16: How not to run code reviews

16

You’re judged each time

Page 17: How not to run code reviews

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

Page 18: How not to run code reviews

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

Page 19: How not to run code reviews

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

Page 20: How not to run code reviews

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

Page 21: How not to run code reviews

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

Page 22: How not to run code reviews

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!“

Page 23: How not to run code reviews

23

What to pursue?

Page 24: How not to run code reviews

24

Ask questions rather than make statements

You did it wrong…

What was the reason of…

Page 25: How not to run code reviews

25

Don’t ask „Why?“

Why the variable is not local?

It seems that the variable…

Page 26: How not to run code reviews

26

Praise/Reward/Honour

Well done!

Good job! Let’s add this to our coding standards!

Page 27: How not to run code reviews

27

Use code conventions

Page 28: How not to run code reviews

28

Project-specific checklist

• Based on experience • Includes critical programming issues • Includes common mistakes • Great source for teaching newcomers

Page 29: How not to run code reviews

29

Review less, find more

Smart Bear case study on informal code reviews, 2006, 2500 reviews, 3.2 MLOC, 50 developers

Page 30: How not to run code reviews

30

Explain more first

Smart Bear case study on informal code reviews, 2006, 2500 reviews, 3.2 MLOC, 50 developers

Page 31: How not to run code reviews

31

Reviews must identify as many defects as possible, regardless of personality who „caused“ or found them

Page 32: How not to run code reviews

32

PS

by SmartBear Software