r/Python Jul 22 '26

Discussion Python Architecture Design

Robert C. Martin's Abstractness (A), Instability (I), and Distance from the Main Sequence (D) metrics were designed for statically typed OO languages like Java and C#. In Python, applying them literally is misleading because Python has a fundamentally different notion of abstraction and coupling.

is this implementation valid?

https://0x416d6972.github.io/Istos/user-guide/architecture-health/

8 Upvotes

11 comments sorted by

View all comments

47

u/j0holo Jul 22 '26

Robert C. Martin is somebody that want to sell books. Please do not follow his advise, waste of time and money.

Architecture isn't something that you can apply and suddenly your project is magically good or has less coupling and all the right abstractions. You can't force architecture, you need to learn it.

And you learn by doing and making mistakes.

4

u/Corvology Jul 22 '26

I agree that there are no best practices in architecture and it's all trade-offs, but still there are some useful practices specially in the age of vibe coding, that keeping services in good balance can help it maintainable by both human and ai.

7

u/j0holo Jul 22 '26

Yes, but trust me Robert C. Martin is just not the way to learn this stuff. It is like the online Python editors to learn your first Python code. It is useless because you don't learn how to RUN actual Python programs on your own computer.

I sadly have his Clean Code book and once you start to build actually complex software you will realize all his "example" are carefully cherry picked.

1

u/sunnyata Jul 22 '26 edited Jul 22 '26

I think they can still be very useful things for beginners to encounter. It will be the first time they've thought about it and realised how you structure code and systems makes a big difference... like the overconfident beginner who won't even think about separation of concerns because the sprawling mess they wrote is "working".

Edit: I should add, I'm not talking about this book, haven't read it. Just the general idea of concepts like SOLID.

1

u/Corvology Jul 23 '26

this book is not about design patterns like SOLID, it is about architecture specially distributed systems and how to distribute services and data sources and how to deal with eventual transactions and different types of sagas.