Published Dec 30 2024
Use Packages Because You Choose To. Not Because You Have To.
It's increasingly popular in today's development landscape to solve every problem you have, no matter how minute, by installing a package. Projects with 1k+ npm dependencies are the norm. Quite frankly, this approach just highlights the skill issues with today's developers. Especially javascript devs.
The wheel doesn't need to be reinvented. If you're trying to start a business and build a product it doesn't make sense to implement the http protocol from scratch so you don't have to use NGINX. But do you know what NGINX is doing in the first place? If Vercel went out of business and you had to re-deploy your app tomorrow, could you do it? Or would you just go to the next company selling you "The Fastest One-Click Deploy on the Edge!"
What about making a blog? Or a documentation page for your project? Are you going to pay for a SaaS documentation tool because it's convenient and your time is better spent somewhere else? Or because you don't have the skill needed to build a basic blog?
Let's get even smaller. If you had to validate the format of a phone number, would you take 30 mins and write out a simple regular expression? Or is your first instinct to npm install phonejs
? If you answered the latter, you're actively hampering your growth and progress. Not to mention putting your application in the hands of hundreds, if not thousands of maintainers who you don't know.
Don't reinvent the wheel: But at least know how a wheel is made.
If you take some time to learn how to actually solve problems, or learn how they have been solved, then using an external package becomes a choice as opposed to a neccesity.
"I could implement this functionality, but it would take me 3 days and there are other priorities, so I'll use this package"
"There's a package for this, but I can just implement it in 30 minutes and have it to exactly what I want and nothing else."
Don't those options sound nice? Give yourself those options. Take some time to think about what exactly are all those dependencies doing, and if it would really be that much effort to implement only the parts you need yourself, as opposed to having someone else hold your hand.