Should/Shouldn't I use libraries?
librariessoftware engineering
February 18, 2023
3 min read

I've worked on a couple of projects at this point & almost everywhere I've installed dependencies/libraries that I need. Don't get me wrong, I can't imagine working without them. But I've noticed that I've been avoiding them lately. Libraries greatly help me to iterate software specially when I want to test out if a project is worth building or not.

I want you to consider the following example. You're working a company XYZ & you're building their main product/service. You are supposed to build a feature that will allow users to upload a multi part file to the server. You've never done this before & so you decide to use a libary P. You do a quick yarn add p & you call a global function that P provides say uploadFile(file). You're done. Wooho! You've built the feature. You're happy, everyone's happy. You push your code to the repo & you go home.

Now, you're back at work the next day & there's a change in the plans by the management. They want to validate the file before it's uploaded. You're like "Oh, I can do that". You go to the docs of P but now you realize, P doesn't support this feature yet. You go to the issues & you see that there's either a dead issue or your use-case was never considered before. You open an issue but now you're stuck waiting for the maintainer. You don't understand the code because P so you can't really do anything by yourself. You're stuck.

I've been through this quite a couple of times. Now, this isn't a problem with P. I'm there's a lot of hard work that goes into building a library. Maintainence is a lot of work. Trust me, I highly respect maintainer's with all of my heart (Thank You!). But, I've noticed that I've been avoiding libraries when I can. I've been trying to come up with my own solutions to problems where I know that putting in that extra 5 hours will save me a fuck ton of time in the future.

PS: Hey, startups. This does not apply to you. Use a fuck ton of libraries. Your job is to iterate fast.

The key I want you to take away is to, find a balance. Use libraries if you can't avoid it but don't be afraid to build your own solutions. That's all what software engineering is about I guess. <3

comments.
@
    09DWLPG6152H1Z9