Skip to main content

Command Palette

Search for a command to run...

Why do we really need Version Control?

Published
•3 min read•View as Markdown
Why do we really need Version Control?

Why Version Control Exists?

Those of us who have been studying and developing projects may not have heard about version control, but one thing almost every one of us has faced is the problem of managing a growing codebase while working on a project. The one thing we all can relate to real hard is how we change the file names like project_final.c, project_final_final.c, project_i_promise_it_is_final.c. It may have sounded funny, but it is not funny for someone who is trying to remember which version of his code introduced a major bug in the project. The idea of Version Control System or VCS was born from this very problem. The main reason for the existence of Version Control is to track each modification made to a project over time in a systematic manner.

Version Control System maintains a complete history of changes in the code where every update is recorded along with the information of who made the change and when the change was made.

The Pendrive Analogy in Software Development

Suppose a person, called Blaze working on an project. The project is quite big and the codebase is supposed to grow significantly over a span of few months. So naturally the codebase is bound to go through several versions. Let Blaze is using a pendrive to so store the entire codebase. Now, while the codebase is going through a version update, Blaze has two options, either he can keep on storing the versions while keeping the previous version stored or he can delete the previous version can keep the latest one.

If he chooses to keep all the versions, a lot of space in the pendrive will be wasted. If he chooses to keep only the latest version, and there is a major bug in the new code then there will be no way to revert to a previous version.

Also, pendrive can only store code. There is no way for it to track the change between versions or who modified the codebase. This becomes even more problematic in a collaborative environment. Suppose Blaze needs some help in his project, so he gives the pendrive to one of his friends, Shyam, and asks him to add some new features. While Shyam is working on the project, there is no way for Shyam to make any progress because the pendrive is no longer with him. And even if they both decide to work independently, a new problem will arise when they will attempt to combine their changes. There is no automatic mechanism to merge the modifications made by both.

Problems Faced Before Version Control Systems

Before the Version Control Systems came into the picture, developers relied on manual methods such as copying files to folders, external hard drives or pendrives. While it was somewhat manageable for small projects, these methods failed to manage large codebases. One of the most common issues that developers faced was version confusion due to multiple versions of code existing simultaneously on the disk with different file names.

Another major problem was the absence of any code change history. This led to the lack of accountability in collaborative environment. If the developers have no way to find out who is responsible for the change in codebase then there will be no fear of consequences as well.

There were also other problems like no scope for parallel development, risk of permanent data loss, inefficient use of storage, etc.

Conclusion

As software projects continued to grow in size, complexity, and team involvement, these issues became impossible to ignore. Manual methods could no longer ensure reliability, accountability or efficient collaboration. This made Version Control Systems just not only useful but also mandatory in modern software development.

More from this blog

blazethecreativedev

14 posts