Skip to main content

Command Palette

Search for a command to run...

Why Version Control Exists: The Pendrive Problem

Published
5 min readView as Markdown
Why Version Control Exists: The Pendrive Problem

In software, Version Control Systems (VCS) are the "Save State" and "Time Machine" of development. They exist because humans are messy, collaborative work is complicated, and "oops" is the most common word in a programmer's vocabulary.

The Pendrive Analogy: "Manual Versioning"

Before tools like Git, developers lived in the chaotic era of file management. This is the heart of our Pendrive Problem.

The "Final_v2_REALLY_FINAL_PLEASE🙏" Syndrome

Developers used to manage versions by physically copying files. You’ve likely seen this folder structure:

  • project_alpha/

  • project_alpha_backup/

  • project_alpha_final/

  • project_alpha_final_v2_donot_delete/

Below is a… sample of how I used to save my own files before learning git.

The Workflow in such cases, where git was not used, was like this:

  1. File Transfer: You finish a feature, zip it, and put it on a pendrive or email it to your project lead.

  2. The Merge: The lead has to manually look at your code and their code, side-by-side, and try to copy-paste the differences without breaking anything.

  3. The Conflict: If two people edited the same file, the person who saved last usually won, effectively deleting the other person's work.

This neither solved the collaboration problem nor the problem of version control. If you still think this is an overrated problem, let’s go through a few scenarios where things took a turn for the worse:-

  • The Overwrite Disaster: Person A and Person B both download login.php. Person A adds a "Remember Me" checkbox for some future addition. Person B fixes a security bug. Person B uploads their version five minutes after Person A. The "Remember Me" feature is now gone forever.

  • The Mystery Bug: A feature worked perfectly on Tuesday but broke on Friday. Without VCS, there is no way to see exactly what lines of code changed in those three days or who changed them.

  • Zero Accountability: "Who changed the database password to '12345'?" In the pendrive era, no one knows.

  • The Fear of Experimenting: Without a "Time Machine," developers are afraid to try new ideas because if the experiment fails, they might not be able to revert the code to its previous working state.

Such problems turned team collaboration into a hellish experience, especially in large teams. These are not the only problems faced while collaborating with a team, such as:-

  • Concurrency & Time efficiency: Teams need to work on the same codebase simultaneously, they cannot wait for 1 member to finish their feature first and only then can someone from the remaning team members would be able to start their work. This would slow the speed of work done to an abysmally slow rate.

  • Code Review: Without a VCS, there is no central place to comment on code before you send it to others, which means that unless they ask you about what changes you have made, they will have to manually skim through the code base.

The solution

After going through such processes, the software developers decided to create something that could effectively help them overcome such issues, and the answer to that was VCS, i.e., Version Control System. There are many version control systems in the market today, the most commonly used is git, and a few common ones are: CVS, Subversion (SVN), and Perforce

Version control moved us from 'defensive coding'—where we spent 40% of our time just trying not to break each other's work—to 'offensive coding,' where we can iterate fast, fail safely, and collaborate globally.

With help of tools like github, which act as the cloud repository of local git repositories, which help us collaborate with others.

Zoomed view

This file structure helps us understand the code much more easily and helps us see how the code changed over time and now you can compare the image above and this, while being happy how VCS is such a boon.

💡 Fun Facts

  • The "Git" Origin Story: Linus Torvalds, the creator of Linux, wrote the first version of Git in just two weeks in 2005. He did it out of frustration because the existing version control tools were too slow for the massive Linux kernel project.

  • What's in a Name?: "Git" is British slang for an unpleasant or "pig-headed" person. Torvald jokingly said, "I'm an egotistical bastard, and I name all my projects after myself. First 'Linux', now 'git'."

  • Market Domination: According to the 2023 Stack Overflow Developer Survey, over 93% of developers use Git. It has effectively become the universal language of code collaboration.

🧠 Trick Question

Q: In the "Pendrive Era," the person who saved last usually won (overwriting the previous file). Does Git automatically accept the newest version if two people edit the same line of code?

Conclusion: From Chaos to Confidence

If there is one takeaway from the "Pendrive Era," it’s that software development is 10% writing code and 90% managing chaos. The "Pendrive Problem" wasn't just about losing files; it was about the anxiety of knowing that one wrong "Paste" command could wipe out a week of work.

Version Control Systems like Git didn't just replace pendrives; they fundamentally changed our psychology. We stopped hoarding "Final_v2" folders out of fear and started branching out with confidence. Whether you are a solo developer working on a side project or part of a massive team, VCS is your safety net, your time machine, and your ultimate undo button. So, do yourself a favor: ditch the zip files and git init.

Happy Learning!