Skip to content

Instantly share code, notes, and snippets.

@phosphene
Last active December 12, 2015 05:08
Show Gist options
  • Save phosphene/4719173 to your computer and use it in GitHub Desktop.
Save phosphene/4719173 to your computer and use it in GitHub Desktop.
Sandi Metz's Rules of Parsimony for Rails
1. Your classes should be no longer than (200) 100 lines of code.
2. Your methods should be no longer than (10) five lines of code.
3. You should pass no more than four parameters into a method.
4. Your controller should only instantiate one object to do whatever it is that needs to be done.
5. Your view can only know about one instance variable.
6. Err on the side of many small objects
7. Thin Models/Thin Controllers
8. Drive design through tests
9. See "Lex Parsimoniae" for advice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment