| Short answer: combinatoric explosion of dependencies. If you write everything yourself, you might have a few modules in your codebase that all add to up to something like 15 MB. Of that, maybe 1 MB is specific to your app, the other 14 MB will be generic components for things like handling logging, HTTP, running background jobs, dealing with permissions, etc... If you pull in a library to enable authentication with Facebook, then you drag in not just the specifics of that concept -- the 1 MB -- but also its framework components -- the other 14 MB. There is virtually no sharing! Add in, say, Google authentication, as well as Twitter, Microsoft, and Facebook, and now you've got 4 copies of every basic "shared" component... because they're not shared. (Not effectively enough, at any rate.) This is a disease of modern "package based" development practices, such as NPM, Cargo, NuGet, etc... Every package has a dependency tree, which may or may not be shared. Worse still, if any packages need any level of interaction, you often get shims or adapters, bloating things out further. It's not unusual for a trivial app to have an entire web browser layout engine embedded in it by accident. For web apps, I've seen megabytes of JavaScript getting pulled down to the client because of the various "sharing" buttons that are static content taking up just a few hundred pixels on the screen. Each one is from a separate vendor with separate dependency trees. One more random example: the new Windows Calculator pulls in dependencies for things such as Windows Hello 4 Business login recovery helper! Personally, I blame JavaScript and Python. Both languages had tiny and/or bad standard libraries and hence developers were forced to develop huge frameworks of packages to compensate. Facebook did their own thing, Google did their own thing, and on and on. Somehow developers internalised their limitations and started telling everyone that "batteries not included" standard libraries are somehow magically better, despite the glaring downsides. Now new languages like Rust are being purposefully designed with deliberately small standard libraries, as compared to C# and Java. Their proponents will say this is a good thing right up until Rust develops Python- and JS- style cliques where there's a "Facebook Rust" and a "Google Rust" and if you accidentally pull in the tiniest thing from both you get a duplicate of every basic concept. |