True software reusability

Truth about reusability

Disclaimer : The content of this blog are my views and understanding of the topic. I do not intend to demean anything or anyone. I am only trying to share my views on the topic so that you will get a different thought process and angle to look at this topic.

Reusability is the key concept in the IT industry. Due to OpenSource initiative we are able to reuse more code now. The understanding of the concept of the reusability is crucial since we may end up misusing the concept. I would like to share my understanding on this topic 

Horizontal Reusability

Reusability could be found in many things around us. For instance we could use a log of wood to build a house or it could be used to protect us from the cold winter when burnt. Most of us would say that this is not reusability since if the wood is used to build a home cannot be used again for creating a fire. I would say that the basic concept of the reusability here is - Reusability by diversity. Which means once you have a wood you can choose of the many options you have. This is horizontal reusability. In software world it is achieved by either copy pasting the code or using the same service or module in multiple places. To achieve this kind of reusability we need to ensure the code is more generic which serves the purpose ( using same module in multiple places ) or it could be specific to some problem which is repeated  ( copy pasting the code ). We observe this is the most common concept of Software reusability.

Vertical Reusability

Next is the vertical reusability i.e. reusability by abstraction. For instance Developer-A creates a library-a which is used by another Developer-B to create library-b which is then used by third Developer-C to create library-c. In this chain the dependencies are transitive. The benefit of this kind of reusability is that we are going towards more simplified solutions and can make things more advanced. Evolution and advancements in human society was achieved by building on top of existing knowledge. Hence each one of us have a role in the chain of abstraction. Similar to pyramid all layers are important for it to stand. I promote this reusability more because we need to look forward from what we already have and start creating on top of existing.

Comparison

Horizontal Reusability

Vertical Reusability



Summary

We need to focus on the Vertical Reusability while ensuring that the lower layers are made up of Horizontally reusable components. Although society has evolved in a fashion wherein we like to create our own implementations of something instead of building on top of existing but it is a choice based on how trustworthy is the reusable library or module.