code reviews - php unconference europe 2013
DESCRIPTION
Revised Code Review presentation from the PHP Unconference Europe 2013 in BerlinTRANSCRIPT
ENTER
Code Peer Reviews
Leave your ego at the door
05.05.2013 Frank Sons – PHP Unconference Europe 2013
Who am I?
Software Quality Engineer
Doing PHP/Java/etc. for ~15 years
PHP Usergroup Hamburg
Still learning!
05.05.2013 2Frank Sons – PHP Unconference Europe 2013
So, what‘s this about?
Introducing Reviews
Collective Coder Ownership
The right review for the right job
Beware the dragons!
05.05.2013 3Frank Sons – PHP Unconference Europe 2013
A short introduction to reviews
Forget about the code for the moment…
05.05.2013 Frank Sons – PHP Unconference Europe 2013 4
What‘s the idea?
05.05.2013 5Frank Sons – PHP Unconference Europe 2013
Peer review methods are employed to maintain standards, improve
performance and provide credibility.
Wikipedia: Peer review
Reviews aren‘t limited to code…
05.05.2013 6Frank Sons – PHP Unconference Europe 2013
Back to code reviews…
IBM: Inspection introduced 1970s
05.05.2013 7Frank Sons – PHP Unconference Europe 2013
Google: 20% rule used for reviews
„That‘s not my code!“
Collective code ownership is a mindset
05.05.2013 Frank Sons – PHP Unconference Europe 2013 8
What about the ego?
05.05.2013 9Frank Sons – PHP Unconference Europe 2013
“Everyone has the right and freedom to totally suck in private.”
Jeff Atwood - @codinghorror
Forget about your ego!
05.05.2013 10Frank Sons – PHP Unconference Europe 2013
“Attempt to be awesome in public and embrace the suck!”
Jeff Atwood - @codinghorror
Reviews are knowledge sharing!
05.05.2013 11Frank Sons – PHP Unconference Europe 2013
Share within your team…
Product knowledge
Technical knowledge
Coding Standards
Transparency
05.05.2013 12Frank Sons – PHP Unconference Europe 2013
Finding the right review method
What do you want to do today?
05.05.2013 Frank Sons – PHP Unconference Europe 2013 13
Ad hoc
Just ask someone
Takes only a few minutes
Happens everywhere
Little impact beyond problem
Completely informal
05.05.2013 14Frank Sons – PHP Unconference Europe 2013
Peer deskcheck / pass around
Asking someone for input
Can be done asynchronous
Author is not present
Good for mentoring and coaching
Very informal
05.05.2013 15Frank Sons – PHP Unconference Europe 2013
Pair programming
Agile approach
Driver and Navigator
Rapid Iterations
Cultural change needed
Informal review
05.05.2013 16Frank Sons – PHP Unconference Europe 2013
Walkthrough
Author explains code
Code reading
Ideal to present and educate
Risk of overlooking critical code
Informal, no defined process
05.05.2013 17Frank Sons – PHP Unconference Europe 2013
Inspection
Most formal approach
Industry standard
Specific roles and trained inspectors
Checklist
Moderated review
05.05.2013 18Frank Sons – PHP Unconference Europe 2013
„Inspection Walkthrough“
Reader doesn‘t know code
Experienced dev: „eagle eye“ view
Author explains / answers questions
Specific code section
No Leads involved
05.05.2013 19Frank Sons – PHP Unconference Europe 2013
Beware the dragons!
It can be tricky…
05.05.2013 Frank Sons – PHP Unconference Europe 2013 20
Egoless!
05.05.2013 21Frank Sons – PHP Unconference Europe 2013
My ego ist not tied to my “perfect” or “imperfect” work product
Avoid the dragons
No fingerpointing
Leave the egos at the door
Resistance to change
Lack of knowledge
Cultural issues
05.05.2013 22Frank Sons – PHP Unconference Europe 2013
Keep this in mind
Three to seven participants
Keep it at two hours max
Involve Managers in planning
Find problems not solutions
Review coverage vs. Project size
05.05.2013 23Frank Sons – PHP Unconference Europe 2013
You will see the benefits
Code will be understandable
Knowledge is spread
Improves communication
Light house effects
05.05.2013 24Frank Sons – PHP Unconference Europe 2013
JUST DO IT!
05.05.2013 Frank Sons – PHP Unconference Europe 2013 25
This helps…
05.05.2013 26Frank Sons – PHP Unconference Europe 2013
Enjoy your reviews!
Reviews can help your team
Reviews are all about the mindset
Don‘t fear the dragons
05.05.2013 27Frank Sons – PHP Unconference Europe 2013
Liked it? Contact me!
Twitter: @FrankS
slideshare.net/frank_sons
Ask for a card ;-)
05.05.2013 28Frank Sons – PHP Unconference Europe 2013
Thanks!
05.05.2013 29