<?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>Steve Freeman</title>
	<atom:link href="http://www.higherorderlogic.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.higherorderlogic.com</link>
	<description>Working software daily</description>
	<lastBuildDate>Mon, 24 Oct 2011 20:24:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Another reason not to log directly in your code</title>
		<link>http://www.higherorderlogic.com/2011/10/another-reason-not-to-log-directly/</link>
		<comments>http://www.higherorderlogic.com/2011/10/another-reason-not-to-log-directly/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 18:13:52 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Test-Driven]]></category>

		<guid isPermaLink="false">http://www.higherorderlogic.com/?p=815</guid>
		<description><![CDATA[I&#8217;ve been ranting for some time that it&#8217;s a bad idea directly to mix logging with production code. The right thing to do is to introduce a collaborator that has a responsibility to provide structured notifications to the outside world about what&#8217;s happening inside an object. I won&#8217;t go through the whole discussion here but, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been ranting <a href="http://www.mockobjects.com/2007/04/test-smell-logging-is-also-feature.html" title="logging is alos a feature" target="_blank">for some time</a> that it&#8217;s a bad idea directly to mix logging with production code. The right thing to do is to introduce a collaborator that has a responsibility to provide structured notifications to the outside world about what&#8217;s happening inside an object. I won&#8217;t go through the whole discussion here but, somehow, I don&#8217;t think I&#8217;m winning this one.</p>

<p>Recently, a team I know provided another reason to avoid mixing production logging with code. They have a system that processes messages and have been asked to record all the accepted messages for later reconciliation with an upstream system. They did what most Java teams would do and logged incoming messages in the class that processes them. Then they associated a special appender with that class&#8217;s logger that writes its entries to a file somewhere for later checking. The appenders are configured in a separate <span class="caps">XML </span>file.</p>

<p>One day the inevitable happened and they renamed the message processing class during a refactoring. This broke the reference in the <span class="caps">XML </span>configuration and the logging stopped. It wasn&#8217;t caught for a little while because there wasn&#8217;t a test. So, lesson one is that, if it matters, there should have been a test for it. But this is a pretty rigorous team that puts a lot of effort into doing things right (I&#8217;ve seen much worse), so how did they miss it? </p>

<p>I think part of it is the effort required to test logging. A unit test won&#8217;t do because the structure includes configuration, and acceptance tests run slowly because loggers buffer to improve performance. And part of it is to do with using a side effect of system infrastructure to implement a service. There&#8217;s nothing in the language of the implementation code that describes the meaning of reporting received messages: &ldquo;it&#8217;s just logging&rdquo;.</p>

<p>Once again, if I want my code to do something, I should just say so&hellip;</p>

<p><em>Update:</em> I&#8217;ve had several responses here and on other media about how teams might avoid this particular failure. All of them are valid, and I know there are techniques for doing what I&#8217;m supposed to while using a logging framework.</p>

<p>I was trying to make a different point&mdash;that some code techniques seem to lead me in better directions than others, and that a logging framework isn&#8217;t one of them. Once again I find that the trickiness in testing an example like this is a clue that I should be looking at my design again. If I introduce a collaboration to receive structured notifications, I can separate the concepts of handling messages and reporting progress. Once I&#8217;ve split out the code to support the reconciliation messages, I can test and administer it separately&mdash;with a clear relationship between the two functions.</p>

<p>None of this guarantees a perfect design, but I find I do better if I let the code do the work.</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2011/10/another-reason-not-to-log-directly/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Test-First Development 1968</title>
		<link>http://www.higherorderlogic.com/2011/10/test-first-development-1968/</link>
		<comments>http://www.higherorderlogic.com/2011/10/test-first-development-1968/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 14:06:40 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Test-Driven]]></category>

		<guid isPermaLink="false">http://www.higherorderlogic.com/?p=808</guid>
		<description><![CDATA[Seeing Kevlin Henney again at the Goto conference reminded me of a quotation he cited at Agile on the Beach last month. In 1968, NATO funded a conference with the then provocative title of Software Engineering. Many people feel that this is the moment when software development lost its way, but the report itself is [...]]]></description>
			<content:encoded><![CDATA[<p>Seeing <a href="https://twitter.com/#!/KevlinHenney" title="Kevlin Henney">Kevlin Henney</a> again at the <a href="http://gotocon.com/" title="Goto conference">Goto conference</a> reminded me of a quotation he cited at <a href="http://agileonthebeach.com/" title="Agile on the Beach">Agile on the Beach</a> last month.</p>

<p>In 1968, <span class="caps">NATO </span>funded a conference with the then provocative title of <em>Software Engineering</em>. Many people feel that this is the moment when software development lost its way, but <a href="http://homepages.cs.ncl.ac.uk/brian.randell/NATO/nato1968.PDF" title="NATO 1968 software engineering report">the report</a> itself is more lively that its title suggests.</p>

<p>It turns out that &#8220;outside in&#8221; development, with early testing is older than we thought. Here&#8217;s a quote from the report by <a href="http://en.wikipedia.org/wiki/Alan_Perlis" title="Alan Perlis">Alan Perlis</a>:</p>

<blockquote>I&#8217;d like to read three sentences to close this issue.
<ol>
 <li>A software system can best be designed if the testing is interlaced with the designing instead of being used after the design.</li>
 <li>A simulation which matches the requirements contains the control which organizes the design of the system.</li>
 <li>Through successive repetitions of this process of interlaced testing and design the model ultimately becomes the software system itself. I think that it is the key of the approach that has been suggested, that there is no such question as testing things after the fact with simulation models, but that in effect the testing and the replacement of simulations with modules that are deeper and more detailed goes on with the simulation model controlling, as it were, the place and order in which these things are done.</li>
</ol></blockquote>

<p>It&#8217;s all out there in our history, we just have to be able to find it.</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2011/10/test-first-development-1968/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>An example of an unhedged software call option</title>
		<link>http://www.higherorderlogic.com/2011/09/an-example-of-an-unhedged-software-call-option/</link>
		<comments>http://www.higherorderlogic.com/2011/09/an-example-of-an-unhedged-software-call-option/#comments</comments>
		<pubDate>Sat, 10 Sep 2011 22:36:57 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Agile Programming]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Software culture]]></category>

		<guid isPermaLink="false">http://www.higherorderlogic.com/?p=743</guid>
		<description><![CDATA[At a client, we&#8217;ve been reworking some particularly hairy calculation code. For better or worse, the convention is that we call a FooFetcher to get hold of a Foo when we need one. Here&#8217;s an example that returns Transfers, which are payments to and from an account. In this case, we&#8217;re mostly getting hold of [...]]]></description>
			<content:encoded><![CDATA[<p>At a client, we&#8217;ve been reworking some particularly hairy calculation code. For better or worse, the convention is that we call a <em>FooFetcher</em> to get hold of a <em>Foo</em> when we need one. Here&#8217;s an example that returns Transfers, which are payments to and from an account. In this case, we&#8217;re mostly getting hold of Transfers directly because can identify them<sup>1</sup>.</p>



<pre>public interface TransferFetcher {
  Transfer      fetchFor(TransferId id);
  Transfer      fetchOffsetFor(Transfer transfer);
  Set&lt;Transfer&gt; fetchOutstandingFor(Client client, CustomerReference reference);
  Transfer      fetchFor(CustomerReference reference);
}</pre>



<p>This looks like a reasonable design&mdash;all the methods are to do with retrieving Transfers&mdash;but it&#8217;s odd that only one of them returns a collection of Transfers. That&#8217;s a clue.</p>

<p>When we looked at the class, we discovered that the <code>fetchOutstandingFor()</code> method has a different implementation from the other methods and pulls in several dependencies that only it needs. In addition, unlike the other methods, it has only one caller (apart from its tests, of course). It doesn&#8217;t really fit in the Fetcher implementation which is now inconsistent.</p>

<p>It&#8217;s easy to imagine how this method got added. The programmers needed to get a feature written, and the code already had a dependency that was concerned with Transfers. It was quicker to add a method to the existing Fetcher, even if that meant making it much more complicated, than to introduce a new collaborator. They <a href="http://www.higherorderlogic.com/2010/07/bad-code-isnt-technical-debt-its-an-unhedged-call-option/" title="unhedged call option" target="_blank">sold a Call Option</a>&mdash;they cashed in the immediate benefit at the cost of weakening the model. The team would be ahead so long as no-one needed to change that code.</p>

<p>The option got called on us. As part of our reworking, we needed to change how Transfer objects were constructed so we could handle a new kind of transaction. The structure we planned meant changing another object, say <code>Accounts</code>, to depend on a <code>TransferFetcher</code>, but the current implementation of <code>TransferFetcher</code> depended on <code>Accounts</code> to implement <code>fetchOutstandingFor()</code>. We had a dependency loop. We should have taken a diversion and moved the behaviour of <code>fetchOutstandingFor()</code> into an appropriate object, but then we had our own delivery pressures. In the end, we found a workaround that allowed us to finish the task we were in the middle of, with a note to come back and fix the Fetcher.</p>

<p>The cost of recovery includes not just the effort of investigating and applying a solution (which would have been less when the code was introduced) but also the drag on motivation. It&#8217;s a huge <a href="http://en.wikipedia.org/wiki/Gumption_trap" title="from Zen and the Art of Motrocycle Maintenance" target="_blank">gumption trap</a> to be making steady progress towards a goal and then be knocked off course by an unnecessary design flaw. The research described in <a href="http://www.progressprinciple.com/">The Progress Principal</a> suggests that small blockers like this have a disproportionate impact compared to their size. Time to break for a cup of tea.</p>

<p>I believe that software quality is a cumulative property. It&#8217;s the accumulation of many small good or bad design decisions that either make a codebase productive to work with or just too expensive to maintain.</p> 

<p>&hellip;and, right on cue, Rangwald talks about <a href="http://raganwald.posterous.com/javas-comb-over" title="Tyranny of the urgent" target="_blank">The Tyranny of the Urgent</a>.</p>

<hr/><br />
<p style="font-size: 0.8em;">1) The details of the domain have been changed to protect the innocent, so please don&#8217;t worry too much about the detail.</p>
<p style="font-size: 0.8em;">Thanks to @aparker42 for his comments</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2011/09/an-example-of-an-unhedged-software-call-option/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Going to Goto (twice)</title>
		<link>http://www.higherorderlogic.com/2011/09/going-to-goto-twice/</link>
		<comments>http://www.higherorderlogic.com/2011/09/going-to-goto-twice/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 20:49:00 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Agile Programming]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Test-Driven]]></category>

		<guid isPermaLink="false">http://www.higherorderlogic.com/?p=727</guid>
		<description><![CDATA[I&#8217;ll be at Goto Aarhus October 9-14 this year, giving a presentation and workshop on Nat Pryce and my material on using Test-Driven Development at multiple levels, guiding the design of system components as well as the objects within them. If you register with the code free1250, you&#8217;ll get a discount of 1250 DKK and [...]]]></description>
			<content:encoded><![CDATA[<p><img alt="GOTO Conferences" src="/images/goto_logo.png" class="alignright" width="93" height="90" />I&#8217;ll be at Goto <a href="http://gotocon.com/aarhus-2011/" title="Goto Aarhus">Aarhus</a> October 9-14 this year, giving a <a href="http://gotocon.com/aarhus-2011/presentation/Fractal%20TDD.%20Using%20tests%20to%20drive%20system%20design">presentation</a> and <a href="http://gotocon.com/aarhus-2011/presentation/Hands-On%20:%20TDD%20at%20the%20System%20Scale" target="_blank">workshop</a> on <a href="http://www.natpryce.com/" target="_blank">Nat Pryce</a> and my material on using Test-Driven Development at multiple levels, guiding the design of system components as well as the objects within them. </p>

<p>If you register with the code <em>free1250</em>, you&#8217;ll get a discount of 1250 <span class="caps">DKK </span>and Goto will donate the same amount to <a href="http://www.computersforcharities.co.uk/" target="_blank">Computers for Charities</a></p>

<p>Some of us are then rushing to Goto <a href="http://gotocon.com/amsterdam-2011/">Amsterdam</a>, where I&#8217;ll be giving the talk again on Friday. Again the code <em>free1250</em> will do something wonderful, but I&#8217;m not quite sure what.</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2011/09/going-to-goto-twice/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Is Dependency Injection like Facebook?</title>
		<link>http://www.higherorderlogic.com/2011/07/is-dependency-injection-like-facebook/</link>
		<comments>http://www.higherorderlogic.com/2011/07/is-dependency-injection-like-facebook/#comments</comments>
		<pubDate>Sun, 31 Jul 2011 02:40:05 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=641</guid>
		<description><![CDATA[The problem with social networks I think there&#8217;s a description in Paul Adams&#8217; talk about online vs. offline social networks of how Dependency Injection goes bad, particularly when using one of the many automated frameworks. Adams describes a research subject Debbie who, in &#8220;real life&#8221; has friends and contacts from very different walks of life. [...]]]></description>
			<content:encoded><![CDATA[<h2>The problem with social networks</h2>

<p>I think there&#8217;s a description in <a href="http://www.thinkoutsidein.com/blog/2010/04/presenting-the-real-life-social-network-at-the-ia-summit/" title="online vs. offline social networks" target="_blank">Paul Adams&#8217; talk about online vs. offline social networks</a> of how <a href="http://en.wikipedia.org/wiki/Dependency_injection" target="_blank">Dependency Injection</a> goes bad, particularly when using one of the <a href="http://en.wikipedia.org/wiki/Spring_Framework" title="Spring" target="_blank">many</a> <a href="http://picocontainer.org/" title="Pico Container" target="_blank">automated</a> <a href="http://code.google.com/p/google-guice/" title="google guice" target="_blank">frameworks</a>.</p>
<img alt="" src="/images/di-friends-and-groups.png" title="Debbie's friends and groups" style="float: right; margin-left: 10px;" />

<p style="text-align: justify;">Adams describes a research subject Debbie who, in &ldquo;real life&rdquo; has friends and contacts from very different walks of life. She has friends from college with alternative lifestyles who post images from their favourite LA gay bars. She also trains local 10-year olds in competitive swimming. Both the college friends and swimming kids have &ldquo;friended&rdquo; her. She was horrified to discover that these two worlds had inadvertently become linked though her social networking account. </p>

<p>This is the &ldquo;<a href="http://www.facebook.com/" title="facebook" target="_blank">Facebook</a> problem&rdquo;. The assumption that all relationships are equivalent was good enough for college dorms but doesn&#8217;t really scale to the rest of the world, hence <a href="http://plus.google.com" title="Google+" target="_blank">Google+</a>. As Adams points out,</p>
<blockquote>Facebook itself is not the problem here. The problem here is that these are different parts of Debbie&#8217;s life that would never have been exposed to each other offline were linked online.</blockquote>

<p>Like most users, Debbie wasn&#8217;t thinking of the bigger picture when she bound the whole of her life together. She was just connecting to people she knew and commenting on some pictures of guys with cute buns.</p>

<h2>Simile alert!</h2>

<p>Let&#8217;s revisit the right-hand side of that illustration.</p>
<img alt="" src="/images/di-ports-and-adapters.png" title="Ports and Adapters" style="float: right; margin-left: 10px;"/>
<p style="text-align: justify;">This is <a href="http://www.natpryce.com" title="Nat Pryce" target="_blank">Nat</a>&#8216;s diagram for the <a href="http://alistair.cockburn.us/Hexagonal+architecture" title="ports and adapters" target="_blank">Ports and Adapters</a> pattern. It illustrates how some people (including us) think system components should be built, with the domain logic in the centre protected from the accidental complexity of the outside world by a layer of adapters. I do <em>not</em> want to have my web code inadvertently linked directly to my persistence code (or even connected to LA gay bars).</p>

<p>That&#8217;s the trouble with the use of DI frameworks in systems that I&#8217;ve seen, there&#8217;s only one level of relationship: get me an object from the container. When I&#8217;m adding a feature, I just want to get hold of some component&mdash;and here&#8217;s an easy way to do it. It takes a lot of rigour to step back at every access to consider whether I&#8217;m introducing a subtle link between components that really shouldn&#8217;t know about each other.</p>

<p>I know that most of the frameworks support managing different contexts but it seems that, frankly, that&#8217;s more thinking and organisation than most teams have time for at the beginning of a project. As for cleaning up after the fact, well it&#8217;s a good way to make a living if the company can afford it and you like solving complex puzzles. More critical, however, is that the Ports and Adapters structure is recursive. Trying to manage the environments of multiple levels of subsystem with most current containers would be, in <a href="http://peripateticaxiom.blogspot.com/" title="Keith Braithwaite" target="_blank">Keith Braithwaite</a>&#8216;s words, &ldquo;impossible and/or insane&rdquo;.</p>

<h2><code>new</code> again</h2>

<p>The answer, I believe, is to save the DI frameworks for the real boundaries of the system, the parts which might change from installation to installation. Otherwise, I gather object assembly into specialised areas of the code where I can build up the run-time structure of the system with the deft use of constructors and <code>new</code>. It&#8217;ll look a bit complex but no worse than the equivalent DI structure (and everyone should learn to read code that looks like lisp).</p>

<p>If I later find that I can&#8217;t get access to some component that I think I need, that&#8217;s not necessarily a bad thing. It&#8217;s telling me that I&#8217;m introducing a new dependency and sometimes that&#8217;s a hint that a component is in the wrong place, or that I&#8217;m trying to use it from the wrong place. The coding bump is a design feedback mechanism that I miss when I can just pull objects out of a container. If I do a good job, I should find that, most of the time, I have just the right components at the time that I need them.</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2011/07/is-dependency-injection-like-facebook/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Test-Driven Development and Embracing Failure</title>
		<link>http://www.higherorderlogic.com/2011/04/tdd-embracing-failure/</link>
		<comments>http://www.higherorderlogic.com/2011/04/tdd-embracing-failure/#comments</comments>
		<pubDate>Mon, 25 Apr 2011 22:33:04 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Software culture]]></category>
		<category><![CDATA[Test-Driven]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=590</guid>
		<description><![CDATA[At the last London XpDay, some teams talked about their &#8220;post-XP&#8221; approach. In particular, they don&#8217;t do much Test-Driven Development because they find it&#8217;s not worth the effort. I visited one of them, Forward, and saw how they&#8217;d partitioned their system into composable actors, each of which was small enough to fit into a couple [...]]]></description>
			<content:encoded><![CDATA[<p>At the last <a href="http://www.xpday.org/">London XpDay</a>, some teams talked about their &#8220;post-XP&#8221; approach. In particular, they don&#8217;t do much Test-Driven Development because they find it&#8217;s not worth the effort. I visited one of them, <a href="http://www.Forward.co.uk">Forward</a>, and saw how they&#8217;d partitioned their system into composable actors, each of which was small enough to fit into a couple of screens of Ruby. They release new code to a single server in their farm, watching the traffic statistics that result. If it&#8217;s successful, they carefully propagate it out to the rest of the farm. If not, they pull it and try something else. In their world, the improvement in traffic statistics, the end benefit of the feature, is what they look for, not the implemented functionality.</p>

<p>I think this fits into Dave Snowden&#8217;s <a href="http://en.wikipedia.org/wiki/Cynefin">Cynefin</a> framework, where he distinguishes between the ordered and unordered domains. In the <em>ordered</em> domain, causes lead to effects. This might be difficult to see and require an expert to interpret, but essentially we expect to see the same results when we repeat an action. In the complex, <em>unordered</em> domain, there is no such promise. For example, we know that flocking birds are driven by three simple rules but we can&#8217;t predict exactly where a flock will go next. Groups of people are even more complex, as conscious individuals can change the structure of a system whilst being part of it. We need different techniques for working with ordered and unordered systems, as anyone who&#8217;s tried to impose order on a gang of unruly programmers will know.</p>

<p>Loosely, we use rules and expert knowledge for ordered systems, the appropriate actions can be decided from outside the system. Much of the software we&#8217;re commissioned to build is about lowering the cost of expertise by encoding human decision-making. This works for, say ticket processing, but is problematic for complex domains where the result of an action is literally unknowable. There, the best we can do to influence a system is to try probing it and be prepared to respond quickly to whatever happens. <a href="http://www.metaprog.com/blogs/2009/10/on-retrospective-coherence-part-1/">Joseph Pelrine</a> uses the example of a house party&mdash;a good host knows when to introduce people, when to top up the drinks, and when to rescue someone from that awful bore from <span class="caps">IT.</span> A party where everyone is instructed to re-enact all the moves from last time is unlikely to be equally successful<sup>1</sup>. Online start-ups are another example of operating in a complex environment: the Internet. Nobody really knows what all those people will do, so the best option is to act, to ship something, and then respond as the behaviour becomes clearer. </p>

<p>Snowden distinguishes between &#8220;fail-safe&#8221; and &#8220;<a href="http://www.cognitive-edge.com/blogs/dave/2007/11/safefail_probes.php">safe-fail</a>&#8221; initiatives. We use use <em>fail-safe</em> techniques for ordered systems because we know what&#8217;s supposed to happen and it&#8217;s more effective to get things right&mdash;we want a build system that just works. We use <em>safe-fail</em> techniques for unordered systems because the best we can do is to try different actions, none of which is large enough to damage the system, until we find something that takes us in the right direction&mdash;with a room full of excitable children we might try playing a video to see if it calms them down.</p>

<p>At the technical level, Test-Driven Development is largely fail-safe. It allows us, amongst other benefits, to develop code that just works (for multiple meanings of &#8220;work&#8221;). We take a little extra time around the writing of the code, which more than pays back within the larger development cycle. At higher levels, <span class="caps">TDD </span>can support safe-fail development because it lowers the cost of changing our mind later. This allows us to take an interim decision now about which small feature to implement next or which design to choose. We can afford to revisit it later when we&#8217;ve seen the result without crashing the whole project.</p>

<p>Continuous deployment environments such as at Forward<sup>2</sup>, on the other hand, emphasize &#8220;safe-fail&#8221;. The system is partitioned up so that no individual change can damage it, and the feedback loop is tight enough that the team can detect and respond to changes very quickly. That said, even the niftiest lean start-up will have fail-safe elements too, a sustained network failure or a data breach could be the end of the company. Start-ups that fail to understand this end up teetering on the edge of disaster.</p>

<p>We&#8217;ve learned a lot over the last ten years about how to tune our development practices. Test-Driven Development is no more &#8220;over&#8221; than Object-Orientation is, it&#8217;s just that we understand better how to apply it. I think our early understanding was coloured by the fact that the original eXtreme Programming project, <a href="http://en.wikipedia.org/wiki/Chrysler_Comprehensive_Compensation_System">C3</a>, was payroll, an ordered system; I don&#8217;t want my pay cheque worked out by trying some numbers and seeing who complains<sup>3</sup>. We learned to Embrace Change, that it&#8217;s a sign of a healthy development environment rather than a problem. As we&#8217;ve expanded into less predictable domains, we&#8217;re also learning to Embrace Failure.</p>

<p><hr/><br />
1) this is a pretty good description of many &#8220;Best Practice&#8221; initiatives<br />
2) Fred George has been documenting safe-fail in the organisation of his development group too, he calls it &#8220;<a href="http://www.infoq.com/presentations/Leaner-Programmer-Anarchy">Programmer Anarchy</a>&#8220;<br />
3) although I&#8217;ve seen shops that come close to this</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2011/04/tdd-embracing-failure/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Speaking and tuting at QCon London. 7-11 March</title>
		<link>http://www.higherorderlogic.com/2011/01/speaking-and-tuting-at-qcon-london-7-11-march/</link>
		<comments>http://www.higherorderlogic.com/2011/01/speaking-and-tuting-at-qcon-london-7-11-march/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 21:19:41 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Software culture]]></category>
		<category><![CDATA[Test-Driven]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=575</guid>
		<description><![CDATA[Nat and I will be running our &#8220;TDD at the System Scale&#8221; tutorial at QCon London. Sign up soon. I&#8217;ll also be presenting an engaging rant on why we should aspire to living and working in a world where stuff just works. If you quote the promotion code FREE100 when you sign up, QCon will [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/speaking-at-qcon-2011.jpg" alt="Speaking at QCon London 2011" style="float:right; margin-left: 5px;"/> <a href="http://www.natpryce.com">Nat</a> and I will be running our <a href="http://qconlondon.com/london-2011/presentation/Hands-On+:+TDD+at+the+System+Scale">&#8220;TDD at the System Scale&#8221; </a> tutorial at <a href="http://qconlondon.com/london-2011/conference/">QCon London</a>. Sign up soon.</p>

<p>I&#8217;ll also be presenting an <a href="http://qconlondon.com/london-2011/presentation/Better+is+Better">engaging rant</a> on why we should aspire to living and working in a world where stuff just works.</p>

<p>If you quote the promotion code <code>FREE100</code> when you sign up, QCon will give you a discount of &pound;100 and the same amount to <a href="http://www.crisis.org.uk/index.php">Crisis Charity</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2011/01/speaking-and-tuting-at-qcon-london-7-11-march/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are we being primed for?</title>
		<link>http://www.higherorderlogic.com/2010/09/what-are-we-being-primed-for/</link>
		<comments>http://www.higherorderlogic.com/2010/09/what-are-we-being-primed-for/#comments</comments>
		<pubDate>Sun, 26 Sep 2010 10:29:35 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Organisations]]></category>
		<category><![CDATA[Software culture]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=548</guid>
		<description><![CDATA[The excellent BBC popular science programme Bang Goes the Theory, recently reproduced this experiment on priming. In the original experiment, the subjects were primed by being asked to write sentences based on sets of words: one set was neutral and the other contained words related to an elderly sterotype. The result was that participants for [...]]]></description>
			<content:encoded><![CDATA[<p>The excellent <span class="caps">BBC </span>popular science programme <a href="http://www.bbc.co.uk/bang/">Bang Goes the Theory</a>, recently reproduced <a href="http://www.yale.edu/acmelab/articles/bargh_chen_burrows_1996.pdf">this experiment</a> on priming. In the original experiment, the subjects were primed by being asked to write sentences based on sets of words: one set was neutral and the other contained words related to an elderly sterotype. The result was that</p>
<blockquote>participants for whom an elderly stereotype was primed walked more slowly down the hallway when leaving the experiment than did control participants, consistent with the content of that stereotype. </blockquote>
<p>In the &#8220;Bang&#8221; experiment, they took two queues of people entering the <a href="http://www.sciencemuseum.org.uk/">Science Museum</a> and placed pictures of the elderly and infirm around one queue, and  the young and active around the other. The result was the same, people in the queue with the elderly images took significantly longer to walk into the building.</p>
<p>It&#8217;s striking that such a small thing can affect how we behave.</p>
<p>Now, look around your work environment and consider what it&#8217;s priming <em>you</em> for. Are you seeing artefacts of purpose and effectiveness? Or does it speak of regimentation and decay? Now look at your computer screen. Are you seeing an environment that emphasises productivity and quality? Or does it speak of control and ugliness?</p>
<p>It&#8217;s amazing that some of us get anything done at all.</p>
<p>This isn&#8217;t about spending lots of money to look nice (although that espresso machine is appreciated). I suspect that the sort of &#8220;funky, creative&#8221; offices that get commissioned from designers dressed in black are usually an upmarket version of motivational posters.  </p>
<p>My guess is that a truly productive environment must have some &#8220;authenticity&#8221; for the people who spend most of their days in it. Most geeks I know would be happy with a trestle-table provided they get to spend the difference on a good chair and powerful kit, and other disciplines might have other priorities.</p> 
<p>But then, perhaps every environment <em>is</em> authentic since the organisation is making clear what it really values most. And what might that imply?&hellip;</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2010/09/what-are-we-being-primed-for/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Bad code isn&#8217;t Technical Debt, it&#8217;s an unhedged Call Option</title>
		<link>http://www.higherorderlogic.com/2010/07/bad-code-isnt-technical-debt-its-an-unhedged-call-option/</link>
		<comments>http://www.higherorderlogic.com/2010/07/bad-code-isnt-technical-debt-its-an-unhedged-call-option/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 14:15:15 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Agile Programming]]></category>
		<category><![CDATA[Software culture]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=503</guid>
		<description><![CDATA[I&#8217;d been meaning to write this up for a while, and now Nat Pryce has written up the 140 character version. This is all Chris Matts&#8216; idea. He realised that the problem with the &#8220;Technical Debt&#8221; metaphor is that for managers debt can be a good thing. Executives can be required to take on more [...]]]></description>
			<content:encoded><![CDATA[<p style="font-size: 0.8em">I&#8217;d been meaning to write this up for a while, and now Nat Pryce has written up the <a href="http://twitter.com/natpryce/status/19286162811">140 character version</a>.</p>

<p><img style="float:right" src="http://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Short_call_option.svg/200px-Short_call_option.svg.png" alt="Payoff from writing a call." /></p>

<p>This is all <a href="http://abc.truemesh.com/">Chris Matts</a>&#8216; idea. He realised that the problem with the &#8220;Technical Debt&#8221; metaphor is that for managers debt can be a good thing. Executives can be required to take on more debt because it makes the finances work better, it might even be encouraged by tax breaks. This is not the same debt as your personal credit card. Chris came up with a better metaphor, the <em>Call Option</em>.</p>

<p>I &#8220;write&#8221; a <a href="http://en.wikipedia.org/wiki/Call_option">Call Option</a> when I sell someone the right, but not the obligation, to buy in the future an agreed quantity of something at an price that is fixed now. So, for a payment now, I agree to sell you 10,000 chocolate santas<sup class="footnote"><a href="#fn1">1</a></sup> at 56 pence each, at any time up to 10th December. You&#8217;re prepared to pay the premium because you want to know that you&#8217;ll have santas in your stores at a price you can sell.</p>

<p>From my side, if the price of the santas stays low, I get to keep your payment and I&#8217;m ahead. But, I also run the risk of having to provide these santas when the price has rocketed to 72 pence. I can protect myself by making arrangements with another party to acquire them at 56 pence or less, or by actually having them in stock. <em>Or</em>, I can take a chance and just collect the premium. This is called an unhedged, or <a href="http://en.wikipedia.org/wiki/Naked_call">&#8220;Naked&#8221;</a>, Call. In the financial world this is risky because it has unlimited downside, I have to supply the santas <em>whatever</em> they cost me to provide.</p>

<p>Call options are a better model than debt for cruddy code (without tests) because they capture the unpredictability of what we do. If I slap in an a feature without cleaning up then I get the benefit immediately, I collect the premium. If I never see that code again, then I&#8217;m ahead and, in retrospect, it would have been foolish to have spent time cleaning it up.</p>

<p>On the other hand, if a radical new feature comes in that I have to do, all those quick fixes suddenly become very expensive to work with. Examples I&#8217;ve seen are a big new client that requires a port to a different platform, or a new regulatory requirement that needs a new report. I get equivalent problems if there&#8217;s a failure I have to interpret and fix just before a deadline, or the team members turn over completely and no-one remembers the tacit knowledge that helps the code make sense. The market has moved away from where I thought it was going to be and my option has been called.</p>

<p>Even if it is more expensive to do things cleanly (and I&#8217;m not convinced of that beyond a two-week horizon), it&#8217;s also less risky. A messy system is full of unhedged calls, each of which can cost an unpredictable amount should they ever be exercised. We&#8217;ve all seen what this can do in the financial markets, and the scary thing is that failure, if it comes, can be sudden&mdash;everything is fine until it isn&#8217;t. I&#8217;ve seen a few systems which are just too hard to change to keep up with the competition and the owners are in real trouble.</p>

<p>So that makes refactoring like buying an option too. I pay a premium now so that I have more choices about where I might take the code later. This is a mundane and obvious activity in many aspects of business&mdash;although not, it seems, software development. I don&#8217;t need to spend this money if I know exactly what will happen, if I have perfect knowledge of the relevant parts of the future, but I don&#8217;t recall when I last saw this happen.</p>

<p>So, the next time you have to deal with implausible delivery dates, don&#8217;t talk about Technical Debt. Debt is predictable and can be managed, it&#8217;s just another tool. Try talking about an Unhedged Call. Now all we need is a way to price Code Smells.</p>

<hr/><br />
<p>1) There is an apocryphal story about a trader buying chocolate santa futures and forgetting to sell them on. Eventually a truckload turned up at the Wall Street headquarters.</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2010/07/bad-code-isnt-technical-debt-its-an-unhedged-call-option/feed/</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
		<item>
		<title>Machiavelli on code quality</title>
		<link>http://www.higherorderlogic.com/2010/04/machiavelli-on-code-quality/</link>
		<comments>http://www.higherorderlogic.com/2010/04/machiavelli-on-code-quality/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 08:04:22 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Agile Programming]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Software culture]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=488</guid>
		<description><![CDATA[As the doctors say of a wasting disease, to start with, it is easy to cure but difficult to diagnose. After a time, unless it has been diagnosed and treated at the outset, it becomes easy to diagnose but difficult to cure. &#8212;&#160;Nicolo Machiavelli, The Prince via Dee Hock, Birth of the Chaordic Age]]></description>
			<content:encoded><![CDATA[<blockquote>As the doctors say of a wasting disease, to start with, it is easy to cure but difficult to diagnose. After a time, unless it has been diagnosed and treated at the outset, it becomes easy to diagnose but difficult to cure.</blockquote>
<p style="text-align:right;">&mdash;&nbsp;Nicolo Machiavelli, <em>The Prince</em></p>
<em>via</em> Dee Hock, <i>Birth of the Chaordic Age</i>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2010/04/machiavelli-on-code-quality/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Not a charter for hackers</title>
		<link>http://www.higherorderlogic.com/2010/04/not-a-charter-for-hackers/</link>
		<comments>http://www.higherorderlogic.com/2010/04/not-a-charter-for-hackers/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 07:55:05 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Organisations]]></category>
		<category><![CDATA[Software culture]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=468</guid>
		<description><![CDATA[Just had to turn off comments since this post has become a spam target. Sorry. Update: Kent since tweeted this nice one-liner: a complete engineer can code for latency or throughput and knows when and how to switch Kent Beck&#8217;s excellent keynote at the Startup Lessons Learned Conference has been attracting some attention on The [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 0.8em; font-style:italic">Just had to turn off comments since this post has become a spam target. Sorry. </span></p>

Update: Kent since tweeted this nice one-liner:<br />
<blockquote>a complete engineer can code for latency or throughput and knows when and how to switch</blockquote>
<hr/><br />
Kent Beck&#8217;s <a href="http://www.justin.tv/startuplessonslearned/b/262656520">excellent keynote</a> at the <a href="http://www.sllconf.com/">Startup Lessons Learned Conference</a> has been attracting some attention on The Interweb. In particular, it seems like he&#8217;s now saying that careful engineering is wasteful&mdash;just copy and tweak those files to get a result <em>now</em>. I can already hear how this will be cited by frustrated proprietors and managers around the world (more on this in a moment).

<p>What I think he actually said is that we should make engineering trade-offs. When we&#8217;re concerned with learning, then we want the fastest turnaround possible. It&#8217;s like a physics apparatus, it&#8217;s over-engineered if it lasts beyond the experiment. <em>But</em>, if we&#8217;re delivering stuff that people will actually use, that we want them to rely on, then the trade-off is different and we should do all that testing, refactoring, and so on that he&#8217;s been talking about for the last ten years. Kent brushes over that engineering stuff in his talk, but it&#8217;s easy to forget how rare timely, quality delivery is in the field.</p>

<p>My favourite part is Kent&#8217;s answer to the last question. A stressed manager or owner asks how to get his developers to stop being so careful and <em>just ship something</em>. Kent&#8217;s reply is to present the developers with the real problem, not the manager&#8217;s solution, and let them find a way. What the manager really wants is cheap feedback on some different options. The developers, given a chance, might find a better solution altogether, without being forced into arbitrarily dropping quality.</p>

<p>Good developers insist on maintaining quality, partly to maintain pride in their work (as Deming proposed), but also because we&#8217;ve all learned that it&#8217;s the best route to sustained delivery. </p>

<p>As Brian Marick <a href="http://www.exampler.com/blog/2010/04/04/about-business-value/">pointed out recently</a>, it&#8217;s about achieving more (much more) through relationships, not one side or another achieving dominance. </p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2010/04/not-a-charter-for-hackers/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Mark Twain again</title>
		<link>http://www.higherorderlogic.com/2010/03/mark-twain-again/</link>
		<comments>http://www.higherorderlogic.com/2010/03/mark-twain-again/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 14:24:11 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Organisations]]></category>
		<category><![CDATA[Software culture]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=456</guid>
		<description><![CDATA[We should be careful to get out of an experience only the wisdom that is in it&#8212;and stop there&#8212;lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again, and that is well; but also she will never sit down on a cold [...]]]></description>
			<content:encoded><![CDATA[<blockquote>We should be careful to get out of an experience only the wisdom that is in it&mdash;and stop there&mdash;lest we be like the cat that sits down on a hot stove-lid. She will never sit down on a hot stove-lid again, and that is well; but also she will never sit down on a cold one any more.</blockquote>

<p>via <a href="http://www.gembapantarei.com/2010/02/the_wisdom_within_the_experience_1.html">Gemba Panta Rei</a></p>

<p style="font-size:0.9em">Twain also wrote of opera, &#8220;that sort of intense but incoherent noise which always so reminds me of the time the orphan asylum burned down.&#8221;</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2010/03/mark-twain-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling an Oracle stored procedure with a Table parameter with Spring&#8217;s StoredProcedure class</title>
		<link>http://www.higherorderlogic.com/2010/02/calling-an-oracle-stored-procedure-with-a-table-parameter-with-springs-storedprocedure-class/</link>
		<comments>http://www.higherorderlogic.com/2010/02/calling-an-oracle-stored-procedure-with-a-table-parameter-with-springs-storedprocedure-class/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 23:08:00 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=427</guid>
		<description><![CDATA[I don&#8217;t normally do this sort of thing, but this took my colleague Tony Lawrence and me a while to figure out and we didn&#8217;t find a good explanation on the web. This will be a very dull posting unless you need to fix this particular problem. Sorry about that. We happen to be using [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t normally do this sort of thing, but this took my colleague Tony Lawrence and me a while to figure out and we didn&#8217;t find a good explanation on the web. This will be a very dull posting unless you need to fix this particular problem. Sorry about that.</p>

<p>We happen to be using the Spring database helper classes to talk to Oracle with stored procedures. It turns out that there&#8217;s a bug in the driver that means that you have to jump through a few hoops to pass values in when the input parameter type is a table. This should be equivalent to an array, but apparently it isn&#8217;t, so you have to set up the callable statement correctly. Where to do this was not obvious (to us) in the Spring framework.</p>

<p>Here&#8217;s an example stored procedure declaration:</p>



<pre>CREATE TYPE VARCHARTAB IS TABLE OF VARCHAR2(255);

CREATE PACKAGE db_package {
  TYPE list_type IS TABLE OF VARCHAR2(50) INDEX BY BINARY_INTEGER;
PROCEDURE a_stored_procedure(
  table_in IN list_type
)</pre>



<p>The <code>table_in</code> parameter type <code>list_type</code> is declared within a package, which means we can&#8217;t declare the parameter as an <code>OracleTypes.ARRAY</code> when setting up the statement.  Instead we declare it as the type of the table contents <code>OracleTypes.VARCHAR</code>

</p>



<pre>class MyProcedure extends StoredProcedure {
  public MyProcedure(DataSource dataSource) {
    super(dataSource, &quot;db_package.a_stored_procedure&quot;);
    declareParameter(new SqlParameter(&quot;table_in&quot;, 
                                      OracleTypes.VARCHAR));
    compile();
  }
  
  void call(String... values) {
    execute(withParameters(values));
  }</pre>



<p>Here&#8217;s the money quote. When setting up the parameter, you need to provide it with a <code>SqlTypeValue</code>.
Don&#8217;t use one of the helper base classes that come out of the box, but create an implementation directly. That gives you access to the <code>statement</code>, which you can cast and set appropriately.<br />
</p>
  


<pre>   private Map&lt;String, Object&gt; withParameters(String... values) {
      return ImmutableMap.of(&quot;table_in&quot;,
                             oracleIndexTableWith(50, values));
   }

   private  &lt;T&gt; SqlTypeValue 
   oracleIndexTableWith(final int elemMaxLen, final T... values) {
     return new SqlTypeValue() {
       @Override
       public void setTypeValue(
         PreparedStatement statement, int paramIndex, 
         int sqlType, String typeName) throws SQLException 
      {
         ((OracleCallableStatement)statement).setPlsqlIndexTable(
            paramIndex, values, values.length, values.length,  
            sqlType, elemMaxLen);
       }
     };
   }
}</pre>



<p>That&#8217;s it. Happy copy and paste.</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2010/02/calling-an-oracle-stored-procedure-with-a-table-parameter-with-springs-storedprocedure-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Responding to Brian Marick</title>
		<link>http://www.higherorderlogic.com/2010/01/responding-to-brian-marick/</link>
		<comments>http://www.higherorderlogic.com/2010/01/responding-to-brian-marick/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 22:10:39 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Agile Programming]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Test-Driven]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=385</guid>
		<description><![CDATA[Brian&#8217;s been paying us the compliment of taking our book seriously and working through our extended example, translating it to Ruby. He has a point of contention in that he&#8217;s doubtful about the value of our end-to-end tests. To be more precise, he&#8217;s doubtful about the value of our automated end-to-end tests, a view shared [...]]]></description>
			<content:encoded><![CDATA[<p>Brian&#8217;s been paying us the compliment of taking <a href="http://www.growing-object-oriented-software.com/">our book</a> seriously and working through our extended example, translating it to Ruby. </p>

<p>He has a <a href="http://www.exampler.com/blog/2010/01/08/some-preliminary-thoughts-on-end-to-end-testing-in-growing-object-oriented-software/">point of contention</a> in that he&#8217;s doubtful about the value of our end-to-end tests. To be more precise, he&#8217;s doubtful about the value of our <em>automated</em> end-to-end tests, a view shared by <a href="http://www.jbrains.ca/integration_tests_are_a_scam"><span class="caps">J.B.R</span>ainsberger</a>, and <a href="http://agile2009.agilealliance.org/node/1010">Arlo Belshee and Jim Shore</a>. That&#8217;s a pretty serious group. I think the answer, as always, is &ldquo;it depends&rdquo;. </p>

<p>There are real advantages to writing automated end-to-end tests. As Nat pointed out in <a href="http://groups.google.com/group/growing-object-oriented-software/browse_thread/thread/5525c6acdd143be6">an extended message</a> to the mailing list for the book, </p>

<blockquote>Most significantly to me, however, is the difference between &#8220;testing&#8221; end-to-end or through the <span class="caps">GUI </span>and &#8220;test-driving&#8221;. A lot of people who are evangelical about <span class="caps">TDD </span>for coding do not use end-to-end tests for driving design at the system scale. I have found that writing tests gives useful design feedback, no matter what the scale.</blockquote>

<p>For example, during Arlo and Jim&#8217;s session, I was struck by how many of the &ldquo;failure stories&rdquo; described situations where the acceptance tests were actually doing their job: revealing problems (such as deployment difficulties) that needed to be fixed.</p>

<p>Automating an end-to-end test helps me think more carefully about what <em>exactly</em> I care about in the next feature.  Automating tests for many features encourages me to work out a language to describe them, which clarifies how I describe the system and makes new features easier to test.</p>

<p>And then there&#8217;s scale. Pretty much anything will work for a small system (although Alan Shalloway <a href="http://www.netobjectives.com/blogs/smart-people-xp-scrum-is-there-a-pattern">has a story</a> about how even a quick demonstrator project can get out of hand). For larger systems, things get complicated, people come and go, and the team isn&#8217;t quite as confident as it needs to be about where things are connected. Perhaps these are symptoms of weaknesses in the team culture, but it seems wasteful to me to take the design experience we gained while writing the features not encode it somewhere.</p>

<p>Of course this comes at a price. Effective end-to-end tests take skill, experience, and (most important) commitment. Not every system I&#8217;ve seen has been programmed by people who are as rigorous as Nat about making the test code expressive or allowing testing to drive the design. Worse, a large collection of badly written end-to-end tests (a pattern I&#8217;ve seen a few times) is a huge drag on development. Is that price worth paying? It (ahem) depends, and part of the skill is in finding the right places to test.</p>

<p>So, let me turn Brian&#8217;s final question around. What would it take to make automated end-to-end tests less scary?</p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2010/01/responding-to-brian-marick/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>London XpDay 7th &amp; 8th December</title>
		<link>http://www.higherorderlogic.com/2009/11/london-xpday-7th-8th-december/</link>
		<comments>http://www.higherorderlogic.com/2009/11/london-xpday-7th-8th-december/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 11:50:02 +0000</pubDate>
		<dc:creator>steve.freeman</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.m3p.co.uk/?p=359</guid>
		<description><![CDATA[There are still a few places left for the London XpDay, an event designed by practitioners for practitioners. We&#8217;re trying the half-Open Space format again, with a day of prepared sessions (some promising experience reports this year) leading to a day of ad-hoc sessions. This means we can have a conference that&#8217;s more responsive to [...]]]></description>
			<content:encoded><![CDATA[<span style="float:right;"><img src="/images/xpday-logo.png" width="140" alt="XP Day"/></span>
<p>There are still a few places left for the <a href="http://www.xpday.org/">London XpDay</a>, an event designed by practitioners for practitioners.</p>

<p>We&#8217;re trying the half-Open Space format again, with a day of prepared sessions (some promising experience reports this year) leading to a day of ad-hoc sessions. This means we can have a conference that&#8217;s more responsive to the needs of the attendees in the room&mdash;if I want to cover a topic I can propose a session.</p>

<p>And we have some interesting keynotes. Apart from Mark Striebeck, talking about scaling up some agile techniques as only Google can, we&#8217;re continuing our tradition of bringing in &rdquo;outside&ldquo; speakers to trigger discussion. We have Doron Swade (who built the calculating engine in the Science Museum) talking about Babbage, and storyteller Terry Saunders.</p>

<p>Nat and I will also be using the opportunity to launch <a href="http://www.growing-object-oriented-software.com/">our book</a> in the <span class="caps">UK.</span></p>]]></content:encoded>
			<wfw:commentRss>http://www.higherorderlogic.com/2009/11/london-xpday-7th-8th-december/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

