kytrinyx/therapeutic-refactoring — pull request #2 by simonkro (2013-01-04 22:09:00+00:00)
Title: a method is a method is a method ...

_... not a class._

Sorry if this looks trollish, it really isn't meant that way. I do understand that one has to take small examples for speeches but people are following these advises blindly and this is not good - the demonstrated method may have valid uses but this is not one of them.

_Why?_

First there is only `target` and everything is using it, probably that points in a direction that `#name` actually belongs inside the Target class. I guess that class is already so big that someone was scared to make it even bigger - problem is, spreading logic all over the project doesn't make it better at all.

Ignoring that, the approach is still overkill, adding 40 lines and a new file for something 7 short lines can do isn't going to help. On top of that, we now have 3 levels of indirection to follow if we want to learn what the method does.

I opened this pull request to follow the "don't talk, show!" principle and hope it can change some minds.

cheers

Simon