Surviving Code Reviews

78
Surviving Code Reviews Lorna Mitchell ROME 18-19 MARCH 2016

Transcript of Surviving Code Reviews

Surviving Code ReviewsLorna Mitchell

ROME 18-19 MARCH 2016

Surviving Code ReviewsLorna Mitchell, CodeMotion Rome 2016

maintainer and team lead

unsolicited advice

stories

3 ingredients

code

words

perspective

what does it do?

feature/bug

ticket(s)?

If there aren't anyacceptance criteria for

your patch, invent some

all the code

git diff master

git diff master...HEAD

tools

 

TOO BIG

common code mistakes

exotic code, no comments

Committing commentedcode is like leaving litter

on a campsite

contributing.md

can you break your code?

I can

missing data

permissions

user is an idiot

tests

coding standards

syntax check

Your commit history willbe part of my projectuntil the end of time

git reset --soft $(git merge-base master HEAD)

more info than diff

accurate

sane format

http://chris.beams.io/posts/git-commit/

SFW

apologies

will it merge?

git merge --no-commit --no-ff feature

git merge --abort

fix it

rebase

A pull request is the startof a conversation about a

feature

source/target

diff

title

description

what does it do?

what will I observe?

why do I care?

code review

"review" vs "merge"

anyone

peer review vs gatekeepers

key skills

Being able to see whatyou're NOT looking at isa reviewer's superpower

documentation

tests

database patch

deployability

template

email

report

monitoring

cron job

and if not ...

 

reject

automated build

constructive feedback

colleagues vs contributors

too much feedback

sandwich technique

harsh feedback

Pull requests have alifecycle, be prepared tochampion them to the

end

3 ingredients

code

words

perspective

Thankyouhttp://lornajane.net

 This work is licensed under a Creative Commons

Attribution-NonCommercial-ShareAlike 3.0Unported License.