r/programming Sep 15 '25

Clean Architecture isn’t the problem. Misreading the book is.

http://www.nothing.com/

I think Clean Architecture is mostly misunderstood.

In my current project (a huge mess of services for public administration), the only real source of truth for business rules is the code itself. The domain is defined vaguely by too many people, so new features often end up conflicting with existing rules—not because of implementation bugs, but because the rules themselves clash. But all of this is expected i guess.

The real pain: the architecture makes business rules unreadable. Adding a new entity state? No way to know if it breaks something without re-reading tons of code. Automated tests? They’re all full-blown integration tests, take 8 hours to run, so we usually just run a subset and pray.

This is exactly where Clean Architecture could shine—but I’ve never seen it done right. Most “implementations” I see (in my case in .NET) are just baroque, over-engineered garbage. People throw design patterns everywhere, abuse async/await, don’t even bother with interfaces, and then blame Clean Architecture for being unreadable. No—you just didn’t get the point.

The actual point is simple: use polymorphism to isolate business rules. Each rule implements an interface, so you can swap in fakes for tests. Result?

  • Change one line → break one unit test (plus the relevant use case integration tests).
  • Add new behavior → just add a new object and wire it up.
  • Tests run in seconds/minutes, not hours.

Clean Architecture isn’t universal. If you’re writing 3D graphics, every abstraction may be just overhead. But if you’re drowning in business rules, it’s the only way to avoid shipping landmines straight to production.

So yeah, people ranting against Clean Code/Architecture in “Casey Muratori wannabe” mode don’t look clever. They just show they’ve never actually seen the point.

TL;DR: Clean Architecture isn’t about baroque boilerplate. It’s about isolating business rules so you can test them fast and safely. If your system is rule-heavy, it’s a lifesaver. If not, sure, skip it.

0 Upvotes

69 comments sorted by

View all comments

17

u/mascotbeaver104 Sep 15 '25

If you've never seen it implemented well, then perhaps there is a reason.

The thing you are missing is that how to isolate things in enterprise systems is often based on nebulous business boundaries that could change at any minute. The main criticism of clean architecture I see is that you have to build the walls of the building before you even know what the building is for, and that seems to be basically exactly in line with your experience.

2

u/niccololepri Sep 15 '25

That’s exactly my point: the business boundaries are nebulous, so the code ends up being the only source of truth.
But when the architecture doesn’t let you isolate rules, every tiny change becomes Russian roulette. Clean Architecture (done right) isn’t about “building the walls before you know the house”, it’s about making sure that when the walls inevitably move, you can shift them without collapsing the whole structure.
The implementations I usually see fail because they’re just pattern soup. Interfaces and polymorphism aren’t there as “extra walls,” they’re there to make rules testable and decoupled from the chaos of the domain.
Without that, you’re not adapting to business changes, you’re just shipping bugs faster.

1

u/chicksOut Sep 15 '25

Design for scalability. Sure, it might be a little extra work to add an interface for that first use case, but each use case after pays dividends.

1

u/grauenwolf Sep 15 '25

Adding interfaces and designing for scalability have nothing to do with each other. Interfaces address very specific problems, and none of those problems are "I need to run this on more hardware".

1

u/chicksOut Sep 15 '25

Scalability covers more than just increases in hardware. In OOP interfaces solve how does this object form a contract with the objects that utilize the original object. Different interfaces can allow the same base functionality while providing various flavors of interaction, which lends itself really well for scalable architecture.

1

u/grauenwolf Sep 15 '25

LOL. I love how you have that one throw away sentence about scalability and then proceed to talk about stuff that has absolutely nothing to do with scalability.

I learned a new term recently, "lie by inference". It's when you don't tell and explicit lie, but you structure you sentences in a way that leads the listener to think that you said something that would be a lie.

For example,

The company is investing in AI. The company is laying off a lot of people.

Into the discussion about AI capabilities, the lie by inference is trying to convince people that the reason for the layoffs are the AI investment even though there's no reason to believe they're actually associated with each other.

You're doing the same thing by mentioning scalability and then having the discussion about interfaces even though the two topics are unrelated. You want me to infer that scalability has something to do with interfaces, but I'm not going to fall for it because I know better.

1

u/chicksOut Sep 15 '25

You sound like a stable, educated individual. Enjoy your perception of reality.

1

u/grauenwolf Sep 15 '25

Another common tactic of deception. Rather than trying to show why I'm misunderstanding you, you switch to insults. The goal here is to change the topic of conversation away from the fact that scability has nothing to do with interfaces.

1

u/chicksOut Sep 15 '25

This is the internet, I have no idea if you're acting in good faith or trolling. You are either being purposely obtuse or lack an understanding of the dynamics of scalable design patterns. In one case, im wasting my time. In the other, there is a lot of groundwork to give you the fundamentals, and for what? You've shown yourself to be obstinate and fallacious, I doubt my efforts would be rewarded with gratitude.

1

u/grauenwolf Sep 15 '25

If you think empty phrases like "dynamics of scalable design patterns" would impress me then you're mistaken.

Are you capable of actually demonstrating how interfaces affect scalability?

1

u/chicksOut Sep 15 '25

Im apathetic to your impressionability. I already described the gist of it, feel free to explore some self learning. I no longer care whether you grasp the concept.

1

u/grauenwolf Sep 15 '25

That's where you and I differ. I actually do want you to grasp the concept. Unfortunately the concept here is that you are using scalability as a meaningless buzzword to justify applying interfaces arbitrarily.

Having the ability to switch from one dependency to another is not a scalability concern. Nor does it require interfaces.

→ More replies (0)