šŸ”„ Hot Take

npm install: Because Why Write Code When You Can Download Problems?

4 min read

The JavaScript ecosystem convinced an entire generation of developers that importing someone else's 11-line function is better than writing their own. Here's why that's insane.

⚔
Spicy Opinion Alert: This is a deliberately provocative take. We're here to start conversations, not end them.

The JavaScript ecosystem has successfully convinced an entire generation of developers that writing code is somehow beneath them. Why spend five minutes implementing a function when you can npm install someone else’s solution and inherit their bugs, their dependencies, and their questionable life choices?

We’ve created a culture where ā€œdon’t reinvent the wheelā€ has become ā€œdon’t write any code at all.ā€ Your simple React app now depends on more packages than a Linux distribution. Your ā€œHello Worldā€ project downloads half a gigabyte of node_modules before it prints a single character. And we pretend this is normal.

The most damning evidence of our collective insanity? left-pad. Eleven lines of code that padded strings with spaces. Eleven lines that thousands of developers decided were too complex to write themselves. When it disappeared from npm in 2016, it broke Babel, React, and half the JavaScript ecosystem. We built our entire industry on top of someone else’s homework assignment.

But here’s the uncomfortable truth nobody wants to admit: Your ā€œHello Worldā€ app somehow needs 50,000 dependencies because we’ve forgotten how to program.

We’ve confused software engineering with package curation. We’ve replaced problem-solving with problem-importing. Modern JavaScript developers spend more time reading package.json files than writing actual business logic. We’ve become digital hoarders, collecting dependencies like Pokemon cards, convinced that more packages somehow equals better architecture.

The security implications are terrifying. Every dependency is a potential attack vector. Every npm install is an act of blind trust in strangers on the internet. Remember event-stream? A package with 2 million weekly downloads that got hijacked to steal Bitcoin. But sure, let’s keep installing packages from developers we’ve never met for functions we could write in our sleep.

The performance cost is even worse. We ship megabytes of JavaScript to parse a date or check if a number is even. Users on slow connections wait thirty seconds for your site to load because you imported lodash to use three functions. Meanwhile, the browser’s built-in APIs could have handled everything you needed, but nobody bothered to learn them.

The maintenance burden is the real killer. Every package can break your build. Every update can introduce breaking changes. Every deprecated dependency becomes your problem. You’re not building software anymore—you’re maintaining someone else’s software that you probably don’t understand, written by people who probably don’t work on it anymore.

The JavaScript community has created a dependency industrial complex. Package authors publish micro-libraries for functions that should be one-liners. Developers import everything because writing code feels like admitting defeat. Build tools get slower because they’re processing more third-party code than application code.

And the ultimate irony? When these over-engineered, dependency-heavy applications inevitably become unmaintainable, the solution is always the same: remove dependencies, write your own utilities, and simplify the codebase. You know, do what you should have done in the first place.

We’ve lost the plot. We’ve confused engineering sophistication with import sophistication. We’ve built careers on gluing other people’s code together and called it architecture.

But here’s the thing: the problem isn’t dependencies themselves—it’s our complete lack of discipline around them. We treat npm install like it’s free, when every package is a bet on someone else’s code, someone else’s security practices, and someone else’s commitment to maintenance.

The best developers aren’t the ones who memorize every utility function or the ones who install packages for everything. They’re the ones who make intentional choices. They know when to write their own code and when to trust battle-tested libraries. They understand the difference between a critical dependency and digital hoarding.

Your users don’t care how many packages you imported or how many you wrote from scratch. They care that your application works, loads fast, and doesn’t break. Sometimes that means writing your own utilities. Sometimes it means trusting the ecosystem.

The trick is knowing which is which.