~/src/www.mokhan.ca/xlgmokha [main]
cat version-control.md
version-control.md 3560 bytes | 2020-08-03 10:45
symlink: /dev/random/version-control.md

Version control

“This was his computer. We think the code is on here somewhere. Can you find it?”

First day as a professional programmer. Sergio had interviewed me, hired me, then quit the week before I started.

The disaster

Sergio built gift card software for Hypercom terminals. Sold the company to Data Shapers. Then quit when new management sucked.

He took with him:

  • Where the source code was
  • How to build it
  • How to deploy it
  • Everything

No version control. The entire codebase lived on his computer in random folders with no documentation.

My job

Instead of programming, I became a digital archaeologist:

  1. Find source code buried in random folders
  2. Figure out how to compile it
  3. Port to Ingenico terminals without understanding anything
  4. Deploy old versions for existing customers

Hired as a developer, spent weeks as a detective.

What version control fixes

Version control isn’t backup. It’s the foundation of professional software development.

Without it:

  • You don’t know who broke what
  • Multiple people can’t work on the same code
  • Mistakes are permanent
  • You can’t maintain old versions
  • Knowledge dies with people

Basic approaches that don’t work:

  • Dated folders (project_v1.1_final_FINAL.zip)
  • Shared drives with “coordination”
  • Email attachments
  • USB sticks Why these don’t work:
  • No history of who changed what
  • Merge conflicts are disasters
  • Can’t work on the same code simultaneously
  • Lost work when files get overwritten

What version control gives you

Git is the standard. It’s distributed, which means every copy has the full history.

Before version control (my experience):

  • Afraid to change anything
  • Lost work constantly
  • No idea why code existed
  • Manual coordination hell

With version control:

  • Change anything, roll back if needed
  • Clear history of what changed and why
  • Multiple people can work simultaneously
  • Use git bisect to find bugs

If Sergio had used Git

My first week would have been:

  • git clone instead of hunting for files
  • Read commit history instead of reverse engineering
  • git log and git blame to understand code
  • git tag for releases instead of folder chaos

The lesson

Version control isn’t optional. It’s the foundation that makes everything else possible.

Don’t learn this the hard way like I did.