DEV Community

Cover image for Why Version Control Exists: The Pendrive Problem
Vicky Gupta
Vicky Gupta

Posted on

Why Version Control Exists: The Pendrive Problem

Firstly you might be wondering what is a VCS(Version Control System), lets say you are writing a code and in that code you add a feature, fix a bug, then if a problem occurs after doing these changes how will you go back? Imagine if had checkpoints in code like games wouldn’t it be too good, that’s what VCS overall does. In this blog you will get an detailed overview of VCS.


Why Version Control Exists

In the past, when people coded, they often faced the problem of tracking their code and getting help from others to improve it. For example, if I was writing code for a product and needed to hire an intern to add features, I had to send the code files through mail, drive, or using a pendrive with folders like final final-v2 etc. This process was very messy.

When working in team, there was problems such as :

  1. Overwriting Code : If i am trying to fix a bug, and i can’t do it i will share the file to someone else like bug_fix1, then another person will figure out the bug and will try to solve it but while fixing it he might repeat some lines i already wrote to fix the bug.

  2. Loosing Changes : While fixing a bug, if another bug pops up you don’t have an option to go back.

  3. No Collaboration History : Who made a specific change in the code is unkonwn.

Then comes VCS(Version Control System) : a code tracking system that kept the history of all the changes done in the code by everyone, this also helped in better collaboration of people.

The Pendrive Analogy in Software Development

The time before VCS, when there was no version control, no tracking of code people used to share the codes using pendrives and had to tackle with folders like final_v2, let’s say i give my code to my friend in a pendrive then he works upon it and give me back the folder like final_final_v2.

Problems Faced Before Version Control Systems

With no shared tracking system there were many problems like :

  1. “Who has the latest file” : In collaboration many people have their own version of code, with no source of truth

  2. “I fixed it yesterday” Problem : without version history nobody can prove anything properly, like - this bug was not there yesterday - you broke it - overall blame game becomes strong

Conclusion


The pendrive workflow might workout with 2 people, but when there are 10s or more devs then it becomes pure chaos that was very hard to control. So VCS solved not only the tracking changes problem but also made the collaboration way better, that is why for single source of truth VCS is handy

Top comments (0)