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.
Semi Automatic Code Review    Richard Huang      @flyerhzm
About MeWork for GREE• OpenFeint platformOpenSource• create rails_best_practices gem• build railsbp.com website• @flyerhzm,...
DevelopDeploy              Review    Merge          QA
Manual work   easy to introduce bugsAutomation   simple, accurate, less buggy
DevelopDeploy    Manually Coding      Review         Automatic Unit Test    Merge                QA
DevelopDeploy   Totally Manual    Review    Merge                 QA
DevelopDeploy Automatic Script Test Review           Manually Verify     Merge                   QA
DevelopDeploy    Automatic by Git      Review         Manually fix conflicts    Merge                 QA
DevelopDeploy   Automatic by    Review          Capistrano    Merge               QA
Develop              CouldDeploy      automate?    Review    Merge               QA
What to Review?Follow coding guidelines      Performant Better coding syntax          ScalableRemove unused methods   Easy...
What to Review? Follow coding guides                        What if we can Better coding syntax    review these           ...
What to Review?                       Performance And focus on thismore important stuff                         Scalable
How?rails_best_practices gem• analyze source code• give developers suggestions to refactor
Examples    app/controllers/posts_controller.rb:5 -              use scope access
Examples     app/controllers/posts_controller.rb:2 -       use model association (for @post)
Examples     app/views/shared/_head.html.erb:16 -      use query attribute (@user.login?)
IntegrationGuard• https://github.com/logankoester/guard-   rails_best_practicesJenkins• http://developer.aiming-inc.com/ci...
Code Review Service?
Online Servicerailsbp.com• automatically review• collaborate with co-workers• track history• configure what to review
Report               Push Code             NotifyRailsbp                 Github           Check out            Analyze
github hooks
Extendhttps://github.com/railsbp/rails_best_practices/wiki/          How-to-write-your-own-check-list
“Use Try” Checker Pluginauthor ? author.name : nil => author.try(:name)
Open Sourcedrails_best_practices gem• https://github.com/railsbp/rails_best_practicesrailsbp.com• https://github.com/rails...
Demohttps://vimeo.com/40976161
Thanksflyerhzm@gmail.com    @flyerhzm
Semi Automatic Code Review
Semi Automatic Code Review
Semi Automatic Code Review
Semi Automatic Code Review
Semi Automatic Code Review
Semi Automatic Code Review
Upcoming SlideShare
Loading in …5
×

Semi Automatic Code Review

7,763 views

Published on

Published in: Technology
  • Be the first to comment

Semi Automatic Code Review

  1. Semi Automatic Code Review Richard Huang @flyerhzm
  2. About MeWork for GREE• OpenFeint platformOpenSource• create rails_best_practices gem• build railsbp.com website• @flyerhzm, @railsbp
  3. DevelopDeploy Review Merge QA
  4. Manual work easy to introduce bugsAutomation simple, accurate, less buggy
  5. DevelopDeploy Manually Coding Review Automatic Unit Test Merge QA
  6. DevelopDeploy Totally Manual Review Merge QA
  7. DevelopDeploy Automatic Script Test Review Manually Verify Merge QA
  8. DevelopDeploy Automatic by Git Review Manually fix conflicts Merge QA
  9. DevelopDeploy Automatic by Review Capistrano Merge QA
  10. Develop CouldDeploy automate? Review Merge QA
  11. What to Review?Follow coding guidelines Performant Better coding syntax ScalableRemove unused methods Easy, and code Important, but dependsbecomes maintainable on experience
  12. What to Review? Follow coding guides What if we can Better coding syntax review these automatically?Remove unused methods
  13. What to Review? Performance And focus on thismore important stuff Scalable
  14. How?rails_best_practices gem• analyze source code• give developers suggestions to refactor
  15. Examples app/controllers/posts_controller.rb:5 - use scope access
  16. Examples app/controllers/posts_controller.rb:2 - use model association (for @post)
  17. Examples app/views/shared/_head.html.erb:16 - use query attribute (@user.login?)
  18. IntegrationGuard• https://github.com/logankoester/guard- rails_best_practicesJenkins• http://developer.aiming-inc.com/ci/rails- bestpractices-in-jenkins/Internal system
  19. Code Review Service?
  20. Online Servicerailsbp.com• automatically review• collaborate with co-workers• track history• configure what to review
  21. Report Push Code NotifyRailsbp Github Check out Analyze
  22. github hooks
  23. Extendhttps://github.com/railsbp/rails_best_practices/wiki/ How-to-write-your-own-check-list
  24. “Use Try” Checker Pluginauthor ? author.name : nil => author.try(:name)
  25. Open Sourcedrails_best_practices gem• https://github.com/railsbp/rails_best_practicesrailsbp.com• https://github.com/railsbp/railsbp.com
  26. Demohttps://vimeo.com/40976161
  27. Thanksflyerhzm@gmail.com @flyerhzm

×