Microsoft: Source control done wrong.

(This is a months old-post that has been sitting in my drafts list for a while, I don’t recall why I hadn’t posted it so here it is) 

We use Microsoft’s Source Safe. I’ve read numerous nightmare descriptions from within Microsoft as to how code is organized between teams and how it migrates. As I see it, the core problem lies in the way that SourceSafe (and thus Microsoft) do their branching. They literally, physically, separate the two lines of code: if you have code at version 1.2 and decide to branch there, so that you can actively continue maintaining 1.2 while working on 1.3, SourceSafe does this by creating a complete new repository for the new branch.

This makes complete sense on an end-user machine. Having my “code” directory named for the branch it is from, e.g. code-1.2 and code-1.3, makes sense. But it doesn’t make sense in the source control system.

Source Safe allows you to apply a label to a particular point in time during the source history. Other source control systems embellish on this idea by using meaningful labels which can be branched in-line. If 1.3.x is the current head of the development tree, and we need to go back and fix a bug in 1.2.x, you simply pull the files labelled 1.2.x make your changes and when you check them back in, they go back in as 1.2.x.1

This gives you a complete source history in a single repository. It makes merging changes between versions much easier. It makes it infinitely easier to work on concurrent revisions because you can branch repeatedly.

Microsoft’s source control is out of hand – different teams have their own repositories with their own unique instance of the codebase. Double check that – I’m not talking about devs with their own copy of the code on their local machine. I’m talking about the repository that they pull from. This is branching gone not just sour but thoroughly rotten.

You’ve all seen instances where the same bug has cropped up in WWIIOL, or where a bug is listed as fixed in the readme but somehow its not changed.

Well, this is primarily because we use SourceSafe, and secondly because we’re human. When you have 2 or 3 source repositories representing different versions, sometimes files don’t get checked in to the right version.

This hindrance to healthy workflow management is the biggestflaw in the SourceSafe model. It encourages coders to check-in late, when in fact coders should be encouraged to check code into their branches early, and then merge their completed and tested work into the parent branch when they are done.

Doing this establishes a workflow trend, of branch-development, merge-completion that starts with the programmers and translates up through the team. On a large project, lien managers or team leaders become responsible for up merging in changes from lower down the branch hierachy.

In a very large project, this provides you with important data on trends – it can be very useful to analyze some of the working patterns that become clear, such as regular checkins to deal with fixing common problems which might expose issues in an API design or with development tools.

11 Comments

I never did like the branching in Source Safe. Currently I am trying to get my head around Perforce.

So all the coders there hate SourceSafe, but you’re still using it?

imagine the time and headaches to move to something else. There are no shorterm benefits for switching.

It usually takes a production outage disaster that shines light on these hidden costs. Hidden costs are not real until they are realized.

For the same reason most people stay with those Microsoft products that don’t do a good job of the task they’re developed for, the same reason male foxes stay with their bitches for hours after mating… (Go look it up if you don’t know).

FWIW: I don’t think that all Microsoft products are bad. I swear by Visual Studio, IE, and Outlook (not express) is what I’d use if I didn’t have Thunderbird. I think Microsoft keeps telling itself that its a free market. And Microsoft employees keep telling themselves they live in a truly competetive market.

I can’t help but ask myself, how well would any of the Microsoft products fare if they were an independent company?

As much as I love IE, would we be using Netscape today if IE hadn’t had Microsoft muscle to obtain market share – and I’m only talking about legitimate methods like advertising and product placement.

If Word wasn’t developed by the same company that develops its operating system, would it be quite so emacs-like and bloated and unwieldy, or would it be a series of consumer-oriented products serving niche target audiences. Well, the 2007/2008 versions are finally heading that way, but only Microsoft seems to think that is a 21st century concept of their own innovation.

I think Microsoft is blinkered to the reality of its market. How absolutely they have climbed into the bed that IBM made for itself, tucked themselves in tightly. They look at their customers much the way Shaun looks at the undead. “They follow me around, I guess they like me”.

The developers genuinely believe that if they get it wrong, customers won’t buy into it, by singing LALALALALA loudly when the thought comes around that somewhere else in their megacorp are people who’s job it is to make life for non-upgraders uncomfortable. Approve or require subtle changes to Word 8 that makes the document format incompatable with Word 7 so that the forward-compatability features you didn’t approve for Word 7 will lock businesses into having to upgrade in order to exchange documents effectively with their consumers and suppliers.

When I read the apologetics of people who worked on vista (like the start-menu shutdown menu guy) they’re quick to try and absolve themselves by stating credentials which show they were genuinely trying to make Windows a less evil beast. But the litmus test is not what they were doing but why, and whether they questioned the mandates being fed them.

What were the constraints on the security rework. It seems to have the effect of requiring developers to do an amount of portage, and the portage seems to be just enough to be bearable by the average development company, but not if they try and support both the new and the old natively, not for long anyway. And if application developers drop support for older versions of windows as a result, Windows users will be pushed headlong towards conversion too.

I understand that change can be burdonsome. And I’m sure no developer was told by his manager “You must do this and make it work out this way to ensure customer migration”. But Microsoft has an army of money-people, and at somewhere the need to ensure customers buy in to the new product was injected into the higher-level management process. And it might have come down the line as a constraint here, shaped so that the well-intentioned coders have to code in such a way as to “feed the need”.

Or it might have been in the guise of a well-thought out cool-seeming feature. Lets say making Word .doc’s natively support vb script. It means a new version of the format. But its such a cool feature its justified, right? Sure but don’t you see the evil? .doc is a format, a standard. Rendering it incompatible rather than adding “.sdoc” or “.scdoc” or some other suffix to denote extended capabilities. “Not from a Jedi” =~ s/Jedi/Earlier Version/;

I do wish I could get more involved in helping straighten things out there… so much could be tweaked if not for the fact you guys can’t spare or risk any downtime to get things straightened out. :(

Ditching sourcesafe, getting a decent bugtracker in, building an internal documentation wiki for you, the list goes on. :(

Preach on, Brother Krenn. Finally had an impromptu meeting this morning, after some more gentle email prodding of mine earlier this week.

Beyond the normal constraints, time, etc., there’s this little problem of a creature who lives in holes who can’t live without a WYSIWG editor. If there’s no gui button for adding bullet points – he ain’t interested.

But we’re slowly getting there. If I only had the authority to control Ramp and KFS1’s to-do lists (and ignore that furry creatures irrelevant desires)…I’d RULE THE WORLD! Mwahaha! Mwahahaha…/me cackles madly…/me rubs hands megomaniacly

Actually, the vs2005 team system source system is a HUGE improvement over source safe. It’s incredibly expensive. but all of your complaints are addressed in it. ‘Course you guys have no reason to be using that particular product and the gains from it would be more than offset by the very cool, but incredibly stuttery IDE.

I read an interesting article today that suggested that Microsoft somewhere along the way recently stopped priorizing based on customer needs and instead replaced that with prioritizing on things that create their own demand. I tend to agree with that opinion.

Except for .NET. I don’t care what anyone says, the .NET framework is about the greatest thing to ever happen for development in the business world.

I’ve read that Microsoft almost never used SourceSafe themselves in-house. They used another 3rd party source control software and wanted to include it into the Visual Studio but the licensing didn’t work out, so they put something else into it.

I’ve just started using Subversion as a version control.

Nice little piece of software.

At my place of work we migrated (fairly painlessly I might add) from VSS to Subversion and haven’t looked back.

For anyone suffering through SourceSafe, I highly recommend taking a look at Evolution, from ionForge. Very easy to use, familiar enough that the learning curve is short (at least it was for me), and it’s cheap to “upgrade” from SourceSafe or most any other SCM.

Two features we really like are “works in progress” – check in your code w/o breaking the build (check in early, check in often) – and “Reflections”. Reflections are basically self maintaining branches, or automatic branch on change. Works great for the maintaining 1.2 while developing 2.0 scenario.

Leave a Reply

Name and email address are required. Your email address will not be published.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

You may use these HTML tags and attributes:

<a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <pre> <q cite=""> <s> <strike> <strong> 

%d bloggers like this: