News for hackers. Stuff that matters.
Re:The Everything NPM Package by hannob on Sunday January 07, 2024 @03:24AM (#38899556)
The core of the problem is micro dependencies. It seems in the Javascript ecosystem, developers have no awareness of costs of complexity.

When you wonder whether to add a dependency, you should ask yourself: What are the upsides and downsides of adding this dependency. One downside is always that by adding a dependency, you add a potential security problem, a potential point of breakage, and more complexity.

There are situations where these are well justified. If your dependency is stable, from a trustworthy source, and if it is a functionality that you cannot quickly implement yourself. But if you include a dependency that is effectively one line of code, the question answers itself: The costs of adding a dependency is completely unreasonable. It your list of dependencies grows into the 100s, you're doing something wrong.

There are no comments on this comment yet.