Live data from Hacker News

Ask HN: How do you decide when to use a library?

news.ycombinator.com

1–4 of 4 posts

Ask HN: How do you decide when to use a library?

#1
I'm teaching myself bioinformatics and have some knowledge of the major libraries (eg, scikit-bio and biopython). I'm finding it helpful to lean on the libraries sometimes, but then I'll feel guilty and go back and rewrite those sections from primitives. Is this a normal pattern of behavior?

Re: Ask HN: How do you decide when to use a library?

#2
In general libraries are there to make your life easier and help speed up development so you don't reinvent the wheel. The issue is then that you have a dependency, so you have to be able to manage that going forward(including testing other versions usually). In my experience, people normally use libraries pretty heavily and don't rewrite the functionality using primitives unless there is a real reason that everything needs to be standalone(such as writing embedded software where there are space or other limitations).

Re: Ask HN: How do you decide when to use a library?

#3
I try to balance development time versus research and learning time. When you go to use a library, you have to consider the time it takes to determine which libraries exists to solve your problem and evaluate them to determine which matches your project best. Then, you have to decide whether the additional dependenc(y|ies)is worth the development time saved. Like everything else in software development, it's a balancing act. Having said that, as you get older, and have worked in the field longer, you find yourself less and less willing to reinvent the wheel and more willing to just use someone else's code.