A Short Story About Versioning (aka Get Your Shit Together)

Joined
Feb 24, 2016
Messages
23
Likes
22
Degree
0
Joe is your (slightly above) average internet marketer. He has a couple of successful sites that are making him money. Most of them are Wordpress and are on a cheap shared hosting site with cPanel. If he needs to change something, he just uses FTP to update a template, plugin etc.

Are you Joe? Then keep reading.

One day Joe is editing a template and he accidentally messes up something. He already had the file he was working on customized a lot so he can't just go back to the original file. He ends up spending the better part of the day fixing everything until the site is finally back online and looks like it did before.

But Joe does not learn his lesson. He tells himself that he will be more careful next time and promises to himself that he will create a backup before he starts doing changes.

Things go well for a while for Joe and money keeps coming in.

A couple months later the SuperSEOMaximumConversionKiller Plugin that he installed gets bought out by a sketchy guy. There is an update and suddenly there are backlinks to Viagra sites appearing all over Joe's website.

After spending multiple days to find out what happened and how his site was hacked, he removes the plugin. He spends another two days to find all the spammy links. He is exhausted after this week but he is happy that he fixed the website, even though he had to neglect his daily business for a while and lost some money. He goes drinking over the weekend and hopes for a better next week.

When Joe comes home drunk, he has a quick look at his website and notices that all the links are back. He rages for a while and some furniture was or was not destroyed.

What happened? The plugin added hidden encrypted code all over the website that reactivated the hack.

Joe spends a lot of money to hire a developer named Fred who skims through the whole code and fixes everything. Joe is lucky that he found Fred who also happens to tell him how to set up things properly to avoid such a mess in the future.

Fred tells Joe that first he needs some version control. So he sends him to the github tutorial that explains everything (https://guides.github.com/activities/hello-world/). But because Github doesn't offer unlimited private repositories, he recommends Bitbucket (https://bitbucket.org/) to him instead for his websites.

So with the help of Fred, Joe is able to set up a separate git repository for each of his websites and he syncs that with a private Bitbucket repository.

This allows Joe now to track all the changes to his code and he has a backup on Bitbucket. If a change breaks something, he can just revert to the old code. If something else modifies the code, all the changes will be visible. So if Joe ends up in a similar situation he will be able to fix it much faster, promises Fred to him.

Fred also tells Joe that this will only help with changes to the code. He highly recommends to him that he sets up a regular automated database backup separately.

Joe can sleep much better now. Fred also mentioned a few more improvements to him, but they will have a look at those at a later date.
 
Fred tells Joe that first he needs some version control. So he sends him to the github tutorial that explains everything (https://guides.github.com/activities/hello-world/). But because Github doesn't offer unlimited private repositories, he recommends Bitbucket (https://bitbucket.org/) to him instead for his websites.

You can host as many repositories as you like by using gitolite (http://gitolite.com/gitolite/index.html). Get a cheap VPS and be your own github. I've been using this method since around 2008 and have set it up for quite a few clients since then. Uses SSH keys for access control and works very well, even for large scale projects.

What surprises me is the amount of people I still see out there doing dev work professionally, some on a pretty large scale for "big budget" clients, and not using some kind of revision control system (I see this all the time). To me, it's kind of like a bank that is "going to get around to getting a safe one day".
 
You can host as many repositories as you like by using gitolite (http://gitolite.com/gitolite/index.html). Get a cheap VPS and be your own github. I've been using this method since around 2008 and have set it up for quite a few clients since then. Uses SSH keys for access control and works very well, even for large scale projects.

There is also Gitlab (https://about.gitlab.com/) if someone prefers a self hosted solution.

But I think Bitbucket does the job for most people and no there is no setup/hosting required. I use it for all my personal private projects (the public ones are on github). Since bitbucket is free for up to 5 users, it should work for most people. If more is needed, I would just pay a little to either Github or Bitbucket to upgrade the account.

Personally I would rather not spend the time and worry about setting up something myself. Just adds unnecessary overhead in my opinion.

What surprises me is the amount of people I still see out there doing dev work professionally, some on a pretty large scale for "big budget" clients, and not using some kind of revision control system (I see this all the time). To me, it's kind of like a bank that is "going to get around to getting a safe one day".

Same... The things I've seen... Even with companies that look professional from the outside.
 
Nice! This is the same methodology used to manage a virtual desktop environment (VDI). Versioning is so crucial when making changes on the fly. You could just go back and fort between test/maintenance mode and only commit to production when ready to merge all versions.
 
Back