<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>John Selkirk - GIS Development &#187; Source Control</title>
	<atom:link href="http://john.selkirks.net/category/source-control/feed/" rel="self" type="application/rss+xml" />
	<link>http://john.selkirks.net</link>
	<description>My thoughts on development with an emphasis on GIS</description>
	<lastBuildDate>Fri, 21 Aug 2009 12:41:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Software Build Automation</title>
		<link>http://john.selkirks.net/2008/01/14/software-build-automation/</link>
		<comments>http://john.selkirks.net/2008/01/14/software-build-automation/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 13:04:54 +0000</pubDate>
		<dc:creator>John Selkirk</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Cruise Control .NET]]></category>
		<category><![CDATA[Nant]]></category>
		<category><![CDATA[Source Control]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://john.selkirks.net/?p=30</guid>
		<description><![CDATA[I remember reading a book about 4 years ago on how to determine the maturity of software development companies. The thing that stood out at the time was the fact that mature development shops have a well managed and efficient automated build system with a sliding scale from that to companies that are starting and [...]]]></description>
			<content:encoded><![CDATA[<p>I remember reading a book about 4 years ago on how to determine the maturity of software development companies. The thing that stood out at the time was the fact that mature development shops have a well managed and efficient automated build system with a sliding scale from that to companies that are starting and do not even have a source control system.</p>
<p>The reason why it stood out is that at the time we only had a very rudimentary build system and it was bugging me that we could not go from source to installers (including build # and documentation) without someone getting involved to hand crank it. Doing it that always ended up with inconsistency and we would end up testing software builds that had the wrong DLLs in it and simply just waste some testing time.</p>
<p>The decision was made to create a new build system and efforts started on getting it implemented. Unfortunately, along with the decision to implement a build system also came the decision to implement all of the functionality ourselves rather than use 3rd party OR open source tools. Due to this, the build system got half built before we realized that it was not maintainable and the project suspended.</p>
<p>I mention this in the hope that others do not suffer this growing pain as we did. It is also the case that at the time the tools we know use did not exist or certainly were not ready for reliable use so perhaps we just tried to it before the most optimum time.</p>
<p>Ok. So about a year later I started looking at this problem again and found some interesting tools out there that people were recommending.</p>
<ul>
<li><font face="Georgia"><font face="Georgia">Nant</font></font></li>
<li><font face="Georgia">CruiseControl.NET</font></li>
</ul>
<h2>Nant</h2>
<p><a href="http://nant.sourceforge.net/">Nant</a> is a open source .NET build system which finds it&#8217;s home on sourceforge. At the time of looking we had started to move all of our code from VB/C++ over to C# so standardizing on a build system that is .NET based is fairly good one.</p>
<p>We still have to this day a set of components that are VB so it was important that it would support VB. Thankfully we are not the only company in the world that still have VB code and there is a vb6 task as part of the <a href="http://nantcontrib.sourceforge.net">Nant Contrib</a> project. This allowed us to have our VB6 projects compiled in the same build environment as our C# projects.</p>
<p>Nant allows for a great level of control on what is built and what is used to build it.</p>
<h2>CruiseControl.NET</h2>
<p><a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET">CruiseControl.NET</a> (CC.NET) is a continuous integration server that watches your source control system and recognizes when changes have been made on a configured sub folder triggers a process to begin. In our case this process is a nant build task on the piece of functionality that has changed.</p>
<p>The great thing about this is that you get immediate feedback on all code checked in that  it did not break anything. This can be anything from a new source file missing to breaking a build on a different version of ArcGIS (more on this later).</p>
<p>There are web-based and windows notification area (system tray) tools that allow anyone to see the current state of the build system.</p>
<p>To make the &#8216;test builds&#8217; quick and painless we have separated the build files into product/project and even component level. This means that if we change component Y in project X then only that project will be built and not the whole source tree (which takes about 20 minutes and would be over the top for every check-in!). Due to this we have about 30 projects in each build server (up to 3 at any time &#8212; more later).</p>
<p>In the early hours of the morning we also have a batch build script triggered within CC.NET that builds all of the software in order, creates the installers and server folder structures for testing. This process takes anywhere up to about 30 minutes and again as it is within the build system we know whether it as built successfully when we log in every morning.</p>
<h2>Build Servers</h2>
<p>I mentioned that we have up to 3 build servers. Why on earth would we even contemplate having more than one you say? The simple and only reason that we have up to 3 is to support each version of ArcGIS. When using .NET the libraries referenced are version encoded so we made the decision to build the same source code in all of the versions that we currently support. There are ways of work within versioned assemblies (use of policy files for example) but we felt that it would be good to build on the actual version the user will be running the software on so the build servers were born.</p>
<h2>What is the result of the build?</h2>
<p>Well, that depends on what build we are talking about.</p>
<p>For a build that is triggered by a Subversion check-in just the component of software that has been changed is built.  There *should* be a subsequent build of all components that depend on that particular assembly (or set of assemblies) but this is not supported in CC.NET and we have not encoded that logic in Nant as yet.</p>
<p>For a <em>&#8216;batch build&#8217;</em> that has been triggered in the evening the Nant script:</p>
<ul>
<li>Increments the build number is all of the AssemblyInfo.cs files</li>
<li>Builds all of the projects we want built</li>
<li>Reverts the AssemblyInfo.cs files so that they do not show up in SVN as edited.</li>
<li>Generates Installers for all of the products we have</li>
<li>Copies the installers to a well defined location</li>
</ul>
<p>All of this is very important to a software team as it means that all of the tedious tasks that are prone to error are automated. This means we cannot get it wrong (well kind of) and we can be sleeping when it is being done (batch build is triggered at 12:30 AM).</p>
]]></content:encoded>
			<wfw:commentRss>http://john.selkirks.net/2008/01/14/software-build-automation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Uninterruptible Power Supply</title>
		<link>http://john.selkirks.net/2007/08/02/uninterruptible-power-supply/</link>
		<comments>http://john.selkirks.net/2007/08/02/uninterruptible-power-supply/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 14:02:13 +0000</pubDate>
		<dc:creator>John Selkirk</dc:creator>
				<category><![CDATA[Backups]]></category>
		<category><![CDATA[Source Control]]></category>

		<guid isPermaLink="false">http://john.selkirks.net/?p=24</guid>
		<description><![CDATA[So I wake up this morning hoping to finish up development on a piece of work that I am doing to find that my day will be longer than expected. I try to spin up a Virtual PC (VPC) of the ArcGIS 9.1 development environment I have and Virtual PC tells me it cannot find it!
That would [...]]]></description>
			<content:encoded><![CDATA[<p>So I wake up this morning hoping to finish up development on a piece of work that I am doing to find that my day will be longer than expected. I try to spin up a Virtual PC (VPC) of the ArcGIS 9.1 development environment I have and Virtual PC tells me it cannot find it!</p>
<p>That would usually be OK. I have a clean VPC image of ArcGIS 9.1 and dev environment so normally I would just synchronize the source code and I am off and running. Not today.</p>
<p>I have been working on this new functionality for about 4 days now and have not bothered to add it to source control as it is not &#8216;ready&#8217;. So if I do not try and solve the problem I will lose out of 4 days of blood, sweat and most definitely tears.</p>
<p>It turns out that the storms that have been causing the amazing sound and light shows around here with the occasional power fluctuation were not liked by my external hard disk that is home to all of my VPCs <img src='http://john.selkirks.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>I have had this trouble before and I was determined to go straight to BestBuy that morning and get a UPC. I didn&#8217;t and it was just a matter of time before it happened again I guess. The last time I had to spend about 4 hours persuading the hard disk it was OK and let me access the files so when it happened this morning I sighed, brewed some coffee and got ready for the fight.</p>
<p>It turns out that good ol&#8217; chkdsk saved the day and I am back in. All the files *seem* file but time will tell I guess.</p>
<p>I am going to buy a UPS this time. Honest.</p>
]]></content:encoded>
			<wfw:commentRss>http://john.selkirks.net/2007/08/02/uninterruptible-power-supply/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>From Perforce to Subversion</title>
		<link>http://john.selkirks.net/2007/06/27/from-perforce-to-subversion/</link>
		<comments>http://john.selkirks.net/2007/06/27/from-perforce-to-subversion/#comments</comments>
		<pubDate>Wed, 27 Jun 2007 22:10:21 +0000</pubDate>
		<dc:creator>John Selkirk</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Source Control]]></category>

		<guid isPermaLink="false">http://john.selkirks.net/?p=13</guid>
		<description><![CDATA[The company that I work for recently switched from Perforce at $800 a client to Subversion at $0 a client. The reasons for which are obvious but what we did not know until fully implementing the system is the pro&#8217;s and con&#8217;s of doing this for OUR company.
Perforce is a great product. It is fast, [...]]]></description>
			<content:encoded><![CDATA[<p>The company that I work for recently switched from Perforce at $800 a client to Subversion at $0 a client. The reasons for which are obvious but what we did not know until fully implementing the system is the pro&#8217;s and con&#8217;s of doing this for OUR company.</p>
<p>Perforce is a great product. It is fast, easy to use and has some neat tools for managing&nbsp;the editing cycle of source code etc. We have multiple sites&nbsp;for development and having a fast synchronization no matter where you are is very important and perforce does a great job of this. The differencing tools are great and check-in, check-out and revert of code is simple and intuitive. </p>
<p>That said, &#8216;free&#8217; compared to $800 a client is not to be ignored and we decided to try out SVN. Configuration is a simple unless you want to use HTTPS (which everyone does) and then you have to trawl the knowledge base articles and use some magic to get it all to work. One the server is running though getting client online is a breeze.</p>
<p>TortoiseSVN for&nbsp;simple file management&nbsp;and AnkhSVN for Visual Studio integration are a must as far as I am concerned and once again they are free. TortoiseSVN in particular with it&#8217;s Windows Explorer integration and differencing tools is the best interface I have seen in a long time for source control. Perforce tries to have a Windows Explorer interface but it does not do well and certainly get&#8217;s no-where near TortoiseSVN.</p>
<p>One major factor that attracted me to SVN is the fact that you can do what you like to the source tree when offline. The concept of checking out for edit in a pain in my line of work where I spend the majority of my time on client sites. Having the ability to make code changes during the day and check them in at night is great. </p>
<p>I frequently do not have to do that though as more and more clients are providing WiFi connectivity outwith their firewall to the Internet and since we have the HTTPS version of SVN running I can simple check code in over the Web without even using VPN! We previously used&nbsp;secure tunnel for this and the client always flaked out at the worst times <img src='http://john.selkirks.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> &nbsp;</p>
<p>One of the benefits of SVN when using Apache is the WebDav. This allows us to include our documents, project plans etc. in the same versioned repository as the source code but with a fit-for-purpose way in Microsoft Office of getting access to and updating the files. This is something that we have not taken full advantage of as yet but will be starting in the very near future.</p>
<p>All in all I would say that SVN is well worth the effort it takes to setup the server and &#8212; touch wood &#8212; the database has been extremely stable and we have had not problems.</p>
<p>I know that this is a very generic conversation but I will get more in-depth about the branching capabilities (used all the time by us) and how easily it slots into CruiseControl.NET in a different post.</p>
]]></content:encoded>
			<wfw:commentRss>http://john.selkirks.net/2007/06/27/from-perforce-to-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
