Code Review
-
Upload
frank-sons -
Category
Technology
-
view
907 -
download
2
description
Transcript of Code Review
ENTER
Code Peer Reviews
Leave your ego at the door
02.06.2014 Frank Sons – IPC Berlin 2014
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
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
A short introduction to reviews
Forget about the code for a moment…
402.06.2014 Frank Sons – IPC Berlin 2014
Reviews aren‘t limited to code…
502.06.2014 Frank Sons – IPC Berlin 2014
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
Back to code reviews…
IBM: Inspection introduced 1970s
7
Strict checklist for approval
02.06.2014 Frank Sons – IPC Berlin 2014
Absolutely not agile
„That‘s not my code!“
Collective code ownership is a mindset
802.06.2014 Frank Sons – IPC Berlin 2014
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
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
Reviews are knowledge sharing!
1102.06.2014 Frank Sons – IPC Berlin 2014
Share within your team…
Product knowledge
Technical knowledge
Coding Standards
Transparency
1202.06.2014 Frank Sons – IPC Berlin 2014
Finding the right review method
What do you want to do today?
1302.06.2014 Frank Sons – IPC Berlin 2014
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
Ad hoc
Takes only a few minutes
15
Happens anywhere
02.06.2014 Frank Sons – IPC Berlin 2014
Little impact beyond problem
Talk to the duck
1602.06.2014 Frank Sons – IPC Berlin 2014
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
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
We are agile!
19
“Let’s do this together!”
02.06.2014 Frank Sons – IPC Berlin 2014
Pair programming
Driver and Navigator
20
Rapid Iterations
02.06.2014 Frank Sons – IPC Berlin 2014
Review on the fly
Let me show you…
21
“Let me show you my code.”
02.06.2014 Frank Sons – IPC Berlin 2014
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
We want maintainable code
23
Do you understand my code?
02.06.2014 Frank Sons – IPC Berlin 2014
„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
Beware the dragons!
It can be tricky…
2502.06.2014 Frank Sons – IPC Berlin 2014
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
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
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
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
JUST DO IT!
3002.06.2014 Frank Sons – IPC Berlin 2014
This helps…
3102.06.2014 Frank Sons – IPC Berlin 2014
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
Feedback welcome!
Twitter: @FrankS
slideshare.net/frank_sons
Ask for a card ;-)
3302.06.2014 Frank Sons – IPC Berlin 2014
Thanks!
Hope you enjoyed it!
3402.06.2014 Frank Sons – IPC Berlin 2014