NIH Is Far Cheaper Than The Wrong Dependency (Title written with apologies to Sandi Metz.) One of the biggest fallacies in coding is that dependencies have zero downsides. It's treated as free functionality you don't have to write yourself. Wow, what a deal! But dependencies absolutely have a cost. They may require a significant time investment to learn to use. Often they're so large and complex that simply writing the functionality yourself is faster than learning. Sometimes it's easier to write it yourself than install the dependency... Their breaking changes can trigger expensive re-writes of your own code to handle a new interface. You need to ensure they end up on your clients' machine. Let us consider this last point; how many absurdly complicated containerisation or bundling setups do we encounter in our work because someone does not want to "reinvent the wheel" and instead opts to use large, complex dependencies? How many times did people take the time to appreciate they've re-invented an entirely different wheel that has nothing to do with their apps core functionality, just to deploy and run the bloody thing? Instructive here is Tigerbeetle, a financial database written entirely with Vanilla Zig: TigerBeetle has a “zero dependencies” policy, apart from the Zig toolchain. Dependencies, in general, inevitably lead to supply chain attacks, safety and performance risk, and slow install times. For foundational infrastructure in particular, the cost of any dependency is further amplified throughout the rest of the stack. Similarly, tools have costs. A small standardized toolbox is simpler to operate than an array of specialized instruments each with a dedicated manual. Our primary tool is Zig. It may not be the best for everything, but it's good enough for most things. We invest into our Zig tooling to ensure that we can tackle new problems quickly, with a minimum of accidental complexity in our local development environment. A Framework for Evaluating Dependenc...
First seen: 2025-07-18 03:19
Last seen: 2025-07-18 06:21