Consider this: You own a small web design and development shop. Maybe it’s just you and a couple of other people. Because of your size, you rely heavily on outside subcontractors. Subcontractors allow you to take on more projects, make more money, and scale your business carefully. Managing even a few contracted workers is challenging. At some point, you will hit a rough patch where subcontractors don’t deliver on time, don’t meet your quality standards, or—at worst—disappear and never complete the job. Proper vetting, solid references, and hands-on management can help. Technology can promote teamwork and keep projects in check. Enter Subversion.
Subversion connects and promotes collaboration
Subversion (SVN) is a version control system that allows you to track and store code changes, collaborate, and share project files. It’s very easy. You write some code and “commit” it to your Subversion repository (the storage place for all of your project files). People on your team can grab those files, view your work, make changes, and then commit those changes to the SVN repository. Each commit is considered a “revision.” SVN tracks revisions and assigns them a number, so you can always roll back to a previous version of your work.
Visibility is a good thing
Subversion also keeps everyone on your team involved in the project: commits and project changes become visible as they are made (see The Tools You Need, below). If you have solid subcontractors this just provides peace of mind, but if you have someone new it allows you to catch any misunderstandings, project issues, and coding mistakes before it’s time for the subcontractor to deliver the work.
Make it mandatory
If a subcontractor wants to do business with your shop, make your workflow and toolset mandatory. Differing workflows can burden a small company—especially client services companies.
Some subcontractors may want to email .zip files of their work or may post it to a remote server for you to download and view. This is a nice arrangement but it puts your project assets and code out of your hands and into those of someone outside your organization. Effectively, you lose control of the project. What’s the solution? Adopt SVN as your workflow. Besides the normal benefits of versioning and allowing multiple people to work on the same code at the same time, SVN keeps your subcontractors accountable and the project code and files for your clients in your control and possession.
As the subcontractor’s employer, you have every right to stipulate deliverables, the tools used, and how and when the work gets done. Your subcontractors will appreciate a solid workflow and know that you have your act together.
Are there exceptions to this rule?
A process shouldn’t be enforced just because it’s the process. Depending on the subcontractor’s level of responsibility, you might decide you don’t need to include them in your Subversion workflow. You’ll know it when you see it.
Everyone uses Subversion differently. Some people like to commit their project changes dozens of times per day. Others prefer to work through their projects and only commit their changes at the end of the day. Much depends on the type of project you’re working on and whether or not you’re working with others on the same code. I’ve found that the closer the project comes to completion, the more changes that take place over a short period of time. At that stage, I commit my changes to Subversion frequently.
Set expectations on how often you expect to see updates from your subcontractors. I recommend a minimum of once per day while they work on the project.
The good and the bad
Certainly there must be more to this than just creating more administrative work for yourself, right? Of course. You gain the ability to measure the quality and quantity of work your subcontractors complete within a given amount of time. This instant visibility on productivity benefits you and your subcontractors: you don’t have to nag them to complete work while they’re integrated into your workflow.
Subcontractors may be concerned that this arrangement may lead to having their work used without compensation. If you always have their latest code, what stops you from taking it and not paying them? Subversion itself doesn’t create this situation, though—dishonesty can happen in any workflow arrangement. Make sure your contract clearly defines the deliverables and payment terms. There are plenty of resources online on how to create a contract and structure it so you’re protected. If you’re not currently using a contract for work you subcontract, get up, go sit in the corner, and think about what you’re doing.
The tools you need
Refer to Mike West’s article I Wonder What This Button Does to get started and learn the basics of the version control system. In addition, O’Reilly’s Version Control with Subversion is an excellent (and free) resource. Be sure to read the chapter titled Fundamental Concepts for a good overview of the SVN workflow.
On its own, SVN can be daunting when attempting to manage multiple users with different permissions. For example, you probably want a subcontractor to have access to only a single project (the one she’s working on) and not to your entire repository. To facilitate simple SVN repository and user management, I recommend Warehouse, a web interface to Subversion, by Active Reload. Warehouse allows you to easily manage repositories, see changes and—most importantly—add users and set access permissions. User management in Subversion can be tedious—this abstraction layer makes it simple to add or remove users. It also provides RSS feeds of repository changes, so you and your team can see which project files are being worked on and any changes that took place. There are also hosted solutions, such as Beanstalk, that will host your SVN repository for you and include a web GUI for managing it.
While I strongly encourage people to first learn how to interface with SVN using the command line, you can also try out the new Mac OS X application Versions (currently in beta). It provides a GUI to most of the SVN commands.
Hooking into your current workflow
Adding Subversion in to your current workflow doesn’t have to be a jarring event. With the right skills, you can hook SVN into your project management tools. SVN provides “hooks,” which are “repository events” where SVN will fire off any custom scripts you write. One example of this would be a script that would post a new message to 37Signals’ chat application Campfire every time you commit a change to your SVN repository—alerting your co-workers to changes you made. A Google search will reveal many other scripts written for different tools, including ways to integrate the project management tool Basecamp with SVN.
There are several different types of hooks but the most commonly used is the “post-commit” hook, which triggers scripts after a successful commit. Using SVN “hooks,” the ability to work SVN into your current workflow and toolset is nearly limitless.
Why are you still reading this?
Subversion is not just a great way to version and control the code and assets for your projects but also an effective method of controlling and refining the interaction between you, your co-workers, and your subcontractors. Do yourself, your company and your subcontractors a favor; get your SVN workflow up and running today.