[LRUG] Objects and on Hexagonal Rails
Hayes, Steve
Steve.Hayes at gs.com
Wed Jul 24 01:28:56 PDT 2013
If you trust your code base to do what it says (intention revealing method names, no side effects etc) than you rarely need to navigate along execution paths and "good OO" - small classes, small methods, SRP - is well received. When something breaks down and you don't trust your code base then you start to navigate along execution paths to "find out what really happens". Good OO makes this harder - people in this situation would rather have large classes and large methods so that they can "see everything easily".
Staying on the "good" path requires discipline, and it's an unstable equilibria. Many people have never seen a good code base so start out very uncomfortable and frankly suspicious.
-----Original Message-----
From: chat-bounces at lists.lrug.org [mailto:chat-bounces at lists.lrug.org] On Behalf Of Mike Kelly
Sent: Wednesday, July 24, 2013 8:17 AM
To: Chris Parsons
Cc: London Ruby Users Group
Subject: Re: [LRUG] Objects and on Hexagonal Rails
On Wed, Jul 24, 2013 at 7:32 AM, Chris Parsons <chris.p at rsons.org> wrote:
> I actually don't think it's that hard to understand and read good OO
> code, even for a less experienced coder. It's easier to understand
> boilerplate rails code because we are used to seeing those abstractions
> in other apps, but that's often because contort our domain to fit
> inside the standard abstractions. Code that is set free from these
> constraints can be surprisingly simple to follow.
Exactly. Afaict, the challenge of getting up to speed on a codebase
has little to do with being familiar with the idioms used, and more to
do with whether the code itself is coherent and intention revealing
(both of which should be key metrics of "good" OO code).
It seems like a big assumption that breaking complex parts of an
application into discrete objects that better respect SRP is somehow
more complicated for less experienced programmers to understand than
it having been swept under the carpet in the "Rails way"... Does
anyone have first-hand experience of this?
Cheers,
M
_______________________________________________
Chat mailing list
Chat at lists.lrug.org
http://lists.lrug.org/listinfo.cgi/chat-lrug.org
More information about the Chat
mailing list