Is clean architecture controversial?



  • I've seen some rants on reddit, (like this one), but I'm not sure if it became controversial or it's just outliers. What do you guys think are the mainstream ideas on software architecture, that are worth knowing?


  • ♿ (Parody)

    @sockpuppet7 needs more indirection.


  • Considered Harmful

    @sockpuppet7 The argument here already has a name: the Harvard vs New Jersey approaches to engineering. It cannot be settled. Note the parallel to high vs low K offspring strategies.


  • Considered Harmful

    No plan architecture survives contact with the enemy customer requirements or legacy systems.



  • Personally, I find that it has good ideas (decoupling stuff, having clear separation of concerns so you don't have hand-rolled SQL scattered hither and yon, interfaces, etc) but is often (like too much else by Uncle Bob and Co) treated dogmatically as a sacred text.


  • I survived the hour long Uno hand

    @Benjamin-Hall said in Is clean architecture controversial?:

    (...by Uncle Bob and Co) treated dogmatically

    I mean, you'd be treating your breakfast like a dog after watching one of his videos too. GoPro selfies while walking should be restricted to TikTok nurses only.


  • Banned

    ..



  • @Gustav said in Is clean architecture controversial?:

    functional programming, Rust, and other unquestionably good ideas

    :nelson: :laugh-harder:

    To be specific, it's the unquestionably part there I object to. All of those things have pros, cons, and tradeoffs. They're things that are good for some purposes, under some circumstances. Not universally.


  • Banned

    ..



  • @Gustav said in Is clean architecture controversial?:

    @Benjamin-Hall said in Is clean architecture controversial?:

    All of those things have pros, cons, and tradeoffs.

    Pros: higher code quality (= less bugs), less surprises (= less bugs), codebases are easier to reason about when line counts are in the millions (= less bugs).

    Cons: more lines of code need to be written (= more costly in short run), you need better developers to make it work (= more costly in short run)

    Compare with pros/cons of the examples I gave but you excluded from your post. Do you see a pattern here?

    Functional programming is a style that does not inherently mean any of those pros or cons. It's just a style. Rust can improve those things if you're in a problem domain where the issues it fixes are salient and where it's even applicable. For example, all my front-end work (either web or mobile) cannot use Rust at all, so transitioning to Rust would be a massive show-stopper and a no-go. And even in areas where it's relevant, it's one of of many possible options.

    Seriously, you're being a religious zealot here.


  • I survived the hour long Uno hand

    @Benjamin-Hall said in Is clean architecture controversial?:

    Seriously, you're being a religious zealot here.

    :first_time_question_mark.jaypeegee:



  • @Gustav said in Is clean architecture controversial?:

    • lazy ass motherfuckers
    • elderly developers who believe they already know everything

    I might be in this post.

    short - people who shouldn't be listened to in the first place.

    What do you have against short people???

    (Note: I am not in this part of the post. I am of normal height, ~2 cm below the average for non-Hispanic white males in the US. However, I lagged behind my peers throughout childhood and adolescence, usually one of, if not the shortest person in my classes, so I can still take mock offense at this.)


  • Banned

    ..



  • @Gustav <puts foot in door>Have you heard about our Lord and Savior Rust?

    Seriously, that's what you sound like. You're a zealot, and I don't (anymore) talk to zealots. It's a waste of everyone's time.



  • @Benjamin-Hall said in Is clean architecture controversial?:

    For example, all my front-end work (either web or mobile) cannot use Rust at all, so transitioning to Rust would be a massive show-stopper and a no-go.

    Didn't you read the post? There's just a bit of up-front cost attached to it. Get a Rust to JS-or-whatever-transpiler (if one doesn't already exist, just hire somebody to write one). Hire a handful of experienced Rust programmers from the 5 or so that exist globally. Grind business activities to a halt while everything is being rewritten and re-architected (just a bit more cost). Grind business to a halt a bit longer while bits and pieces of the infrastructure are being rewritten as well.

    Fortunately, once the rewrite is complete, you will be able to roll it out immediately, with no problems at all. After all, the software was written by a great team, is statically typed and provably correct (no undefined behaviour!), so it does exactly what everybody wanted it to do (even if they couldn't previously agree on what that would be).

    🚎


  • Banned

    ..



  • @Gustav said in Is clean architecture controversial?:

    @Benjamin-Hall said in Is clean architecture controversial?:

    @Gustav <puts foot in door>Have you heard about our Lord and Savior Rust?

    Seriously, that's what you sound like. You're a zealot, and I don't (anymore) talk to zealots. It's a waste of everyone's time.

    And this is exactly what I was talking about. Whether it's clean architecture, unit testing, static typing, functional programming, Rust, or any other software engineering idea that doesn't have immediate and obvious payoff, people will refuse to put the 6-24 months needed to understand why these ideas are good, and instead will call you a zealot and continue on their merry way to Cannotreadpropertyundefinedofundefinedtown.

    Or maybe we have done the work and just disagree. Specifically, anyting that takes 6-24 months to assess cannot ever be unquestionably good. Because if it was, it wouldn't take that long to decide on.

    My point is that they're not unquestionably good things. They're debatably, conditionally good things. You refuse to accept that because you're a zealot, blind to any flaws in your Holy Writ. And that's exactly what irks me about Uncle Bob and his cult--it's a cult mentality.



  • @Benjamin-Hall and what you reply when your team is asked to plan the architecture of a piece of software and one of your teammates propose this one? do you take it because it's good if you don't go full cultist on it, or do you propose some alternative?

    I've been in this position a few times already, and I didn't figure a convincing way to argue with them



  • @sockpuppet7 said in Is clean architecture controversial?:

    @Benjamin-Hall and what you reply when your team is asked to plan the architecture of a piece of software and one of your propose this one? do you take it because it's good if you don't go full cultist on it, or do you propose some alternative?

    I've been in this position a few times already, and I didn't figure a convincing way to argue with them

    I try to focus on the relevant pieces and extract value where I can. And it depends on the relationship I have with the architect/stakeholders. I try to avoid buzzword architectures. Sometimes, something along the lines of DDD (implemented non-religiously) is valuable. Other times, a more monolithic approach is best. But the idea is to pull good ideas from wherever they're found without going "all in" on any particular approach ab initio.

    In my short career I've already been burned by such "here's the latest buzzword architecture/methodology" concepts.

    And one thing is to relentlessly refocus on what are our particular needs and uses rather than trying to do patterns for the sake of patterns or methods for the sake of doing methods. That requires understanding the domain at hand and knowing where you are and what the constraints are. Things that the cult-level proposals never actually touch, because it's toy problems in trivial domains all the way down.


  • BINNED

    Since we've quickly derailed the topic to that debate again, let me chime in:

    I initially read the topic title not as "Is Clean Architecture controversial", i.e. the book with that name, but as lower-case "clean architecture", the concept of having anything clean in the first place. And, it appears, that indeed that is controversial already. To wit from that other thread, there's people who "might write something in Rust", but

    • they have a to deal with a tangled legacy codebase (understandable) and don't see enough benefit in writing new features in Rust or incrementally porting old features. If only they could green-field this thing again, though, they'd write something nice and clean and use something like Rust (or anything else sufficiently modern and not garbage) to do it.
    • they're a start-up which needs to push their green-field software out of the door yesterday, so they don't have time to do anything right. They'll rather accumulate a ton of technical debt now with hacks built on hacks, which they'll clean up some time in the Future ™.

    That's not really about Rust specifically (no silver bullet, yada yada), but more exemplarily for anything that encourages good design and clean architecture for the problem. There's never a time to do things right, not when you're starting fresh, and not when you already have cobbled shit together either.

    I'm not sure if nobody else found @gribnit's post insightful because you think it was too obvious or if you all just don't read anything he writes, but I think this was quite fitting:

    @Gribnit said in Is clean architecture controversial?:

    @sockpuppet7 The argument here already has a name: the Harvard vs New Jersey approaches to engineering.

    In case it's the latter: he's talking about what's known in the Unix world as Worse is Better, also mentioned here with the problem being "Big Design Up Front".

    Personally, I understand that there's real world constraints that lead to this conclusion, but still think that on balance that the whole software landscape consists of far too much cobbled together shit that would ultimately have been cheaper for everybody if done right, or at least less incredibly wrong.


  • Banned

    ..



  • @topspin said in Is clean architecture controversial?:

    I'm not sure if nobody else found @gribnit's post insightful because you think it was too obvious or if you all just don't read anything he writes, but I think this was quite fitting:
    @Gribnit said in Is clean architecture controversial?:

    @sockpuppet7 The argument here already has a name: the Harvard vs New Jersey approaches to engineering.

    In case it's the latter: he's talking about what's known in the Unix world as Worse is Better, also mentioned here with the problem being "Big Design Up Front".
    Personally, I understand that there's real world constraints that lead to this conclusion, but still think that on balance that the whole software landscape consists of far too much cobbled together shit that would ultimately have been cheaper for everybody if done right, or at least less incredibly wrong.

    I have him (her? it?) filtered out. But as far as the lowercase clean architecture/Big Design Upfront issue--

    It's important to design up front. But that's hard (in the sense that solving the Halting Problem is hard, not in the sense of "takes too much effort") because what you design is limited by what your knowledge of your target is.

    Now I'm no Agile proponent. As with everything, there are good and bad parts. But the converse (shutting everything down for 6-24 months while you design a perfect product) isn't feasible either even in a money-unconstrained world. In many cases, design up front (more specifically, the wrong type of design or the wrong assumptions up front) causes way more issues than just being humble and nimble as you go. Because often you don't understand what the market is until you actually have a product out there. And too many assumptions up front cause epic crap-tons of pain later.



  • @Gustav said in Is clean architecture controversial?:

    That's a cop out answer. Everything is conditionally good. It's just that sometimes the condition is always true. Proving it is difficult, of course. Disproving is easier, assuming it's false to begin with. But you didn't disprove anything. You just assumed it a priori (and I admit, it's a pretty good heuristic, but like all heuristics, sometimes it's wrong.) And your counterarguments so far are pretty weak - technically speaking, at the moment they hinge on me being a liar. Am I a liar? Do I not make GUI in Rust? Is multithreading not increasingly important for all kinds of software?

    Yours is the responsibility to prove that there is no case where Rust and functional programming is not the answer. Because you're the one who made that claim. That's what unquestionably (the word I was objecting to) means. It means it cannot be questioned. Putting anything human-created on that pedestal is, to me, a major red flag, a sign of unthinking zealotry.


  • Banned

    ..



  • @Gustav said in Is clean architecture controversial?:

    @Benjamin-Hall said in Is clean architecture controversial?:

    In my short career I've already been burned by such "here's the latest buzzword architecture/methodology" concepts.

    Will it help if I told you the theory behind Rust's type system was invented in the 80s, and functional programming is almost as old as programming itself?

    No. Because like all things, fads are cyclical. There is nothing new under the sun, saith the Preacher. And note I'm not saying that Rust and functional programming are bad or wrong or even inappropriate. I'm saying that it is possible to question whether they are right and suitable without being inherently wrong. That's the claim you made. That it was unquestionably good and that the only reasons not to use them were bad ones because you're lazy and stupid. That is the statement of a zealot who is impossible to reason with.


  • BINNED

    @Benjamin-Hall said in Is clean architecture controversial?:

    @Gustav said in Is clean architecture controversial?:

    @Benjamin-Hall said in Is clean architecture controversial?:

    In my short career I've already been burned by such "here's the latest buzzword architecture/methodology" concepts.

    Will it help if I told you the theory behind Rust's type system was invented in the 80s, and functional programming is almost as old as programming itself?

    No. Because like all things, fads are cyclical. There is nothing new under the sun, saith the Preacher. And note I'm not saying that Rust and functional programming are bad or wrong or even inappropriate. I'm saying that it is possible to question whether they are right and suitable without being inherently wrong. That's the claim you made. That it was unquestionably good and that the only reasons not to use them were bad ones because you're lazy and stupid. That is the statement of a zealot who is impossible to reason with.

    In good WTDWTF tradition, I think you're unneccesarily getting caught up on that one word "unquestionably". He could've just as well wrote "certainly", for which you could :technically-correct: make the same argument, but I assume you wouldn't. Also note that in the original post he wrote "unquestionably good idea". Not all good ideas turn out to be good practice in all cases, which doesn't mean they're weren't generally good ideas anyway.

    And as I've said above: while there's always a balance to be struck, I think it's far too often struck into the "we'll hack something together, who cares about design/correctness/etc." direction.


  • Banned

    ..



  • @topspin said in Is clean architecture controversial?:

    @Benjamin-Hall said in Is clean architecture controversial?:

    @Gustav said in Is clean architecture controversial?:

    @Benjamin-Hall said in Is clean architecture controversial?:

    In my short career I've already been burned by such "here's the latest buzzword architecture/methodology" concepts.

    Will it help if I told you the theory behind Rust's type system was invented in the 80s, and functional programming is almost as old as programming itself?

    No. Because like all things, fads are cyclical. There is nothing new under the sun, saith the Preacher. And note I'm not saying that Rust and functional programming are bad or wrong or even inappropriate. I'm saying that it is possible to question whether they are right and suitable without being inherently wrong. That's the claim you made. That it was unquestionably good and that the only reasons not to use them were bad ones because you're lazy and stupid. That is the statement of a zealot who is impossible to reason with.

    In good WTDWTF tradition, I think you're unneccesarily getting caught up on that one word "unquestionably". He could've just as well wrote "certainly", for which you could :technically-correct: make the same argument, but I assume you wouldn't. Also note that in the original post he wrote "unquestionably good idea". Not all good ideas turn out to be good practice in all cases, which doesn't mean they're weren't generally good ideas anyway.

    And as I've said above: while there's always a balance to be struck, I think it's far too often struck into the "we'll hack something together, who cares about design/correctness/etc." direction.

    The world is filled with good ideas in the abstract that, when implemented, routinely cause Big Problems. And that's my big beef here (with practitioners and architects generally)--they're so caught up in the abstract patterns and practices that they don't look at the specific needs of this particular case and kneejerk spout their Holy Gospel Patterns.

    Type systems (general or specific), programming styles (procedural, functional, object-oriented), types of testing--all of these have tradeoffs. And each situation is different in meaningful ways--any dogmatic approach is wrong. And if he'd said "certainly" there, I'd still have pushed back--because they're conditionally good ideas, depending on the details.

    And, also in good WTDWTF fashion, that one word was what I was focused on, on purpose If he'd said generally good ideas, I'd have been ok with it. I've just been bit too many times by zealots doing the zealot thing and making my life worse and the product more difficult to maintain and extend because their abstract thinking didn't actually map onto reality in a useful way.

    And sure, design and correctness matter. I've been pushing back against my own company's tendency to spin out half-baked designs and then pivot to something else, leaving stuff to molder and get in the way. On the other hand, you can over-engineer, over-design stuff. My current ticket involves writing up a set of partial designs (very high-level stuff) about one such domain that was stupidly over-architected as the vanguard of the "new way" of doing things. And has now moldered as an expensive (in maintenance and in operational resource terms) limpet on the side of the business for quite a while. A domain that could be done with a couple of entities and a database table or two at most involves four separate services, an entire extra database, a complex set of custom binary protocols, and gigabites of duplicated data with utterly muddled access patterns because the initial design was way too abstracted.



  • @Gustav said in Is clean architecture controversial?:

    @Benjamin-Hall said in Is clean architecture controversial?:

    @Gustav said in Is clean architecture controversial?:

    That's a cop out answer. Everything is conditionally good. It's just that sometimes the condition is always true. Proving it is difficult, of course. Disproving is easier, assuming it's false to begin with. But you didn't disprove anything. You just assumed it a priori (and I admit, it's a pretty good heuristic, but like all heuristics, sometimes it's wrong.) And your counterarguments so far are pretty weak - technically speaking, at the moment they hinge on me being a liar. Am I a liar? Do I not make GUI in Rust? Is multithreading not increasingly important for all kinds of software?

    Yours is the responsibility to prove that there is no case where Rust and functional programming is not the answer. Because you're the one who made that claim.

    I agree. It is on me. And I've failed to prove it so far. You have no rational reason to believe my claims. That said, there's a difference between doubting I'm right, and outright claiming I'm wrong. And you did the latter (doubting is "maybe it is unquestionably, but I don't see it", not "it's debatably, conditionally good").

    That's what unquestionably (the word I was objecting to) means. It means it cannot be questioned. Putting anything human-created on that pedestal is, to me, a major red flag, a sign of unthinking zealotry.

    Gödel's incompleteness theorems are human-made (and the human's name was Gödel) and they're totally unquestionable. Also, I was being a little tongue-in-cheek there. Choosing Rust for every single new project created on or before December 6, 2022 would be a tad insane. But sometime in the future, if enough trillions and man-eons are put into making Rust frameworks and libraries better, it might actually be a viable option. And it would be a better world, because Rust's design decisions very good, and also the paradigm it forces on the programmer is very good. Good, as in leads to less bugs, which in turn leads to less work overall. Of course, much like fair election in the US, it will never happen because our world is fucked up and people are even worse (just look which language they picked to actually write all software in.)

    If I can question it without being obviously, self-evidently wrong, it's not unquestionable. And that's the point.

    And if Gödel's incompleteness theorem means anything unquestionable, it's because it's a fundamental property of the nature of the ideas in question. He discovered it, he didn't invent it.


  • Banned

    ..


  • Banned

    ..


  • 🚽 Regular

    @Gustav said in Is clean architecture controversial?:

    Clean architecture has the same problem as unit testing, static typing, functional programming, Rust, and other unquestionably good ideas - while the benefits are huge, they're not immediately visible and are largely unmeasurable; but the upfront increase in cost and difficulty of software development is very immediate, very visible and very measurable.

    Think about who are the people speaking in opposition to all these things:

    • code monkeys
    • pointy-haired bosses
    • web developers
    • people who dream of the world where everyone makes their own software
    • scientists
    • lazy ass motherfuckers
    • elderly developers who believe they already know everything there is to know and completely deny the possibility that new coding methods could be better than what they've always done

    In short - people who shouldn't be listened to in the first place.

    Ah, to be young again....


  • Banned

    ..


  • I survived the hour long Uno hand

    @Gustav said in Is clean architecture controversial?:

    @Zecc you wish you didn't already know everything? :tro-pop:

    He wishes he was young enough to believe he did know everything. 🍹


  • Banned

    ..



  • @Gustav I've forgotten what it's like to know everything.


  • I survived the hour long Uno hand

    @Gustav said in Is clean architecture controversial?:

    @izzion you mean the stage between knowing everything and forgetting everything?

    He wishes he was at the stage where he was too stupid to know he didn’t know everything, and reality hadn’t slapped him in the nuts face yet.


  • Banned

    ..


  • 🚽 Regular

    @Gustav said in Is clean architecture controversial?:

    @Zecc you wish you didn't already know everything? :tro-pop:

    I wish I knew more things. I'm always up for learning more.

    But there are so many hours in a day, mental energy too, and you have to pick your battles.

    For example, I choose not to elaborate on this at this point in time, because in a few minutes I'm going to have to start pretending I'm working; on my job with code monkeys and pointed-haired bosses. Because I'm not young enough to upend my life and quit for greener pastures I'm not sure exist (for me anyway).

    But I'm a lazy ass motherfucker. Don't listen to me.


  • 🚽 Regular

    @izzion said in Is clean architecture controversial?:

    He wishes he was at the stage where he was too stupid to know he didn’t know everything, and reality hadn’t slapped him in the nuts face yet.

    I know what you're talking about, but I don't think I've ever felt that way, actually. I've always been very mindful of my ignorance, in particular because I'm not the most outgoing and well-lived person so there's a ton of stuff I've never got to experience first hand, partially by preference.

    But again, my memory is terrible, so maybe I have felt that way but I just don't remember it. 🤷‍♂️


  • 🚽 Regular

    @Gustav said in Is clean architecture controversial?:

    You can be as wrong as you want and there will never be any negative consequences!

    According to my boss, my predecessor was fired because this integration I'm maintaining frequently caused data loss. It caused someone else to be fired because it made it look like they had skipped a whole day's work as a data entry operator.

    As it happens, when it was made clear it hadn't been their fault the data wasn't in the system, they got hired again. But then, after a day's work was lost again, they quit.

    Maybe being fired doesn't bother you. But be aware what you do has consequences in other people's lives too. And this wasn't even mission critical software.


  • Discourse touched me in a no-no place

    @Zecc said in Is clean architecture controversial?:

    According to my boss, my predecessor was fired because this integration I'm maintaining frequently caused data loss. It caused someone else to be fired because it made it look like they had skipped a whole day's work as a data entry operator.

    As it happens, when it was made clear it hadn't been their fault the data wasn't in the system, they got hired again. But then, after a day's work was lost again, they quit.

    Maybe being fired doesn't bother you. But be aware what you do has consequences in other people's lives too. And this wasn't even mission critical software.

    Sounds like it was critical for the data-entry operator's own mission.


  • BINNED

    @Zecc said in Is clean architecture controversial?:

    Maybe being fired doesn't bother you. But be aware what you do has consequences in other people's lives too. And this wasn't even mission critical software.

    That's why you better hope the controller for your radiation therapy is neither written in C nor in node. 🏆


  • Discourse touched me in a no-no place

    @Gustav said in Is clean architecture controversial?:

    people will refuse to put the 6-24 months needed to understand why these ideas are good

    6 months is a very big investment of time (and money). How much are people getting paid for doing that and are there any useful intermediate outputs? 24 months is a potential company killer. What are the competitors doing? Will they steal your customers away?

    Big rewrites are extremely costly, always, and very risky to take on if you can't also keep the existing systems moving forwards (whatever that means in context). There have been many examples of this in the past; who remembers Netscape? That is why there is such a huge bias towards upgrading things in-place if possible.


  • Banned

    ..


  • Banned

    ..


  • 🚽 Regular

    @Gustav said in Is clean architecture controversial?:

    This is literally the first case I ever heard in my entire life of a software developer getting fired for messing up their code without also getting criminal charges.

    I haven't mentioned criminal charges, either way. This is because it's not my business. Didn't ask, wasn't told.

    @Gustav said in Is clean architecture controversial?:

    I once had a coworker whose bad code caused the company a six figure loss. He didn't get a yearly bonus and that's it.

    I don't know your coworker, but presumably the people who decided whether to fire him or not do and they decided not firing them was the rational thing to do.

    There's that story I CBA to DDG that goes something like:
    "why didn't you fire them after they made you lost a million dollars?"
    "they just learned a million dollar lesson and won't be making the same mistake again. I can't afford to replace them with someone who hasn't"


  • Banned

    ..


  • Notification Spam Recipient

    @Benjamin-Hall said in Is clean architecture controversial?:

    cult mentality

    Is a prevalent problem in IT. Scores of programmers (surprisingly?) have no capacity to think for themselves and are only capable of blindly following directions from messiahs. This is my holy hammer and everything is a nail.

    It's impossible to reason with them. As an answer you either get long diatribes full of memorized expressions, that have little to do with problem at hand, or just links to lectures/blogs/books of their masters.

    Sometimes, something along the lines of DDD (implemented non-religiously) is valuable. Other times, a more monolithic approach is best. But the idea is to pull good ideas from wherever they're found without going "all in" on any particular approach ab initio.

    This is the way.



  • @Zecc said in Is clean architecture controversial?:

    There's that story I CBA to DDG that goes something like:
    "why didn't you fire them after they made you lost a million dollars?"
    "they just learned a million dollar lesson and won't be making the same mistake again. I can't afford to replace them with someone who hasn't"


Log in to reply