While reading my timeline in twitter I saw that @bantik asked a question about how to find unused mehtods in a code base and well I thought to myself yeah that will help me in this chaotic ocean of old and new code. And so he retweeted a few minutes ago about rails best practices gem. And I said mmm perhaps this can help in some way, I mean I know a lot of stuff about rails but again this can’t hurt.I’ve been working for at least 4 years with ruby on rails projects and I’m always solving many things, connecting stuff and fixing bugs. I consider myself a fluent developer in ruby and yes I think I know a lot. Well I was surprised once I install the rails best practices and start looking at the result of our current project. I realized immediatelly that I was wrong I didn’t know enough I still have to learn a lot of more. Plus we have a lot of unused code, security vulnerabilities, bad practices and even missing indexes in our DB.Anyway I was really surprised that this tool can open your eyes and help you to learn better and more useful techniques than those from the rush of fixing a bug or writing a test for it.Still interested?Take a look at rails best practices gem
$ gem install rails_best_practices
Run this from your root directory
$ rails_best_practices -f html .
And voilá you will get a BIG file full of all those findings that you thought (me) you will never get, because of course you are an “experienced” developer.
And that’s it an excellent tool to keep it in mind for your current and future rails projects.
Love to hear your feedback.