Skip to content

Instantly share code, notes, and snippets.

@ethagnawl
Last active December 11, 2015 02:09
Show Gist options
  • Save ethagnawl/4528598 to your computer and use it in GitHub Desktop.
Save ethagnawl/4528598 to your computer and use it in GitHub Desktop.
- classes can be no longer than 100 lines
- methods can be no longer than 5 lines
- methods cannot accept more than 4 parameters (no gigantic hashes)
- controllers cannot instantiate more than 1 object
- views cannot know about more than 1 instance variable
- views should only send messages to that variable (no Demeter violations)
- rules are meant to be broken if by breaking them you produce better code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment