In IT software development the „not invented here syndrome“ is a very well known disease that many software developers succumb to. It basically sais, that in nearly all cases an already existing software library for a given task will not be used but instead a solution for the same problem will be re-implemented again. The solution needs to „be implemented here“ for being considered good.
Knowing this dilemma I always forced myself to first look for existing solutions or libraries, before I ever started my own implementation. But a short while ago, I found out that this opposite approach is also too extreme. The ideal solution depends on some criteria that need to be measured objectively:
- Is there an existing solution for your problem. You need to check. And more often than you might expect, there already is an existing library for your task.
- What is the learning curve for the existing lib? Is it easy to use?
- How close is the existing implementation to your exact needs? Does it need to be customized?
Depending on 2. and 3. it might very well be wise to actually do re-implement your own solution. You will know its internal workings and it will implicitly be exactly tailored to your needs.
So in the future think carefully: Use the existing lib or implement your own one. If you decide to implement your own solution, then please at least publish it as open source, because for what you learned from the existing implementations.