In a recently conversation I was told of a situation which I've experienced in the past and I'm sure others have as well.
While on holiday the code I'm responsible for has been modified by an external contractor. Before my holiday I pointed out that we should make sure version control is used by anyone making any change. It wasn't. Now I'm frustrated and pissed off. The problem isn't that someone else was editing the code, or that I somehow lost control of a fiefdom or anything like that. It's that I've just spent hours I could be using to do something else tracking down file modification dates and then diff'ing them against my versions out of version control. Time I shouldn't have to had spent doing anything The bigger issue is now I'm under pressure by my boss to deliver some changes at the same time as I have to deal with this, and no extra time has been allowed for it.
You pay contractors to do work for you, a large part of that should be to insist they do it in a way that is consistent with your working practices. You wouldn't let them commit changes to a PHP website in ASP, Perl or Python and equally you should insist that changes are delivered consistently and in a manageable format. Warning flags get raised if someone tells me they don't use version control. Not knowing how and asking questions is one thing; I have no problem helping someone, a contractors included, learn our version control system and practices because I see our relationship as a long term one, so any investment in that relationship is worthwhile. If a contractor tells me they cannot or will not use our version control system though, we have a problem and usually we end the relationship then and there. It may sound like a hardline call based on a single criteria but it is a deal breaker for me. For a contractor there could of course be some concern that they've submitted the work and may not be paid. Version control is not the cause of this - it's dishonesty, plain and simple and if the person you're working for is that dishonest submitting code via email before the cheque clears is equally risky.  

Some ground rules

Our most basic rule is commit at least once a day while you're working on the project. This is especially the case if the work is being done on a day rate, but also if the project was quoted on a fixed rate basis. We use the data to judge if a project is on time, we're completely upfront about why we want this: Knowing the current velocity for changes gives us a really good indication of where we are in the development cycle. With a current version committed to our repository we can just checkout, deploy and see. It removes the chances of miscommunication, misunderstandings and estimate errors. Committing early and often by contractors is much like releasing early and often to users. It allows us to make regular builds and run QA on the project. The benefits of this are that we can start to run our testing regime long before we would otherwise be able to test. We try to encourage external developers to follow similar methodologies to those we use internally, the primary goal of any new project is to make a deployable release as quick as possible, then add features to it in a sensible manner. This coupled with regular commits allows us to test features as they're added, not weeks down the line days or hours before the project is to go live.

Once bitten, twice shy

We've had a few projects in the past where we outside contractors for a variety of reasons failed to deliver on time. This has lead to our losing a follow up contract on at least one occasion we're aware of. By getting code committed to our repository we can see where a project is, and if necessary step in early with concerns about the deadline. Both daily commits and QA help immensely with this and all but eliminate estimate errors because we can have an honest objective conversation about how far we're going to miss milestones very early in the process because a miss becomes obvious when you can see the velocity. The earlier you can do this, the better your chance delivering on time.

Rules for some, but not others

Sometimes it doesn't make sense to go the whole forcing version control down someone's throat route. For some projects and changes we'll just bang a few files into an zip archive, email it and get the same back, then integrate it ourselves. It usually depends on the scope of the changes and how long they're likely to be working on the project in question. We would only work with someone familiar or willing to learn version control though, even in the above scenario they'd would have to be willing to use it if we'd asked them to. How have your experiences using version control with contractors gone? Post a comment and tell us about it! I think tomorrow I'll post a bit of more hands on article on setting up version control for contractors. I'll try to focus a little more on how to build, install and implement subversion with access controls. See you then.