When developing software you often face the same problem. Do I re-use already exisisting code or do I create new code. I have been working in this niche for a while know and I’m still faced with making this decision every know and then.
So how to make the choice, when to pick which option. To be completely honest I don’t quite know. Most times I just toss a coin, not the best way to decide (I know this).
Let me explain why I often build my own classes and code. I’m a fanaticle C++ programmer and I’m often faced with the problem that I could use either the standard library or write my own classes. Recently I choose that I would write everything I needed from scratch. And here are the reasons for my choice:
- More control over what is included in the code and what is not
This may not seem to important, but I happen to know that the string object included in the standard library is far from perfect. The same is true for the vector or array class. So I decided it was time to rewrite them to fit my needs.
- Gaining intemite knowledge about the working of the program
I personally believe it’s important to know why a program reacts the way it does. And in C++ especially. I’ve often had problems with the standard library that resulted in corrupted memory. Debugging didn’t help anything as I didn’t understand the code.
- Building up your skill set
I know that this point will be the reason not to do it in most companies, but creating your own ‘core’ libraries will help you increase your programming skills. The reasons why companies dislike this is because it takes way to much time.
As you might have noticed I’m kinda biased towards developing as much as possible yourself. But don’t get me wrong it is with its downsides. It takes a huge amount of time to develop your own ‘core’ library. Which makes it expensive. So for managers it’s important to weigh any possible gain, like the three points I made, against the time and money needed to do so.