A common question teams run into while building a Rails app is “What code should go in the lib/ directory?”. In this post I describe a common antipattern for Rails code organization and a principle for determining what classes should go where.
I just launched Code Climate. It's a tool that helps Ruby teams reduce technical debt by giving them metrics about their codebase. It's based upon Open Source static analysis projects like Flog and Flay and hosted so you don't have to install or run any software and it's easy to share.