Ask HN: When do you use a library vs. implement something yourself?

At one end are single-function npm libraries that led to the left-pad fiasco[1].

At another end are things that you should only be implementing yourself in highly unusual circumstances, such as cryptography libraries.

Where on this spectrum do you usually implement the thing yourself, and what is your thought process?

What are the costs of importing a library, and how are those costs different for different projects? Are there security risks? What are the benefits?

Conversely, what are the costs and benefits of implementing something in-house?

Has there ever been a case where you've tried to roll your own and it ended in disaster? Or where you'd wished you'd never added a dependency on some library?

[1] https://ift.tt/2l49IBn

from Hacker News: Front Page https://ift.tt/2F24uP7
via

Comments

Popular posts from this blog