Revision Control and off Site Backups

Repository servers are a really great tool. When I was developing Caps N’ Coins I was doing it solo, so a repo server was actually unnecessary. However I still chose to use one. The one that I have the most experience with is Mercurial. Mercurial is a great tool, it is primarily a command line application but Graphical User Interfaces for it to exist. Mercurial also has plugins so that it can be integrated with other development environments like Eclipse.

Mercurial, like Git, is a distributed revision application, and I do not use it properly what so ever. Every time I have used it either with the development of Project Cumulus or Caps N’ Coins I have used it as if it were client / server. I have a linux server set up with mercurial running and I push and pull changes to the server, never from any of the other developers directly. I have always assumed that I would like Subversion

These tools are great and when working with a team of developers you really should look into using one of these tools. With Mercurial you are able to see all of the changes that everybody makes to the code with each push, see what changes cause branches and you are able to do all of this securely. Mercurial is able to send and receive data over ssh so that all code changes will be encrypted before they are transmitted. This is a great thing if you are worried about security, as I am. I also have my linux server set up to use 2 factor authentication and Mercurial still works with this.

Getting mercurial set up to use ssh on windows is actually pretty easy, you just need to install Open SSH on your windows computer and then you can use the command

hg push ssh://user@server.com//path/to/repo

to push the change. You will be prompted for the password to the username you provided and if 2 factor authentication is set up you will also be asked to provide the pin.

One of the best things you can do on top of using a revision control system is to also make sure that all of your code is backed up in multiple locations. Having access to all of the changes to your code, that you have ever made, is great; but, it doesn’t help you if your hard drive is damaged or stolen. All of your code could be completely lost and all of your hard work would be for nothing if that were to happen.

I got into the habit of keeping my Mercurial repository in multiple locations. I have the repo on whatever machine I am currently doing the development on, and the server that I normally push the changes to. On top of those locations I have also recently started storing the repository files in cloud storage services. The three that immediately come to mind would be Dropbox, Microsoft Onedrive, and Google Drive. All of these services offer you multiple gigabytes of storage for free if you sign up, and they have applications you can install on your computer. A folder labeled for the service will show up in your “My Documents” directory, and whatever files you put in there will be sent to the remote servers and then you instantly have an off site backup.

The great thing is if you are concerned about security, as I am, all three of these services support two factor authentication using either sms or using the Google Authenticator app available for iOS and Android (there is a Blackberry 10 version that I use as well called Authomator). Revision control combined with off site backups could potentially save all of your hard work, get into the habit of using both of these things, you will be glad you did.

So it begins

Early 2014 I decided to finally stop being afraid and set up a gaming focused website along with some colleagues of mine. We had no idea what the real focus of the site was or how to go about doing it.

I was the only person who had any sort of programming experience so it was up to me to develop any customer software required. I have completed a post secondary education with advanced diplomas in Computer Programming and Computer Networking. I was confident that I would be able to manage the server just fine, but I had not done any significant programming in years as the job I got in I.T. was in the networking field.

Despite this, I set out to see what I could do. I had decided on wordpress as the CMS that would be used. It had the reputation of being the easiest to work with and it had a large selection of plugins to expand functionality quite easily.

I looked into twitter bootstrap after an old friend of mine recommended that I use it to build my front it. It seemed simple enough to work with so I downloaded it and I started poking around with it.

After playing around with bootstrap for long enough I felt it was finally time to actually start hooking bootstrap into wordpress. I, thankfully, found in incredible tutorial on building a responsive theme for wordpress at Team Treehouse and if it was not for that tutorial I do not think that I would have gotten very far with the development.

The tutorial was written for Bootstrap 2 and I was using Bootstrap 3 for my site, but I did not have any difficulty following the tutorial and just substituting in the bootstrap 3 version of the command the tutorial was having me complete.

According to my repository, I had been working for two and a half months before I had something that I felt was ready to show to the rest of the team. They were impressed with the work so we kept it.

Of course, as any creative person will tell you, you are never truly “done”. Every so often I find something that bugs me, or something that needs to be tweaked. This little project has been a great test of my skills and the best part of it is that it is going to continue to test my skills because what I have right now is not going to be the “Finished” version of the site, I am always going to need to add new features. This project looks like it will continue to be a challenge for some time to come.