Is clean architecture controversial?
-
@MrL said in Is clean architecture controversial?:
@dcon said in Is clean architecture controversial?:
@MrL said in Is clean architecture controversial?:
Why not? I like big things imploding.
Wow, is that a photo of secret hyperpoop trials? Didn't know we got that far.
I suspect it's the final mythbusters episode. It's a railroad tank car, and they pulled it vacuum. Nothing happened, so they re-pressurized it, dropped something heavy on it from height, then pulled it vacuum again. Which resulted something like the image above.
-
@PleegWat Good thing stuff never gets dropped on rail wagons for any reason.
-
@PleegWat said in Is clean architecture controversial?:
@MrL said in Is clean architecture controversial?:
@dcon said in Is clean architecture controversial?:
@MrL said in Is clean architecture controversial?:
Why not? I like big things imploding.
Wow, is that a photo of secret hyperpoop trials? Didn't know we got that far.
I suspect it's the final mythbusters episode. It's a railroad tank car, and they pulled it vacuum. Nothing happened, so they re-pressurized it, dropped something heavy on it from height, then pulled it vacuum again. Which resulted something like the image above.
Yeah, I know. I saw it.
-
@dkf said in Is clean architecture controversial?:
@PleegWat Good thing stuff never gets dropped on rail wagons for any reason.
https://www.youtube.com/watch?v=Bu1YFshFuI4
Basically indestructible.
-
@topspin I like how the JATO on the test vehicles are just never mentioned.
-
Re-railing - The Pascal type system, in considering arrays of different sizes to be different types, did nothing wrong.
-
-
@Gribnit said in Is clean architecture controversial?:
You killed @Gustav! You bastards!
-
@error your sub-pixel antialiasing appears to be broken.
Even Jony Ive would say that font’s too thin.
-
@Gribnit said in Is clean architecture controversial?:
The Pascal type system, in considering arrays of different sizes to be different types, did nothing wrong.
Why would you suggest that anybody thought it was wrong?
#include <cstdio> #include <typeinfo> #include <type_traits> int main() { int a[3], b[4]; std::printf( "%s\n", std::is_same_v<decltype(a),decltype(b)> ? "same":"not same" ); std::printf( "%s : %s\n", typeid(a).name(), typeid(b).name() ); return 0; }
$ g++ test.cpp && ./a.out not same A3_i : A4_i
-
@cvi well, that's the memory-model type. That's Different
-
@Watson Reading that story, it doesn't seem exactly like the salesman made a mistake. He didn't make the sale - but do they really expect every salesman to have a 1.000 battering average?
Maybe they're leaving a critical detail out?
-
@jinpa said in Is clean architecture controversial?:
do they really expect every salesman to have a 1.000 battering average?
It was the '60s. So, only if dinner ain't ready.
-
@jinpa said in Is clean architecture controversial?:
@Watson Reading that story, it doesn't seem exactly like the salesman made a mistake. He didn't make the sale - but do they really expect every salesman to have a 1.000 battering average?
Maybe they're leaving a critical detail out?
It's at the top of the story: the company was close to going under but had a bunch of inventory. They desperately needed sales to not go bankrupt.
-
@Parody I had read the article, including the top. My comment holds.
-
@jinpa
The story I recall (but couldn't find) was told by someone who said he was the guy who'd stuffed up, and had a bit more detail. It was also a five-million-dollar mistake, not one million, but it was still Thomas J. Watson who counted it towards his education.
-
@jinpa said in Is clean architecture controversial?:
@Parody I had read the article, including the top. My comment holds.
How badly would you have to fail your company for you to expect you will be fired/asked to resign?
Apparently the salesman in this story thought this was enough given the company's situation.
-
@Parody If you read Watson's last comment, it supports the insight that there's a critical detail left out.
-
@jinpa said in Is clean architecture controversial?:
@Parody If you read Watson's last comment, it supports the insight that there's a critical detail left out.
...and I don't think there needs to be any other details.
Still, you didn't answer my question. How badly would you have to fail your company for you to expect you will be fired/asked to resign? Obviously I think that the failed contract was enough as it was, given the situation the company was in.
-
@Parody said in Is clean architecture controversial?:
How badly would you have to fail your company for you to expect you will be fired/asked to resign?
None at all, just fail to lick the Brown Star.
-
Like the good old tradition in some sales forces: a bonus for the top seller and a pink slip for the bottom seller.
It may very well be that the story is an amalgam of several incidents, seeing as the point of the story was less the minutiae of what happened and more the nature of Watson's response, as exemplary of his management style.
-
@Watson said in Is clean architecture controversial?:
the nature of Watson's response, as exemplary of his management style.
Well, I guess you'd know, wouldn't you, eh @Watson?
-
@HardwareGeek said in Is clean architecture controversial?:
@Watson said in Is clean architecture controversial?:
the nature of Watson's response, as exemplary of his management style.
Well, I guess you'd know, wouldn't you, eh @Watson?
Elementary, my dear.
-
@topspin said in Is clean architecture controversial?:
@HardwareGeek said in Is clean architecture controversial?:
@Watson said in Is clean architecture controversial?:
the nature of Watson's response, as exemplary of his management style.
Well, I guess you'd know, wouldn't you, eh @Watson?
Elementary, my de
aer.Is Sherlock often talking to his hat?
-
@sockpuppet7 said in 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?
Clean Architecture is, in my opinion, controversial, because it comes from the land of everything is an object. But, as the argument from Simple Made Easy goes, object oriented programming itself is not simple because it uses one concept,
class
es, for three purposes: as data types, as units of encapsulation, and as units of code reuse.But those things are independent of each other, and often don't coincide in practice. That makes describing clean architecture on a ‘purely’ object-oriented language harder, because you are making classes all the time, but you are making them with different goals in different cases.
The newest generation of languages, like Go and Rust, use modules as the unit of encapsulation and functions as the unit of code reuse, leaving data structures as just data structures—and have interfaces less coupled to data types. That makes things simpler, because while there are more concepts, each concept has much cleaner purpose.
Does that mean that you can't have a clean design in a ‘purely’ object-oriented language? No. But it does mean insisting on the one true object-oriented design for everything will make it more complicated, not simpler. OOP wasn't a silver bullet, it was a fad. Don't hold on to it.
On the other hand clean architecture is controversial, as already mentioned by @Gribnit and @topspin because of Worse is Better, a.k.a. Perfect is The Enemy of Good. See also this article:
Shipping is a feature. A really important feature. Your product must have it.
Oh, and I shouldn't forget Big Ball of Mud.
-
@Bulb said in Is clean architecture controversial?:
because it comes from the land of everything is an object
It was the style at the time.
Wait, the book is much newer than I imagined it is. Even the copy of Clean Code I actually thought I've had on the shelf for decades now isn't even particularly old. Whatever, onions are in the minds of people.
-
@Bulb said in Is clean architecture controversial?:
See also this article:
Shipping is a feature. A really important feature. Your product must have it.
I may agree or disagree with the rest of the post. But this? THIS IS IMPORTANT. Imperfect software that meets certain minimum requirements and ships is infinitely better than perfect software that meets all perfect requirements and never ships.
-
@topspin said in Is clean architecture controversial?:
@Bulb said in Is clean architecture controversial?:
because it comes from the land of everything is an object
It was the style at the time.
I have enough onion on my belt. I learned programming before it was the style, and never grew particularly fond of it afterwards.
I learned the object oriented techniques in C and Perl. In C that means implementing virtual method tables yourself, and Perl just added a little bit of functionality to ‘bless’ an object (in the sense of by-reference data structure) with a module as a virtual method table. So I added polymorphism into my toolbox but never started to consider OOP the one true way, and never learned to rely on classes for encapsulation or code reuse because most languages I worked in (also C++, Python etc.) still had plain old functions, with methods being just a special subclass of them, and modules.
-
@topspin said in Is clean architecture controversial?:
Whatever, onions are in the minds of people.
I, too, like to wear my mind below the belt
-
@Bulb said in Is clean architecture controversial?:
most languages I worked in (also C++, Python etc.) still had plain old functions, with methods being just a special subclass of them, and modules.
Python is lying to you there. It really is objects all the way down; you're just working with the syntactic sugar in from of all that. The thickness of that sugar is part of why Python is so desperately slow and so hard to write a good compiler for.
-
@dkf said in Is clean architecture controversial?:
@Bulb said in Is clean architecture controversial?:
most languages I worked in (also C++, Python etc.) still had plain old functions, with methods being just a special subclass of them, and modules.
Python is lying to you there. It really is objects all the way down; you're just working with the syntactic sugar in from of all that. The thickness of that sugar is part of why Python is so desperately slow and so hard to write a good compiler for.
If I write a free function in Python, what class is it secretly a method of?
-
@topspin said in Is clean architecture controversial?:
If I write a free function in Python, what class is it secretly a method of?
The function is a first-class object in its own right, an instance of the class "function".
-
@dkf said in Is clean architecture controversial?:
@Bulb said in Is clean architecture controversial?:
most languages I worked in (also C++, Python etc.) still had plain old functions, with methods being just a special subclass of them, and modules.
Python is lying to you there. It really is objects all the way down; you're just working with the syntactic sugar in from of all that.
It's not lying. Of course it is all objects, because it has first class functions, and everything by-reference, and by definition a by-reference value is an object. It still has plain old functions though. They are objects themselves, but they are distinct from methods, which additionally have an invocant.
It also does not have encapsulation at all, but the closest thing is still modules, not classes. Though of course a module is also an object, because everything is.
The thickness of that sugar is part of why Python is so desperately slow and so hard to write a good compiler for.
I wouldn't call it syntactic sugar, because there isn't any subset of the language or a potential simpler language underneath to which it could be expanded. Instead, the problem is that everything is customizable in a very circular way. Like, a function is an object with a
__call__
method, but that method is a function again and the interpreter just hopes it will reach a point that uses the default implementation eventually, but it is nowhere near guaranteed and damn hard to analyse in advance.
-
@Bulb said in Is clean architecture controversial?:
I wouldn't call it syntactic sugar, because there isn't any subset of the language or a potential simpler language underneath to which it could be expanded. Instead, the problem is that everything is customizable in a very circular way. Like, a function is an object with a
__call__
method, but that method is a function again and the interpreter just hopes it will reach a point that uses the default implementation eventually, but it is nowhere near guaranteed and damn hard to analyse in advance.There are the basic Python bytecode operations and a fairly small number of operations implemented in the runtime (not sure if that is C or C++ and prevents me from looking). Those bytecode ops are very low level, and definitely require everything to be an object as pretty much everything comes down to setting up (what is effectively) dynamic vtable dispatch calls; it's much harder to look at Python bytecode and see what is going on than the equivalent in many other languages.
The fact that everything is done with an uncached dynamic lookup by name is one of the core things that makes Python slow (along with better known sins like the global interpreter lock). It is a very flexible approach, but even with an excellent implementation it will never be fast. Tcl used to work in a somewhat similar way (and was also very slow as a consequence), but has done something better for decades (and has much easier to read bytecode).
-
@Watson said in Is clean architecture controversial?:
@topspin said in Is clean architecture controversial?:
If I write a free function in Python, what class is it secretly a method of?
The function is a first-class object in its own right, an instance of the class "function".
Hopefully it is also implicitly a member of the class(es) of functions which meet its signature(s) (default values are stupid)
-
@Gribnit said in Is clean architecture controversial?:
@Watson said in Is clean architecture controversial?:
@topspin said in Is clean architecture controversial?:
If I write a free function in Python, what class is it secretly a method of?
The function is a first-class object in its own right, an instance of the class "function".
Hopefully it is also implicitly a member of the class(es) of functions which meet its signature(s) (default values are stupid)
You can say that it is, but nothing enforces it... other than you getting an error if you call it wrongly. The logic of what callable type signatures really are gets a bit complicated once you have ubiquitous variadic functions (and Python has a fairly complex variant of that; the basic callable type signature there involves a variable-length list of positional arguments and a variable-size dictionary of keyword-based arguments, and those can be mapped to declared formal parameters in various ways). They make some things easier, and others harder.
-
@dkf said in Is clean architecture controversial?:
@Bulb said in Is clean architecture controversial?:
I wouldn't call it syntactic sugar, because there isn't any subset of the language or a potential simpler language underneath to which it could be expanded. Instead, the problem is that everything is customizable in a very circular way. Like, a function is an object with a
__call__
method, but that method is a function again and the interpreter just hopes it will reach a point that uses the default implementation eventually, but it is nowhere near guaranteed and damn hard to analyse in advance.There are the basic Python bytecode operations and a fairly small number of operations implemented in the runtime (not sure if that is C or C++ and prevents me from looking). Those bytecode ops are very low level, and definitely require everything to be an object as pretty much everything comes down to setting up (what is effectively) dynamic vtable dispatch calls; it's much harder to look at Python bytecode and see what is going on than the equivalent in many other languages.
Pretty much all dynamically typed languages require everything to be an ‘object’ and do dynamic dispatch everywhere. For me, that does not qualify them as object-oriented. OOP is that combination of abuse of ‘classes’ for otherwise unrelated things.
The fact that everything is done with an uncached dynamic lookup by name is one of the core things that makes Python slow (along with better known sins like the global interpreter lock). It is a very flexible approach, but even with an excellent implementation it will never be fast. Tcl used to work in a somewhat similar way (and was also very slow as a consequence), but has done something better for decades (and has much easier to read bytecode).
Semantically, JavaScript seems like it would be as bad Python in the need to look up members all the time and yet it seems to optimize quite a bit better. So I'd blame more the need to always check the “metamethods” before each operation in Python.
-
@Bulb said in Is clean architecture controversial?
OOP is that combination of abuse of ‘classes’ for otherwise unrelated things.
You're welcome to define it any way you want, but using standard definitions promotes productive communication.
There is strict OOP, where everything is an object (in that you can invoke methods on any entity), and then there is non-strict OOP (of many differing degrees).
Semantically, JavaScript seems like it would be as bad Python in the need to look up members all the time and yet it seems to optimize quite a bit better. So I'd blame more the need to always check the “metamethods” before each operation in Python.
Python seems to make optimisation particularly difficult. It somehow inhibits sensible caching (I've not delved into how that happens, but it is quite possibly related to the fundamental value model) as well as having a legacy of the most terrible threading implementation anywhere and all sorts of design decisions that appear driven by "it seemed like a neat trick at the time" that just wedge things to be bad and stay bad.
They occasionally clean up a bit of the sewer, but they're still locked into trouble by decades of legacy. Fixing things properly will need an axe and a jerry can of petrol.
-
@dkf said in Is clean architecture controversial?:
@Bulb said in Is clean architecture controversial?
OOP is that combination of abuse of ‘classes’ for otherwise unrelated things.
You're welcome to define it any way you want, but using standard definitions promotes productive communication.
There is strict OOP, where everything is an object (in that you can invoke methods on any entity), and then there is non-strict OOP (of many differing degrees).
You can invoke methods on any entity is true even of some languages that you wouldn't generally call object oriented. Like Rust (in Rust you can define traits for anything, and the core library defines some traits for primitive types, so you can indeed call methods on any entity, but on the other hand it does not even have inheritance!).
-
@dkf said in Is clean architecture controversial?:
Fixing things properly will need an axe and a jerry can of petrol.
Is there a GoFundMe or something for that?
-
@dkf said in Is clean architecture controversial?:
Python seems to make optimisation particularly difficult. It somehow inhibits sensible caching (I've not delved into how that happens, but it is quite possibly related to the fundamental value model)
I would think it might have something to do with the complicated meta-object protocol. Like, even ‘plain’ member access is actually a method call on the meta-class and, one, that can also have a meta-class and, two, it means the interpreter does not really understand what is happening inside the method of
type
, the default meta-class.as well as having a legacy of the most terrible threading implementation anywhere and all sorts of design decisions that appear driven by "it seemed like a neat trick at the time" that just wedge things to be bad and stay bad.
… meanwhile JavaScript just punted and does not provide threading at all.
Makes me wonder what Ruby does; I never looked at that one in more details.
They occasionally clean up a bit of the sewer, but they're still locked into trouble by decades of legacy. Fixing things properly will need an axe and a jerry can of petrol.
They already missed the opportunity with Python 3 and they are not going to take another chance.
-
Clean architecture is uncontroversial, but impossible. Sufficient cleanliness creates generality allowing ugliness wanting cleaned up. Do not have read this. Continue to strive.
-
@Bulb said in Is clean architecture controversial?:
Makes me wonder what Ruby does;
I infer that Ruby supports cross-server intra-cluster threading. After all, it supports Discourse
-
@cvi said in Is clean architecture controversial?:
@dkf said in Is clean architecture controversial?:
Fixing things properly will need an axe and a jerry can of petrol.
Is there a GoFundMe or something for that?
Please get funding for two jerry cans. One to fix Python3, and another to finally get rid of Python2.
-
@robo2 said in Is clean architecture controversial?:
@cvi said in Is clean architecture controversial?:
@dkf said in Is clean architecture controversial?:
Fixing things properly will need an axe and a jerry can of petrol.
Is there a GoFundMe or something for that?
Please get funding for two jerry cans. One to fix Python3, and another to finally get rid of Python2.
When Python4 gets spun off as its own language, what should it be called?
-
@Watson said in Is clean architecture controversial?:
@robo2 said in Is clean architecture controversial?:
@cvi said in Is clean architecture controversial?:
@dkf said in Is clean architecture controversial?:
Fixing things properly will need an axe and a jerry can of petrol.
Is there a GoFundMe or something for that?
Please get funding for two jerry cans. One to fix Python3, and another to finally get rid of Python2.
When Python4 gets spun off as its own language, what should it be called?
Python Classic.
-
@Watson said in Is clean architecture controversial?:
@robo2 said in Is clean architecture controversial?:
@cvi said in Is clean architecture controversial?:
@dkf said in Is clean architecture controversial?:
Fixing things properly will need an axe and a jerry can of petrol.
Is there a GoFundMe or something for that?
Please get funding for two jerry cans. One to fix Python3, and another to finally get rid of Python2.
When Python4 gets spun off as its own language, what should it be called?
Paku?
-
@robo2 said in Is clean architecture controversial?:
fix Python3
get rid of Python2
Can we just simplify and get rid of both?
-
@izzion said in Is clean architecture controversial?:
Python Classic.
Python One.
Filed under: Microsoft Branding
-
@cvi said in Is clean architecture controversial?:
@robo2 said in Is clean architecture controversial?:
fix Python3
get rid of Python2
Can we just simplify and get rid of both?
Fine by me. You will still need your two jerry cans, so no loss there.