If the code is for you, and for you exclusively, go ahead.
If you're writing code as part of a team for a customer, then it isn't for you and it's whole purpose is to solve the problem at hand.
Secondly:
The primary issue I have with a NIH code-it-yourself approach is that it doesn't scale over time. Professionally, over two decades, I have seen several teams go through a technical evaluation and decide, in the end, that no open or closed source solution exactly fit their needs. So they coded it themselves.
Fast forward three to five years and everyone regretted the NIH approach. Those open or closed source solutions had matured and easily surpassed the home grown feature set, which still required a team of engineers to invest in.
There are exceptions, of course. Sometimes you have to build it yourself. But more often than not, it's much, much more effective to let go of your ego and collaborate with others, particularly on open source solutions in which you always have the option to fork the codebase and bring it, effectively, in house.
Generally, I find those that strongly advocate for NIH overly discount the long term costs of maintaining software.
> Fast forward three to five years and everyone regretted the NIH approach. Those open or closed source solutions had matured and easily surpassed the home grown feature set, which still required a team of engineers to invest in.
This is the root of the problem: a small team generally can't keep up with an open source project over time.
The NIH approach works well at larger companies who can dedicate a lot of engineers to working on in-house infrastructure projects full time. At smaller companies it is a distraction from building the core product.
If the code is for you, and for you exclusively, go ahead.
If you're writing code as part of a team for a customer, then it isn't for you and it's whole purpose is to solve the problem at hand.
Secondly:
The primary issue I have with a NIH code-it-yourself approach is that it doesn't scale over time. Professionally, over two decades, I have seen several teams go through a technical evaluation and decide, in the end, that no open or closed source solution exactly fit their needs. So they coded it themselves.
Fast forward three to five years and everyone regretted the NIH approach. Those open or closed source solutions had matured and easily surpassed the home grown feature set, which still required a team of engineers to invest in.
There are exceptions, of course. Sometimes you have to build it yourself. But more often than not, it's much, much more effective to let go of your ego and collaborate with others, particularly on open source solutions in which you always have the option to fork the codebase and bring it, effectively, in house.
Generally, I find those that strongly advocate for NIH overly discount the long term costs of maintaining software.