Big Ball of Mud (1999)
laputan.org
laputan.org
> Shantytowns are squalid, sprawling slums. What is it that they are doing right?
> Shantytowns are usually built from common, inexpensive materials and simple tools. Shantytowns can be built using relatively unskilled labor.
This is a powerful metaphor, and I see it often in code.
If you've ever seen an API gateway written using the same web framework as the other services, where in order to route "/external/order" to "/internal/order", the first step steps are e.g. "File | new | Controller", call it "ExternalController", make a GET method called "order", and in there code up a http call to "internal/order" ... you have a shantytown API gateway.
It's terrible, it requires manual extending for any new endpoint. But it's not a specialised skill. Anyone on the dev team can extend it by just adding more of the same.
The way around this, and again you have to get management and customer support, is to bring maintenance activities into every iteration. Create systems that can detect issues and errors early (more comprehensive testing, new testing styles like fuzzing and property-based testings; moving critical portions to statically typed languages or adding type annotations; etc.). Make addressing those issues a priority, some portion of your time in each iteration should be spent addressing concerns or increasing the ability to detect issues. Over time, when I've seen this done, it's made making changes much faster, even for larger changes. But without this, even "trivial" changes can end up taking months, instead of days or weeks.
[0] https://web.mit.edu/nelsonr/www/Repenning=Sterman_CMR_su01_....
[1] https://www.systemdynamics.org/assets/conferences/2017/proce...
I think she’s the one that gave me the phrase “capability trap” and Google found these and other articles.
In this case it's generally an attractive nuisance for business logic, aggregation, data transformation etc, which means that after a while
1) extracting the proxying is hard and
2) you can't understand a service without reading the code in multiple layers, since some of it's business logic is in the proxy layer. Big balls of mud can be big, distributed balls of mud.
That's not a shantytown. That's an architecture astronaut utopia, creating according to the latest methodologies.
Where as with a customized "elegant" meta-programming DRY NIH solution unique to ThisCorp. "How does this work?". "Try to figure it out yourself. Jack has left and Ryan is too busy fixing production issues to help you".
Obviously if you have a team of Haskell compiler writing geniuses YMMV.
In this specific case, I wouldn't recommend that either. e.g. there are plenty of products in the API gateway space that do that thing well. e.g. NGINX, Kong, Istio, Apigee etc.
They're not "unique to ThisCorp" but neither are they well-known to many Ruby / Node / Java / C# coders. It's a separate, specialised knowledge.
I think that's the "relatively unskilled labor" part: i.e. "yes, there are specialised tools that are excellent at solving this problem .... but we don't know them"
In order for software to be successful it needs to solve a problem. In order for that software to be successful in the long term it will have to change and adapt to continue solving the problem. Architecture usually means abstraction. And abstraction is most always a tradeoff - you sacrifice flexibility to make something common, easier. But there is the rub. A successfully abstracted architecture that solves the problem today, will not be able to solve the problem tomorrow without big changes!
I see something similar with large software systems. A 'system' is something that can stand alone, but very large software is logically composed of many subsystems that could in theory stand alone even if presently they never stand apart from the full system or if their components are so intertwined that the logical subsystem is only a potential abstraction. While the full system might be a ball of mud, and you have little to no control over what Team X does with their subsystems and their relations/interconnects with the overall system, it is possible to rework your own subsystems in a way that they themselves aren't balls of mud and stay that way indefinitely. (I suspect this is part of some of the optimism behind microservices -- followed by pessimism when people realize the full system that interconnects everything can still easily become (or start as) a ball of mud, one even less pleasant to work in than in a monolith design.)
I would argue they are more akin to failed housing projects: competent architects went to great lengths to justify their existence as a cost-effective solution to an existing problem, but this approach didn't work and they offer no better conditions to their residents than shantytowns.
"The Wetware Crisis: The Dead Sea Effect"
echo "<H2>Registrations: <B>" `ls | wc -l` "</B></H2>"
echo "<CODE>"
echo "Authors: <B>" `grep 'Author = Yes' * | wc -l` "</B>"
echo "<BR>"
echo "Non-Authors: <B>" `grep 'Author = No' * | wc -l` "</B>"
echo "<BR><BR>"
> This script is slow and inefficient, particularly as the number of registrations increases, but not least among its virtues is the fact that it works. Were the number of attendees to exceed more than around one hundred, this script would start to perform so badly as to be unusable.I'm not entirely buying it; I remember what performance was like in 1995, and grepping a hundred or so small files wasn't any sort of big deal, even on consumer-grade equipment like an 80486 running GNU/Linux, even with multiple users hammering on that CGI server to obtain the above output.
In any case, the logic could easily be rearranged so that the output of exactly the same code as above is cached as static HTML, which is regenerated only when the set of registration files is altered.
So if the registration exploded and the machine got bogged down with multiple instances of these slow scripts, there would be no need to change the actual code, just to plug it into the overall solution in a different way.
A thread from 2017 (6 comments): https://news.ycombinator.com/item?id=13716667
2015 (9 comments): https://news.ycombinator.com/item?id=9989424
2013 (21 comments): https://news.ycombinator.com/item?id=6745991
2009 (2 comments): https://news.ycombinator.com/item?id=911445
2007 (2 comments): https://news.ycombinator.com/item?id=10259
Nothing bigger? I would have sworn otherwise.
Of course now you have microservice architectures where you're basically creating programs made of containerized services. Any bets on how long it'll take to have containers-of-containers be a thing?
Maybe this could be the "big box of crap" pattern.
Stuffing it into a container to deploy it is orthogonal. It doesn't solve many problems
I have worked professionally in a company that is a giant, sprawling software slum at best. Containers are huge there because they are perceived as fixing this issue even if they just make it worse in practice.
One of the issues here is the lost art of writing installable and well-organized software. It's quite normal these days to have services and apps that consist of multiple often redundant services and sub-applications wired haphazardly together with crap strewn all over systems.
It's more like they are doing the technical equivalent of credit card churning but never closing out the accounts. I have never seen anything like this, and I have, on and off in my career, worked in contexts best described as "software superfund decon expert."
As soon as Kubernetes gets mature enough to have to make backwards-incompatible changes and keep old code running, we'll have to have a way of deploying clusters that were defined in the old versions. So probably a few years?
Frankly, I think this pattern describes most programming constructs as well. As what's a good approach for managing largeness (or complexity)? Dividing it into smaller simpler understandable chunks, that can be changed in isolation, which is what containers attempt to do, as what many programming constructs attempt to do.
But you're right, it'll just grow more, and things will likely just get divided again into more chunks. I don't see a way out of this process.
In fact, I feel this describes a general law, as it describes everything large in general. Take companies for example. Large companies are less innovative, because they're more complex and hard to change, just like large software. Additionally, large companies tend to containerize things into divisions, departments, teams, and so on, in attempt to manage complexity.
Bigness is the anti-thesis to change/innovation...
To wit, if what you have is a big ball of mud anything you add to it becomes mud too. At least without heroic effort, this seems to be true. It's not necessarily a bad thing, but it is worth recognizing in systems thinking.
Still, even the dorodango is fragile, prone to cracking, sensitive to many conditions. Inheriting one is a situation which may occur to any programmer. What the organization decides to do once they have a Big Ball of Mud on their hands is the real issue.
I consider this the reaction to the eventuality to be a real test of organizational mettle.
Sometimes the energy cost/(effort) can be higher than the benefit, or the cost of the opportunity of having a mud/noise system can be negligible. As other human constructions, sometimes best is not better, it depends on the metric.
featuring the MIT vs New Jersey approaches.
Wherin dick gabriel rolls up his sleeves to get into the language wars and calls more popular languages than his favourite "viruses" and says they are "worse" by definition without proper justfication. It's like catnip for those around here who want to ride a technology to career success through early adoption so then put on their language warrior garbs to hunt the heretics who dare question. Old greybeards did since the time of the dinosaurs. And it sucked then too.
Sensible argument and discussion are so much more productive, interesting, enjoyable, educational than language war flame-fests of which this is one.
No images though. However, I noticed down at the bottom this text:
> All Beatles Images (c) Apple Corps Ltd. Page Design (c) 1997 jwinterprises
Well... off to google?
"Beatles shovel spaghetti" brings up multiple copies of this image, including an explanation: https://biteswiththebeatles.wordpress.com/2017/09/27/aunt-je...
> If you have ever owned a vinyl copy (or certain CD copies) of Magical Mystery Tour, you’ll know that it comes with a 28-page booklet containing song lyrics, drawings by cartoonist Bob Gibson, and scenes from the Magical Mystery Tour movie.
> [..]
> Yes, you looked at that correctly. That is John Lennon, dressed as an Italian waiter, literally shoveling buckets of spaghetti on this woman’s plate. You’re probably gonna want some context…
(Edit: and if I only scrolled further I see someone else already posted that link)