Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Alex Fernández - Has anyone else seen your code? - Codemotion Berlin 2018

Do you regularly deliver code that nobody else has seen? Does anyone even know your production code, or has everyone forgotten what it did? Code review is one of the most interesting and unknown practices in software development. It is the cheapest way to reduce errors, increase ownership of the codebase and train the team, all at once! In this talk we will see an update with numbers and references to convince you and your bosses to implement reviews as a crucial step in your development process.

  • Inicia sesión para ver los comentarios

Alex Fernández - Has anyone else seen your code? - Codemotion Berlin 2018

  1. 1. HAS ANYONE ELSE SEENHAS ANYONE ELSE SEEN
  2. 2. HAS ANYONE ELSE SEENHAS ANYONE ELSE SEEN YOUR CODE?YOUR CODE?
  3. 3. HAS ANYONE ELSE SEENHAS ANYONE ELSE SEEN YOUR CODE?YOUR CODE? CODEMOTION BERLIN 2018-11-21CODEMOTION BERLIN 2018-11-21
  4. 4. YOUR HOST TODAYYOUR HOST TODAY @pinchito
  5. 5. WHAT WE WILL COVERWHAT WE WILL COVER
  6. 6. WHAT WE WILL COVERWHAT WE WILL COVER BadCodeWillKillYou
  7. 7. WHAT WE WILL COVERWHAT WE WILL COVER BadCodeWillKillYou DeployingSpiders
  8. 8. WHAT WE WILL COVERWHAT WE WILL COVER BadCodeWillKillYou DeployingSpiders ZenandtheArtofCodeReviews
  9. 9. WHAT WE WILL COVERWHAT WE WILL COVER BadCodeWillKillYou DeployingSpiders ZenandtheArtofCodeReviews EditorialProcess
  10. 10. WHAT WE WILL COVERWHAT WE WILL COVER BadCodeWillKillYou DeployingSpiders ZenandtheArtofCodeReviews EditorialProcess Conclusions
  11. 11. WHY ME?WHY ME?
  12. 12. WHY ME?WHY ME? 20+yearsintheindustry
  13. 13. WHY ME?WHY ME? 20+yearsintheindustry 5+yearsdoingcodereviews
  14. 14. WHY ME?WHY ME? 20+yearsintheindustry 5+yearsdoingcodereviews Readabunchofblogposts
  15. 15. WHY ME?WHY ME? 20+yearsintheindustry 5+yearsdoingcodereviews Readabunchofblogposts Extremelymuscularbody
  16. 16. CODE CAN (AND WILL) KILL YOUCODE CAN (AND WILL) KILL YOU
  17. 17. BAD CODE IS OUT TO GET YOU!BAD CODE IS OUT TO GET YOU!
  18. 18. SOFTWARE BUGS COST $60 BILLIONSOFTWARE BUGS COST $60 BILLION
  19. 19. SOFTWARE BUGS COST $60 BILLIONSOFTWARE BUGS COST $60 BILLION
  20. 20. SOFTWARE BUGS COST $60 BILLIONSOFTWARE BUGS COST $60 BILLION ...intheUSin2002
  21. 21. SOFTWARE HANDLES:SOFTWARE HANDLES:
  22. 22. SOFTWARE HANDLES:SOFTWARE HANDLES: allmoneyexceptpocketchange
  23. 23. SOFTWARE HANDLES:SOFTWARE HANDLES: allmoneyexceptpocketchange communicationsaroundtheworld
  24. 24. SOFTWARE HANDLES:SOFTWARE HANDLES: allmoneyexceptpocketchange communicationsaroundtheworld healthinstrumentsandrecords
  25. 25. SOFTWARE HANDLES:SOFTWARE HANDLES: allmoneyexceptpocketchange communicationsaroundtheworld healthinstrumentsandrecords almostalltransportationvehicles
  26. 26. STATE OF THE ART SENSORSSTATE OF THE ART SENSORS
  27. 27. STATE OF THE ART SENSORSSTATE OF THE ART SENSORS VS PRIMATE IN METAL BOXVS PRIMATE IN METAL BOX
  28. 28. STATE OF THE ART SENSORSSTATE OF THE ART SENSORS VS PRIMATE IN METAL BOXVS PRIMATE IN METAL BOX
  29. 29. APE WINSAPE WINS
  30. 30. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS
  31. 31. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo
  32. 32. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM
  33. 33. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM Nissan
  34. 34. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM Nissan BMW
  35. 35. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM Nissan BMW Tesla
  36. 36. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM Nissan BMW Tesla ...
  37. 37. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM Nissan BMW Tesla ... Seat?
  38. 38. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM Nissan BMW Tesla ... Seat? Dacia?
  39. 39. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM Nissan BMW Tesla ... Seat? Dacia? Perodua??
  40. 40. SELF-DRIVING CAR MANUFACTURERSSELF-DRIVING CAR MANUFACTURERS Waymo GM Nissan BMW Tesla ... Seat? Dacia? Perodua?? Saipa???
  41. 41. WAR ROBOTSWAR ROBOTS Canbeunleashedbyasoftwarebug
  42. 42. ACTUAL ROBOTSACTUAL ROBOTS
  43. 43. DEPLOYING SPIDERSDEPLOYING SPIDERS
  44. 44. DO YOU KNOW WHAT YOU DEPLOY?DO YOU KNOW WHAT YOU DEPLOY?
  45. 45. DO YOU KNOW WHAT YOU DEPLOY?DO YOU KNOW WHAT YOU DEPLOY? OFTEN WE DO NOT KNOW!OFTEN WE DO NOT KNOW!
  46. 46. IT MAY BE WEIRD STUFFIT MAY BE WEIRD STUFF
  47. 47. IT MAY BE WEIRD STUFFIT MAY BE WEIRD STUFF (POTENTIALLY VERY WEIRD)(POTENTIALLY VERY WEIRD)
  48. 48. SPOILER ALERTSPOILER ALERT
  49. 49. SPOILER ALERTSPOILER ALERT
  50. 50. SPOILER ALERTSPOILER ALERT IT'S A HUMAN HEAD!IT'S A HUMAN HEAD!
  51. 51. Doescodeeverworkthefirsttime?
  52. 52. Doescodeeverworkthefirsttime?
  53. 53. Doescodeeverworkthefirsttime?
  54. 54. Doescodeeverworkthefirsttime?
  55. 55. Doescodeeverworkthefirsttime? Yes!
  56. 56. Doescodeeverworkthefirsttime? Yes! Probablynot?
  57. 57. Doescodeeverworkthefirsttime? DefinitelynotYes! Probablynot?
  58. 58. HALL OF TORTURED SOULSHALL OF TORTURED SOULS
  59. 59. LINUX 4.17.3: 6 MLOCLINUX 4.17.3: 6 MLOC
  60. 60. LINUX 4.17.3: 6 MLOCLINUX 4.17.3: 6 MLOC $ grep -ir fuck linux-4.17.3 | wc -l 29 $ grep -ir kludge linux-4.17.3 | wc -l 110 $ grep -ir cludge linux-4.17.3 | wc -l 1 $ grep -ir crap linux-4.17.3 | wc -l 195 $ grep -r TODO linux-4.17.3 | wc -l 4825
  61. 61. LINUX 4.17.3: 6 MLOCLINUX 4.17.3: 6 MLOC $ grep -ir fuck linux-4.17.3 | wc -l 29 $ grep -ir kludge linux-4.17.3 | wc -l 110 $ grep -ir cludge linux-4.17.3 | wc -l 1 $ grep -ir crap linux-4.17.3 | wc -l 195 $ grep -r TODO linux-4.17.3 | wc -l 4825 ## Some Highlights * Wirzenius wrote this portably, Torvalds fucked it up :-) /* !!!! THIS IS A PIECE OF SHIT MADE BY ME !!! */
  62. 62. NODE.JS 10.5.0: 3 MLOCNODE.JS 10.5.0: 3 MLOC
  63. 63. NODE.JS 10.5.0: 3 MLOCNODE.JS 10.5.0: 3 MLOC $ grep -ir fuck node-v10.5.0 | wc -l 25 $ grep -ir kludge node-v10.5.0 | wc -l 22 $ grep -ir crap node-v10.5.0 | grep -v scrap | wc -l 9 $ grep -r TODO node-v10.5.0 | wc -l 2904
  64. 64. NODE.JS 10.5.0: 3 MLOCNODE.JS 10.5.0: 3 MLOC $ grep -ir fuck node-v10.5.0 | wc -l 25 $ grep -ir kludge node-v10.5.0 | wc -l 22 $ grep -ir crap node-v10.5.0 | grep -v scrap | wc -l 9 $ grep -r TODO node-v10.5.0 | wc -l 2904 ## Some Highlights * **help:** fuck it. just hard-code it ([d5d5085] (https://github.com/zkat/npx/commit/d5d5085)) * IOW it's all just a clusterfuck and we should think of something that makes slightly more sense.
  65. 65. JAVA 10.0.1: 3.5 MLOCJAVA 10.0.1: 3.5 MLOC
  66. 66. JAVA 10.0.1: 3.5 MLOCJAVA 10.0.1: 3.5 MLOC $ grep -ir fuck java-10.0.1 | wc -l 1 $ grep -ir kludge java-10.0.1 | wc -l 16 $ grep -ir crap java-10.0.1 | grep -v scrap | wc -l 3 $ grep -r TODO java-10.0.1 | wc -l 2155
  67. 67. JAVA 10.0.1: 3.5 MLOCJAVA 10.0.1: 3.5 MLOC $ grep -ir fuck java-10.0.1 | wc -l 1 $ grep -ir kludge java-10.0.1 | wc -l 16 $ grep -ir crap java-10.0.1 | grep -v scrap | wc -l 3 $ grep -r TODO java-10.0.1 | wc -l 2155 ## Some Highlights if (uri == null || uri.length() == 0) // crap. the NamespaceContext interface is broken // forces us to clear out crap up to the next * TODO: wrapping message needs easier. in particular properties and attachments.
  68. 68. UNIT TESTS ARE GREATUNIT TESTS ARE GREAT
  69. 69. UNIT TESTS ARE GREATUNIT TESTS ARE GREAT
  70. 70. UNIT TESTS ARE GREATUNIT TESTS ARE GREAT
  71. 71. UNIT TESTS ARE GREATUNIT TESTS ARE GREAT
  72. 72. UNIT TESTS ARE GREATUNIT TESTS ARE GREAT
  73. 73. UNIT TESTS ARE GREATUNIT TESTS ARE GREAT
  74. 74. UNIT TESTS ARE GREATUNIT TESTS ARE GREAT WHEN SOMEONE REVIEWS THEM!WHEN SOMEONE REVIEWS THEM!
  75. 75. EXTERNAL TESTS ARE AWESOMEEXTERNAL TESTS ARE AWESOME
  76. 76. EXTERNAL TESTS ARE AWESOMEEXTERNAL TESTS ARE AWESOME Buthavetoberepeatedeverytime
  77. 77. EXTERNAL TESTS ARE AWESOMEEXTERNAL TESTS ARE AWESOME Buthavetoberepeatedeverytime Labor-intensive
  78. 78. EXTERNAL TESTS ARE AWESOMEEXTERNAL TESTS ARE AWESOME Buthavetoberepeatedeverytime Labor-intensive Microsoft:1QA/devinthe90s
  79. 79. EXTERNAL TESTS ARE AWESOMEEXTERNAL TESTS ARE AWESOME Buthavetoberepeatedeverytime Labor-intensive Microsoft:1QA/devinthe90s Today:1QA/3devs
  80. 80. WHEN PAIR PROGRAMMING IS NOT ENOUGHWHEN PAIR PROGRAMMING IS NOT ENOUGH
  81. 81. EVEN REMOTE PAIR PROGRAMMINGEVEN REMOTE PAIR PROGRAMMING
  82. 82. ZEN AND THE ARTZEN AND THE ART OF CODE REVIEWOF CODE REVIEW
  83. 83. JUDGED BY A JURY OF YOUR PEERSJUDGED BY A JURY OF YOUR PEERS
  84. 84. IDEAL REVIEWIDEAL REVIEW
  85. 85. IDEAL REVIEWIDEAL REVIEW
  86. 86. IDEAL REVIEWIDEAL REVIEW
  87. 87. IDEAL REVIEWIDEAL REVIEW
  88. 88. IDEAL REVIEWIDEAL REVIEW
  89. 89. IDEAL REVIEWIDEAL REVIEW
  90. 90. DO NOT RELY SOLELY ON SENIOR REVIEWDO NOT RELY SOLELY ON SENIOR REVIEW
  91. 91.   SENIOR REVIEW CREATESSENIOR REVIEW CREATES  A CHOKE POINT A CHOKE POINT
  92. 92.   SENIOR REVIEW CREATESSENIOR REVIEW CREATES  A CHOKE POINT A CHOKE POINT
  93. 93.   SENIOR REVIEW CREATESSENIOR REVIEW CREATES  A CHOKE POINT A CHOKE POINT
  94. 94.   SENIOR REVIEW CREATESSENIOR REVIEW CREATES  A CHOKE POINT A CHOKE POINT
  95. 95.   SENIOR REVIEW CREATESSENIOR REVIEW CREATES  A CHOKE POINT A CHOKE POINT
  96. 96. MANDATORY FEYNMAN MISQUOTEMANDATORY FEYNMAN MISQUOTE Icouldn'texplainmycodetoajunior.That meansIdon'treallyunderstandmycode. RichardFeynman
  97. 97. ENCOURAGE JUNIORS TO ASK ONE QUESTIONENCOURAGE JUNIORS TO ASK ONE QUESTION
  98. 98. ENCOURAGE JUNIORS TO ASK ONE QUESTIONENCOURAGE JUNIORS TO ASK ONE QUESTION
  99. 99. ENCOURAGE JUNIORS TO ASK ONE QUESTIONENCOURAGE JUNIORS TO ASK ONE QUESTION Youmaylearnsomething
  100. 100. ENCOURAGE JUNIORS TO ASK ONE QUESTIONENCOURAGE JUNIORS TO ASK ONE QUESTION Youmaylearnsomething ...ornot
  101. 101. TOO MANY PRIMA DONNAS ALREADYTOO MANY PRIMA DONNAS ALREADY
  102. 102. EGO-LESS PROGRAMMINGEGO-LESS PROGRAMMING
  103. 103. TREAT PEOPLE WELLTREAT PEOPLE WELL
  104. 104. TREAT PEOPLE WELLTREAT PEOPLE WELL Donotgiveorders;askquestions
  105. 105. TREAT PEOPLE WELLTREAT PEOPLE WELL Donotgiveorders;askquestions Maybeaskquestionsinsteadofgivingorders?
  106. 106. TREAT PEOPLE WELLTREAT PEOPLE WELL Donotgiveorders;askquestions Maybeaskquestionsinsteadofgivingorders? Isn'titfastertochangeitthantoargue?
  107. 107. TREAT PEOPLE WELLTREAT PEOPLE WELL Donotgiveorders;askquestions Maybeaskquestionsinsteadofgivingorders? Isn'titfastertochangeitthantoargue? Couldyouacceptcriticismgracefully?
  108. 108. DON'T TROLL PEOPLEDON'T TROLL PEOPLE
  109. 109. BENEFITSBENEFITS
  110. 110. BENEFITSBENEFITS Knowledgeissharedaround
  111. 111. BENEFITSBENEFITS Knowledgeissharedaround Disseminatecodingculture
  112. 112. BENEFITSBENEFITS Knowledgeissharedaround Disseminatecodingculture Statusupdatesaremuchfaster
  113. 113. BENEFITSBENEFITS Knowledgeissharedaround Disseminatecodingculture Statusupdatesaremuchfaster Ittakeslong,butnotdoingittakeslonger
  114. 114. EXPLAINING YOUR CODE IS GOODEXPLAINING YOUR CODE IS GOOD
  115. 115. EXPLAINING YOUR CODE IS GOODEXPLAINING YOUR CODE IS GOOD
  116. 116. EXPLAINING YOUR CODE IS GOODEXPLAINING YOUR CODE IS GOOD Ifyoudon'tlearnanythingyou'redoingitwrong
  117. 117. VOLKSWAGEN SCENARIOVOLKSWAGEN SCENARIO
  118. 118. VOLKSWAGEN SCENARIOVOLKSWAGEN SCENARIO Blameisspread
  119. 119. VOLKSWAGEN SCENARIOVOLKSWAGEN SCENARIO Blameisspread Otherpeoplereviewed
  120. 120. VOLKSWAGEN SCENARIOVOLKSWAGEN SCENARIO Blameisspread Otherpeoplereviewed Gostraighttothesolutions
  121. 121. IF REVIEWS GIVE YOU TROUBLEIF REVIEWS GIVE YOU TROUBLE
  122. 122. IF REVIEWS GIVE YOU TROUBLEIF REVIEWS GIVE YOU TROUBLE Maybeyouhavesomeissuestoworkwith?
  123. 123. IF REVIEWS GIVE YOU TROUBLEIF REVIEWS GIVE YOU TROUBLE Maybeyouhavesomeissuestoworkwith? Corollary:
  124. 124. IF REVIEWS GIVE YOU TROUBLEIF REVIEWS GIVE YOU TROUBLE Maybeyouhavesomeissuestoworkwith? Corollary: Ifyouwanttoimproveyourdevprocess,doreviews!
  125. 125. EDITORIAL PROCESSEDITORIAL PROCESS
  126. 126. EDITORIAL PROCESSEDITORIAL PROCESS
  127. 127. EDITORIAL PROCESSEDITORIAL PROCESS
  128. 128. EDITORIAL PROCESSEDITORIAL PROCESS
  129. 129. FOUR-EYES PRINCIPLEFOUR-EYES PRINCIPLE
  130. 130. SIX EYESSIX EYES
  131. 131. EIGHT EYESEIGHT EYES SIX EYESSIX EYES
  132. 132. EIGHT EYESEIGHT EYES SIX EYESSIX EYES
  133. 133. EIGHT EYESEIGHT EYES SIX EYESSIX EYES
  134. 134. CREATE YOUR OWN ADVENTURE!CREATE YOUR OWN ADVENTURE!
  135. 135. CREATE YOUR OWN ADVENTURE!CREATE YOUR OWN ADVENTURE!
  136. 136. CREATE YOUR OWN ADVENTURE!CREATE YOUR OWN ADVENTURE!
  137. 137. CREATE YOUR OWN ADVENTURE!CREATE YOUR OWN ADVENTURE!
  138. 138. SOME EXAMPLESSOME EXAMPLES 3+1s no-1s Youcanvote+0or-0 Adjustasneeded Node.jsreview Apacheconsensusrules
  139. 139. REVIEWS ARE A PROCESS, NOT AREVIEWS ARE A PROCESS, NOT A DESTINATIONDESTINATION Prepareformultipleround-trips
  140. 140. TO SUMMARIZETO SUMMARIZE
  141. 141. PEOPLE DEPLOY CODE ALL THE TIMEPEOPLE DEPLOY CODE ALL THE TIME
  142. 142. PEOPLE DEPLOY CODE ALL THE TIMEPEOPLE DEPLOY CODE ALL THE TIME
  143. 143. PEOPLE DEPLOY CODE ALL THE TIMEPEOPLE DEPLOY CODE ALL THE TIME "DEPLOY""DEPLOY"
  144. 144. JUNIORS MAKE GREAT REVIEWERSJUNIORS MAKE GREAT REVIEWERS
  145. 145. CODE REVIEWS KEEP YOU HONESTCODE REVIEWS KEEP YOU HONEST
  146. 146. MAKE THE PROCESS EXPLICITMAKE THE PROCESS EXPLICIT
  147. 147. THANKS!THANKS! @pinchito

×