Libraries are your (not) problem

When adding a library to your project, all the library problems become your problems as well.

This popped up on LinkedIn recently. I like the intent. It's definitely something to be think about when bringing in a library.

I normally review change history, last release, issue trackers, etc to make a determination if I want to pull in the library.

Let's ignore the "I'll just copy/paste or write the small piece I need" that I prefer. If it's small, why use a library? If it's open source, open it up and take the source.

But - That's being ignored. Let's look at the statement

When adding a library to your project, all the library problems become your problems as well.

I'd say that the problems that become are the code problems. There can be a bit of ... social matters ... with open source projects. The more people involved, the more this comes up.
It's not really a problem for consumers of the library unless the code is impacted. The biggest impact is that it stops being maintained. Less is that stuff you don't need gets into the library. Again - Only impacted by what impacts the code.

To clarify - Code is not the entirity of the Library you're pulling in. It's just, at a minimum, the part you care about.

And yes, issues in the code are your concern - but with proper software development practices; it's not your problem.

Abstract 3rd Party Code

One of my guiding principles is to abstract 3rd party code. While this isn't always 100% done... I really like to. Isolating 3rd party code makes their issues, not my issue. It's something to handle, to code for, but not my problem.

The libraries limitations are not limitations of my system.
The libraries bugs are not bugs affecting my system.

Those are some negatives that abstracting the 3rd party code solves for us, but it also empowers us.

The absent feature is a feature given to my system.
The multi-line functionality is a single line to my system.
The temporal dependencies are not seen by my system.

Abstracting the external stuff allows us the flexibility to adapt their code into what we need it to be.

Biggest

The biggest thing I've seen using frameworks and libraries is that when you let them into your system, they start to dictate HOW your system looks. They determine what you do and how.

You can't control THEIR code, so keep it out of your system.

Show Comments