<?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>Software Configuration Management and Agile Software Development &#187; best practice</title>
	<atom:link href="http://accurev.com/blog/tag/best-practice/feed/" rel="self" type="application/rss+xml" />
	<link>http://accurev.com/blog</link>
	<description>SCM and Agile Software Development Blog</description>
	<lastBuildDate>Fri, 03 Feb 2012 19:28:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Continuous Integration &amp; Enabling Local Developer Builds</title>
		<link>http://accurev.com/blog/2011/06/20/continuous-integration-builds/</link>
		<comments>http://accurev.com/blog/2011/06/20/continuous-integration-builds/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 18:11:54 +0000</pubDate>
		<dc:creator>AccuRev</dc:creator>
				<category><![CDATA[AccuRev]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[continuous integration]]></category>
		<category><![CDATA[SCM Resources]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[developer build]]></category>
		<category><![CDATA[Software Configuration Management]]></category>

		<guid isPermaLink="false">http://www.accurev.com/blog/?p=2658</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2011/06/20/continuous-integration-builds/' addthis:title='Continuous Integration &#38; Enabling Local Developer Builds ' ><a href="//addthis.com/bookmark.php?v=250&#38;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">&#124;</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div>Goals of Continuous Integration If a primary goal of continuous integration is to improve software quality and reduce downstream build and test failures, then perhaps the single most important SCM best practice is to enable automated local developer builds. To this end, developers should be provided with access to a local build environment that mirrors [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2011/06/20/continuous-integration-builds/' addthis:title='Continuous Integration &#38; Enabling Local Developer Builds '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2011/06/20/continuous-integration-builds/' addthis:title='Continuous Integration &amp; Enabling Local Developer Builds ' ><a href="//addthis.com/bookmark.php?v=250&amp;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">|</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div><h2>Goals of Continuous Integration</h2>
<p>If a primary goal of <a href="http://www.accurev.com/continuous-integration.html" target="_blank">continuous integration</a> is to improve software quality and reduce downstream build and test failures, then perhaps the single most important SCM best practice is to enable automated local developer builds. To this end, developers should be provided with access to a local build environment that mirrors the production build environment, including:</p>
<ul>
<li>Database schema</li>
<li>Configuration files</li>
<li>Environment variables</li>
<li>Shared libraries and files</li>
<li>Known compiler/linker/runtime environments</li>
</ul>
<p>This minimizes the “it compiled fine on my machine” syndrome that plagues many development efforts. Once the build environment is available, every effort should be made to automate the local build, so that each developer can build easily and quickly without having to perform a series of manual steps.</p>
<p>Ideally, the developers should have access to a private build area that uses the same tools and configurations as the production builds. As part of configuring a local build, developers should be trained to take several steps to ensure that local changes will have minimal negative effects once shared with other developers and teams. These steps are as follows:</p>
<ul>
<li>Updating their private workspace to obtain the latest shared configuration code</li>
<li>Merging conflicting changes from the shared configuration to their private workspace</li>
</ul>
<p>By ensuring that developers have known, good build environments, and that they have the latest code with all conflicts resolved, there is high probability that the local build will succeed. If the local build is successful, a continuous integration build that includes the developer’s changes should also succeed.</p>
<h2>Shifting to Continuous Integration and Frequently Updating Code</h2>
<p>Traditionally, developers tend to put off sharing their changes, sometimes for days, because they don’t want to affect other people too early, or don’t want to get blamed for breaking the build. Unfortunately, this strategy tends to backfire and typically leads to more problems in debugging larger sets of changes after a build breaks. Independent of whether continuous integration is being employed, encouraging developers to build, test, and share their code in small “chunks” is a simple and effective way to improve team collaboration and reduce costly broken builds.</p>
<p>The importance of frequently updating the code in the <a href="http://www.accurev.com/scm.html" target="_blank">SCM</a> system is amplified when organizations move towards a continuous integration model. Continuous integration represents a paradigm shift for software development, emphasizing communication between developers about what changes have been made. By breaking down tasks into small chunks that take several hours to complete, developers can “commit” or “promote” their changes frequently and receive immediate feedback about the quality of the changes through the continuous integration build and unit test results. As teams get accustomed to this new approach, developers also gain a sense of progress by seeing not only their own changes build successfully, but also seeing the changes that other developers have made available.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2011/06/20/continuous-integration-builds/' addthis:title='Continuous Integration &amp; Enabling Local Developer Builds '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://accurev.com/blog/2011/06/20/continuous-integration-builds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stream-per-Task Pattern &#8211; with AccuRev SCM</title>
		<link>http://accurev.com/blog/2007/10/11/stream-per-task-paradigm-with-accurev-software-configuration-management/</link>
		<comments>http://accurev.com/blog/2007/10/11/stream-per-task-paradigm-with-accurev-software-configuration-management/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 20:00:14 +0000</pubDate>
		<dc:creator>dave</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Patterns]]></category>
		<category><![CDATA[AccuRev]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[promotion-based]]></category>
		<category><![CDATA[SCM]]></category>
		<category><![CDATA[Software Configuration Management]]></category>
		<category><![CDATA[stream per task]]></category>
		<category><![CDATA[task-based development]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://accurev.wordpress.com/2007/10/11/stream-per-task-paradigm-with-accurev-software-configuration-management/</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2007/10/11/stream-per-task-paradigm-with-accurev-software-configuration-management/' addthis:title='Stream-per-Task Pattern &#8211; with AccuRev SCM ' ><a href="//addthis.com/bookmark.php?v=250&#38;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">&#124;</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div>Streams are the workhorse of an AccuRev depot. Without streams, everyone would commit code to a single &#8220;bucket.&#8221; As you know, streams are connected together in a hierarchy that defines a promotion-based workflow. For mainline development, a workflow can be as simple as: Dev &#62; Test &#62; Prod or, sophisticated like: Dev &#62; UnitTest &#62; [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2007/10/11/stream-per-task-paradigm-with-accurev-software-configuration-management/' addthis:title='Stream-per-Task Pattern &#8211; with AccuRev SCM '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2007/10/11/stream-per-task-paradigm-with-accurev-software-configuration-management/' addthis:title='Stream-per-Task Pattern &#8211; with AccuRev SCM ' ><a href="//addthis.com/bookmark.php?v=250&amp;username=xa-4d2b47597ad291fb" class="addthis_button_compact">Share</a><span class="addthis_separator">|</span><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a></div><p>Streams are the workhorse of an AccuRev depot. Without streams, everyone would commit code to a single &#8220;bucket.&#8221; As you know, streams are connected together in a hierarchy that defines a promotion-based workflow. For mainline development, a workflow can be as simple as:</p>
<p><code>Dev &gt; Test &gt; Prod</code></p>
<p>or, sophisticated like:</p>
<p><code>Dev &gt; UnitTest &gt; Int &gt; LoadTest &gt; FlightTest &gt; Prod</code></p>
<h3>The Pattern</h3>
<p>While streams are always used for organizing the <em>core </em>workflow, they can also be extended to logically organize developer tasks using a &#8220;stream-per-task&#8221; paradigm. <span style="color: #0000ff;">The concept is simple:</span> create a new stream for every task that one or more developers plan to work on. Name the stream logically, as in &#8220;Feature X&#8221; or &#8220;BugFix Y&#8221;. The developers then create their workspaces from this stream. This pattern works exceptionally well with agile development groups where work is broken down into tasks.</p>
<h3>The Advantages</h3>
<p>In theory, the task stream is just another stream and promotion step on the way to delivering changes to the core workflow (<em>see adjacent picture</em>). Though, in practice, the advantages are numerous:<a title="Stream per Task" href="http://www.accurev.com/blog/wp-content/uploads/2007/10/stream_per_task.jpg" target="_blank"><img class="alignright" style="margin-top: 10pt; margin-right: 0px; margin-bottom: 5px; margin-left: 5px; border: 1px solid black;" src="http://www.accurev.com/blog/wp-content/uploads/2007/10/stream_per_task.jpg" alt="Stream per Task" width="200" height="150" title="Stream per Task Pattern   with AccuRev SCM" /></a></p>
<ul>
<li>Organize development activity by feature or fix</li>
<li>Visually see all active projects (removed task streams are implicitly <em>finished</em>)</li>
<li>Visually see and manage who is working on any given project</li>
<li>Develop individual projects against latest mainline without forced committing to the core (<em>relies on inheritance and </em><em>significantly reduces rollback</em>)</li>
<li>Control access to projects by user or group using stream locks</li>
<li>Retarget entire projects and teams with a single drag-n-drop</li>
</ul>
<h3>The Critics</h3>
<p>No suggestion is without its critics. Let&#8217;s address a few of the common claims. <strong>Claim</strong>: adding a new stream creates an unnecessary promotion step. <span style="color: #ff0000;">Response: </span>use a <a href="http://blog.accurev.com/2007/09/20/stream-refactoring-with-pass-throughs/" target="_blank">pass-through stream</a> instead! <strong>Claim</strong>: creating a stream-per-task will create 10&#8242;s, or 100&#8242;s of streams. <span style="color: #ff0000;">Response</span>: Yes, but each stream is a 120-byte (yes, byte) record of meta data on the server so space consumption is negligible; the GUI &#8216;zoom&#8217; feature makes navigating thousands of streams manageable; remove each stream when the project is finished; and using a good naming convention goes a long way. <strong>Claim</strong>: Creating streams is yet-another-step for someone; who will do it? <span style="color: #ff0000;">Response</span>: it depends; Sometimes savvy project managers enter them in AccuRev; other times it&#8217;s the release manager(s) who take this on as a routine task; but I say, empower the developers! Why not have the dev leads or project-oriented developers do the task &#8212; it&#8217;s sooo simple and can be controlled with locks, ACLs, or basic triggers.</p>
<p><span style="color: #ff0000;"><a title="Workspace per Task" href="http://www.accurev.com/blog/wp-content/uploads/2007/10/workspace_per_task.jpg" target="_blank"><img class="alignright" style="margin-top: 5pt; margin-right: 0px; margin-bottom: 5px; margin-left: 5pt; border: 1px solid black;" src="http://www.accurev.com/blog/wp-content/uploads/2007/10/workspace_per_task.jpg" alt="Workspace per Task" width="200" height="150" title="Stream per Task Pattern   with AccuRev SCM" /></a></span>For those critics still remaining who need proof, I&#8217;ve provided an illustrated stream hierarchy where everyone contributes to a single bucket. Compare this picture with the one above&#8230;. and I&#8217;m sure you&#8217;ll be convinced. In short, the drawbacks of everyone committing to the same bucket include:</p>
<ul>
<li>Unable to collaborate in isolation</li>
<li>Requires reverting (unmerging) features who&#8217;s release has been postponed</li>
<li>Limited visibility to active projects; requires strict wspace naming; hard to enforce</li>
<li>Retargeting project work requires multiple workspace reparenting</li>
<li>Unable to control per-project delivery or access with locks or ACLs</li>
</ul>
<h3>Concrete Example</h3>
<p>With the pros and cons out of the way, lets show a concrete example. For both discussions above, <a title="Stream per Task Example" href="http://www.accurev.com/blog/wp-content/uploads/2007/10/stream_per_task_example.jpg" target="_blank"><img class="alignright" style="margin-top: 5px; margin-right: 0px; margin-bottom: 5px; margin-left: 5pt; border: 1px solid black;" src="http://www.accurev.com/blog/wp-content/uploads/2007/10/stream_per_task_example.jpg" alt="Stream per Task Example" width="200" height="150" title="Stream per Task Pattern   with AccuRev SCM" /></a>I intentionally created stream structures in abstract form using generic names and a layout that is comparable. But lets get real. Here is a stream structure that represents a more realistic environment and even includes elements from a <a href="http://accurev.wordpress.com/2007/09/20/stream-refactoring-with-pass-throughs/" target="_blank">previous blog</a> post on using the pass-through stream. Isn&#8217;t it great to see how this stream-per-task paradigm helps methodically organize activity across the entire depot!</p>
<p>Are there any other pros or cons to this approach? Does anyone have examples of using this pattern in their own implementation of AccuRev?</p>
<p>/happy tasking/ &#8211; dave</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://accurev.com/blog/2007/10/11/stream-per-task-paradigm-with-accurev-software-configuration-management/' addthis:title='Stream-per-Task Pattern &#8211; with AccuRev SCM '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://accurev.com/blog/2007/10/11/stream-per-task-paradigm-with-accurev-software-configuration-management/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

