I've come to the conclusion that this non-programming programmer "design pattern" fad is a way of obfuscating mathematical and computational concepts while making them no less hard (as we see by them often being poorly used) but seem less hard (and, paradoxically, more intelligent due to buzzword compliance) to the businessmen who, because of programmers' weak professional identity, call the shots.
Curried function? Too mathematical. Let's call it a Factory.
Tree-walking algorithm? Let's call it a Visitor.
Sinusoidal curve? Again, too mathy. Let's call it the Vibrator pattern.
Lots of words get spilled, mediocre employees remain employed, good people leave or get fired while trying to fight the current of stupidity, and nothing gets done. Brilliant! Now, you can go a step further by creating a system to monitor those mediocre employees, making them basically employable while bringing down the top, and call it "Agile" when it's the exact opposite of agility.
A factory and curried function are quite different concepts even if some functionality overlaps. Ditto with tree walking patterns and visitors. Abuse is quite common, because many people are exposed to one and not the other, so use the name hey know other than the one they don't know. Naturally human.
Well, yes, but then that's all patterns are: terms used to represent a way of doing something. It's sort of marketing for methods - and whoever did the marketing for "curried function" just didn't do a good enough job, maybe.
obfuscating mathematical and computational concepts while making them no less hard
It seems to me that what makes some programming tools better than other is that they hide mathematical and computational complexity while making solving problems easier - nothing is going to make the computationally hard or intractable not hard or intractable.
Attempts to hide computational and mathematical complexity is pretty much the theme for a whole history of programming languages. It certainly is its genesis story -
at which point the history of debates over programming languages begins, and it seems to me that this debate is largely because what I call 'hiding computational and mathematical complexity' you are free to say obfuscates it. It's how we get the yin and yang of C and Scheme making 70's scene - malloc and and full lexical scoping both simplify someone's life and make someone's unbearable.
I always know that there's a bad OOP example when automobiles are involved. It means it's a marketing piece not a tutorial - managers have cars and as a lowest common denominator of technical knowledge know they have four wheels, provided we ignore the one in the trunk. In other words, we've already lost because the person writing the explanation doesn't know the difference between hiding complexity and obfuscating it [How many cylinders in a Mazda Rx-8? Where does the Leaf fit in?].
On the flip side, what can we expect? Math is hard for a lot of people because it builds sequentially. Teenage hormonal distractions have probably prevented more people from moving beyond ciphering to algebra and beyond than anything save for access to educational resources.
FactoryProviderProviderProviders in the form of frameworks don't necessarily require understanding of higher order functions - like garbage collection, some lazy programmer wrote a program to handle it, and this turns out to be useful because people can use it without really understanding what it is, and being able to use things which are not computationally understood is pretty much the driving force behind the rise of OOP - how many people talk about dispatch when discussing an object's methods?
OOP is a sexier Cobol - cars and their wheels makes for more interesting story than employee records. Even better, outside of the automobile industry, there aren't going to be pointed questions related to domain knowledge (a real risk when discussing employee records with a business person). This and the fact that OOP code is less accessible to the non-programmer than Cobol [which was designed for the boss to follow] gives us Java in any language.
Determining if the conceptual merger of Java and JavaScript described by the author is ironic is left as an exercise for the reader.
For all the talk of abstraction by so many programmers, I wonder how many of us just really want metaphors. Ways of organizing and relating to code that are at least vaguely familiar.
But then some programmers start talking about abstract math and category theory, and many people recoil because it is too abstract, or because it is so abstract that it is more general than the most immediately obvious metaphor (Functors are kind of like boxes, but not always. You should think of them like computational contexts instead).
Of course metaphors have their place; there is no need in making things less relatable just because. But at some point you may have to abandon the comfort zone of trucks being a specialization of a more general car blueprint.
I think it's more concrete. FactoryProviderProviderProviders provide a common set of procedures for programmers to provide programs [sorry, second cup of coffee]. All that framework makes the landscape familiar and allows the procedures which worked for generating Java code to work when a person wants to generate JavaScript. It provides space for algorithms for writing programs.
The tradeoff is that it will never be done in a way that optimizes on logical insight. Simple currying would be simpler but the boss still might not understand it, and it's better culturally if the boss doesn't understand sixty lines of boiler plate than twelve lines of mathematical reasoning.
The advantage is that the programmer can know, if I do these things I will get close to the result without worrying over much about the degree to which I might lack deep understanding. On HN there are plenty of people comfortable with the idea of factories as curried dispatch constructors. But that's not the typical case.
Simple currying would be simpler but the boss still might not understand it, and it's better culturally if the boss doesn't understand sixty lines of boiler plate than twelve lines of mathematical reasoning.
That's the whole problem, the notion that "the boss" needs to understand how the code works. OOP patterns are designed to "model" real-world business objects and processes so that they can be documented on a UML diagram that business analysts and managers can look at to grasp how the software works without having to understand how computers work. This is a big reason why the software gets unnecessarily complex--the real world is infinitely complex.
Most of the time, what you actually need the software to do is not nearly as complex, though, so it would be better to just write simpler code that does the thing that needs doing rather than models all the things. But in that case it's harder for the non-technical boss to understand the logic without a handy metaphor.
The layer of abstraction that seems to be most frequently violated in enterprise contexts, is the software developer's job itself.
For whom is the idea that the boss needs to understand the program a problem and why?
The typical answer is for programmers and because then the boss might have specific technical input rather than requirements and under bad management that could be a problem - i.e. keeping the boss from understanding the code is a defence to mitigate bad management which has the added benefit of UML diagrams a likely first place for a bad manager to cut costs.
Much of the last 40 years has seen software engineers exchanging the human parsablility of Cobol for the utter impenetrability of regex's - culminating in Perl which was so impenetrable to even programmers that Java had to be invented. Anyway, the idea that a computer language should allow an intelligent lay person to follow an algorithm written in it died with Cobol. It - the idea not Cobol - might be worth revisiting in language design.
Of course the idea I was trying to express is that the boss will feel better at not understanding 60 lines of boilerplate javascript than not understanding a dozen lines of elegant Haskell.
It's bad for everyone involved because the programmer loses the ability to make decisions about how to structure the program he/she is working on, and the manager and/or business analyst waste lots of time worrying about intricate technical details of someone else's job, when they should be tending to their own responsibilities. It's a violation of separation of concerns and a disrespect for the software developer's domain expertise.
The trend I have seen in enterprise software is that, because good software developers are expensive and in high demand, the business attempts to commoditize them by having lower paid, semi-technical staff (like business analysts) do everything except for write the actual code, limiting the developer's job description to simply translating a diagram and a list of features and business rules into Java--like some sort of human compiler.
That approach is doomed to produce terrible software forever, because you can't write good software without thinking deeply and understanding both the problem to be solved and the tools available to solve it. And you just can't commoditize a job that requires that much thinking.
On the other hand, I do agree that software development needs to be made easier than it currently is. It is currently very hard because the current tools we have are built on layers upon layers of leaky abstractions that still require a highly trained and experienced individual to understand first, in order to be productive. Making programming languages more easily comprehensible to humans, is a big part of that. Programming languages are for humans, after all.
Curried function? Too mathematical. Let's call it a Factory.
Tree-walking algorithm? Let's call it a Visitor.
Sinusoidal curve? Again, too mathy. Let's call it the Vibrator pattern.
Lots of words get spilled, mediocre employees remain employed, good people leave or get fired while trying to fight the current of stupidity, and nothing gets done. Brilliant! Now, you can go a step further by creating a system to monitor those mediocre employees, making them basically employable while bringing down the top, and call it "Agile" when it's the exact opposite of agility.