This API or that Library – which one?
Last week, I was playing with a scraper program in Loklak Server project when I came across a library Boilerpipe. There were some issues in the program related to it’s implementation. It worked well. I implemented it, pulled a request but was rejected due to it’s maintenance issues. This wasn’t the first time an API(or a library) has let me down, but this added one more point to my ‘Linear Selection Algorithm’ to select one.
Once Libraries revolutionized the Software Projects and now API‘s are taking abstraction to a greater level. One can find many API’s and libraries on GitHub or on their respective websites, but they may be buggy. This may lead to waste of one’s time and work. I am not blogging to suggest which one to choose between the two, but what to check before getting them into use in development.
So let us select a bunch of these and give score +1 if it satisfies the point, 0 for Don’t care condition and -1 , a BIG NO.
Now initialize the variable score to zero and lets begin.
1. First thing first. is it easy to understand
Does this library code belongs to your knowledge domain? Can you use it without any issue? Also consider your project’s platform compatibility with the library. If you are developing a prototype or a small software(like for an event like Hackathon), you shall choose easy-to-read tutorial as higher priority and score++. But if you are working on a project, you shouldn’t shy going an extra mile and retain the value of score.
2. Does it have any documentation or examples of implementation
It shall have to be well written, well maintained documentation. If it doesn’t, I am ok with examples. Choose well according to your comfort. If none, at least code shall be easy to understand.
3. Does it fulfill all my needs?
Test and try to implement all the methods/ API calls needed for the project. Sometimes it may not have all the methods you need for your application or may be some methods are buggy. Take care of this point, a faulty library can ruin all your hard work.
4. Efficiency and performance (BONUS POINT for this one)
Really important for projects with high capacity/performance issues.
5. See for the Apps where they are implemented
If you are in a hackathon or a dev sprint, Checking for applications working on this API shall work. Just skip the rest of the steps (except the first).
6. Can you find blogs, Stack Overflow questions and tutorials?
If yes, This is a score++
7. An Active Community, a Super GO!
Yaay! An extra plus with the previous point.
8. Don’t tell me it isn’t maintained
This is important as if the library isn’t maintained, you are prone to bugs that may pop up in future and couldn’t be solved. Also it’s performance can never be improved. If there is no option, It is better to use it’s parts in your code so that you can work on it, if needed.
Now calculate the scores, choose the fittest one and get to work.
So with the deserving library in your hand, my first blog post here ends.
You must be logged in to post a comment.