Skip to content

Instantly share code, notes, and snippets.

@danjwinter
Created March 26, 2016 21:02
Show Gist options
  • Save danjwinter/d902a2fb2f499fa7fbf4 to your computer and use it in GitHub Desktop.
Save danjwinter/d902a2fb2f499fa7fbf4 to your computer and use it in GitHub Desktop.

The five line method one is probably the largest challenge but I think that it will expose the portions of your code that are trying to do too much. It's so easy to have methods grow uncontrollably or have lots of dependencies. Trying to contain methods to 5 lines is challenging, especially with case statements. The other rules seem more doable - I definitely fall in the trap from time to time of passing too many variables but that's just another indication that the method is doing too much. Same for the 100 line classes. I need to work better on architecting solutions for single responsibility methods and classes

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