Slide 1

Slide 1 text

T H E S C I E N C E O F C O D E R E V I E W S R I C K K U I P E R S / @ R S K U I P E R S

Slide 2

Slide 2 text

@RSKUIPERS RICK KUIPERS DEVELOPER @PHPAMERSFOORT SPEAKER @PHPSTORMTIPS GAMER @ENRISE

Slide 3

Slide 3 text

MEETSPIRE UP IN +

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

W E W E R E N O L O N G E R J U S T L E A R N I N G F R O M O U R O W N M I S TA K E S , B U T A L S O F R O M E A C H O T H E R ' S M I S TA K E S .

Slide 6

Slide 6 text

A formal assessment of code with the intention of instituting change if necessary. CODE REVIEW

Slide 7

Slide 7 text

! Readability ! Architecture ! Sharing knowledge ! Bugs WHY?

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

PULL REQUEST REVIEW

Slide 10

Slide 10 text

PAIR PROGRAMMING DRIVER NAVIGATOR

Slide 11

Slide 11 text

MOB PROGRAMMING DRIVER NAVIGATOR NAVIGATOR NAVIGATOR

Slide 12

Slide 12 text

DO YOU HAVE COLLEAGUES REVIEW YOUR CODE? 17% 73% Yes Only when I ask We use pair programming as a form of code review No, we only rely on automated tools No, a tester only functionally tests the code No

Slide 13

Slide 13 text

DO YOU FEEL LIKE YOU LEARN A LOT FROM GIVING AND RECEIVING CODE REVIEWS 4% 96% Yes No

Slide 14

Slide 14 text

DO YOU ENJOY GETTING YOUR CODE REVIEWED? 13% 87% Yes Usually, but sometimes I find it hard to accept feedback or deal with criticism No

Slide 15

Slide 15 text

EGOLESS PROGRAMMING "Developers need a robust enough ego to trust and defend their work, but not so much ego that they reject suggestions for better solutions. Similarly, the egoless reviewer should have compassion and sensitivity for their colleagues, if only because their roles will be reversed one day.” Source: Humanizing Peer Reviews, Karl E. Wiegers.

Slide 16

Slide 16 text

THE TEN COMMANDMENTS OF EGOLESS PROGRAMMING 1. Understand and accept that you will make mistakes. 2. You are not your code. 3. No matter how much "karate" you know, someone else will always know more. 4. Don't rewrite code without consultation. 5. Treat people who know less than you with respect, deference, and patience. 6. The only constant in the world is change. 7. The only true authority stems from knowledge, not from position. 8. Fight for what you believe, but gracefully accept defeat. 9. Don't be "the guy in the room.” 10. Critique code instead of people – be kind to the coder, not to the code.

Slide 17

Slide 17 text

! Unhappy paths ! Tests added ! Feature implemented according to specs ! Performance ! Security WHAT TO LOOK FOR DURING A CODE REVIEW

Slide 18

Slide 18 text

C O D E R E V I E W E T I Q U E T T E

Slide 19

Slide 19 text

DON’T JUMP TO CONCLUSIONS

Slide 20

Slide 20 text

COMMUNICATE CLEARLY

Slide 21

Slide 21 text

USE EXAMPLES

Slide 22

Slide 22 text

THANK YOU

Slide 23

Slide 23 text

GIFS

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

You own the code… With code reviews… As a team!

Slide 26

Slide 26 text

We should … I think we should …

Slide 27

Slide 27 text

What do you think?

Slide 28

Slide 28 text

! Introduce branching ! Automate menial tasks like code style checks and linting ! Let everyone participate ! Give everyone the right to merge GETTING STARTED

Slide 29

Slide 29 text

! Code and functional reviews ! Get a 3rd opinion ! Keep changes small ! Don't trust the developer ! Review using your favourite tool ! Shared vision IMPROVING CODE REVIEWS

Slide 30

Slide 30 text

ARCHITECTURAL EXPLORATION 1 HOUR ! " PRESENT AND DISCUSS # TAKE NOTES $ SCHEDULE A MEETING

Slide 31

Slide 31 text

WHY AREN'T CODE REVIEWS PART OF YOUR COMPANIES WORKFLOW? 4% 28% 30% 38% We have never discussed this We feel our projects are too small to do code reviews Management thinks it's a waste of time/money As a developer, I don't see the value in doing code reviews

Slide 32

Slide 32 text

1. Start the trend 2. Return the favour 3. Measure the impact 4. Show your boss CONVINCING YOUR COMPANY IN 4 EASY STEPS ! Increased customer satisfaction ! Developers learning from each other ! Takes 15 minutes per feature ! Part of the price

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

T H E E N D R I C K K U I P E R S / @ R S K U I P E R S