Why reinvent the wheel?

Today we are going to focus on whether reinventing the wheel (in terms of coding our own software) is better than using existing code alternatives. Many people have different opinions on this topic, and while I have my own, I will try to have an unbiased vision. Let’s get started!

I hate reusing code 😒

This is often a very good choice, contrary to popular belief in some cases. The main advantage is that you’ve got full control over the software, which is often essential, but you will have to deal with your own bugs which is a good or a bad thing depending on how active other alternatives are.

Evaluating an already made module is very time consuming if you are worried about security and/or performance.1 Which you should be. Furthermore, some shortcomings will surface only after extensive use, when it’s too late to switch to another better alternative.

There is as little code to understand as possible, as the implementation is your own. This is a large benefit when you need to write an extension as there is less code to understand and to modify.

Extending an already made module causes a big communication overhead (discussions with the developers maintaining the ready-made project). On the other hand, branching the code is untempting because you won’t be able to reap benefits from bugfixes and extensions.

All previous remarks assume the project in question is open source. In most cases, when using a closed source project, there is far too little documentation available. This is especially true for big and legacy frameworks.

The license agreement of the project you are thinking about to use may also be too strict.

Open source rules! 😎

Activity of Bootstrap (an open-source project) since 2011

Activity of Bootstrap (an open-source project) since 2011

If you need a performant and already tested module, search for popular open source projects before starting your own, mainly because:

Summary

There certainly are situations in which code reuse is the best option, but it is not always the best choice. The context of code reuse in software development is certainly different from reusing bricks when building a wall or removing the doors from a car design.