Se ha denunciado esta presentación.
Se está descargando tu SlideShare. ×
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio
Anuncio

Eche un vistazo a continuación

1 de 32 Anuncio

The Art of Code Reviews

Descargar para leer sin conexión

Slides presented on the GDG Berlin Android.

https://www.meetup.com/GDG-Berlin-Android/events/fvvctlyzdbkc/

--

Code reviews are a fundamental part of our job as software developers. Every piece of code we write is (hopefully) carefully reviewed by our teammates before becoming part of our systems. It's an important part of the development process, and it requires significant time and effort.

While a great review experience will promote interesting discussions, ensure consistency in the codebase, and potentially catch bugs and implementation oversights, a poor review might lead to nasty bugs and unhappy developers. Still, sometimes it's hard to find the motivation to thoroughly review a pull request, and eventually it just doesn't seem to be worth it given the time you'll need to spend and how hard it usually is to properly review those huge PRs that pop up every now and then.

In this talk you'll learn strategies and guidelines that will help improve the efficiency of your team's code reviews. We'll talk about work in progress PRs, commit by commit reviews, emoji driven comments and more. You'll listen to great (and scary) tales of code reviews experiences, and lots of tips and tricks when it comes to preparing the perfect pull request for your peers.

Slides presented on the GDG Berlin Android.

https://www.meetup.com/GDG-Berlin-Android/events/fvvctlyzdbkc/

--

Code reviews are a fundamental part of our job as software developers. Every piece of code we write is (hopefully) carefully reviewed by our teammates before becoming part of our systems. It's an important part of the development process, and it requires significant time and effort.

While a great review experience will promote interesting discussions, ensure consistency in the codebase, and potentially catch bugs and implementation oversights, a poor review might lead to nasty bugs and unhappy developers. Still, sometimes it's hard to find the motivation to thoroughly review a pull request, and eventually it just doesn't seem to be worth it given the time you'll need to spend and how hard it usually is to properly review those huge PRs that pop up every now and then.

In this talk you'll learn strategies and guidelines that will help improve the efficiency of your team's code reviews. We'll talk about work in progress PRs, commit by commit reviews, emoji driven comments and more. You'll listen to great (and scary) tales of code reviews experiences, and lots of tips and tricks when it comes to preparing the perfect pull request for your peers.

Anuncio
Anuncio

Más Contenido Relacionado

Más reciente (20)

Anuncio

The Art of Code Reviews

  1. 1. The Art of Code Reviews Fred @tfcporciuncula
  2. 2. The Art of Code Reviews Fred @tfcporciuncula Anita @anitas3791 David @_dlazaro Sebastiano @rotxed Lara @lariki Philipp @tehultrah
  3. 3. Some organizations do regular code reviews; those that don’t would do better if they did. Code reviews help spread knowledge through a development team. Reviews help more experienced developers pass knowledge to those less experienced. They help more people understand more aspects of a large software system. They are also very important in writing clear code. My code may look clear to me but not to my team. That’s inevitable — it’s hard for people to put themselves in the shoes of someone unfamiliar with whatever they are working on. Reviews also give the opportunity for more people to suggest useful ideas. I can only think of so many good ideas in a week. Having other people contribute makes my life easier, so I always look for reviews. Refactoring, Second Edition — Martin Fowler
  4. 4. What this is *not* about • How to write comments • How to respond to comments • How to be empathetic and sensitive • How to not take it personally
  5. 5. What this is *not* about http://adavis.info/2018/09/frustration-free-code-reviews.html https://github.blog/2015–01–21-how-to-write-the-perfect-pull-request/
  6. 6. …and what this *is* about • What we do to make them more efficient • The ideas we use in our process • How to be a happy person • and much more! How the Blinkist Android team does code reviews
  7. 7. The WIP PR
  8. 8. The WIP PR 1. You do a tiny bit of work and open a PR 2. Everyone knows what you’re doing 3. People who care a lot about what you’re doing can easily keep an eye on it 4. Early feedback FTW
  9. 9. The WIP PR
  10. 10. https://github.blog/2019–02–14-introducing-draft-pull-requests/
  11. 11. The WIP PR
  12. 12. The WIP PR https://ben.straub.cc/2015/04/02/wip-pull-request/
  13. 13. Small PRs
  14. 14. Small PRs
  15. 15. Squash? Merge? Rebase?
  16. 16. The ideal world
  17. 17. Squash and merge will make you lose your (beautiful?) commit history. But if your PR is small enough, then that’s fine.
  18. 18. Commit-by-commit reviews
  19. 19. A PR is like a presentation, and your slides are your commits.
  20. 20. Commit-by-commit reviews It really helps with: • Presenting your changes in assimilable chunks • Unrelated and automatic changes • Big PRs
  21. 21. The ideal world… doesn’t exist :(
  22. 22. Commit-by-commit reviews Two options to reach a commit-by-commit reviewable PR: • You’re can either build a beautiful commit history from the beginning • You rewrite your commit history before opening your PR
  23. 23. Commits don’t necessarily need to compile.
  24. 24. Commit-by-commit reviews
  25. 25. Extra bits
  26. 26. Extra bits 4. Embrace self-reviews 5. Emoji driven comments ! 1. Keep PR list clean 2. Create great descriptions 3. Have a good PR template
  27. 27. " driven comments ❤ – Praise and compliment $ – Suggest ideas ❓ – Ask questions & – Nit-picky comments ⚠ – Warn and express concern ( – Blocker!
  28. 28. Summary • WIP PRs • Small PRs • Commit-by-commit reviews • Keep things clean (and maybe use $, ❓, &)
  29. 29. Good pull requests are an act of empathy, for both the author and reviewer. https://slack.engineering/on-empathy-pull-requests-979e4257d158
  30. 30. Resources • http://adavis.info/2018/09/frustration-free-code-reviews.html • https://github.blog/2015–01–21-how-to-write-the-perfect-pull- request/ • https://github.blog/2019–02–14-introducing-draft-pull-requests/ • https://ben.straub.cc/2015/04/02/wip-pull-request/ • https://slack.engineering/on-empathy-pull-requests-979e4257d158 • https://medium.com/@kurtisnusbaum/large-diffs-are-hurting- your-ability-to-ship-e0b2b41e8acf
  31. 31. Thanks ❤ With love from the Blinkist Android team ❤

×