No matter how good your code is, there will always be parts which do not work as well as you want. These are sometimes called bugs. There are also times when we think building something ourselves will be more cost effective, if for no other reason than we simply know the code better.
A while back a colleague of mine, Lee, was tasked with making some additions to one of the dialogs in the system that we work on. They needed a tree component with some customised features to display the data. So Lee spent weeks working on this specialised tree component and when he had finished it was a work of art, to both the primary and secondary audience. Lee had used all the correct techniques, using SOLID principles. All was good with the world.
The tree was integrated into the module and the module was released in the next iteration. However when the users started using the module they found a number of issues, as users do, and there were some late nights from the team in order to fix them.
A few weeks later I was sitting down reflecting on what went well and what didn’t go quite so well when one of our other colleagues, Tay, joined us for a coffee.
“So why did you build that yourself” he asked Lee.
“Well”, replied Lee, “I thought I would be saving the company money and I thought that as I knew the code inside out I would be able to make changes easier”.
“So do you think that by the time you had written the tree component and then fixed all the bugs that saved the company money?”, asked Tay with a smile on his face “come on Lee I know what sort of rate you are on”.
Lee laughed at himself and replied “No I suppose not”.
“And do you think the code was as well tested as a ready built library used by thousands of people?” asked Tay.
Again, Lee responded with a negative.
So in the end we all agreed that if there is a ready built library you can use in your software, using it is probably a better route rather than building something yourself. After all by the time you have developed something and fixed any issues with it, your version is simply not going to be as tested as a ready built component that is used by thousands of people.
What are your thoughts on using ready built libraries? Leave a comment and tell me about it.