If you’ve ever used Google Docs before, you may have noticed that every few seconds a version of your document is saved. Is that overkill? Probably. Is it necessary? Absolutely! You’ll never know when you might want to go back to a version of your document that’s a minute old, an hour old, 6 months old. The same idea holds true with your code!
I wanted to take a moment to remind all you developers out there, even those of you who are burning the midnight oil after work on hobby projects, how important it is to use some sort of source version control for your code. I would hope this would be a no brainer for those of you working in a team environment. If you’re not already using version control (i.e. – Team Foundation Server, SourceSafe, Subversion, etc) in that scenario then you better set something up immediately because you’re in a world of hurt if you lose code from a computer crash or an accidental file copy. Not only is it bad for you but it could be detrimental to the team and the company.
Ok, now, since source control is so important for teams, the question then becomes how is it important for solo projects? My response to that is easy. The reasons an individual would want to use source control are the same reasons a team would want to use it:
- Code repository/backup
- Version history
- Rollback code changes
- Feature branching/merging
The list could go on and even though you might think, “But Derek, I’m just working by myself. Why would I even bother going through the hassle of using source control?” know that the first time you lose a vital piece of code because of a hard drive failure or want to find out what the code looked like for a method a year ago that’s since been changed, you’re going to be swearing up a storm.
Free Hosted Source Control
We’ve got the reasons for source control out of the way lets figure out how we can add it to your current project. Think it’s a difficult process? Absolutely not! Not only is it easy to start using versioning, the best part is there are so many source control hosts which don’t cost you a penny! Below I’ve listed just a couple of the many web sites offering free source control hosting. As an added bonus project management abilities too so you track requirement documents, work items and bugs! You can host your project online so that you can work on code from multiple locations and/or with multiple people from all over the world.
- Codeplex (http://www.codeplex.com) – this site offers source control with Team Foundation Server, Mercurial or Subversion. Great for Visual Studio developers and now that TFS has a plug-in for Eclipse, many languages not native to Visual Studio such as PHP, Java, Python, etc can be integrated with ease.
- Project Hosting on Google Code (http://code.google.com/hosting/) – project hosting has been offered by Google for quite some time and is very popular in the open source community. They support Subversion and Mercurial version control.
- Gitorious (http://gitorious.org/) – Git is a relatively newish source control system that the developers claim is extremely fast. I haven’t had a chance to use it but I’ve read good things about it.
So those are just three hosting sites of the many existing solutions out there. Bottom line, if you’re not already using source control, sign up for one of those sites and give it a try. You can also download a version control application such as Git or Subversion and run it off your local computer. Either way you choose, you’ll find out pretty quickly all the benefits you’ve been missing.