I recently pulled an apparently small item from the backlog. It was to add a guided tour, a showcase of the essential features of the app. Naturally, I search for an open-source library that would do the job, and Bob's your uncle.
There are a few alternatives to pick from. Yet, they seem just not quite fit the need here. All of them require excessive changes to the existing implementation instead of just plug and play.
In cases like these, how do I draw the line, when to use a library, when to DIY.
First of all, I have a high do it yourself threshold. I generally think that almost any reasonably used OS library is a better option than DIY. You probably are a worse developer in the domain of the library than the community behind it. You also have not yet run into all those corner cases and weird bugs that come biting you back. Even if the dependency may bring something you don't need, I see it as a worthwhile trade-off. I'll skip the frameworks vs. libraries debate here.
If the open-source library brings in "too much" (determined by a gut feeling I suppose) AND brings in tons of potentially outdated dependencies, look for another one. If no suitable is found, then start to think DIY.
In my guided tour feature, I brought in zero new deps, did minimal changes to the existing code, and wrote roughly the same amount of new code and tests than I would have if I would bring in some of the potential off-the-shelf solutions.
Comments
Post a Comment