SlideShare a Scribd company logo
1 of 32
Download to read offline
Use rails_best_practices
to refactor your rails codes


      flyerhzm@gmail.com
         Richard
Huang



       Proprietary
and
Confiden/al.
©
2011
OpenFeint.   1
About Me

Richard
Huang
(flyerhzm)
• hEp://huangzhimin.com
• hEp://twiEer.com/flyerhzm
• hEp://github.com/flyerhzm

Work
for
OpenFeint

        Proprietary
and
Confiden/al.
©
2011
OpenFeint.   2
Presentation from ihower




      Proprietary
and
Confiden/al.
©
2011
OpenFeint.   3
rails_best_practices gem




      Proprietary
and
Confiden/al.
©
2011
OpenFeint.   4
rails_best_practices gem


28
code
checkers

~
800
watchers
on
github

>
100K
downloads

        Proprietary
and
Confiden/al.
©
2011
OpenFeint.   5
rails-bestpractices.com




     Proprietary
and
Confiden/al.
©
2011
OpenFeint.   6
rails-bestpractices.com




     Proprietary
and
Confiden/al.
©
2011
OpenFeint.   7
rails-bestpractices.com

70
prac/ces

gem
document

gem
blog


        Proprietary
and
Confiden/al.
©
2011
OpenFeint.   8
How rails_best_practices gem
          works




        Proprietary
and
Confiden/al.
©
2011
OpenFeint.   9
Usage

gem
install
rails_best_prac/ces

cd
rails_project

rails_best_prac/ces


         Proprietary
and
Confiden/al.
©
2011
OpenFeint.   10
Result




Proprietary
and
Confiden/al.
©
2011
OpenFeint.   11
Html Result




Proprietary
and
Confiden/al.
©
2011
OpenFeint.   12
Why should use
rails_best_practices gem




       Proprietary
and
Confiden/al.
©
2011
OpenFeint.   13
We Are Ruby/Rails Developers



  Write
Beau/ful
Codes

  Follow
Best
Prac/ces



          Proprietary
and
Confiden/al.
©
2011
OpenFeint.   14
We Are a Team


Code
Conven/on

Code
Review



       Proprietary
and
Confiden/al.
©
2011
OpenFeint.   15
Java
checkstyle




        Proprietary
and
Confiden/al.
©
2011
OpenFeint.   16
Ruby

Saikuro
Flog
Flay
Reek
Roodi


          Proprietary
and
Confiden/al.
©
2011
OpenFeint.   17
rails_best_practices gem



Check
rails
codes
quality

Create
check
list
for
rails
team



         Proprietary
and
Confiden/al.
©
2011
OpenFeint.   18
How rails_best_practice gem
          works




       Proprietary
and
Confiden/al.
©
2011
OpenFeint.   19
1                                                   2
Codes                    rbp
gem                                       sexp
                                       3
           4
                           Lexical
                                       5

                                                                   6
Analyze
                 Prepare
 Result                                7
           9                                                       8
                          Review

               Proprietary
and
Confiden/al.
©
2011
OpenFeint.
1                                                   2
Codes                    rbp
gem                                   sexp

                           Lexical


Analyze
                 Prepare
 Result
                          Review

               Proprietary
and
Confiden/al.
©
2011
OpenFeint.
1                                                   2
Codes                    rbp
gem                                   sexp
                                       3
           4
                           Lexical


Analyze
                 Prepare
 Result
                          Review

               Proprietary
and
Confiden/al.
©
2011
OpenFeint.
1                                                   2
Codes                    rbp
gem                                       sexp
                                       3
           4
                           Lexical
                                       5

                                                                   6
Analyze
                 Prepare
 Result
                          Review

               Proprietary
and
Confiden/al.
©
2011
OpenFeint.
1                                                   2
Codes                    rbp
gem                                       sexp
                                       3
           4
                           Lexical
                                       5

                                                                   6
Analyze
                 Prepare
 Result                                7
           9                                                       8
                          Review

               Proprietary
and
Confiden/al.
©
2011
OpenFeint.
sexp
       class Post < ActiveRecord::Base
         attr_accessor :editable
       end




s(:class, :Post,
  s(:colon2, s(:const, :ActiveRecord), :Base),
  s(:scope,
    s(:call, nil, :attr_accessor,
      s(:arglist, s(:lit, :editable))
    )
  )
)



         Proprietary
and
Confiden/al.
©
2011
OpenFeint.   25
sexp
       def test
         puts "hello world"
       end




s(:defn, :test, s(:args),
  s(:scope,
    s(:block,
      s(:call, nil, :puts,
        s(:arglist, s(:str, "hello world"))
      )
    )
  )
)

         Proprietary
and
Confiden/al.
©
2011
OpenFeint.   26
Play with sexp


                                  ruby_parser

hEps://github.com/flyerhzm/rails_best_prac/ces/blob/master/lib/rails_best_prac/ces/core/runner.rb#L104




                            Proprietary
and
Confiden/al.
©
2011
OpenFeint.                               27
More Options


rails_best_prac/ces
rails_best_prac/ces
‐f
html
rails_best_prac/ces
‐f
html
‐‐with‐textmate
rails_best_prac/ces
‐f
html
‐‐with‐mvim



            Proprietary
and
Confiden/al.
©
2011
OpenFeint.   28
Configurable

rails_best_prac/ces
‐g

mvim
config/rails_best_prac/ces.yml

rails_best_prac/ces


            Proprietary
and
Confiden/al.
©
2011
OpenFeint.   29
Extensibility

How
to
write
your
own
check
list?



   RAILS_ROOT

=>

Rails.root



       Proprietary
and
Confiden/al.
©
2011
OpenFeint.   30
Resource

• rails
best
prac/ces
Website
    hEp://rails‐bestprac/ces.com/

• rails_best_prac/ces
Source
Codes
    hEps://github.com/flyerhzm/rails_best_prac/ces
• rails_best_prac/ces
Document
    hEp://rdoc.rails‐bestprac/ces.com/




03/23/11           Proprietary
and
Confiden/al.
©
2010
Aurora
Feint.   31
Thank you


  Questions?


Proprietary
and
Confiden/al.
©
2011
OpenFeint.   32

More Related Content

More from Richard Huang

Rails project code review
Rails project code reviewRails project code review
Rails project code reviewRichard Huang
 
使用Rails best practices做代码审查
使用Rails best practices做代码审查使用Rails best practices做代码审查
使用Rails best practices做代码审查Richard Huang
 
Rails bestpractices.com
Rails bestpractices.comRails bestpractices.com
Rails bestpractices.comRichard Huang
 
Ruby application based on http
Ruby application based on httpRuby application based on http
Ruby application based on httpRichard Huang
 
Css sprite best practices
Css sprite best practicesCss sprite best practices
Css sprite best practicesRichard Huang
 
Static Code Analysis For Ruby
Static Code Analysis For RubyStatic Code Analysis For Ruby
Static Code Analysis For RubyRichard Huang
 
Email Contacts For Invitation
Email Contacts For InvitationEmail Contacts For Invitation
Email Contacts For InvitationRichard Huang
 

More from Richard Huang (7)

Rails project code review
Rails project code reviewRails project code review
Rails project code review
 
使用Rails best practices做代码审查
使用Rails best practices做代码审查使用Rails best practices做代码审查
使用Rails best practices做代码审查
 
Rails bestpractices.com
Rails bestpractices.comRails bestpractices.com
Rails bestpractices.com
 
Ruby application based on http
Ruby application based on httpRuby application based on http
Ruby application based on http
 
Css sprite best practices
Css sprite best practicesCss sprite best practices
Css sprite best practices
 
Static Code Analysis For Ruby
Static Code Analysis For RubyStatic Code Analysis For Ruby
Static Code Analysis For Ruby
 
Email Contacts For Invitation
Email Contacts For InvitationEmail Contacts For Invitation
Email Contacts For Invitation
 

Recently uploaded

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Recently uploaded (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

rails_best practices_rubykaigi

Editor's Notes

  1. Hi Everybody, today my topic is use rails_best_practices to refractor your rails codes. rails_best_practices gem is a static code analytics tool for rails project. \nBefore I start the topic, let me ask you a question first, have you ever tried rails_best_practices gem?\n(wow, more than I expected)\n(seems not many, I&apos;d like to give you an introduction about this gem, I think you will like it)\n
  2. My name is Richard Huang, here is my personal website, you can follow my twitter account or check out my open sourced projects on github.\nI&apos;m now working for OpenFeint, it&apos;s the largest mobile gaming network.\n
  3. First, please allow me to tell you the story why I created rails_best_practices gem.\nIn October 2009, I attended a RailsConf in China Shanghai, Mr. Wen-Tian Chang shared his famous presentation Rails Best Practices, it&apos;s really exciting, he told us what are bad smells and how to refractor them.\nAfter that, I looked through my rails projects, found a lot of bad smells, then I refractor them according to his prevention. \n
  4. But it was not easy to catch all of the bad smells manually, so I thought if I could make it automatically.\nThen I began to write the rails_best_practices gem from November 2009. It doesn&apos;t implement all of the practices from Wen-Tian Chang&apos;s presentation because some are too difficult to check automatically, but I also added some other useful practices to the gem.\n
  5. Now, it contains 28 code checkers, nearly 800 watchers on github, and more than 1 hundred thousand downloads.\n
  6. After a year, I realized that I need help, I hope to see more and more rails best practices from talent rails developers all over the world, then I can add their practices to the rails_best_practices gem. So I created a website rails-bestpractices.com in December 2010. On the website, everyone can share his rails practices, others can vote to say if they like it or not, they can also leave comments to discuss. \n
  7. This is one of the best practices on webiste, named use query attribute, in common, the practice will show you what&amp;#x2019;s the bad smell, and how to refactor it.\n
  8. Now there are 70 practices on the website, I can&amp;#x2019;t say all of them are best, but most of them are really useful. The website also contains the gem document and gem weblog.\n
  9. Now, let me show you how rails_best_practices gem works.\n
  10. First, you should gem install rails_best_practices, go to a rails project directory, type rails_best_practices command.\n
  11. It&apos;s really easy to use, then you will see the analyze result. It tells you which line in which file has a code smell, and tells you what code smell it is as well. Then you can go to the rails-bestpractices.com website to figure out how to refractor this bad smell.\n
  12. rails_best_practices gem also provides a visual result page. It&apos;s a html document, same to the terminal, it shows you which file and which line contains the bad smell, the bad smell description is at the right side. Click the filename it will open Textmate or mvim and locate to that file and that line, Click the bad smell description, it will take you to the rails-bestpractices.com website, show you how to refractor the bad smells.\nLet&amp;#x2019;s try it now.\n
  13. Why I think we should use the rails_best_practices gem?\n
  14. The most important reason is we are the ruby developer, we are the rails developer, we not only write codes to solve problems, we also have the pleasure to read and write beautiful codes. \nAnd we always try to follow the best practices to solve the problems.\n
  15. You know different developers may have different coding styles, but we are always working in a team, we should have a code convention for team, to say what should do and what should not do.\nBesides this, in a rails team, we have senior rails developers, we also have junior developers, most of the time we will do the code review for others, but what if we can make the code review partial automatically? For example, before code review, the codes are checked automatically for syntax, so we can focus on how they are implemented and if there will be a performance issue without worrying too much about if the codes are ugly.\n\n
  16. Before, I wrote Java codes, there is a great code analytics tool, named checkstyle, which tells you the bad smells in your java codes.\n
  17. In Ruby world, we also have a lot of code analytics tools, like saikuro, flog, flay, reek and roodi, they help you to analyze the code complex, find out similar or duplicated codes and other codes smells in ruby codes. They are great.\n
  18. But they are used for ruby projects, no special for rails projects. rails_best_practices gem is a static code analytics tool, created for rails projects, helps you to find out the rails code smells, give you some suggestions to improve your rails code quality. It provides you 28 default code checkers, if you don&apos;t like all of the default checkers, you can customize to use only some. rails_best_practices gem also provides a way to write plugins, which allows you to write your own code check lists for your rails team.\n
  19. If you are interested in writing your own check list, you should know a bit about how rails_best_practices gem works internally?\n
  20. This is the high-level work flow of rails_best_practices gem. The left top is the source codes, left bottom is the analyze result, the middle part is the rails_best_practices gem, the right side is the sexp, sexp is a data structure to represent the abstract syntax tree. \n
  21. First step, the gem reads source codes of rails project, \nthen, the gem translates the source codes into sexp\n
  22. The third step is lexical, it only analyze the code formats, like if the codes contain the trailing white space, it doesn&apos;t depend on sexp, just reads the content of source codes, and outputs to the analyze result if necessary. \n
  23. The fifth step is prepare, just as its name implies, it does some preparation for the final code check, it reads the sexp, analyzes the model names, model attributes, model associations, and so on. \n
  24. After that, it does the code review, reads prepare result and the sexp again, check the sexp according to the best practices on website, if it finds anything violates the best practices, it will send it to the analyze result.\n
  25. Let&apos;s have a look what&apos;s the sexp. The top side is the ruby source code, and the bottom side is the corresponding sexp, it is readable, define a class Post, inherited from ActiveRecord::Base, within it, call a method attr_accessor with argument editable.\n
  26. Here is another example, it&apos;s a method definition, method name is test, with empty arguments, contains a code block, call a method puts with argument hello world.\n
  27. I don&apos;t want to tell you all about sexp in this presentation, you can play it with ruby_parser gem. And here is the link that show you how rails_best_practices gem use ruby_parser to get the sexp.\n
  28. rails_best_practices command provides several options, by default it outputs the bad smells in terminal with colors, you can also ask it to output as html page, and with textmate or mvim support. there are other options, type rails_best_practices -h to get more.\n
  29. You may not like all of the default code checkers, it&apos;s not a problem, rails_best_practices allow you to customize which code checkers should use or not. Go to the rails project directory, type rails_best_practices -g, it will generate a configuration file rails_best_practices.yml under config directory, you can comment or delete the code checkers if you don&apos;t like. Save it, then when you use rails_best_practices again, the commented or deleted code checkers will not take effect. Let&amp;#x2019;s try it now.\n
  30. What about the code checkers that you want but not exist in the rails_best_practices default checkers? Don&apos;t worry, rails_best_practices gem allows you to easily extend it. It&apos;s helpful to create your own check list for your rails team. Here is the wiki page tells you how to write your own check list, it just finds all upper case RAILS_ROOT, which should be replaced to Rails.root. Let&amp;#x2019;s look at the wiki page.\n
  31. Here are some resources, website, source codes and document. If you are interested in and willing to contribute to rails_best_practices gem, I&apos;d like that you post your best practices first on website, then implement it in the gem with good comment. It&apos;s easy to do if you spent about half an hour to read the source codes.\n
  32. Thank you. And any questions?\n