I don’t see any way to avoid it. In fact, every discipline, other than software development, seems to be managing the complexity (albeit, not always well).
My problem is that if each of those layers is bloated to 5-10x the size and complexity they should be, then we have a problem. This can compound, not just additively but multiplicatively. Eventually you end up in a quagmire where nothing works right and you can’t fix anything because that would just reveal more breakage at layers you don’t control.
One thing I noticed over this last week is how much nicer it is to work with something like ASP.NET Core 8.0 instead of the old ASP.NET MVC 5. It’s leaner and meaner, but has enough “batteries included” that I don’t have to drag hundreds of megabytes of slightly incompatible third-party modules in just to get essentials such as JSON and Dependency Injection.
As an industry we need to acknowledge the need for cohesive and consistent platforms, not just components.
We need to occasionally clean house and consolidate, not just keep throwing packages over the fence and calling it a day.
Agreed, but it's also, apparently, a difficult bar to clear.
Apple manages to do it, by having iron-fisted control of the hardware, the operating system, and the SDKs.
But even they are starting to fray. I've been writing Apple code since 1986, and I'm getting familiar with some of the newer stuff, like CreateML and SwiftUI.
There's a ... difference ... in the way that documentation is being handled. In The Days of Yore, we had Inside Macintosh, which was a multi-volume Encyclopedia Britannica-like set of tomes, delving deep into the operating system and SDKs. It was written by really skilled people; often with advanced and esoteric degrees, and with great writing chops.
These days, not so much.
I'm glad for bloggers and online enthusiasts.
Now Microsoft can’t even make a GUI framework that is actually used by anyone, including themselves!
Burned out a few years back writing an admin panel mobile app for an embedded device. The actual panel and the interaction with the device was fine, it was the insanity of the customer architect who only had time to design the system but not build it. You'd think that would have informed them on their excessive creativity, but alas.
One use case was that an operator working with a device could at times need external support. One feature was to be able to dial support from the phone whilst using the app such that the operator could receive instructions, or have support remotely change settings for them.
At least, that's what I thought. That would make sense. But no.
They wanted a full real time socket connection between the hardware, the mobile app, a server, another server and the support app. Important detail is that operators often worked in areas with bad reception.
This meant ensuring that all these connections were up at all times, with error handling, ensuring that messages were delivered and the gist, whilst simultaneously serializing and deserializing these messages and running whatever algorithms over them, often calling other services written in node that would take ages to respond if they didn't just timeout completely (30s!).
Oh, and they wanted to sell this forward so everything, everything, needed to be customizable.
Every meeting with said architect and he had new ideas, new protocols, new solutions.
Eventually I needed to fix a bug in their code, which turned out to be a 15Gig monorepo where 1/3-2/3 of all code was commented out.
You can imagine what the final product was. Which was rolled out to everyone on day one without any testing in live environments.
I'm tired just talking about it.
I vehemently disagree. New codebases might be built on top of large stacks of framework code and infrastructure code, but source repositories ought to actually be tighter and more business-focused than they used to be.
But they're often bloated monstrosities, filled with resume-padding architecture astronaut bullshit, or contorted to fit the latest hip framework's requirements.
Apologies ahead for this long-winded rant, but this exact issue has been boiling my blood for weeks now because I've been wading through the neck-deep mess that a customer has made, such as writing an astonishing three megabytes of source (typed by hand, not generated!) for a single web form. One!
Especially in the era of modern web frameworks, we can avoid most of the "ceremony" of older systems like C or C++ where just making a call to a database was pages of fiddly boilerplate. Instead of embracing this, I see developers reintroducing unnecessary code because they must have gotten so used to the verbosity that they felt exposed without it.
Let me give a concrete example from a codebase I've just spent a week reviewing. I've read through hundreds of pages of code, found dozens of critical resource leaks and security issues, and I'm yet to encounter any actual business logic.
The first mistake that happened was that someone decided to use Angular. Why? It's hip! It's cool! It's what all the kids are doing!
Except now, you have to have an API instead of just web pages. That API will need to serialize things to JSON, so you need to data transfer objects and Newtonsoft code. Suddenly, you need to deal with JWT, and make sure the untrusted client doesn't receive internal (secret) fields from the database. The client is no longer strongly typed or closely tied to the C# code, so you need a full megabyte of test code that you never would have needed before to validate all the Typescript.
This code does nothing of business value. It's a form. You fill it out, and hit submit. There's no "interactivity", there's no single-page-app features used, it's just... waste.
Then, then, on top of that, someone that really likes "grand cathedral" style code architecture decided that this whole thing would be more secure if there was a "middle tier". You know, an API. No, not the Angular API facing the Internet! A back-end API. For no reason. For an app written by two developers that has its own, dedicated database, and will never interact with any other app, tool, or system.
So now you have to write server-to-server API call code including the DTOs and related definitions, the server code, the client code, the service authentication code, the error handling, the distributed tracing, the HTTP header forwarding (securely!), and on, and on.
All typed out by hand, because: "REST is easy!"
No wait, there's more: The original architect also wanted to make the system "database agnostic", so the mid-tier repeats every abstraction. It has interfaces, types, etc... so that you can "swap in" another database. This never happened, and will never happen. This is purely wasted effort.
Then someone put API Management in front of this. Why? Because the word "API" was used. Remember: Angular uses JSON APIs, not HTML, so it's a "thing" that "needs" management. Then that API management -- a cloud SaaS service -- has a reverse proxy in front of it operating in API management mode for "security".
Meanwhile all these layers are riddled with URL injection, SQL injection, and similar basic security errors precisely because it's too hard to add a new field to the form, so developers get lazy and simply add a generic "ExecuteQuery(string sql)" mid-tier method and move on with their lives.
This is why we have "too much code". Because architects can't justify their positions if there's only two icons with a single arrow between them in their designs. Because "hip new thing" is a shiny we all love to chase. Because of magical thinking that assumes that more abstractions means the code is more good.
We have nobody to blame for this but ourselves.