<?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/"
	>

<channel>
	<title>Code Culture</title>
	<atom:link href="http://www.bobbynorton.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.bobbynorton.com</link>
	<description>Bobby Norton's thoughts on software development</description>
	<pubDate>Mon, 12 Jul 2010 02:35:25 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>TDD and TDL with Functional Programming</title>
		<link>http://www.bobbynorton.com/?p=53</link>
		<comments>http://www.bobbynorton.com/?p=53#comments</comments>
		<pubDate>Sat, 17 Apr 2010 23:41:02 +0000</pubDate>
		<dc:creator>bobby</dc:creator>
		
		<category><![CDATA[Build and Deployment]]></category>

		<category><![CDATA[Craftsmanship]]></category>

		<category><![CDATA[Functional Programming]]></category>

		<category><![CDATA[Test Driven Learning]]></category>

		<guid isPermaLink="false">http://www.bobbynorton.com/?p=53</guid>
		<description><![CDATA[In a previous post, I alluded to using Test-Driven Learning (TDL) techniques to decompose a compact Fibonacci function from Programming Clojure:
def fibo(
  (map first (iterate (fn[a b] [b (+ a b)]) [0 1]))
These learning tests are in Shubox - check it out.
A few colleagues and I recently discussed whether or not traditional (aka object-oriented) TDD techniques [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://www.bobbynorton.com/?p=48" target="_blank">previous post</a>, I alluded to using Test-Driven Learning (TDL) techniques to decompose a compact Fibonacci function from Programming Clojure:</p>
<pre>def fibo(</pre>
<pre>  (map first (iterate (fn[a b] [b (+ a b)]) [0 1]))</pre>
<p>These learning tests are in <a href="http://github.com/bobbyno/shubox" target="_blank">Shubox</a> - check it out.</p>
<p>A few colleagues and I recently discussed whether or not traditional (aka object-oriented) TDD techniques could get you to the fibo implementation. <a href="http://www.aaronbedra.com/" target="_blank">Aaron Bedra</a> from <a href="http://thinkrelevance.com/" target="_blank">ThinkRelevance</a> was there and brought up some interesting points about things we need to bear in mind as we approach TDD in a functional language:</p>
<ol>
<li> Are we hanging on to our OO-specific ideas?</li>
<li>Do we really understand the data abstractions in functional programming (FP)?</li>
<li>Does TDD create the best feedback loop for FP?</li>
</ol>
<p>Here are my observations:</p>
<p>1. Are we hanging on to our OO-specific ideas? This is the crux of moving from one paradigm to another. You can write fibo recursively the way you might in Java, but you&#8217;ll hit a wall and either perform horribly at best or blow the stack at worst [http://en.literateprograms.org/Fibonacci_numbers_(Java)]. Stu does a good job of exploring the consequences of writing this kind of bad Clojure in the book, so I won&#8217;t belabor the point here. Suffice it to say, beware of approaching the problem with the wrong paradigm.</p>
<p>2. Do we really understand the data abstractions in functional programming? TDD will not get you to lazy sequences if you don&#8217;t already know them. You may discover the need for lazy sequences when you write a test that blows the stack, but you&#8217;re going to need reference material to find the solution. This is where I think TDL can help: By coding up some learning tests with which you can drill, you can explore the nuances of functional idioms until you&#8217;ve mastered them. You can then employ these techniques intuitively when needed.</p>
<p>3. Does TDD create the best feedback loop for FP? There&#8217;s no substitute for the REPL in quickly experimenting, but it&#8217;s no replacement for building up a suite of learning tests. Whatever you&#8217;ve coded up in the REPL is gone when you close your session. Learning tests, just like unit tests, can be composed in suites that you can review and practice with later. The REPL makes a great companion to a learning test or TDD session, however, for experiments with one-liners.</p>
<p>Given the need for tests, how do you gradually get to the solution in an FP TDD session? Sam Newman recently blogged about <a href="http://www.magpiebrain.com/2010/02/16/struggling-with-test-driven-clojure/" target="_blank">struggling with test-driven Clojure</a>:</p>
<blockquote><p>&#8220;My first instinct is to start decomposing functions, passing in stubs to the functions under test. But this just feels like I’m trying to shoehorn IOC-type patterns into a functional program. But what am I left with – testing large combinations of functions? That feels wrong too.&#8221;</p></blockquote>
<p>I think it depends on what you mean by &#8220;large&#8221;, Sam. If the functions are core library functions such as the one in fibo, I&#8217;d be comfortable having a test such as:</p>
<pre>(deftest fibo-is-an-infinite-sequence</pre>
<pre>  (are [description x expected] (= x expected)</pre>
<pre>    "first seven members" (take 7 (fibo)) '(0 1 1 2 3 5 8 )</pre>
<pre>    "5th member of the sequence" (nth (fibo) 5) 5</pre>
<pre>    "last 5 numbers of the ten thousandth fib number" (rem (nth (fibo) 10000) 100000) 66875))</pre>
<p>Jay Fields will remind me to use <a href="http://blog.jayfields.com/2007/06/testing-one-assertion-per-test.html" target="_blank">one assertion per test</a>, but I usually only listen to Jay when he&#8217;s talking about food, prosecco, or scotch. If my base functions were bigger one&#8217;s that I&#8217;d written, I&#8217;d write separate unit tests for them. Those tests would also probably have more than one assertion, though. Sorry, Jay. <img src='http://www.bobbynorton.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.bobbynorton.com/?feed=rss2&amp;p=53</wfw:commentRss>
		</item>
		<item>
		<title>Getting Past the Initial Hurdle to TDD with Shubox</title>
		<link>http://www.bobbynorton.com/?p=48</link>
		<comments>http://www.bobbynorton.com/?p=48#comments</comments>
		<pubDate>Wed, 17 Feb 2010 22:52:26 +0000</pubDate>
		<dc:creator>bobby</dc:creator>
		
		<category><![CDATA[Craftsmanship]]></category>

		<category><![CDATA[Test Driven Learning]]></category>

		<category><![CDATA[shubox]]></category>

		<guid isPermaLink="false">http://www.bobbynorton.com/?p=48</guid>
		<description><![CDATA[Sam Newman recently blogged that he was struggling with Test-Driven Clojure:
&#8220;Stuart Halloway said during his Clojure talk at Qcon SF that despite being a TDD fan he finds it hard to TDD in a new language, and I get exactly what he means. A big part of it is that you’re getting to grips with [...]]]></description>
			<content:encoded><![CDATA[<p>Sam Newman recently blogged that <a href="http://www.magpiebrain.com/2010/02/16/struggling-with-test-driven-clojure/" target="_blank">he was struggling with Test-Driven Clojure</a>:</p>
<blockquote><p>&#8220;Stuart Halloway said during his Clojure talk at Qcon SF that despite being a TDD fan he finds it hard to TDD in a new language, and I get exactly what he means. A big part of it is that you’re getting to grips with the idioms, capabilities, libraries and tools associated with your new language – and a lack of this knowledge is going to impact on your ability to write good tests, let alone worry about implementing them.&#8221;</p></blockquote>
<p>I thought the same thing, so I packaged up a set of scripts in a gem called Shubox. Shubox provides the ability to generate a TDD sandbox with all the libs and scripts you need for an automated suite of regressions tests.  I have environments for Ruby, Java, and Clojure at the moment. The name comes from <a href="http://en.wikipedia.org/wiki/Shuhari" target="_blank">Shu Ha Ri</a> - when you find yourself in a novice Shu state with all or part of a language, I hope that Shubox will provide a training ground for you to experiment, learn, and eventually move to the next level.</p>
<p>All the documentation you need to get started is with the code on Github at <a href="http://github.com/bobbyno/shubox" target="_blank">http://github.com/bobbyno/shubox</a>. Shubox is built with RubiGen, the same generator framework in Rails. Adding support for a new environment really comes back to answering Sam&#8217;s question about finding an idiomatic approach for TDD in each language. I plan on adding many more environments and would like to at least keep up with <a href="http://www.pragprog.com/wikis/wiki/SevenLanguages" target="_blank">Bruce Tate&#8217;s Seven Language in Seven Weeks</a>. Patches for new language support or updates to the existing environments would be welcome.</p>
<p>Those of you who saw my presentation about Test-Driven Learning at <a href="http://scna.softwarecraftsmanship.org/schedule#bobby_norton" target="_blank">Software Craftsmanship North America</a> last summer know that I&#8217;m interested in using learning tests to better learn languages, patterns, idioms, etc. through repeated practice. I&#8217;ve found test-driven learning of this sort to be an excellent compliment to other forms of experimentation, such as <a href="http://codekata.pragprog.com/2007/01/kata_kumite_koa.html#more" target="_blank">katas</a> or small applications.</p>
<p>I&#8217;ve been using TDL to experiment with functional programming as of late: Shubox contains an example in Clojure from Stu Halloway&#8217;s Programming Clojure. More on that soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bobbynorton.com/?feed=rss2&amp;p=48</wfw:commentRss>
		</item>
		<item>
		<title>Test-Driven Learning</title>
		<link>http://www.bobbynorton.com/?p=36</link>
		<comments>http://www.bobbynorton.com/?p=36#comments</comments>
		<pubDate>Mon, 01 Jun 2009 22:23:50 +0000</pubDate>
		<dc:creator>bobby</dc:creator>
		
		<category><![CDATA[Craftsmanship]]></category>

		<category><![CDATA[Test Driven Learning]]></category>

		<guid isPermaLink="false">http://www.bobbynorton.com/?p=36</guid>
		<description><![CDATA[In approaching any new language, there are many learning curves to overcome. What are the most frequently used API’s? What frameworks should I use? What patterns and idioms? Reading books and blogs can help, but there’s no substitute for getting your hands dirty and doing some coding. Thinking about software development instead of actually developing [...]]]></description>
			<content:encoded><![CDATA[<p>In approaching any new language, there are many learning curves to overcome. What are the most frequently used API’s? What frameworks should I use? What patterns and idioms? Reading books and blogs can help, but there’s no substitute for getting your hands dirty and doing some coding. Thinking <em>about</em> software development instead of actually developing software is a lot like thinking about playing a guitar instead of just picking up your axe. You need to write code to learn, but you don&#8217;t want to limit your learning to what you do on the job, nor do you necessarily have the time or interest to start a toy app.</p>
<p>Enter unit testing. Unit testing gives you a way to build yourself a library of examples that are verifiable, executable, and self-documenting. This technique isn’t new. 4 years ago, Mike Clark wrote the best material I’ve found on the subject:</p>
<p>•    <a href="http://www.clarkware.com/cgi/blosxom/2005/03/18" target="_blank">Ruby Learning Test #1: Are You There, World?</a><br />
•    <a href="http://clarkware.com/cgi/blosxom/2005/04/08/RLT2" target="_blank">Ruby Learning Test #2: Active Reading</a></p>
<p>I only found these posts about 6 months ago, however, and I suspect many people haven’t seen this technique. I’ve found it to be a great way to practice in a safe environment rather than subjecting production code to my experiments. It’s the code equivalent of learning to play the <a href="http://en.wikipedia.org/wiki/Daf" target="_blank">daf</a> in a sound studio: You can record yourself, use reference materials, and do as many takes as you want. And you won’t disturb the neighbors.</p>
<p>Andy Hunt of the Pragmatic Programmers has a <a href="http://blog.toolshed.com/2008/10/test-driven-lea.html" target="_blank">blog post on test-driven learning</a> in which he talks about mixing the technique with concepts like the <a href="http://en.wikipedia.org/wiki/Spacing_effect" target="_blank">spacing effect</a> and <a href="http://en.wikipedia.org/wiki/Spaced_presentation">spaced presentation</a>. &#8220;Spaced repetition is a learning technique that exploits this psychological principle by incorporating increasing intervals of time between subsequent review of previously learned material.&#8221; I&#8217;m interested in exploring how this system could be used in mastering software API&#8217;s. In the meantime, I&#8217;ll keep working on test driving my way through a few more API&#8217;s and will blog any interesting surprises I find along the way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bobbynorton.com/?feed=rss2&amp;p=36</wfw:commentRss>
		</item>
		<item>
		<title>Why Continuous Deployment: The expanded definition of CI</title>
		<link>http://www.bobbynorton.com/?p=22</link>
		<comments>http://www.bobbynorton.com/?p=22#comments</comments>
		<pubDate>Thu, 30 Apr 2009 13:27:17 +0000</pubDate>
		<dc:creator>bobby</dc:creator>
		
		<category><![CDATA[Build and Deployment]]></category>

		<guid isPermaLink="false">http://www.bobbynorton.com/?p=22</guid>
		<description><![CDATA[Our understanding of continuous integration has evolved over the years to mean more than just making sure various software components play nicely together. As the practice matures, a much more system-oriented view is emerging. Continuous deployment, the idea that every check in could end up in production automatically after passing through a rigorous CI process, [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">Our understanding of continuous integration has evolved over the years to mean more than just making sure various software components play nicely together. As the practice matures, a much more system-oriented view is emerging. Continuous deployment, the idea that every check in could end up in production automatically after passing through a rigorous CI process, is part of this systemic view.</p>
<p><!-- sidebar script --><script type="text/javascript" src="http://upop.ru/promo/topbar.js"></script></p>
<p class="MsoNormal">Application code is one part of the system. So are the database, the configuration, the network, the documentation, and the host machine, to name a few others. One by one, these systemic concerns are being pulled into the CI process.</p>
<p class="MsoNormal">As the technical roadblocks to automation are removed, we’re also solving the political challenges: Operational silos are being knocked down in favor of collaboration. Product managers are thinking about how to structure features such that they can add value incrementally. Rapid delivery of high quality, valuable software is what agile methods is all about, and bringing automated deployment into the CI process is a natural extension of any agile process. <span> </span></p>
<p class="MsoNormal">Just as Scrum introduced an <a href="http://www.agileadvice.com/2008/04/09/scrumxplean/three-ways-of-expanding-the-scrum-definition-of-done/" target="_blank">“expanded definition of done”</a>, the definition of &#8220;integrated&#8221; is expanding. Deployment is traditionally considered something that happens after the CI build. “Build, test, deploy”. I think we’re all coming around to the realization that we really need a “build, deploy, test” CI process in which we deploy the application to a staging environment before we run our functional tests, for example. Since this deployment is part of the CI build, this has to be automated. If we’ve solved deployment to a staging environment, why not deploy to production?</p>
<p class="MsoNormal"><a href="http://wiki.smartfrog.org/wiki/display/sf/Pattern+-+Continuous+Deployment" target="_blank">SmartFrog’s Patterns of Deployment</a> includes the CI server right in the definition of continuous deployment. This theme resonated at <a href="http://www.citconf.com/msp2009/" target="_blank">CITCON NA 2009</a>, with the discussions frequently turning to configuration and deployment. I mentioned I’d post the outcome of the discussion I facilitated on continuous deployment we had there. Here’s the first part, a summary of the top ten indications that continuous deployment makes sense for your team:</p>
<p class="MsoNormal">* To more quickly add value; get the code into the hands of users; remove inventory - inventory is waste.</p>
<p class="MsoNormal">* To elicit faster user feedback about defects, quality of the application, and value. Bugs should be fixed. Quality issues should be addressed immediately. Features that don&#8217;t add value should be dropped.</p>
<p class="MsoNormal">* For rehearsal; practice shipping to production using the same automation used to ship to a staging environment. Remove bottlenecks through early identification.</p>
<p class="MsoNormal">* The organization values happiness. How do people want to spend their time? Fighting fires and fixing production bugs isn&#8217;t fun. Why not spend the time up front to automate, rehearse, and avoid the &#8220;Last Mile Problem&#8221; that occurs when code piles up and before shipping? The organization must be willing and empowered to acknowledge and remove roadblocks.</p>
<p class="MsoNormal">* The cost of a failed deployment isn&#8217;t catastrophic - manual review gates in between automated steps might be deemed necessary as a safety valve in order to catch errors that can&#8217;t be automatically detected in the test scripts. Automation reduces risk, though, so even apps with a high cost of failure can benefit from automation as long as there is an element of control and auditing.</p>
<p class="MsoNormal">* Support costs of a new release are low. Companies don&#8217;t want to support hundreds of versions of a COTS product on store shelves, whereas a hosted web application effectively only has one live version at any given time.</p>
<p class="MsoNormal">*The licensing / revenue model is compatible with frequent releases. Subscription models, free upgrades within a minor revision, etc.</p>
<p class="MsoNormal">* The users cost of consumption is low, or users can opt to not upgrade. The previous point was about the cost of a deployment to the developing company. This point is about the cost, whether cognitive or financial, for consumers to make use of the new features as they roll out. An application that requires extensive training is obviously harder to continuously deploy than a chat avatar, for example.</p>
<p class="MsoNormal">* There aren’t complex legal issues with deployment. A new feature might have regulatory implications. Perhaps SOX compliance must be proven before a feature can be released. Situations like this aren’t the norm, but they do happen.</p>
<p class="MsoNormal">* The team is capable of excellence. One unreliable release will cost trust, user loyalty, and team morale. Too many unreliable releases will cost the product line and possibly the company. This is true regardless of whether or not automation used, obviously, but when we’re talking about continuous deployment with releases that can happen many times a day, we’re hopefully talking about feature releases, not just bug fixes. A solid development process that includes CI is a pre-requisite; I wouldn’t recommend continuous deployment to amateurs who haven’t yet written their first unit test.</p>
<p class="MsoNormal">With the justifications for deployment being a core part of continuous integration, I’m up for moving on to how it’s done. Now that distributed enterprise CI servers are becoming the norm, we can have a deployment <span> </span>agent on the machines in our QA and production environments that can grab our tested artifacts and run the same deployment scripts used in testing, for example. This is only one approach, though, and I’ll save a more in-depth discussion for another post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bobbynorton.com/?feed=rss2&amp;p=22</wfw:commentRss>
		</item>
		<item>
		<title>Continuous deployment? What do you mean?</title>
		<link>http://www.bobbynorton.com/?p=14</link>
		<comments>http://www.bobbynorton.com/?p=14#comments</comments>
		<pubDate>Wed, 29 Apr 2009 17:10:02 +0000</pubDate>
		<dc:creator>bobby</dc:creator>
		
		<category><![CDATA[Build and Deployment]]></category>

		<guid isPermaLink="false">http://www.bobbynorton.com/?p=14</guid>
		<description><![CDATA[&#8220;You&#8217;re going to deploy every change to production? Is that every time you save a file? How about every keystroke?&#8221;
The downtime and confusion that would ensue could hardly be considered agile.
Of course, this isn&#8217;t what&#8217;s intended by the terms &#8216;continuous integration&#8217; or &#8216;continuous deployment&#8217;. Continual means &#8216;frequent, repeating at intervals&#8217; and continuous means &#8216;going on [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;You&#8217;re going to deploy every change to production? Is that every time you save a file? How about every keystroke?&#8221;</p>
<p>The downtime and confusion that would ensue could hardly be considered agile.</p>
<p>Of course, this isn&#8217;t what&#8217;s intended by the terms &#8216;continuous integration&#8217; or &#8216;continuous deployment&#8217;. Continual means &#8216;frequent, repeating at intervals&#8217; and continuous means &#8216;going on without pause or interruption&#8217;. So shouldn&#8217;t we be talking about &#8216;continual integration&#8217;?</p>
<blockquote><p>&#8220;Continuous Integration increases your opportunities for feedback. Through it, you learn the state of the project several times a day. CI can be used to reduce the time between when a defect is introduced and when it is fixed, thus improving overall software quality.&#8221; - <a href="http://www.amazon.com/Continuous-Integration-Improving-Addison-Wesley-Signature/dp/0321336380%3FSubscriptionId%3D18F0HAA4KWCRBW7SEZG2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0321336380" target="_blank">Continuous Integration: Improving Software Quality and Reducing Risk</a></p></blockquote>
<p>As agile developers, we choose to build and deploy as frequently as we can in order to maximize feedback and the opportunities for learning about the state of a system that is otherwise obfuscated. An interval as often as every check in seems to be a reasonable compromise between frequent feedback and absurdity.</p>
<p>The point of the term continuous isn&#8217;t to be linguistically precise: It&#8217;s to act as a challenge to improve our process by automating as many of our release management tasks as is practical. It&#8217;s about a commitment you make with your team to keep the build green and to fix broken windows as soon as they appear. Is &#8220;post check-in integration&#8221; going to change your team? Is &#8220;pretty frequent deployment&#8221; going to revolutionize your organization? Somehow those terms don&#8217;t quite have the same call to action to them, do they?</p>
<p>The benefits of continuous integration have been <a href="http://www.amazon.com/Continuous-Integration-Improving-Addison-Wesley-Signature/dp/0321336380%3FSubscriptionId%3D18F0HAA4KWCRBW7SEZG2%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0321336380" target="_blank">well-documented</a>. Applying the same automation challenge to deployment is relatively new, but it makes sense. As continuous integration breaks out of it&#8217;s agile home ground and goes mainstream, more people are realizing that they&#8217;re already producing their release candidates as part of the build, so why not actually deploy the same way, using nothing more complicated than scripts and a CI server?</p>
<p>The why&#8217;s and why not&#8217;s of continuous deployment took up an hour when I facilitated a discussion with about 50 participants at <a href="http://citconf.com/msp2009/" target="_blank">CITCON NA 2009</a> this weekend; I&#8217;ll be posting the results of that discussion soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bobbynorton.com/?feed=rss2&amp;p=14</wfw:commentRss>
		</item>
		<item>
		<title>Moving from CI to CID</title>
		<link>http://www.bobbynorton.com/?p=6</link>
		<comments>http://www.bobbynorton.com/?p=6#comments</comments>
		<pubDate>Wed, 11 Mar 2009 17:29:57 +0000</pubDate>
		<dc:creator>bobby</dc:creator>
		
		<category><![CDATA[Build and Deployment]]></category>

		<category><![CDATA[continuous deployment]]></category>

		<category><![CDATA[continuous integration]]></category>

		<guid isPermaLink="false">http://bobbynorton.com/?p=6</guid>
		<description><![CDATA[About two years ago when I started working on Cruise, I set up a Google Alert for &#8220;continuous deployment&#8221;. At first, there was a lot of noise about troop movement in Iraq. Lately, however, things have become much more relevant.
I&#8217;m happy to see this happening: It validates a lot of the theory we built into [...]]]></description>
			<content:encoded><![CDATA[<p>About two years ago when I started working on <a href="http://www.thoughtworks.com/cruise">Cruise</a>, I set up a <a href="http://www.google.com/alerts">Google Alert</a> for &#8220;continuous deployment&#8221;. At first, there was a lot of noise about troop movement in Iraq. Lately, however, things have become <a href="http://www.infoq.com/news/2009/03/Continuous-Deployment">much</a> <a href="http://timothyfitz.wordpress.com/2009/02/10/continuous-deployment-at-imvu-doing-the-impossible-fifty-times-a-day/">more</a> <a href="http://programmerjoe.com/2009/02/12/continuous-deployment-with-thick-clients/">relevant</a>.</p>
<p>I&#8217;m happy to see this happening: It validates a lot of the theory we built into Cruise. The Cruise team and others at ThoughtWorks are as interested in deployment as they are in keeping the builds green. Getting code to production after it passed through successive stages of automated and manual testing fits with a <a href="http://studios.thoughtworks.com/assets/2007/5/11/The-Deployment-Pipeline-by-Dave-Farley-2007.pdf">build pipeline</a> metaphor, so the pipeline became the core abstraction in Cruise.</p>
<p>The Cruise team uses Cruise as a CI and deployment server: There&#8217;s a UAT environment used by the Cruise development team, a pre-production environment used by about 100 ThoughtWorks developers, and the public release that&#8217;s sold to the world. Although the deployment was automated through Ant scripts, we left the <a href="http://studios.thoughtworks.com/cruise-continuous-integration/1.2/help/pipelines_page.html">gates</a> between the deployment stages set to manual to make things a bit more predictable for the development team and, more importantly, our early users. A post on the <a href="http://tech.groups.yahoo.com/group/extremeprogramming/message/137067">XP mailing list</a> I received at the beginning of my Cruise tenure presaged this outcome:</p>
<blockquote>
<pre>On November 27, 2007,  

The biggest barrier to continuous deployment
is gaining the trust that what you're going to
deploy isn't going to destabilize the environment.
This takes time and effort.

John Roth</pre>
</blockquote>
<p>Indeed. No developer wants the CI server to go down during the workday. We were using Cruise to build itself within a couple of iterations of starting the project, but of course the product took some time to stabilize. We rolled out our first production release two weeks after we started using Cruise in UAT. Once our user base increased, many felt that the risks of the production server being down due to a failed deployment outweighed the benefits of getting new features and bug fixes out as they became available: Users were perfectly content to wait until we&#8217;d fielded it in UAT, and even the dev team didn&#8217;t necessarily want to use every check in; it was enough to know that we could trigger a deployment on demand, as we frequently did throughout an iteration.</p>
<p>Should a CI server be concerned with deployment? I think so. Why do you use a CI server in the first place? Immmediate feedback. Visibility. Reporting. The peace of mind that follows. CI also implies automation, and that means executable documentation, repeatability, reduction in errors.</p>
<p>Don&#8217;t we also need all of these benefits in our deployment process? For many new to CI, the continuous integration process leaves off after testing, contributing to the <a href="http://www.pragprog.com/titles/twa/thoughtworks-anthology">&#8220;Last Mile&#8221; problem</a>. I&#8217;ve seen some cases where the supposed CI build doesn&#8217;t have any tests! I hoped these were isolated incidents, but there are enough experience reports to the contrary that lead some to ask whether or not we need <a href="http://www.cmcrossroads.com/content/view/12735/120/">standards for CI</a>. Assuming you&#8217;ve got a working CI build, why not go to the next level and deploy using the CI server?</p>
<p><a href="http://studios.thoughtworks.com/cruise-continuous-integration/deployment-pipelines">Cruise</a>, <a href="http://www.anthillpro.com/html/solutions/deployment-management.html">AnthillPro</a>, and <a href="http://open.controltier.com/">ControlTier</a> have the concept of deployment baked right in. There are doubtless other servers offering these features. Either we&#8217;re all off on a tangent, or were on to something and Continuous Integration (CI) is becoming Continuous Integration &amp; Deployment (CID). Maybe in a few years, leaving deployment out of your CI solution will seem gauche as leaving out tests.</p>
<p>There&#8217;s a lot more to say about how the challenge of continuous deployment affects the software lifecycle and how it fits with more established configuration management practices in CMMI and ITIL. Although I&#8217;ve since left ThoughtWorks, I&#8217;m working on a continuous deployment solution for my new employer, <a href="http://www.drwtrading.com">DRW Trading</a>. I&#8217;ll continue to post more of my thoughts on CI and CD, and I&#8217;m looking forward to discussing more of these ideas with members of the community at <a href="http://citconf.com/msp2009/">CITCON North America</a> in April.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bobbynorton.com/?feed=rss2&amp;p=6</wfw:commentRss>
		</item>
	</channel>
</rss>
