RSS Feed

New Adventures in Software


Visual SourceSafe: A Public Service Announcement

Posted in Software Development by Dan on May 23rd, 2008

Something bothered me about my previous post espousing the virtues of Hudson:

Out-of-the box Hudson supports CVS and Subversion repositories. Plug-ins extend this list to include Git, Mercurial, Perforce, ClearCase, BitKeeper, StarTeam, Accurev and Visual SourceSafe.

In this supposedly enlightened age, why would it be necessary for anything to provide support for Microsoft’s Visual SourceSafe? VSS has never been a good option for revision control. Even before the emergence of the likes of Subversion, Mercurial and Git, there have always been better free solutions available.

The fact that people still use VSS in 2008 scares me.

Trawling through the archives, I cannot believe that I have never written about VSS in this blog. It’s one of my favourite topics. Other tools and libraries that I have ranted about are shining beacons of virtuous software in comparison. I’m not particularly anti-Microsoft. If you choose to use Windows, or Office, or IE – fine. But a decision to use Visual SourceSafe is not one that can be defended. Too often it gets picked because it comes bundled with a Microsoft development subscription that has to be paid anyway:

“Well, we’ve paid for it, so we might as well use it.”

“After all, something we paid for is going to be better than something free, right?”

No. No. No. DO NOT USE VISUAL SOURCESAFE FOR ANYTHING. Ever.

How Bad Can It Be?

Visual SourceSafe and I go back a long way. In my first job out of university, we used VSS. I had not been exposed to version control systems before. They don’t teach source code management in universities (despite it being arguably the most important tool for professional software development).

I got on fine with VSS. It seemed to do the job. Sure it was slow, but we could wait. And it only worked on Windows, but we were all running NT 4.0 anyway. And sometimes the repository would get corrupted, but we had backups. And we couldn’t easily check out two working copies of the same project on the same machine, but we could work around this. And the exclusive checkout model was a bit restrictive, but it seemed to make sense and we could just take turns editing the crucial files.

Then somebody insisted that all future projects would use CVS. This was bad, or so I thought. VSS had a reasonably friendly GUI, albeit with a few odd quirks. CVS had the intimidating CLI or some really awkward GUIs (it was a while before I would discover the excellent SmartCVS). All that merging and branching was very complicated too. Surely that wasn’t a good idea? But after a period of complaining I came to respect CVS, even though it would sometimes tell me “I HATE YOU“. It had quite clearly evolved via the Sticky-Tape and String school of software development, but it worked pretty well.

If CVS was a product of the Sticky-Tape and String process, then Visual SourceSafe was born of severe brain trauma.

“Visual SourceSafe? It would be safer to print out all your code, run it through a shredder, and set it on fire.” – (Attributed to an unidentified Microsoft employee).

Masquerading as a serious professional tool, VSS exhibits a staggeringly inappropriate architecture. There is no server process for VSS. Everything is based on Windows file-sharing. This obviously has serious implications for security. Client software is trusted implicitly. It also explains the poor performance and susceptibility to repository corruption. Everything is stored on the network share, even the dimensions for each user’s VSS Explorer window (there is nothing to stop you from editing your colleague’s local preferences in the shared .INI file). Maybe if you have a fast, reliable network, daily backups, and you’re very trusting, you can use VSS without major problems. Maybe.

It Gets Worse

That of course assumes that you don’t need to access your source code remotely. Unfortunately, my pre-CVS days were not the last time that I encountered SourceSafe.

I later joined another company who hadn’t got the memo. At least this time we had a solution for remote access. I say “solution”, it was more a proof-of-concept. By “proof-of-concept”, I mean that somebody saw it working once. Probably.

Clearly we couldn’t just expose the network share on the Internet, so the idea was to establish a VPN connection to the office and then use the VSS client normally. Even with a broadband connection this was intolerable. The inefficiencies of SourceSafe were not always apparent on a 100Mb LAN, but they were all too obvious over ADSL. Since people were usually not away from the office for more than a couple of days at a time, it was easier just to plan your work in advance and check in your changes when you got back (just make sure nobody else is going to need to edit the same files while you are away). To add insult to injury, we were increasingly developing for Solaris. We couldn’t access SourceSafe from the Sparc machines, but at least we had scp to bridge the gap.

Anyway, to cut a long story short, we eventually ditched VSS in favour of Subversion, but not before I discovered my two favourite “features”. Perhaps the most entertaining is the timezone problem. If you have clients in different timezones (or even on the same LAN but with clocks out-of-sync), when one client checks in a change from “the future”, the other can’t see it until its clock has caught up.

The other problem is that, once you have deleted a file, you cannot then re-add another file with the same name in the same location without purging the history of the first file. This situation will happen at least once in the life of a project (after all, developers sometimes change their minds). Once you have purged the history of the original, you then cannot retrieve a complete snapshot of the project for any version that included that file. That point is worth emphasising:

VISUAL SOURCESAFE DOES NOT MAINTAIN A HISTORY OF ALL COPIES OF ALL FILES UNDER ALL CIRCUMSTANCES.

And really, if that’s the case, why bother with version control at all? Even ignoring the several other problems, SourceSafe is not fit for purpose.

Use Subversion, use Git, buy Perforce, buy BitKeeper, even use CVS if you must (though Subversion should be considered first). Just don’t use Visual SourceSafe.

NOTE: In the interests of accuracy, it is worth mentioning that my experience is primarily with version 6.0 and earlier of SourceSafe. Visual SourceSafe 2005 introduces a server process as a helper to address some of the issues, though it is really just papering over the cracks as the underlying architecture remains. It is also worth noting that there are 3rd party add-ons to SourceSafe to improve the remote access situation. But why pay for a patch for a defective version control system when you can get one that works for free?

9 Responses to 'Visual SourceSafe: A Public Service Announcement'

Subscribe to comments with RSS

  1. evensonic said,

    on May 23rd, 2008 at 10:40 pm

    I agree 100%. I’ve been amazed for years that you don’t see more rants against VSS. Hopefully it’s because VSS simply does not register on most developers’ radar. But the evils of VSS must be told to help save the naive from thinking it is a legitimate choice for version control.


  2. on May 24th, 2008 at 11:01 pm

    [...] New Adventures in Software » Visual SourceSafe: A Public Service Announcement – “Visual SourceSafe? It would be safer to print out all your code, run it through a shredder, and set it on fire.” – (Attributed to an unidentified Microsoft employee). [...]

  3. GrokCode said,

    on May 26th, 2008 at 6:40 pm

    Ughhh Source Safe. Just hearing the name brings back terrible memories. Repository corruption before big milestones. Loosing history rebuilding the repository. Again. Its the most benighted pile of steaming garbage I’ve ever had the misfortune to work with.

  4. Dan Howard said,

    on May 26th, 2008 at 8:56 pm

    I recently had this discussion with one our company partner’s developers. He said the new VSS 2005 is much better. Whatever that means.

    I never used the new version but the old one VSS from Visual Studio 6 has other pooines as well. It merges on commit and creates directories in UPPER case when you import. Total garbage – and it is sad that people still use and defend this junk.

  5. Brian said,

    on May 26th, 2008 at 9:53 pm

    Lol, I too once thought VSS was good. Ah the innocence of youth. I experienced every one of those “features” you mentioned and I laugh about them now. I can’t believe people out there still use VSS….

  6. Blake said,

    on May 26th, 2008 at 10:12 pm

    “They don’t teach source code management in universities (despite it being arguably the most important tool for professional software development).”

    They taught us CVS and SVN at the University of California, Irvine.

  7. Rodger said,

    on May 26th, 2008 at 11:52 pm

    I think the view from MS is to use (if your going to) SourceSafe as a starting point for the single developer or perhaps a small team/project as a stepping stone to move towards Team Foundation Server. I am fairly positive even Microsoft wouldn’t recommend it for use on larger teams or mission critical projects. VSS 2005 with the appropriate patch works fine to that end. People freak though when they see the cost involved with TFS.

    Although with the existence of many single-developer/small team version control systems for free, it’s really not needed. Perforce I believe offers such a version? As does Vault. Both of which would most likely be a better choice. Subversion can be a decent choice with TorrtiseSVN + VisualSVN, Doesn’t feel nearly as integrated as something like VSS and TortiseSVN certainly has one of the worst context menu systems I’ve seen in quite some time.

    I guess overall, I see VSS in relation to TFS as I see Access to SQL Server. Some people seem to use Access for large insane projects for which it was never intended.

  8. Tom Pridham said,

    on May 27th, 2008 at 12:07 am

    VSS was a good tool in the era of 1999 / 2000. VSS had it’s issues, but was better than not using version control at all. I am not a fan of CVS, but I really like subversion.

    I have seen some projects crash and burn because they did not use any type of version control. So VSS is better than nothing, but most version control packages now are all better than VSS.

    Regards,
    Tom Pridham


  9. on May 27th, 2008 at 1:01 pm

    [...] Visual SourceSafe: A Public Service Announcement (Dan Dyer) [...]