Skip to content

Instantly share code, notes, and snippets.

@gizipp
Created March 19, 2020 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gizipp/79bb3346201d6a7100b9701192ae37d0 to your computer and use it in GitHub Desktop.
Save gizipp/79bb3346201d6a7100b9701192ae37d0 to your computer and use it in GitHub Desktop.
Sandi Metz' Rules For Developers
  1. Classes can be no longer than one hundred lines of code.
  2. Methods can be no longer than five lines of code.
  3. Pass no more than four parameters into a method. Hash options are parameters.
  4. Controllers can instantiate only one object. Therefore, views can only know about one instance variable and views should only send messages to that object (@object.collaborator.value is not allowed).

https://yiming.dev/blog/2017/08/23/sandi-metzs-rules-for-oop/ https://thoughtbot.com/blog/sandi-metz-rules-for-developers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment