To tell you the truth, I'm not sure of the origins of source control. But it is a good practice with a lot of merit. In the old days of DOS development, I would do things like backup my project whenever I started to do some new work on it. That way, if I really messed up, I could revert to where I started from and the only thing I lost was some time.
Have you heard about people that get in the kitchen, experiment, turn out something fantastic but are never quite able to duplicate it? They are in some ways operating without source control. They certainly didn't document what they did which makes it virtually impossible to recreate. But I'm sure master chefs have some sort of admin system worked out where they do experiment and have good documentation of what worked and what didn't. That way, they can roll back to a successful recipe and have happy customers.
Source control is quite a topic for developers. But datum number one is use source control. Even as a solo developer, there is much to be gained. In a team environment, it is absolutely essential.
Source control or version control or software configuration management are more or less synomyms for the same thing. Regardless of the product, there are two basic concepts that hold true. There is a repository, which is the vault where you source is kept. It is not only the current version of your source, but every single version of it from when you first created it. The other part is called the working copy and it is what a developer will have on his machine. So right away, there are two copies of the source code, making this infinitely more valuable than the case of no source control. If you have a team of developers, each one will have a copy on their computer, so now your source code is widely disseminated among several computers. It is unlikely that you will ever lose much source code in this way - and we haven't even talked about backup processes.
The other thing about source control is it gives you some confidence. You can trash your working copy completely and then just checkout again and you are set to go. The working copy is not sacred at all. In fact, do whatever you need to do. When you have it working correctly, you then check in or "commit" your changes and the repository is updated with the latest bit of your work.
Having a central repository also enables you to perform regularly schedule backups. The source is all in one place and most source control systems have an easy mechanism to backup the repository.
What do I use and why? I am using Subversion, which is an open source product. The price is right (free) and it seems to be very well regarded. I did not do an exhaustive search but this product in my own test drive, did everything I figured I would ever need to do. Also, I did not want to spend a lot of money. I have Microsoft's Visual Source Safe (VSS) and played around with it. But I didn't much care for some of the public experiences with it, most notably being that it is apparently very slow over a network. In fairness to Microsoft, the source control system with Visual Studio 2005 is supposed to work well over the wire. But there were problems at one time with repository data corruption and this is something I am not able to risk. With all the accolades that Subversion has gotten, I figured I would at least learn it well enough to get some good experiences with it and if it didn't work for me, I could always go to something else. It has done well for me. Perhaps the only thing I'm not crazy about is the setup that is involved for remote access of a repository. It seems the easiest way to do this is to use the Apache server, which I did not want to do. But installing Apache is actually not that difficult and setting it up to run side by side with IIS is also straightforward (hint - just use different ports!).
Where should the repository go? Well I like to put it on its own computer or own drive. Right now, I am using a 400GB Buffalo Link Station. This is a very smart hard drive that has a linux kernal in it and has some nice configurations for security and users. It can be accessed by drive letter or FTP. And using the Apache Server on a PC, you can access the repository through a web browser. So it's pretty useful. I can also plug in another drive to the link station through a USB connection and then backup that way or just make it a larger drive.
Source control is very useful for a lot of things besides software development. You can version word documents, excel, anything where you want a record of its complete history. It's quite useful in that regards. I use it for HTML websites, so I can version what the website looked like at various times during its history.
Anyway, use source control and improve how you do business.
Comments