2 ms·
One advantage of rolling your own is that you only need to consider your (your own, your employer's, ...) specific needs, and sometimes that added flexibility i
by krylon 12y ago
One advantage of rolling your own is that you only need to consider your (your own, your employer's, ...) specific needs, and sometimes that added flexibility is well worth the effort.
Especially once those needs change, you can simply change your solution rather than beg some company or open source project to implement that change for you or try to get some patch accepted or maintaining it yourself. Sometimes that is a big advantage.
On the other hand, if your hand-rolled library/application/service/whatever is built by a single person and that person leaves the company, you might be royally screwed.
About a year ago I had the, um, honor of taking over maintenance of a bespoke application developed in-house (by a single guy) to make up for some shortcomings in our ERP system (which can, in theory, be customized, but 1. it has to be customized in Visual Basic Script, and 2. the vendor makes no guarantees whatsoever that your customizations will still work after the next upgrade).
It has mostly worked out OK, because the guy that left coded in a very readable style, but when I deployed an updated version of the application, the accounting department complained that things stopped working which used to work. But when I looked at the source code, they should not have worked at all, because the code was not there. So probably the version the accountants had been using before my update was not built from the version of the source code I was given (not to mention that the code was not maintained using any kind of versioning system).
TL;DR - in the case of small-ish applications (depending on how unusual/special your needs are and what amount of resources you can afford to invest) I believe there can be big advantages in rolling your own, but you need to be aware of the risks. I've seen a few cases where companies had kept using bespoke applications for ten years and longer, even though they were clearly broken / out of sync with the company's needs, because nobody was left to maintain them.
EDIT: Just to be clear, I am thinking more at the level of (small) applications than libraries. With libraries, I prefer to use existing solutions, for a lot of reasons, many of which other participants have already pointed out.