Pro Yearly is on sale from $80 to $50! »

Unlearning Toxic Behaviors in a Code Review Culture

Unlearning Toxic Behaviors in a Code Review Culture

58b8bdbc3314947c22bee35addf51a76?s=128

Sandya Sankarram

December 10, 2017
Tweet

Transcript

  1. 1 Unlearning Toxic Behaviors in a Code Review Culture Sandya

    Sankarram AlterConf SF December 2017
  2. 2 What is a Code Review? Sandya Sankarram @sandyaaaas

  3. 3 Common Peer Code Review Categories Key Details of Common

    Types of Code Reviews Group Walkthrough Paired Programming Pull Request Sandya Sankarram @sandyaaaas
  4. 4 Code Reviews Are Invaluable Knowledge Sharing Fostering Debate Informed

    Decision Making Mentorship Quality Sandya Sankarram @sandyaaaas
  5. 5 Code reviews can sometimes create toxic, unsupportive environments Sandya

    Sankarram @sandyaaaas
  6. Unhelpful: Passing off opinion as fact Helpful: Back up your

    claims with documentation, references to a style guide, references If you have an opinion about styles, don’t make it your review seeker’s problem Sandya Sankarram @sandyaaaas
  7. Unhelpful: Overwhelming with an avalanche of comments ✘ ✓ Sandya

    Sankarram @sandyaaaas
  8. Unhelpful: Asking devs to fix problems they did not cause

    Unhelpful: “I’ve always hated how this function is structured. Can you fix it, since you’re modifying it anyway?” Helpful: “Looks good to me. Will create a separate ticket to clean this file up.” Sandya Sankarram @sandyaaaas
  9. Unhelpful: Asking judgemental questions Unhelpful: “Why didn’t you just do

    ___?” Helpful: “You can also do ___, which has the benefit of ___” Sandya Sankarram @sandyaaaas
  10. Unhelpful: Being Sarcastic Unhelpful: “Did you even test this code

    before you checked it in?” Helpful: “Your code breaks during “x, y, and z” edge cases, can you please address those cases?” Sandya Sankarram @sandyaaaas
  11. Unhelpful: Using emojis instead of statements to point out issues

    ✘ ✓ Sandya Sankarram @sandyaaaas
  12. Unhelpful: Not replying to all comments ✘ ✓ Sandya Sankarram

    @sandyaaaas
  13. Unhelpful: Ignoring toxic behaviors from high performers High performance is

    no excuse One strong developer is not worth sacrificing an entire team’s morale (Joseph Gefroh, Toxic developers considered harmful, 2016) Sandya Sankarram @sandyaaaas
  14. 14 Understand that you might be part of the issue

    Sandya Sankarram @sandyaaaas
  15. 15 Effects of toxic behaviors on the team Sandya Sankarram

    @sandyaaaas
  16. 16 Creating a more supportive environment Sandya Sankarram @sandyaaaas

  17. Helpful: Use questions or recommendations to drive dialog Unhelpful: “Pull

    all of these translations into a constants file.” Instead, ask a question. Helpful: “What would you think about pulling these translations into a constants file? There are a lot and a separate file might make sense.” (@rodoabad on github, Code Review Culture, 2017) Sandya Sankarram @sandyaaaas
  18. Helpful: Be a resource. Don’t micro manage or backseat drive.

    Don’t back-seat drive (Recurse Center, User Manual, 2017) Ask questions. Debate. Point to resources. Sandya Sankarram @sandyaaaas
  19. Helpful: Respect & respond to every comment Respond to every

    comment, even if you don’t plan to apply feedback Sandya Sankarram @sandyaaaas
  20. Helpful: Know when to take a discussion offline and in-person

    In-person meeting > Unending Comment Thread (Tidy Java, How to be a better code reviewee, 2017) Sandya Sankarram @sandyaaaas
  21. Helpful: Don’t show surprise Developer A: Your changeset violates the

    style guide in several places. Do you have a linter installed to catch these issues before you check them in?” Developer B: No, I haven’t heard of a linter before. What is that? (Unhelpful) Developer A: What is what? Oh… you’re asking what a linter is?! (Helpful) Developer A: Linters are tools that detect issues like syntax and style errors. Let me send you some helpful resources over slack. Adapted from Recurse Center social rule “Don’t Feign Surprise” Sandya Sankarram @sandyaaaas
  22. Helpful: Automate what can be with git hooks & tests

    that run when build triggered Sandya Sankarram @sandyaaaas
  23. Helpful: Use opportunities to teach. Don’t show off. Is your

    comment helping the other developer learn or are you nitpicking to participate? Adapted from Recurse Center social rule “No well-actually’s” Sandya Sankarram @sandyaaaas
  24. Helpful: Refuse to normalize unhelpful behavior Don’t excuse unhelpful behaviors

    as “the way things are” Sandya Sankarram @sandyaaaas
  25. Helpful: Speak OUT Let people know if they are being

    unhelpful Uncomfortable… but people need to know! Sandya Sankarram @sandyaaaas
  26. Helpful: Managers: hire carefully, listen to your team, and enforce

    - Don’t hire toxic developers - Listen to your team’s concerns - Be clear about what is unacceptable - Enforce (Joseph Gefroh, Toxic developers considered harmful, 2016) Sandya Sankarram @sandyaaaas
  27. Helpful: Try to set the standard as your team is

    small and growing If your team is small, you are setting the standard, so you don’t have to unlearn unhelpful behaviors later! Sandya Sankarram @sandyaaaas
  28. 28 Disclaimer Your mileage may vary Be mindful that experiences

    and environments differ. ​ ​ Sandya Sankarram @sandyaaaas
  29. I am not policing content of feedback, just asking people

    to be mindful of tone Sandya Sankarram @sandyaaaas
  30. Thank you. @sandyaaaas sandya.sankr@gmail.com