Tuesday, April 18, 2006

One of my regular reads is Coding Horror and a recent post had a list of things all development teams should do : http://www.codinghorror.com/blog/archives/000568.html

Number 1. Do you use source control.
I guess most developers say of course doesnt everybody but that isnt always the case especially at smaller companys.

One of the first things I did at my current company was introduce source control when I found source-code was in various places on the network and this directory here "probably" contains the latest version.
  • Updated source code files were zipped up and emailed to other developers.
  • A file comparison tool was used to merge each set of changes into the "master" source.
  • The master source was kept in a directory on the senior developers machine.
  • This could be time consuming and error prone.
  • Sometimes one developers emailed changes wouldnt make it into the main build.
  • Occasionaly somebody would lose their changes and would need to code things again.

Even in a team of one Source-Control can be very very useful.
  • If used properly it allows you to go back to an earlier, known good, version of the code.
  • It lets you apply a fix to an older version of the code if the newer code hasnt gone thru testing yet but you need a fast release.
  • You can see when that nasty bug was added to the source code ( and who was to blame ! ) and more importantly identify what could have prevented this bug arising in the first place.
  • Its step one on the way to being able to create builds at the press of a button
We started off with "Microsoft Visual Source Safe" and later moved to a tool called "Team Coherence". "Team Coherance" has some nice features like being able to do a search by filename ( Yes I know but believe it or not VSS didnt have this ! ), see a sourcefiles history as you highlight it, work faster over a internet connection.

Even if politics means you cant force all developers to use the source control system its worth using. As long as somebody checks in all changes you get the benefits. As those benefits become more visible and obvious then it may beome easier to get everybody checking in their own changes.

And as I mentioned without source control you will find it difficult to add automated builds and move towards continuous integration ( if thats your bag )

No comments: