by dathinab · 1w ago · 0 comments
I think this is the completely wrong takeaway.
Ober the last ~15 years I have probably used around ~10 web frameworks/libraries
_not a single one was even close to being complete or mostly correct, even just for standard HTTP ~1.1 handling_!!! (The routing, path, header handling. Not any of the complex stuff in HTTP2, Quick etc.)
the problem isn't using dependencies, that is the solution (not reinventing the wheel again).
And preferring reusing solutions which are more complete, practical testet and have more resources to maintain/improve basic functionality is (in most situations) not "anxious" development, but (should be) common sense.
The amount of hidden complexity in even somewhat basic stuff like HTTP is enourmous, rewriting everything all the time is wasting billions across the industry all the time and (in general) increases the chance for bugs.
The problem isn't "using dependencies" or small dependencies, but:
- availability (or lack) of high quality well maintained dependencies
- "no one" wanting to pay for software dependencies
- misguided tendencies for 'clever' & overengineered solution in one extreme (e.g. the stuff which lead to log4shell)
- misguided obsession with deceptive simplicity in artificial examples which lead to 1001 incomplete solutions because of the obsessiv simplicity doesn't stop at cutting out over-engineering but also cuts out fundamental parts
- lack of widely adopted, effective, tooling & infrastructure to trust dependencies.
- lack of tooling to more efficient reuse and compose working parts, the way we do programming seems just very fundamental broken.
- also a lot of legacy tech we are stuck with making many things unnecessary complicated
Also as a side note, number of packages != number of entities to trust. Weather you use 10 or 1 package from the same source, maintained and published in the same way often makes little to no difference for supply chain security.
Take CSV, there are multiple RFCs that fully or slightly cover ab out the standard if you want to call it that.
and some of the things listed are fundamental software issues you _don't_ avoid just by reinventing the wheel, they just change how they appear
honestly in my experience, for most things, problems with reinventing the wheel are way long term larger then problems with re-using software, at least if the re-using is done responsible
I have seen way to many cases of companies trying to avoid using dependencies for something "because this thing is simple" and then realized they are mishandling this, had an outage due to that, had to add those features etc. etc.
In then end often even just taking the 3rd party dependency, giving it a short review and then vendoring it, with rare updates to it, would nearly always have lead to a far better outcome.
(Which is also the recommendation I give for guidelines for "not-too-large 3rd party leaf dependencies", given them a small review, vendor them, keep an eye out(1) for CVEs and then only update when needed with another small review. Through note that this doesn't work for all things, the "not-too-large leaf dependencies" part matters. For other things other guidelines are better.)
(1): As part of normal CVE/Security scanning.
> lack of widely adopted, effective, tooling & infrastructure to trust dependencies
How would I as an individual developer, or even a CTO at a small to midsize company, justify the investment to fix that? It would take buy-in from a Google-level entity to create and rollout such tooling for, say, Java.
Copying a few functions, or even recreating a whole HTTP server from scratch, is a smaller body of work. Sure, I could vendor and keep an eye out for CVEs, that’s a valid approach. But that’s me copying and taking ownership of an external codebase, not taking a dependency. Ownership is easiest for code that you’ve written, because you (or your team) also built the mental model to go along with it.
And if I have to vet a new codebase anyway, I’d rather it be the smallest subset that I actually use; not the full functionality of NGINX.
I can justify making the locally optimal decision (reimplement some functionality so I can truly own it) and that may result in a less than optimal global outcome. I can’t justify doing to the globally optimal thing at the expense of my company.
Ultimately, the incentives aren’t aligned. The activation energy to get from locally optimal to global optimal is too high, and that’s not going to change any time soon. In fact, it’s rapidly trending the other direction. AI makes it easy to reimplement the functionality you need. An idealized view of “if only people paid for high-quality dependencies this would be solved” is not one I can buy in to. That’s not the reality I live in, for better or worse. In a world where nobody wants to shoulder the burden of vetting dependencies, avoiding them is often the best alternative.