Skip to content

Comment on The Single Responsibility Principle

Comments

I personally find it easier to think of it as Conway's Law:

"organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations" - M. Conway

More on http://c2.com/cgi/wiki?ConwaysLaw and http://en.wikipedia.org/wiki/Conway's_law

However, I also hate this mental model of software engineering because I have often found it easier to refactor the organization. Maybe because I'm a prima donna and only like working at startups.

I think it's better to require each portion of code has a narrow interface so you can reason in your mind easily about what that code segment does and should do into the future. A function or a class must promise what it should deliver given some inputs and not violate that expectation. If you ever had to reason about code using invariants, you'll grok this.

More on http://c2.com/cgi/wiki?NarrowTheInterface

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.