Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Code Reviews: the Good, the Bad, and the Ugly

Code Reviews: the Good, the Bad, and the Ugly

Code reviews are an amazing opportunity for teams to help one another grow and maintain a high bar of quality for their code bases overall. Unfortunately this opportunity is often squandered and both giving and receiving these reviews can easily become one of the most frustrating parts of our jobs. Come learn about tactics for improving the process on your team.

Amanda Sopkin

June 01, 2018
Tweet

More Decks by Amanda Sopkin

Other Decks in Programming

Transcript

  1. Code review “A systematic examination of computer code...intended to find

    mistakes overlooked in software development.”
  2. Why do code reviews? Improve us as developers Decentralize knowledge

    Share responsibility Improve code base quality Knowledge spreading
  3. Atlassian Crucible Atlassian's code review tool Google Gerrit Open source

    git code review tool Github Git hosting and pioneer of the "Pull Request" Facebook Phabricator Open source git/mercurial/svn review tool Review Board Open source review tool that is SCM/platform neutral JetBrains Upsource git/mercurial/perforce/svn review tool Visual Studio Team Services collaborative environment with git Code review tools
  4. Importance of human code review “Code Review is the single

    greatest way of noticing and killing bugs, increasing overall understanding, fixing design problems, and learning from one another.” -Graydon Hoare
  5. Absence of trust Fear of conflict Lack of commitment Avoidance

    of accountability Inattention to results
  6. Absence of trust Fear of conflict Lack of commitment Avoidance

    of accountability Inattention to results
  7. Absence of trust Fear of conflict Lack of commitment Avoidance

    of accountability Inattention to results
  8. Absence of trust Fear of conflict Lack of commitment Avoidance

    of accountability Inattention to results
  9. Absence of trust Fear of conflict Lack of commitment Avoidance

    of accountability Inattention to results
  10. ? “The zoombinator is throwing a zoom exception and I

    thought this would fix the issue. I can take another look if you think that would be better.”
  11. “I think your solution is good, but I don’t want

    to butt in, so I won’t say anything.”
  12. Absence of trust Fear of conflict Lack of commitment Avoidance

    of accountability Inattention to results
  13. Absence of Trust -> Build Trust Fear of Conflict ->

    Be Honest and Open Lack of Commitment -> Work as a Team Avoidance of Accountability -> Be Accountable Inattention to Results -> Tune in
  14. Be empathetic (Project Aristotle) People were skilled at reading emotions

    based on nonverbal cues. If a team member appeared uneasy with a decision, it was likely noticed and discussed. If someone appeared down, others showed concern and support. Those conversations are not always easy, but they’re important. They allow us to be authentic and engaged.
  15. Speak like you like each other Make the other person

    feel safe The focus is NOT “being right” Say “What was the reasoning here...” instead of “why”
  16. Speak like you like each other There is usually more

    than one way to do it Ask questions, not statements Be Honest and Open @amandasopkin
  17. Explain things in the review I am changing this API

    because of a bug we discovered in XYZ steps.
  18. Work as a Team Explain things in the review After

    one hour, stop and take a break Do it thoroughly or not at all @amandasopkin
  19. Break things up in the review Communicate with others early

    and often Go face to face when necessary Be accountable @amandasopkin
  20. Set a tone for the whole team Establish guidelines/goals Consider

    a checklist Tune in to the team @amandasopkin
  21. ? “The zoombinator is throwing a zoom exception and I

    thought this would fix the issue. I can take another look if you think that would be better.”
  22. ? “The zoombinator is throwing a zoom exception. I think

    this will fix the issue because it won’t be caught at Zoomification.”
  23. “I think your solution is good, but I don’t want

    to butt in, so I won’t say anything.”
  24. “I think this is the right strategy because we noticed

    the bug is not getting past the Zoomifier.”
  25. ?

  26. And…. Last but not least – don’t forget to evaluate

    this session in the DevSum app! @amandasopkin
  27. • Icons taken from flaticon.com • “The 5 Dysfunctions of

    a Team” by Patrick Lencioni • “Code Complete” by Steve McConnell • “Best Kept Secrets of Peer Code Review” by Jason Cohen • The New York Times • Medium Sources
  28. Absence of trust Fear of conflict Lack of commitment Avoidance

    of accountability Inattention to results