4 ms·
> The way you make code last a long time is you minimize dependencies that are likely to change and, to the extent you must take such dependencies, you minimize
by kevmo314 1y ago
> The way you make code last a long time is you minimize dependencies that are likely to change and, to the extent you must take such dependencies, you minimize the contact surface between your program and those dependencies.
A lot of value is driven from those dependencies though. Zapier as a pointed example: Zapier sans dependencies is ... well I don't even know. So sure, you could avoid dependencies at all cost, but at some point you might end up deleting the reason someone else wants to use your code in the first place.
Of course, if you're writing code only for yourself that will totally work, but most professional software engineers are not -- it's a balance and it's not fair to say all they have to do is stop writing glue code.
- j45 1y agoYour example of Zapier dependence resonates - being sure to put a simple layer between your code and Zapier is the critical component. The code makes the same call to a Zapier type command but it could be routed to Zapier today, and somewhere else in the future. This can take a nominal amount of time longer than integrating Zapier directly. It could be a couple more tables to setup and manage, or it can be done in the code somewhere.
- caseyohara 1y agoI've been working on the same product for ~13 years and I can confidently say the most important thing to ensure the longevity and long-term maintainability of a codebase is aggressive minimization of dependencies. Engineering is all about compromises. If near-term velocity is more important to you than long-term evolution and maintainability, then go ahead and use all of the dependencies if it allows you to ship faster. But that is a form of technical debt that you will have to pay down eventually.
- QuadrupleA 1y agoWhat are you doing with Zapier that you couldn't do with your own code, or carefully curated small set of libraries? For networked services, the REST APIs of popular providers (Stripe, AWS, etc.) are usually kept backwards compatible for a long time.