David Rodenas PhD
2 min readNov 11, 2022

--

Thank you so much for the article.

It is nice to read about Dan North in first hand. Also, it is nice to put SOLID to the limit, so we can evaluate what is good or not.

Sadly, you cannot read only the article to get a clear picture. But for people like me, it is great that it has the video and the podcast associated, so we can get even deeper than just one small story.

What surprised me, is the interpretation of the Single Responsibility Principle, which states that one file has one and only one reason to change. Which, Dan, puts an example of C++ limits to do the opposite: one change must affect one and only one file. According to him because compiling was slow by then. It is possible that the discourse from Robert C. Martin has changed with time, or that I always took the most mathematic definition: the arrow goes from the file to the reason (one file has one reason to change), but not the opposite (in which one reason can have multiple reasons to change). Or maybe I have adapted it to my current needs (although I read the paper). Or perhaps, as he tells, the original SRP was about one to one, and somewhere in the path Uncle Bob changed it. Also, I found curious that he criticized the typical structure in models/services/controllers/... exactly like Robert C. Martin does... so... I have the impression that something has been lost in the process.

Anyway, CUPID (although not described here) looks like a promising idea. Even it looks like it is orthogonal, one thing does not prevent the other.

And by the way, just a note, if anyone wants to know what is CUPID, look at , https://cupid.dev/ and the acronym means:

The five CUPID properties are:

  • Composable: plays well with others
  • Unix philosophy: does one thing well
  • Predictable: does what you expect
  • Idiomatic: feels natural
  • Domain-based: the code models the problem domain in language and structure

Which, by the way, the same Dan North confess to have invented after deciding the CUPID word.

Wow, it got too large. But if you can clarify my doubt about SRP, it would be great.

Thanks for sharing!

--

--

David Rodenas PhD
David Rodenas PhD

Written by David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.

No responses yet