Monday, April 23, 2007

Why to version control your projects?

If you have ever been involved in a group project in which the members work in the same set of files (like a software development project) you will probably have noticed the issues that appear almost immediately:
  • What is the latest version?
  • Is this or that feature already present?
  • Who did what?
  • Where have the changes I spent 10 hours working on last week gone?
  • How to conciliate my changes with everyone else's?
Some of these issues could be fought with a -very- well planned project, in which each member would have his responsibilities well defined and clear cut and little or no overlapping would exist with other member's part on the project.

In a typical software project this would mean at least a well defined set of classes and interfaces between them, a good UI prototype and very precise analysis documentation. Now, we know that in times of 'Agile development' this scenario isn't very common.

This kind of detailed planning takes time and resources that are often scarce.
On top of it, this theoretical 'isolation' of each member would be counter productive, since the developers would not benefit from the overall view of the application being developed and testing would become much harder to do during the development. It would not be a group project but individual projects brought together at some point.

Another option would be having someone to periodically (lets say daily) manually merge all the changes in a new 'base project' that would be used for further development. This is a time consuming task and very often requires deep understanding of the application being developed and technologies in use.

Well, there is a better way to do that and It's called version control systems. These systems are client-server applications that take care of serving the files composing a certain project to the people interested in it, pretty much like a shared network drive would do.
But unlike a regular network share, these systems keep historical data of the files stored there, meaning that once a file is sent to them, it will be there 'forever'. If the file is changed, the older version is archived and will be available at any time it's needed.

Version control systems also keep information on what changed from one version to another, who did the changes and helps on the process of merging new changes into the project.

The most popular version control systems are CVS (concurrent version system) and Subversion.
CVS is the most used but it's shortcomings had given space for the creation of Subversion, that is intended to work in a similar fashion but address CVS's failings.

No comments: