News for hackers. Stuff that matters.
Re:Test Isolation Is About Avoiding Mocks by jrochkind1 on Thursday May 15, 2014 @05:08PM (#7752253)
Ah, but I think OP is a pretty good explanation of _why_ the Law of Demeter is actually good, although it doesn't use that phrase.

I've been somewhat suspicious of the law of demeter (not firmly on one side or the other), but this article actually helped me see the value of it.

It's not that "you can't do this because it violates the law of demeter." That's a ridiculous cargo cult way to use software design principles (which, yeah, is quite common). Rather, it's, the law of demeter is good because it prevents THIS stuff, which you don't want.

Like, okay, DHH thinks the law of demeter is useless, but he hates things that... the law of demeter is meant to and helps prevent.

Re:Test Isolation Is About Avoiding Mocks by steveklabnik on Thursday May 15, 2014 @05:45PM (#7752436)
I agree with you that the post is a great explanation of why Demeter is good. All I mean to say is "this is just Demeter" is not a refutation of "I think the Law of Demeter is shit and never follow it." (See my links in your sibling, that's a quote.)