code reviews - vortrag für innogames

28
Code Peer Reviews Leave your ego at the door Frank Sons 18.12.2012

Upload: frank-sons

Post on 06-May-2015

1.278 views

Category:

Technology


0 download

DESCRIPTION

Updated Code Review presentation for internal Innogames presentation on 18.Dec 2012

TRANSCRIPT

Page 1: Code Reviews - Vortrag für Innogames

Code Peer ReviewsLeave your ego at the door

Frank Sons18.12.2012

Page 2: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

So what’s this about?

2

Introducing Reviews

Collective Code Ownership

Reviews done right

Beware the dragons!

Page 3: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

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

3

Page 4: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

What’s the idea?

4

Peer review methods are employed to maintain standards, improve

performance and provide credibility.

Page 5: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Reviews aren’t limited to code...

5

Page 6: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Every project has reviews

6

Educational reviews

Management reviews

Peer reviews

Status reviews

Post-project review

Page 7: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Back to the code...

7

IBM: Inspection introduced in 1970s

Google: 20% rule used for reviews

Page 8: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

“That’s not my code!”Collective code ownership is a mindset

8

Page 9: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

What about the ego?

9

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

Page 10: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Forget about your ego!

10

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

Page 11: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Reviews are knowledge sharing!

11

Page 12: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Share within your team...

12

Product knowledge

Technical knowledge

Coding Standards

Transparency

Page 13: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

The right review for the right jobHow to review - a comprehensive overview

13

Page 14: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Ad hoc

14

Just ask someone

Takes only a few minutes

Happens everywhere

Little impact beyond problem

Completely informal

Page 15: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Peer deskcheck / passaround

15

Asking someone for input

Can be asynchronous

Author is not present

Ideal for mentoring and coaching

Very informal

Page 16: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Pair Programming

16

Agile approach

Driver and navigator

Rapid iterations

Cultural change needed

Informal review

Page 17: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Walkthrough

17

Author explains code

Code reading

Ideal to present and educate

Risk of overlooking critical code

Informal, no defined process

Page 18: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Team review

18

Used to judge product / API

Check against specifications

Preparation needed

Reviews collect data and input

Planned and structured

Page 19: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Inspection

19

Industry standard (IBM)

Specific roles and trained inspectors

Checklist

Moderated review

Most formal approach

Page 20: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

“Inspection walkthrough”

20

Reader doesn’t know code

Experienced dev for “eagle eye” view

Author answers questions

Specific code section / class

Moderated review

Page 21: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Beware the dragons!It can be tricky...

21

Page 22: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Egoless!

22

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

Page 23: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Avoid the dragons

23

Leave your ego at the door

No fingerpointing

Cultural issues / Resistance

No personal consequences

Lack of knowledge

Page 24: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Some things to keep in mind

24

Three to seven participants

Not longer than two hours

Manager involved in planning

Find problems, not solutions

Review coverage vs. project size

Page 25: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

Just do it!

25

Page 26: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

This helps...

26

ISBN:978-0201734850

Page 27: Code Reviews - Vortrag für Innogames

Frank Sons - 18.12.2012 Seite: / 28

I hope you had a good time!

27

Reviews improve your team

Reviews are all about the mindset

Don’t fear the dragons