Code Reviews - Vortrag für Innogames
-
Upload
frank-sons -
Category
Technology
-
view
1.278 -
download
0
description
Transcript of Code Reviews - Vortrag für Innogames
![Page 1: Code Reviews - Vortrag für Innogames](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/1.jpg)
Code Peer ReviewsLeave your ego at the door
Frank Sons18.12.2012
![Page 2: Code Reviews - Vortrag für Innogames](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/2.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/3.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/4.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/5.jpg)
Frank Sons - 18.12.2012 Seite: / 28
Reviews aren’t limited to code...
5
![Page 6: Code Reviews - Vortrag für Innogames](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/6.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/7.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/8.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/9.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/10.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/11.jpg)
Frank Sons - 18.12.2012 Seite: / 28
Reviews are knowledge sharing!
11
![Page 12: Code Reviews - Vortrag für Innogames](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/12.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/13.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/14.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/15.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/16.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/17.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/18.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/19.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/20.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/21.jpg)
Frank Sons - 18.12.2012 Seite: / 28
Beware the dragons!It can be tricky...
21
![Page 22: Code Reviews - Vortrag für Innogames](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/22.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/23.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/24.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/25.jpg)
Frank Sons - 18.12.2012 Seite: / 28
Just do it!
25
![Page 26: Code Reviews - Vortrag für Innogames](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/26.jpg)
Frank Sons - 18.12.2012 Seite: / 28
This helps...
26
ISBN:978-0201734850
![Page 27: Code Reviews - Vortrag für Innogames](https://reader035.fdocuments.in/reader035/viewer/2022062418/5549c0fdb4c905fc7f8b5194/html5/thumbnails/27.jpg)
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