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 Review: An apple a day

1,186 views

Published on

Presented at Multi-Mania in Kortrijk, Belgium on May 24, 2011.

Published in: Technology, News & Politics
  • Be the first to comment

Code Review: An apple a day

  1. 1. Code Review:An Apple A Day
  2. 2. About me
  3. 3. About meKathryn Rotondo
  4. 4. About meKathryn Rotondoflashionista.org
  5. 5. About meKathryn Rotondoflashionista.org@krotondo
  6. 6. About meKathryn Rotondoflashionista.org@krotondoAdobe CommunityChampion (ACC)
  7. 7. About meKathryn Rotondoflashionista.org@krotondoAdobe CommunityChampion (ACC)Soft wareent wicklerin
  8. 8. What is Code Review?
  9. 9. Historically
  10. 10. Recently
  11. 11. Now
  12. 12. How often?
  13. 13. Every Commit!
  14. 14. Benefits
  15. 15. “As Ive learned over the lastt wo years at Google, propercode review habits canreally improve the qualityof a code base, and goodtools for code review willimprove developers life.”
  16. 16. Benefits
  17. 17. BenefitsDistributes project knowledge
  18. 18. BenefitsDistributes project knowledgeProvides learning opportunities
  19. 19. BenefitsDistributes project knowledgeProvides learning opportunitiesCatches Bugs
  20. 20. BenefitsDistributes project knowledgeProvides learning opportunitiesCatches BugsEncourages Tidiness
  21. 21. BenefitsDistributes project knowledgeProvides learning opportunitiesCatches BugsEncourages TidinessSaves Time
  22. 22. Distributes Project Knowledge
  23. 23. Provides Learning Opportunities
  24. 24. Catches Bugs
  25. 25. Encourages Tidiness
  26. 26. Saves Time
  27. 27. Tools
  28. 28. Flex Formatter
  29. 29. Flex FormatterAvailable onSourceForge
  30. 30. Flex FormatterAvailable onSourceForgeGrant Skinner calls itan “IndispensablePlugin for FlashBuilder”
  31. 31. Flex Formatter
  32. 32. Flex FormatterTeam agrees on astyle
  33. 33. Flex FormatterTeam agrees on astyleTeam members installplugin & configure itwith team styleheet
  34. 34. Flex FormatterTeam agrees on astyleTeam members installplugin & configure itwith team styleheetPlugin auto-appliesstyle with every save
  35. 35. Flex FormatterTeam agrees on astyleTeam members installplugin & configure itwith team styleheetPlugin auto-appliesstyle with every save
  36. 36. Flex FormatterTeam agrees on a Effortless!styleTeam members installplugin & configure itwith team styleheetPlugin auto-appliesstyle with every save
  37. 37. Flex FormatterTeam agrees on a Effortless!style Removes style asTeam members install distraction duringplugin & configure it code review processwith team styleheetPlugin auto-appliesstyle with every save
  38. 38. Flex FormatterTeam agrees on a Effortless!style Removes style asTeam members install distraction duringplugin & configure it code review processwith team styleheet Ensures that diffsPlugin auto-applies show only codestyle with every save changes, not style differences
  39. 39. Google Code Reviews
  40. 40. Google Code ReviewsAvailable on GoogleApps Marketplace
  41. 41. Google Code ReviewsAvailable on GoogleApps MarketplaceFree to individuals/organizations withGoogle Apps account
  42. 42. Google Code ReviewsAvailable on GoogleApps MarketplaceFree to individuals/organizations withGoogle Apps accountEvery line of Googlesource code isreviewed this way
  43. 43. Google Code Reviews
  44. 44. Google Code Reviewsa website
  45. 45. Google Code Reviewsa websitedeveloper puts patchup for review, anyoneelse on team canreview it
  46. 46. Google Code Reviewsa websitedeveloper puts patchup for review, anyoneelse on team canreview iteasy to see what codehas changed: greenfor added, red forremoved
  47. 47. Google Code Reviewsa website reviewer can double- click on a line of codedeveloper puts patch to insert commentsup for review, anyone inlineelse on team canreview iteasy to see what codehas changed: greenfor added, red forremoved
  48. 48. Google Code Reviewsa website reviewer can double- click on a line of codedeveloper puts patch to insert commentsup for review, anyone inlineelse on team canreview it allows iteration, so developer can updateeasy to see what code patch based onhas changed: green commentsfor added, red forremoved
  49. 49. Riet veld Upload Script
  50. 50. Riet veld Upload Script Available at Riet veld on Google App Engine
  51. 51. Riet veld Upload Script Available at Riet veld on Google App Engine By Guido Van Rossum, creator of Python
  52. 52. Riet veld Upload Script
  53. 53. Riet veld Upload Script Developer runs the script when they’re ready to have code reviewed.
  54. 54. Riet veld Upload Script Developer runs the script when they’re ready to have code reviewed. It creates a “diff” showing what has changed, and uploads it to Google Code Reviews
  55. 55. Riet veld Upload Script Developer runs the Can be customized to script when they’re match your team’s ready to have code needs reviewed. It creates a “diff” showing what has changed, and uploads it to Google Code Reviews
  56. 56. Process / Demo
  57. 57. Developer
  58. 58. Developer Writes code
  59. 59. Developer Writes code Uploads patch
  60. 60. Developer Writes code Uploads patch Auto-emails reviewers
  61. 61. Developer Writes code Uploads patch Auto-emails reviewers
  62. 62. Developer Reviewer Writes code Uploads patch Auto-emails reviewers
  63. 63. Developer Reviewer Writes code Visits website Uploads patch Auto-emails reviewers
  64. 64. Developer Reviewer Writes code Visits website Uploads patch Browses side-by-side diffs Auto-emails reviewers
  65. 65. Developer Reviewer Writes code Visits website Uploads patch Browses side-by-side diffs Auto-emails reviewers Responds inline
  66. 66. Developer Reviewer Writes code Visits website Uploads patch Browses side-by-side diffs Auto-emails reviewers Responds inline Publishes comments
  67. 67. Developer Reviewer Writes code Visits website Uploads patch Browses side-by-side diffs Auto-emails reviewers Responds inline Publishes comments
  68. 68. Questions?
  69. 69. Customize Upload.pyUpload ServerPatch Subject
  70. 70. Upload Server (-s)Lines 82-84:# URL of the default reviewserver. As for AUTH_ACCOUNT_TYPE,this line could be# changed by the review server(see handler for upload.py).DEFAULT_REVIEW_SERVER ="codereview.appspot.com"
  71. 71. Issue Subject (-m)Lines 2116-2120:if options.issue: prompt = "Message describing this patch set: "else: prompt = "New issue subject: " message = options.message orraw_input(prompt).strip()

×