Slide 1

Slide 1 text

code.reviews Janos Gyerik correct clean efficient tested efficient efficient clean clean tested tested correct correct correct tested correc orrect correc tested efficient clean

Slide 2

Slide 2 text

2 what is it?

Slide 3

Slide 3 text

3 commit
 commit
 commit
 review
 commit
 commit
 review
 commit
 accept commit
 commit
 commit
 
 NOT code reviewed code reviewed

Slide 4

Slide 4 text

4 why do it?

Slide 5

Slide 5 text

5 UCXGVKOG catch early
 catch early catch early bugs bad patterns ugliness

Slide 6

Slide 6 text

6

Slide 7

Slide 7 text

7 peer review peer pressure

Slide 8

Slide 8 text

8 anything that gets reviewed gets better

Slide 9

Slide 9 text

9 quality time savings
 cost savings FACT

Slide 10

Slide 10 text

10 correct readable efficient tested buggy messy crappy untested NOT code reviewed code reviewed

Slide 11

Slide 11 text

11 information sharing NO MORE
 bottleneck developers

Slide 12

Slide 12 text

12

Slide 13

Slide 13 text

13 why/when
 NOT do it?

Slide 14

Slide 14 text

14 big bang development too hard to control should be the exception, not the norm! code reviews 
 are not practical when…

Slide 15

Slide 15 text

15 without supporting tools tools help doing code reviews efficiently don’t waste your time, get them and use them! code reviews 
 are not practical…

Slide 16

Slide 16 text

16 what’s required? disciplined commits

Slide 17

Slide 17 text

17 incremental changes small and stable logical steps at all levels

Slide 18

Slide 18 text

18 one feature one purpose one branch feature

Slide 19

Slide 19 text

19 short-lived max 3 days feature

Slide 20

Slide 20 text

20 (example good branch)

Slide 21

Slide 21 text

21 (example bad branch)

Slide 22

Slide 22 text

22 one commit one logical change

Slide 23

Slide 23 text

23 one good commit == stable build; related changes; no garbage; small; good comment

Slide 24

Slide 24 text

24

Slide 25

Slide 25 text

25 (example good commit)

Slide 26

Slide 26 text

26 example bad commit with many changes)

Slide 27

Slide 27 text

27 (example bad commit with garbage)

Slide 28

Slide 28 text

28 how to do it?

Slide 29

Slide 29 text

29 git fetch origin master git checkout -b feature-x origin/ma # work work work git commit git commit git push origin feature-x # create merge request

Slide 30

Slide 30 text

30 Create Merge Request create; don’t assign! self-review: any WTFs? ready? assign!

Slide 31

Slide 31 text

31 peer review peer pressure

Slide 32

Slide 32 text

32 what to review?

Slide 33

Slide 33 text

33 readable is it clear? easy to read? easy to understand? FACT Code is read far more often
 than written!

Slide 34

Slide 34 text

34 correct is the logic sane? does it work? bug suspects? -> ask!

Slide 35

Slide 35 text

35 efficient any performance concerns? -> ask!

Slide 36

Slide 36 text

36 tested unit tests included? unit test opportunities?

Slide 37

Slide 37 text

37 good practices Code Complete Effective Java Sonar/Findbugs/… codereview.stackexchange.com

Slide 38

Slide 38 text

38 how bad can it be?

Slide 39

Slide 39 text

39 how in-depth? •not too much •not too little •just right •DO IT FAST

Slide 40

Slide 40 text

40 attitude?

Slide 41

Slide 41 text

41 a code review is… NOT about the developer it is about the code

Slide 42

Slide 42 text

42 don’t just say something is “wrong” suggest a better way

Slide 43

Slide 43 text

43 the focus is.. NOT on problems it is on solutions

Slide 44

Slide 44 text

44 perfect code? don’t seek perfect seek good enough better is good enough don’t be a pain in the ass be flexible be constructive

Slide 45

Slide 45 text

45

Slide 46

Slide 46 text

46 mistakes… it’s OK to make mistakes it’s NOT OK to not learn from them

Slide 47

Slide 47 text

47