Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

50
Who did this code review, goddammit! Andrzej Angowski

description

- Who did a code review for this peace, goddammit? - Eh well, you did. - Really? I must have been blind. This simply cannot work! Have you ever heard this discussion before? Studies show that code review main function is not finding bugs. Then what is code review really about? Why most of developers nowadays do it every day? Lecture starts with describing what are the common expectations for code review both from manager’s and developer’s perspective. Then on a contrary speaker tries to persuade the audience what code review is not suited for and why. The lecture concludes on why there is such a similarity between expectations and what code review should not be used for. Andrzej Angowski - The speaker is a Java enthusiast working for the biggest operator of online payments in Poland. He currently holds the role of Senior Java Developer within one of the scrum teams. He is responsible for settlement and reconciliation tools. Previously he worked for international corporation in Telco area creating IPTV middleware as well as data mining and reporting software. He also had an episode with system and network administration. In his spare time he runs carpooling portal and loves to play basketball. He is passionate about automotive and muscle cars in particular. He enjoys spending time with a family and friends.

Transcript of Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Page 1: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Who did this code review,

goddammit!

Andrzej Angowski

Page 2: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

About me…

[email protected]

@Linkedin

2Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 3: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Agenda

1. Expectatons

2. Reality

3. How to align the two above

3Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 4: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Recap @code review

4Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

called pair programming for poor

Page 5: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Recap @code review

5Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

present @PayU for a long tme

Page 6: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Recap @code review

6Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

code review AND pair programming

Page 7: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons

7Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 8: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons

8Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

not bad by default

Page 9: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons

9Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

to low are bad…

Page 10: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons

10Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

…to high bad as well

Page 11: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons

11Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

they should be just right* ;)*Google’s OKR .6 – .7

Page 12: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons – car example

12Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

fast

Page 13: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons – car example

13Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

powerful

Page 14: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons – car example

14Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

cheap

Page 15: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons – car example

15Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

low gasoline consumpton

Page 16: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

16Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 17: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Finding Defects

44%44%

- devops

- managers

17Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 18: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Code Improvements

39%31%

- devops

- managers

18Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 19: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Alternatve Solutons

17%2%*

* - no mistake

- devops

- managers

19Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 20: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Knowledge Transfer

8%

20Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Team Awareness and Transparency9%

Share Code Ownership6%

Page 21: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Reality

21Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 22: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

22Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 23: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Code Improvements

29%

23Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 24: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Code Improvement – example

24Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 25: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Understanding

22%

25Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Social Communicaton16%

Page 26: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Understanding - example

26Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 27: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Finding Defects

27Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

14%

Page 28: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Defect – found

28Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 29: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Defect – FIXED!

29Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 30: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons Expectatons Reality Reality

30Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 31: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Expectatons Expectatons Reality Reality

31Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 32: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

At frst…

understand

the reason of the change

32Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 33: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Reason – ask if not clear!

33Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 34: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

At second…

understand

the context of the change

34Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 35: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Context – can you spot a defect?

35Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 36: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Context – what about now?

36Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 37: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

At third…

widen

communicaton channel

37Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 38: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Can this be handled face-to-face?

38Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 39: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

It’s all about…

UNDERSTANDING

39Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 40: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Additonal tp

RESPONSIBILITY

is stll yours

40Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 41: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Responsibility is yours

41Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

you stll need to test it

Page 42: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Responsibility is yours

42Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

you are the one to go to if it fails on PROD

Page 43: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Feeling empowered?

43Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 44: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Deploy on PROD without testng?

44Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 45: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Additonal tp – other side

don’t take someone else’s

RESPONSIBILITY

45Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 46: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Additonal tp – contnued

46Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

it’s not a must…

Page 47: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Additonal tp – contnued

47Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

…but something you want to do!

Really!

Page 48: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Thank you!

48Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 49: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

Questons?

49Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!

Page 50: Atmosphere 2014: Who did this code review, goddammit! - Andrzej Angowski

About me…

[email protected]

@Linkedin

50Atmosphere, May 2014 Andrzej Angowski – who did this code review, goddammit!