Code Review
-
Upload
frank-sons -
Category
Technology
-
view
907 -
download
2
description
Transcript of Code Review
![Page 1: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/1.jpg)
ENTER
Code Peer Reviews
Leave your ego at the door
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 2: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/2.jpg)
Who am I?
Software Quality Engineer
Doing PHP/Java/etc. for ~15 years
PHP Usergroup Hamburg
Twitter: @FrankS
Still learning
202.06.2014 Frank Sons – IPC Berlin 2014
![Page 3: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/3.jpg)
So, what‘s this about?
Introducing Reviews
Collective Coder Ownership
The right tool for the right job
Beware the dragons!
302.06.2014 Frank Sons – IPC Berlin 2014
![Page 4: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/4.jpg)
A short introduction to reviews
Forget about the code for a moment…
402.06.2014 Frank Sons – IPC Berlin 2014
![Page 5: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/5.jpg)
Reviews aren‘t limited to code…
502.06.2014 Frank Sons – IPC Berlin 2014
![Page 6: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/6.jpg)
What‘s the idea?
6
Code Reviews are intended to find and fix mistakes overlooked in the initial
development phase, improving both the overall quality of software and the
developers' skills.
Wikipedia: Code review
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 7: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/7.jpg)
Back to code reviews…
IBM: Inspection introduced 1970s
7
Strict checklist for approval
02.06.2014 Frank Sons – IPC Berlin 2014
Absolutely not agile
![Page 8: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/8.jpg)
„That‘s not my code!“
Collective code ownership is a mindset
802.06.2014 Frank Sons – IPC Berlin 2014
![Page 9: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/9.jpg)
What about the ego?
9
“Everyone has the right and freedom to totally suck in private.”
Jeff Atwood - @codinghorror
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 10: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/10.jpg)
Forget about your ego!
10
“Attempt to be awesome in public and embrace the suck!”
Jeff Atwood - @codinghorror
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 11: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/11.jpg)
Reviews are knowledge sharing!
1102.06.2014 Frank Sons – IPC Berlin 2014
![Page 12: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/12.jpg)
Share within your team…
Product knowledge
Technical knowledge
Coding Standards
Transparency
1202.06.2014 Frank Sons – IPC Berlin 2014
![Page 13: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/13.jpg)
Finding the right review method
What do you want to do today?
1302.06.2014 Frank Sons – IPC Berlin 2014
![Page 14: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/14.jpg)
Just a second…
14
“Hey, you got a minute? I need some help with a small problem.”
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 15: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/15.jpg)
Ad hoc
Takes only a few minutes
15
Happens anywhere
02.06.2014 Frank Sons – IPC Berlin 2014
Little impact beyond problem
![Page 16: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/16.jpg)
Talk to the duck
1602.06.2014 Frank Sons – IPC Berlin 2014
![Page 17: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/17.jpg)
Take a look please…
17
“Can you take a look at my code please? Here is the branch.”
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 18: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/18.jpg)
Peer deskcheck
Can be done asynchronous
18
Great for reviewing lots of code
02.06.2014 Frank Sons – IPC Berlin 2014
Review tools work this way
![Page 19: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/19.jpg)
We are agile!
19
“Let’s do this together!”
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 20: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/20.jpg)
Pair programming
Driver and Navigator
20
Rapid Iterations
02.06.2014 Frank Sons – IPC Berlin 2014
Review on the fly
![Page 21: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/21.jpg)
Let me show you…
21
“Let me show you my code.”
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 22: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/22.jpg)
Walkthrough
Author explains code
Developers ask Questions
Ideal to present and educate
Risk of overlooking critical code
2202.06.2014 Frank Sons – IPC Berlin 2014
![Page 23: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/23.jpg)
We want maintainable code
23
Do you understand my code?
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 24: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/24.jpg)
„Code Reading“
Reader doesn‘t know code
Other devs: „Eagle Eye view“
Author answers questions
Specific code section
2402.06.2014 Frank Sons – IPC Berlin 2014
![Page 25: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/25.jpg)
Beware the dragons!
It can be tricky…
2502.06.2014 Frank Sons – IPC Berlin 2014
![Page 26: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/26.jpg)
Egoless!
26
My ego ist not tied to my “perfect” or “imperfect” work product
Jeff Atwood - @codinghorror
02.06.2014 Frank Sons – IPC Berlin 2014
![Page 27: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/27.jpg)
Avoid the dragons
Leave the egos at the door
No fingerpointing
Follow up after review
Don‘t abuse result
Lack of knowledge
2702.06.2014 Frank Sons – IPC Berlin 2014
![Page 28: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/28.jpg)
Keep this in mind
Three to seven participants
Keep it at two hours max
Think loud
Find problems not solutions
Review coverage vs. Project size
2802.06.2014 Frank Sons – IPC Berlin 2014
![Page 29: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/29.jpg)
You will see the benefits
Code will be understandable
Knowledge is spread
Improves communication
Light house effects
2902.06.2014 Frank Sons – IPC Berlin 2014
![Page 30: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/30.jpg)
JUST DO IT!
3002.06.2014 Frank Sons – IPC Berlin 2014
![Page 31: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/31.jpg)
This helps…
3102.06.2014 Frank Sons – IPC Berlin 2014
![Page 32: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/32.jpg)
Enjoy your reviews!
Reviews can help your team
32
Reviews are all about the mindset
02.06.2014 Frank Sons – IPC Berlin 2014
Don‘t fear the dragons
![Page 33: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/33.jpg)
Feedback welcome!
Twitter: @FrankS
slideshare.net/frank_sons
Ask for a card ;-)
3302.06.2014 Frank Sons – IPC Berlin 2014
![Page 34: Code Review](https://reader036.fdocuments.in/reader036/viewer/2022062511/54b78ecb4a7959db528b49cd/html5/thumbnails/34.jpg)
Thanks!
Hope you enjoyed it!
3402.06.2014 Frank Sons – IPC Berlin 2014