Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Code reviews

56 views

Published on

Star Wars themed slides from my talk about code reviews at VilniusPHP meetup, which was held on Star Wars day - May 4th.
May the force be with you and your code!

Published in: Software
  • Be the first to comment

  • Be the first to like this

Code reviews

  1. 1. If review is not done, deploy you should not May the 4th 2017 VilniusPHP meetup
  2. 2. Developer I am Žilvinas Kuusas 11+ metų programuoju Sprendžiu el. parašo problemas - Estina / ISIGN Mokau/konsultuoju programuotojus CleanPHP.lt Skatinu bendruomeniškumą per VilniusPHP.lt, Symfony.lt, NoTrollsAllowed.com
  3. 3. Pre-merge code reviews
  4. 4. It’s “code inspection”
  5. 5. 5 rules of code reviews
  6. 6. Rule #1 If problem is not solved code exist should not
  7. 7. Rule #2 Push to the master you should not
  8. 8. Rule #3 Trust no one you should (even yourself)
  9. 9. Rule #4 Review often, review work in progress
  10. 10. Rule #5 Merge responsibly you must
  11. 11. Where to start?
  12. 12. Small tasks
  13. 13. Acceptance criteria
  14. 14. Atomic commits
  15. 15. Tests
  16. 16. Pull requests
  17. 17. Integrate frequently
  18. 18. Pair on merges
  19. 19. Solve the Problem Before Coding
  20. 20. Things to avoid
  21. 21. Blind Merge
  22. 22. One person responsible for everything
  23. 23. No one can push to master
  24. 24. Excuses
  25. 25. Cowboy coders
  26. 26. Focus on details with low value
  27. 27. Blame you should not
  28. 28. Do not be defensive
  29. 29. Review checklist
  30. 30. Unit tests
  31. 31. Does the code solve the given problem?
  32. 32. Method arguments
  33. 33. Null References
  34. 34. Conventions and Consistency
  35. 35. Disposable things
  36. 36. Security
  37. 37. Finally - accept code by merge
  38. 38. Tools ● Github ● Gitlab ● Phabricator ● ... ● ReviewBoard ● BarKeep ● Gerrit
  39. 39. Collective ownership
  40. 40. Everybody knows... ● what the code does ● why it’s designed that way ● how everything works
  41. 41. Bus Factor no single team member is a bottleneck
  42. 42. Shared best practices
  43. 43. Consistent code
  44. 44. Reusable code
  45. 45. Team maturity
  46. 46. Ready to create your first pull-request you are

×