code reviews - leave your ego at the door

28
Code Peer Reviews Leave your ego at the door Frank Sons Senior Software Engineer

Upload: frank-sons

Post on 06-May-2015

2.561 views

Category:

Technology


1 download

DESCRIPTION

Presentation I held internally at Bigpoint, at the PHP Unconference 2012 in Hamburg (19/08/2012) and at the Barcamp Hamburg (11/03/2012)

TRANSCRIPT

Page 1: Code reviews - Leave your ego at the door

Code Peer Reviews

Leave your ego at the door

Frank SonsSenior Software Engineer

Page 2: Code reviews - Leave your ego at the door

So, what’s this about?

2

Introducing Reviews

Collective code ownership

Some ways to review code

Beware the dragons!

Page 3: Code reviews - Leave your ego at the door

3

A short introduction to reviewsForget about the code for the moment…

Page 4: Code reviews - Leave your ego at the door

What’s the idea?

4

Peer review methods are employed to maintain standards, improve

performance and provide credibility.

Page 5: Code reviews - Leave your ego at the door

Reviews aren’t limited to code…

5

Page 6: Code reviews - Leave your ego at the door

Back to code reviews…

6

IBM: Inspection introduced in 1970s

Google: 20% rule used for reviews

Page 7: Code reviews - Leave your ego at the door

7

„That‘s not my code!“Collective code ownership is a mindset

Page 8: Code reviews - Leave your ego at the door

What about the ego?

8

„Everyone has the right and freedom to totally suck in private.“

Page 9: Code reviews - Leave your ego at the door

Forget about your ego!

9

„Attempt to be awesome in public and embrace the suck!“

Page 10: Code reviews - Leave your ego at the door

Reviews are knowledge sharing!

10

Page 11: Code reviews - Leave your ego at the door

Share within your team…

11

Product knowledge

Technical knowledge

Coding Standards

Transparency

Page 12: Code reviews - Leave your ego at the door

12

How to reviewA comprehensive overview

Page 13: Code reviews - Leave your ego at the door

Ad hoc

13

Just ask someone

Takes only a few minutes

Happens everywhere

Little impact beyond problem

Completely informal

Page 14: Code reviews - Leave your ego at the door

Peer deskcheck / passaround

14

Asking someone for input

Can be done asynchronous

Author is not present

Good for mentoring and coaching

Very informal

Page 15: Code reviews - Leave your ego at the door

Pair programming

15

Agile approach

Driver and navigator

Rapid iterations

Cultural change needed

Informal review

Page 16: Code reviews - Leave your ego at the door

Walkthrough

16

Author explains code

Code reading

Ideal to present and educate

Risk of overlooking critical code

Informal, no defined process

Page 17: Code reviews - Leave your ego at the door

Team review

17

Used to judge product

Check against specifications

Preparation needed

Review collects data and input

Planned and structured

Page 18: Code reviews - Leave your ego at the door

Inspection

18

Most formal approach

Industry standard

Specific roles and trained inspectors

Checklist

Moderated review

Page 19: Code reviews - Leave your ego at the door

“Inspection Walkthrough”

19

Reader doesn‘t know code

Experienced dev for „eagle eye“ view

Author explains and answers questions

Specific code section

No leads involved

Page 20: Code reviews - Leave your ego at the door

20

Beware the dragons!It can be tricky…

Page 21: Code reviews - Leave your ego at the door

Egoless!

21

My ego is not tied to my „perfect“ or „imperfect“ work product.

Page 22: Code reviews - Leave your ego at the door

Avoid the dragons

22

No fingerpointing

Leave the egos at the door

Resistance to change

Lack of knowledge

Cultural issues

Page 23: Code reviews - Leave your ego at the door

Some things to keep in mind

23

Three to seven participants

Not longer than two hours

Manager should be involved in planning

Find problems, not solutions

Review coverage vs. project size

Page 24: Code reviews - Leave your ego at the door

24

JUST DO IT!

Page 25: Code reviews - Leave your ego at the door

This helps…

25

Page 26: Code reviews - Leave your ego at the door

I hope you had a good time!

26

Reviews can help your team

Reviews are all about the mindset

Don‘t fear the dragons

Page 27: Code reviews - Leave your ego at the door

27

Thanks!

Page 28: Code reviews - Leave your ego at the door

Find us on

28

Bigpoint GmbHFrank Sons

Senior Software Engineer

Drehbahn 47-4820354 Hamburg

Germany

Tel +49 40.88 14 13 - 0Fax +49 40.88 14 13 - 11

[email protected]