Skip to main content

Command Palette

Search for a command to run...

Version Control System : Bob's Saviour

Updated
•6 min read•View as Markdown
Version Control System : Bob's Saviour
🤔
Let’s explore the world of Silent Bob the Builder

Bob is a builder who can't communicate with other builders and is tasked to build a house. Bob starts developing, builds the guest room, the dinning area, moves onto building the bed room but now encounters a problem. Bob was tasked to build symmetrical windows throughout the house but forgets the dimensions of the windows in the Guest Room, now he needs to go back and measure them again, same happens while building bathroom.

Problem : Bob doesn’t keep record of his work

Solution → Bob asks Uncle Roger the Cameraman for help.

Now whenever Bob wants to make a record of his work after completing his task he marks the area with a Yellow tape. Whenever Uncle Rogers sees the Yellow tape he takes a snapshot of the area/Bob’s work and stores the record in his Private Album. Now Bob can always ask Uncle Rogers to look through his private albums for any previous records.

In the above story :

Bob (Builder) → Developer
Uncle Roger (Camera man) → Version Control System (VCS)

Why does Version Control System Exist?

A VCS as the name suggests is a system that is used to track and manage changes made by the user in their Codebase. It allows the user to collaborate with others & gives user the functionality to see the past history of their code and go back to an older version of their code they saved as a checkpoint. It also allows the user to code in a different dimension to implement a new feature/fix a bug and then merge that to the original timeline.

Example - Imagine each Bob develops a window in the Garage and takes Uncle Roger’s verification whether it will fit or not. While developing the window in the garage the main house remains unaffected and after they are sure that it’s good they can fit it inside the main house with Uncle Roger’s help.


Problems Faced By Developers Before VCS

To understand the issues Developers faced without Uncle Rogers we will continue without him.
The story continues…..

→ Bob now wants to build kitchen but doesn’t know how. He asks help from Bob2 to build the kitchen.
→ Bob2 agrees. Bob2 starts building kitchen.
→ Since kitchen has parts like Gas Pipeline, Chimney, etc. that occupy the whole layout of the house, Bob has to wait.
→ Bob2 finishes building kitchen, Bob starts working on the Living Room.
→ Bob2 realises he made a mistake. Bob2 starts fixing it. Bob’s work is on hold again.

Problem : Bob & Bob2 can’t work together on the house at a time.

  1. The Pen drive Problem

The above story tells us the story of how development with multiple developers was without a Remote (Common) Server. Earlier Developers used to convert their whole codebase into a Zip file, transfer it to a Pen Drive (or mails) and then send those to the other developers. This process repeated between developers while the others waited for their turn to receive the code through pen drive and actually contribute.

Zoomed view

In real world it is akin to a developer waiting for an email containing a .zip file they need before they can start their workflow. It is slow, more chances of having error and disrupts the workflow.

The story continues…..

→ Bob gets frustrated of waiting
→ Bob takes matters into his own hands and starts building the Living Room.
→ While making room for the living room window in the wall he accidently hits a Gas Pipe.
→ Next day when Bob2 arrives he sees a broken pipe but can’t find the culprit since there are no records of Bob working on the project since no Uncle Roger is on the site.

Problem : When Bob & Bob2 tries to work together they end up sabotaging each other.

  1. No History, No Accountability

Without Version Control, there is no history, We basically have no “Undo” Button for the entire project. Once a mistake is made and something is lost, then it will be lost forever. We will be left with no choice but to redo everything from memory.

The story continues…..

→ Bob and Bob2 realises they can’t work together. They start making their parts separately instead of making it in the main house. Once a part has been made they put it in the main house.
→ Bob2 starts working on chimney duct and Bob starts assembling the AC to be put up in the living room.
→ Bob assembles the AC and put it in the living room.
→ Bob2 finishes duct assembly and when comes to place it, he sees that the AC has been put in its path.
→ Now Bob2 will either remove AC, or find a different place for duct or find a work around that puts both.

Problem : Bob and Bob2 don’t share their plans, hence they end up sabotaging each other ideas and losing one’s progress

  1. Merge Hell and Loss of Data

It is quite a common situation in the modern software development field where changes from one developer conflict with each other during the time of merging. Till this date all these merge conflicts are resolved manually thats how important this issue is.

The story continues…..

→ Frustrated of the sabotaging Bob2 decides to build an exact copy of the house next door completing the kitchen and labelled it “House_Final”.
→ Bob realises there were some uncompleted changes left in the living room, so he completes them and makes a new copy of the house “House_Final_v2”.
→ A new developer is hired to make the Bathroom who after finishing it labels the house as “Final_House”.

Problem : Waste of manpower by Bob and Bob2 by building Useless Prototypes like “House_Final”, “House_Final_V2” ,etc.

  1. The “Final_V2_Real” Syndrome.

In this problem instead of having one file, folder that one should directly be able to refer to, they are served with a mountain of final files. Now the developer needs to go through each one and find the one that aligns with what he need. The developer needs to waste their extra time finding the file that has the right blueprint for the bathroom pipes to make and adjustment in it.


Solution to above Problems →

Uncle Rogers and his Bulletin Board. (Version Control System)

Our Poor Bob’s hardships can easily be resolved with the help of Uncle Rogers.

  • Uncle Roger helps Bob keep track of his work and also ensures that everyone is caught up with the current progress by updating the Common Bulletin Board with snapshots of the latest updates, making sure everyone is caught up to the current updates.

  • Uncle Rogers keeps all the snapshots in an ordered fashion, noting the timestamp, a message for each update and other details with it to keep his collection fair and secure.

  • Uncle Rogers allows the creation for only one house and keeps the snapshots of all the previous changes in his Secret Album.

  • Uncle Rogers also makes sure that no one is inserting a part that has already been updated. We will discuss more about the role of Bulleting board in later parts.

    Version Control System (Uncle Rogers) exists so the developer doesn’t have to pay mind to above mentioned problems and focus on the code development. VCS maintains our codebase allowing us to track files and collaborate with others, these systems are essential for Software Development.


More from this blog

Working With Code

13 posts