O'Reilly logo
  • joseph isaac thinks this is interesting:

Methods that have a single responsibility confer the following benefits:

Expose previously hidden qualities Refactoring a class so that all of its methods have a single responsibility has a clarifying effect on the class. Even if you do not intend to reorganize the methods into other classes today, having each of them serve a single purpose makes the set of things the class does more obvious.

Avoid the need for comments How many times have you seen a comment that is out of date? Because comments are not executable, they are merely a form of decaying documentation. If a bit of code inside a method needs a ...


Cover of Practical Object-Oriented Design in Ruby: An Agile Primer


Benefits of designing methods with single responsibilities