<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>XP123</title>
	
	<link>http://xp123.com</link>
	<description>Exploring Extreme Programming</description>
	<lastBuildDate>Sun, 29 Apr 2012 10:20:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/xp123" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="xp123" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>The System Metaphor Explored</title>
		<link>http://xp123.com/articles/the-system-metaphor-explored/</link>
		<comments>http://xp123.com/articles/the-system-metaphor-explored/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 14:00:58 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[metaphor]]></category>
		<category><![CDATA[XPlorations]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2237</guid>
		<description><![CDATA[The System Metaphor is one of the less popular parts of Extreme Programming (XP). Newer descriptions often even omit it. But metaphor is useful &#8211; when you have &#160;a good one, it really helps you understand and organize your system. &#8230; <a href="http://xp123.com/articles/the-system-metaphor-explored/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The System Metaphor is one of the less popular parts of Extreme Programming (XP). Newer descriptions often even omit it. But metaphor <em>is</em> useful &#8211; when you have &nbsp;a good one, it really helps you understand and organize your system.</p>
<p>This post has a couple versions of a tutorial that Steve Wake and I developed and presented at some of the early Agile conferences. It&#39;s released under Creative Commons CC-BY-SA.</p>
<p>Versions: <a href="http://xp123.com/wp-content/uploads/2012/02/SystemMetaphorTutorial.ppt">PPT</a>, <a href="http://xp123.com/wp-content/uploads/2012/02/SystemMetaphorTutorial.pdf">PDF</a>&nbsp;(2-up), <a href="http://xp123.com/wp-content/uploads/2012/02/SystemMetaphorTutorial-with-notes.pdf">PDF with notes</a></p>
<p>Thee&#39;s also a <a href="http://www.slideshare.net/wwake/the-system-metaphor-explored">SlideShare version</a>.&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/the-system-metaphor-explored/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Independent Stories in the INVEST Model</title>
		<link>http://xp123.com/articles/independent-stories-in-the-invest-model/</link>
		<comments>http://xp123.com/articles/independent-stories-in-the-invest-model/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 13:51:40 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[customer]]></category>
		<category><![CDATA[stories]]></category>
		<category><![CDATA[XPlorations]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2215</guid>
		<description><![CDATA[The INVEST model is a reminder of the important characteristics of user stories, and it starts with I for Independent. Independent stories each describe different aspects of a system&#39;s capabilities. They are easier to work with because each one can &#8230; <a href="http://xp123.com/articles/independent-stories-in-the-invest-model/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://xp123.com/articles/invest-in-good-stories-and-smart-tasks/">INVEST</a> model is a reminder of the important characteristics of user stories, and it starts with <strong>I</strong> for <strong>Independent</strong>.</p>
<p>Independent stories each describe different aspects of a system&#39;s capabilities. They are easier to work with because each one can be (mostly) understood, tracked, implemented, tested, etc. on its own.&nbsp;</p>
<p>Agile software approaches are flexible, better able to pursue whatever <em>is</em> most valuable today, not constrained to follow a 6-month old guess about what <em>would be</em>&nbsp;most valuable today. Independent stories help make that true: rather than a &quot;take it or leave it&quot; lump, they let us focus on particular aspects of a system.</p>
<p>We would like a system&#39;s description to be consistent and complete. Independent stories help with that too: by avoiding overlap, they reduce places where descriptions contradict each other, and they make it easier to consider whether we&#39;ve described everything we need.</p>
<p style="text-align: center; "><span style="font-family: arial, helvetica, sans-serif; "><span style="font-size: 18px; ">Three common types of dependency: overlap, order, and containment</span></span></p>
<p>What makes stories dependent rather than independent? There are three common types of dependency: <em>overlap</em> (undesirable), <em>order</em> (mostly can be worked around), and <em>containment</em> (sometimes helpful).&nbsp;</p>
<h2>Overlap Dependency</h2>
<p>Overlap is the most painful form of dependency. Imagine a set of underlying capabilities:<br />
	&nbsp; &nbsp; &nbsp; &nbsp; {A, B, C, D, E, F}<br />
	with stories that cover various subsets:<br />
	&nbsp; &nbsp; &nbsp; &nbsp; {A, B}<br />
	&nbsp; &nbsp; &nbsp; &nbsp; {A, B, F}<br />
	&nbsp; &nbsp; &nbsp; &nbsp; {B, C, D}<br />
	&nbsp; &nbsp; &nbsp; &nbsp; {B, C, F}<br />
	&nbsp; &nbsp; &nbsp; &nbsp; {B, E}<br />
	&nbsp; &nbsp; &nbsp; &nbsp; {E, F}</p>
<p>Quick: what&#39;s the smallest set of stories that ensure that capabilities&nbsp;{A, B, C, D, E, F}&nbsp;are present? What about {A, B, C, E}? Can we get those and nothing else?</p>
<p>When stories overlap, it&#39;s hard to ensure that everything is covered at least once, and we risk confusion when things are covered more than once.&nbsp;</p>
<p style="text-align: center; "><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:150%;">Overlapping stories create confusion.</span></span></p>
<p>For example, consider an email system with the stories &quot;User sends and receives messages&quot; and &quot;User sends and replies to messages.&quot; (Just seeing the word &quot;and&quot; in a story title can make you suspicious, but you really have to consider multiple stories to know if there&#39;s overlap.) Both stories mention sending a message. We can partition the stories differently to reduce overlap:</p>
<p>&nbsp; &nbsp; User sends [new] message<br />
	&nbsp; &nbsp; User receives message<br />
	&nbsp; &nbsp; User replies to message</p>
<p>(Note that we&#39;re not concerned about &quot;technical&quot; overlap at this level: sending and replying to messages would presumably share a lot of technical tasks. How we design the system or schedule the work is not our primary concern when we&#39;re trying to understand the system&#39;s behavior.)</p>
<h2>Order Dependency</h2>
<p>A second common dependency is order dependency: &quot;this story must be implemented before that one.&quot;</p>
<p style="text-align: center; "><span style="font-family:arial,helvetica,sans-serif;"><span class="Apple-style-span" style="font-size: 150%; ">Order dependencies complicate a plan, <br />
	but we can usually eliminate them.</span></span></p>
<p>While there&#39;s no approach that guarantees it, order dependency tends to be something that is mostly harmless and can be worked around. There are several reasons for that:</p>
<ol>
<li>Some order dependencies flow from the nature of the problem. For example, a story &quot;User re-sends a message&quot; naturally follows &quot;User sends message.&quot; Even if there is an order dependency we can&#39;t eliminate, it doesn&#39;t matter since the business will tend to schedule these stories in a way that reflects it.&nbsp;</li>
<li>Even when a dependency exists, there&#39;s only a 50/50 chance we&#39;ll want to schedule things in the &quot;wrong&quot; order.</li>
<li>We can find clever ways to remove most of the order dependencies.</li>
</ol>
<p>For example, a user might need an account before they can send email. That might make us think we need to implement the account management stories first (stories like &quot;Admin creates account&quot;). Instead, we could build in (&quot;hard-code&quot;) the initial accounts. (You might look at this as &quot;hard-coding&quot; or you might think of it as &quot;the skinniest possible version of account management&quot;; either way, it&#39;s a lot less work.)</p>
<p>Why take that approach? Because we want to explore certain areas first. We consider both value and risk. On the value side, we may focus on the parts paying customers will value most (to attract them with an early delivery). On the risk side, we may find it important to address risks, thinking of them as negative value. &nbsp;In our example, we may be concerned about poor usability as a risk. A few hard-coded accounts would be enough to let us explore the usability concerns.&nbsp;</p>
<h2>Containment Dependency</h2>
<p>Containment dependency comes in when we organize stories hierarchically: &quot;this story contains these others.&quot; Teams use different terms for this idea: you might hear talk of &quot;themes, epics, and stories,&quot; &quot;features and stories,&quot; &quot;stories and sub-stories,&quot; etc. A hierarchy is an organizational tool; it can be used formally or informally.&nbsp;</p>
<p style="text-align: center; "><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:150%;">A good organization for <em>describing</em> a system is rarely the best organization for <em>scheduling</em> its implementation.</span></span></p>
<p>The biggest caveat about a hierarchical decomposition is that while it&#39;s a helpful strategy for organizing and understanding a large set of stories, it doesn&#39;t make a good scheduling strategy. It can encourage you to do a &quot;depth-first&quot; schedule: address this area, and when it&#39;s done, go the next area. But really, it&#39;s unlikely that the most valuable stories will all be in a single area. Rather, we benefit from first creating a minimal version of the whole system, then a fancier version (with the next most important feature), and so on.&nbsp;</p>
<h2>Bottom Line</h2>
<p>Independent stories help both the business and technical sides of a project. From a business perspective, the project gets a simple model focused on the business goals, not over-constrained by technical dependencies. From a technical perspective, independent stories encourage a minimal implementation, and support design approaches that minimize and mange implementation dependencies.&nbsp;</p>
<h3>Related Material</h3>
<p>&quot;<a href="http://xp123.com/articles/invest-in-good-stories-and-smart-tasks/">INVEST in Good Stories, and SMART Tasks</a>&quot; &#8211; the original article describing the INVEST model</p>
<p><em><a href="https://elearning.industriallogic.com/gh/submit?Action=AlbumContentsAction&amp;album=composingUserStories&amp;devLanguage=None">Composing User Stories</a></em> &#8211; eLearning from Industrial Logic</p>
<p><a href="http://www.amazon.com/exec/obidos/ASIN/0321205685/xp123com"><em>User Stories Applied</em></a>, by Mike Cohn</p>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/independent-stories-in-the-invest-model/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review: Applying Domain-Driven Design and Patterns (Nilsson)</title>
		<link>http://xp123.com/articles/review-applying-domain-driven-design-and-patterns-nilsson/</link>
		<comments>http://xp123.com/articles/review-applying-domain-driven-design-and-patterns-nilsson/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 13:41:07 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2111</guid>
		<description><![CDATA[Applying Domain-Driven Design and Patterns: With Examples in C# and .NET, by Jimmy Nilsson. Addison-Wesley, 2006. Stir together Eric Evans&#39; Domain-Driven Design&#160;with Martin Fowler&#39;s Patterns of Enterprise Application Architecture, mix in C# code, and you&#39;ve got the flavor of this &#8230; <a href="http://xp123.com/articles/review-applying-domain-driven-design-and-patterns-nilsson/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td style="vertical-align: top; margin:5px"><a href="http://www.amazon.com/exec/obidos/ASIN/0321268202/xp123com"><img alt="Applying Domain-Driven Design and Patterns" height="175" src="http://xp123.com/wp-content/uploads/cover-ADDDP.jpg" width="135" /></a></td>
<td style="vertical-align: top;"><a href="http://www.amazon.com/exec/obidos/ASIN/0321268202/xp123com"><i>Applying Domain-Driven Design and Patterns: With Examples in C# and .NET</i></a>, by Jimmy Nilsson. Addison-Wesley, 2006.</p>
<p>Stir together Eric Evans&#39; <a href="http://xp123.com/articles/review-domain-driven-design/"><i>Domain-Driven Design</i></a>&nbsp;with Martin Fowler&#39;s <i>Patterns of Enterprise Application Architecture</i>, mix in C# code, and you&#39;ve got the flavor of this book.</p>
<p>It&#39;s not as classic as its antecedents. But it does provide useful examples, relating it from the perspective of someone familiar with database issues, but who now comes at things from the domain-driven perspective.</p>
<p>Some of the tools used have changed, but the basics still hold.</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/review-applying-domain-driven-design-and-patterns-nilsson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review – Ruled Britannia (Turtledove)</title>
		<link>http://xp123.com/articles/review-ruled-britannia-turtledove/</link>
		<comments>http://xp123.com/articles/review-ruled-britannia-turtledove/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 19:01:08 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fiction]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2116</guid>
		<description><![CDATA[Ruled Britannia, by Harry Turtledove. This is another of Harry Turtledove&#39;s alternative history novels. In this case, the Spanish Armada succeeded&#160;in the late 16th century, and Spain has taken over England. This is the time of Shakespeare and Queen Elizabeth, &#8230; <a href="http://xp123.com/articles/review-ruled-britannia-turtledove/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td style="vertical-align: top; margin:5px">
<p><a href="http://www.amazon.com/exec/obidos/ASIN/0451459156/xp123com"><img alt="Ruled Britannia" height="200" src="http://xp123.com/wp-content/uploads/cover-ruledBrit.jpg" width="128" /></a></p>
</td>
<td style="vertical-align: top;">
<p><a href="http://www.amazon.com/exec/obidos/ASIN/0451459156/xp123com"><i>Ruled Britannia</i></a>, by Harry Turtledove.</p>
<p>This is another of Harry Turtledove&#39;s alternative history novels. In this case, the Spanish Armada succeeded&nbsp;in the late 16th century, and Spain has taken over England. This is the time of Shakespeare and Queen Elizabeth, and Shakespeare ends up involved in politics and intrigue &#8211; what will become of England?</p>
<p>It&#39;s good fun &#8211; lots of small changes in plays and titles, and lots of witty dialog and snaps in a Shakespearean style.</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/review-ruled-britannia-turtledove/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Vision Thing: How Do You Charter? #agile2011</title>
		<link>http://xp123.com/articles/the-vision-thing-how-do-you-charter-agile2011/</link>
		<comments>http://xp123.com/articles/the-vision-thing-how-do-you-charter-agile2011/#comments</comments>
		<pubDate>Thu, 11 Aug 2011 04:27:06 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2201</guid>
		<description><![CDATA[We held a &#34;Fringe&#34; session at Agile 2011 to discuss how people charter or kick off projects.&#160; Elements of &#34;Kickoff&#34; [These are in no particular order.] Vision Release Criteria Success Criteria From and To State Business capability Solution vision Risks &#8230; <a href="http://xp123.com/articles/the-vision-thing-how-do-you-charter-agile2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We held a &quot;Fringe&quot; session at Agile 2011 to discuss how people charter or kick off projects.&nbsp;</p>
<h2>Elements of &quot;Kickoff&quot;</h2>
<p>[These are in no particular order.]</p>
<ul>
<li>Vision</li>
<li>Release Criteria</li>
<li>Success Criteria</li>
<li>From and To State
<ul>
<li>Business capability</li>
<li>Solution vision</li>
</ul>
</li>
<li>Risks / Fears</li>
<li>Rallying One-Liner [may match up to Vision]</li>
<li>[Early] Backlog (maybe)</li>
<li>Mission</li>
<li>Team Agreements / Social Contract</li>
<li>Community [incl. users, customers]</li>
<li>Project Boundary</li>
<li>Domain Language</li>
<li>Scope Discussion
<ul>
<li>Tradeoffs</li>
<li>What&#39;s the minimum?</li>
<li>&quot;Big rocks&quot;</li>
<li>&quot;Not&quot; List</li>
</ul>
</li>
<li>Guiding Principles</li>
<li>Resources / Constraints</li>
</ul>
<h2>Factors / Approaches / Techniques</h2>
<ul>
<li>Innovation Games</li>
<li>Metaphor</li>
<li>Mini-design studios (e.g., to explore shared understanding of &quot;commitment&quot;)</li>
<li>Sliders</li>
<li>Ranking</li>
<li>&quot;Not&quot; List / &nbsp;In-Out List</li>
<li>Sr. and other management present</li>
<li>No iteration 0 [get going instead]
<ul>
<li>-or-</li>
</ul>
</li>
<li>Iteration zero that includes a skinny end-to-end &quot;Hello World&quot;</li>
<li>Timeboxes</li>
<li>Quickstart approach</li>
<li>Experimentation</li>
<li>Inception Deck</li>
</ul>
<p>Thanks to all who participated!&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/the-vision-thing-how-do-you-charter-agile2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review – Musashi</title>
		<link>http://xp123.com/articles/review-musashi/</link>
		<comments>http://xp123.com/articles/review-musashi/#comments</comments>
		<pubDate>Thu, 26 May 2011 11:10:04 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[fiction]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2093</guid>
		<description><![CDATA[&#160; Musashi, by Eiji Yoshikawa. Kodansha International, 1995.&#160; Swordplay, true love, and a man climbing up the side of a cliff. It&#39;s&#160;not the Princess Bride; it&#39;s the story of Musashi, the most&#160;famous swordsman of Japan. This is a romanticized, historical &#8230; <a href="http://xp123.com/articles/review-musashi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td style="vertical-align:middle"><a href="http://www.amazon.com/exec/obidos/ASIN/4770019572/xp123com"> <img alt="The Clockwork Man" height="150" src="http://xp123.com/wp-content/uploads/image/cover-musashi.jpg" title="The Clockwork Man" width="107" /></a></td>
<td>&nbsp;</td>
<td style="vertical-align:top">
<p><a href="http://www.amazon.com/exec/obidos/ASIN/4770019572/xp123com"><i>Musashi</i></a>, by Eiji Yoshikawa. Kodansha International, 1995.&nbsp;</p>
<p>Swordplay, true love, and a man climbing up the side of a cliff. It&#39;s&nbsp;not the Princess Bride; it&#39;s the story of Musashi, the most&nbsp;famous swordsman of Japan.</p>
<p>This is a romanticized, historical fiction&nbsp;novel. Musashi started out on the losing side of a battle, and spent his&nbsp;life seeking the true way of the samurai. The story has many coincidences and near&nbsp;misses (though fewer than the average episode of <em>24</em>), but the charm and fun overcomes that.</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/review-musashi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3A – Arrange, Act, Assert</title>
		<link>http://xp123.com/articles/3a-arrange-act-assert/</link>
		<comments>http://xp123.com/articles/3a-arrange-act-assert/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 12:38:48 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[programmer]]></category>
		<category><![CDATA[tdd]]></category>
		<category><![CDATA[XPlorations]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2046</guid>
		<description><![CDATA[Some unit tests are focused, other are like a run-on sentence. How can we create tests that are focused and communicate well? What&#39;s a good structure for a unit test? 3A: Arrange, Act, Assert We want to test the behavior &#8230; <a href="http://xp123.com/articles/3a-arrange-act-assert/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Some unit tests are focused, other are like a run-on sentence. How can we create tests that are focused and communicate well?</p>
<blockquote><p><strong>What&#39;s a good structure for a unit test? </strong></p></blockquote>
<blockquote><p><strong>3A: Arrange, Act, Assert</strong></p></blockquote>
<p>We want to test the behavior of objects. One good approach is to put an object into each &quot;interesting&quot; configuration it has, and try various actions on it.&nbsp;</p>
<p>Consider the various types of behaviors an object has:</p>
<ul>
<li>Constructors</li>
<li>Mutators, also known as modifiers or commands</li>
<li>Accessors, also known as queries</li>
<li>Iterators</li>
</ul>
<p>I learned this separation a long time ago but I don&#39;t know the source (though my guess would be some Abstract Data Type research). It&#39;s embodied in Bertrand Meyer&#39;s &quot;command-query separation&quot; principle, and others have independently invented it.</p>
<p>With those distinctions in mind, we can create tests:</p>
<p><b>Arrange</b>: Set up the object to be tested. We may need to surround the object with collaborators. For testing purposes, those collaborators might be test objects (mocks, fakes, etc.) or the real thing.</p>
<p><b>Act</b>: Act on the object (through some mutator). You may need to give it parameters (again, possibly test objects).</p>
<p><b>Assert</b>: Make claims about the object, its collaborators, its parameters, and possibly (rarely!!) global state.&nbsp;</p>
<h2>Where to Begin?</h2>
<p>You might think that the Arrange is the natural thing to write first, since it comes first.</p>
<p>When I&#39;m systematically working through an object&#39;s behaviors, I may write the Act line first.&nbsp;</p>
<p>But a useful technique I learned from Jim Newkirk is that writing the Assert first is a great place to start. When you have a new behavior you know you want to test, Assert First lets you start by asking &quot;Suppose it worked; how would I be able to tell?&quot; With the Assert in place, you can do what <a href="https://elearning.industriallogic.com/gh/submit?Action=AlbumContentsAction&amp;album=before&amp;devLanguage=Java">Industrial Logic</a> calls &quot;Frame First&quot; and lean on the IDE to &quot;fill in the blanks.&quot;&nbsp;</p>
<h2>FAQ</h2>
<p><i>Aren&#39;t some things easier to test with a sequence of actions and assertions?</i></p>
<p>Occasionally a sequence is needed, but the 3A pattern is partly a reaction to large tests that look like this:</p>
<ul>
<li>Arrange</li>
<li>Act</li>
<li>Assert</li>
<li>Act</li>
<li>Assert</li>
<li>Arrange more</li>
<li>Act</li>
<li>Assert</li>
<li>&#8230;</li>
</ul>
<p>To understand a test like that, you have to track state over a series of activities. It&#39;s hard to see what object is the focus of the test, and it&#39;s hard to see that you&#39;ve covered each interesting case. Such multi-step unit tests are usually better off being split into several tests.</p>
<p>But I won&#39;t say &quot;never do it&quot;; there could be some case where the goal is to track a cumulative state and it&#39;s just easier to understand in one series of calls.&nbsp;</p>
<p><em>Sometimes we want to make sure of our setup. Is it OK to have an extra assert?</em></p>
<p>Such a test looks like this:</p>
<ul>
<li>Arrange</li>
<li>Assert that the setup is OK</li>
<li>Act</li>
<li>Assert that the behavior is right</li>
</ul>
<p>First, consider whether this should be two separate tests, or whether setup is too complicated (if we can&#39;t trust objects to be in the initial state we want). Still, if it seems necessary to do this checking, it&#39;s worth bending the guideline.</p>
<p><em>What about the notion of having &quot;one assert per test&quot;?</em></p>
<p>I don&#39;t follow that guideline too closely. I consider it for two things:&nbsp;</p>
<ol>
<li>A series of assertions may indicate the object is missing functionality which should be added (and tested). The classical case is <span style="font-family:courier new,courier,monospace;">equals()<span style="font-family:georgia,serif;">:&nbsp;</span></span>It&#39;s better to define an <span style="font-family:courier new,courier,monospace;">equals()</span> method than (possibly create and) repeat a bunch of assertions about held data.</li>
<li>A series of similar assertions might benefit from a helper (assertion) method.</li>
</ol>
<p>(If an object has many accessors, it may indicate the object is doing too much.)</p>
<p>When a test modifies an object, I typically find it easiest to consider most accessors together.&nbsp;</p>
<p>For example, consider a list that tracks the number of objects and the maximum entry. One test might look like this:</p>
<p><span style="font-family:courier new,courier,monospace;">&nbsp;&nbsp; &nbsp;List list = new List();<br />
	&nbsp;&nbsp; &nbsp;list.add(3);<br />
	&nbsp;&nbsp; &nbsp;assertEquals(1, list.size());<br />
	&nbsp;&nbsp; &nbsp;assertEquals(3, list.max());</span></p>
<p>That is, it considers the case &quot;what all happens when one item is inserted into an empty list?&quot; Then the various assertions each explore a different &quot;dimension&quot; of the object.</p>
<p><i>What about setup?</i></p>
<p>Most xUnit frameworks let you define a method that is called before each test. This lets you pull out some common code for the tests, and it is part of the initial Arrange. (Thus you have to look in two places to understand the full Arrange-ment.)</p>
<p><i>What about teardown?</i></p>
<p>Most xUnit frameworks let you define a method that is called after each test. For example, if a test opens a file connection, the teardown could close that connection.</p>
<p>If you need teardown, use it, of course. But I&#39;m not adding a fourth A to the pattern: most <i>unit</i> tests don&#39;t need teardown. Unit tests (for the bulk of the system) don&#39;t talk to external systems, databases, files, etc., and Arrange-Act-Assert is a pattern for unit tests.&nbsp;</p>
<h3>History</h3>
<p><span style="font-size:12px;">I (Bill Wake) observed and named the pattern in 2001. &quot;Arrange-Act-Assert&quot; has been the full name the whole time, but it&#39;s been variously abbreviated as AAA or 3A. Kent Beck mentions this pattern in his book <a href="http://www.amazon.com/exec/obidos/ASIN/0321146530/xp123com"><i>Test-Driven Development: By Example</i></a>&nbsp;(p. 97). This article was written in 2011. Added a description of Assert First and Frame First due to Brian Marick&#39;s comment. [4/26/11]&nbsp;</span></p>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/3a-arrange-act-assert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review – Talent is Overrated (Colvin)</title>
		<link>http://xp123.com/articles/review-talent-is-overrated-colvin/</link>
		<comments>http://xp123.com/articles/review-talent-is-overrated-colvin/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 13:06:47 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2141</guid>
		<description><![CDATA[Talent Is Overrated: What Really Separates World-Class Performers from Everybody Else, by Geoff Colvin. Portfolio, 2008. Where does talent come from? Nature or nurture? A study of music students found no difference in starting point, but that practice made the &#8230; <a href="http://xp123.com/articles/review-talent-is-overrated-colvin/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td style="vertical-align: top; margin:5px"><a href="http://www.amazon.com/exec/obidos/ASIN/1591842247/xp123com"><img alt="Talent Is Overrated" height="150" hspace="5" src="http://xp123.com/wp-content/uploads/cover-talent-overrated.jpg" vspace="5" width="95" /></a></td>
<td style="vertical-align: top;">
<p><em><a href="http://www.amazon.com/exec/obidos/ASIN/1591842247/xp123com">Talent Is Overrated: What Really Separates World-Class Performers from Everybody Else</a></em>, by Geoff Colvin. Portfolio, 2008.</p>
<p>Where does talent come from? Nature or nurture? A study of music students found no difference in starting point, but that practice made the difference. &quot;A few [researchers] contend that the very existence of talent is not, as they carefully put it, supported by evidence.&quot;</p>
<p>The key is deliberate practice. Deliberate practice is designed to improve performance, by repetition, with feedback, working in &quot;the learning zone.&quot; Your goal is to deepen your domain knowledge.</p>
<p>This book is one of the ones that popularizes the meme of &quot;talent comes from 10,000 hours of deliberate practice.&quot; For those of us who are aging, the news is mixed: it takes longer to learn, but excellent performers needn&#39;t decline in their area of expertise. (That argues for developing varied expertise, I guess.)</p>
<p>Finally, if practice is key, what keeps us practicing? We have to develop intrinsic motivation. The work can help us overcome our supposed limitations.</p>
<p>This book was a very readable introduction, and made a compelling case. I&#39;ll close with a quote:&nbsp;&quot;The price of top-level achievement is extraordinarily high&#8230; what the evidence shouts most loudly is striking liberating news: that great performance is not reserved for a preordained few. It is available to you and everyone.&quot;</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/review-talent-is-overrated-colvin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review – Don’t Make Me Think (Krug)</title>
		<link>http://xp123.com/articles/review-dont-make-me-think-krug/</link>
		<comments>http://xp123.com/articles/review-dont-make-me-think-krug/#comments</comments>
		<pubDate>Fri, 01 Apr 2011 01:56:43 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[HCI]]></category>
		<category><![CDATA[reviews]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2099</guid>
		<description><![CDATA[Don&#39;t Make Me Think: A Common Sense Approach to Web Usability, by Steve Krug. New Riders Press, 2005. This thin book provides guidance on the basics of web usability. It focuses on the importance of doing things in a way &#8230; <a href="http://xp123.com/articles/review-dont-make-me-think-krug/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td style="vertical-align: top; margin:5px"><a href="http://www.amazon.com/exec/obidos/ASIN/0321344758/xp123com"><img alt="Agile Product Management with Scrum" height="150" src="http://xp123.com/wp-content/uploads/cover-krug-think.jpg" width="117" /></a></td>
<td style="vertical-align: top;">
<p><span style="font-size:14px;"><a href="http://www.amazon.com/exec/obidos/ASIN/0321344758/xp123com"><i>Don&#39;t Make Me Think: A Common Sense Approach to Web Usability</i></a>, by Steve Krug. New Riders Press, 2005.</p>
<p>					This thin book provides guidance on the basics of web usability. It focuses on the importance of doing things in a way that meet users&#39; expectations. In addition to some well-thought out examples of re-design, he spends about a third of the book on a simple and cost-effective approach to usability testing. This would be a good choice for your first book on usability.</span></p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/review-dont-make-me-think-krug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Review – Agile Product Management with Scrum (Pichler)</title>
		<link>http://xp123.com/articles/review-agile-product-management-with-scrum-pichler/</link>
		<comments>http://xp123.com/articles/review-agile-product-management-with-scrum-pichler/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 02:08:59 +0000</pubDate>
		<dc:creator>Bill Wake</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[customer]]></category>
		<category><![CDATA[reviews]]></category>
		<category><![CDATA[scrum]]></category>

		<guid isPermaLink="false">http://xp123.com/?p=2101</guid>
		<description><![CDATA[Agile Product Management with Scrum: Creating Products that Customers Love, by Roman Pichler. Addison-Wesley, 2010. This is a fairly easy read (about 120 pages) explaining the role of the Product Owner in Scrum. I&#39;d describe the target as &#34;someone preparing &#8230; <a href="http://xp123.com/articles/review-agile-product-management-with-scrum-pichler/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<table border="0">
<tbody>
<tr>
<td style="vertical-align: top; margin:5px"><a href="http://www.amazon.com/exec/obidos/ASIN/0321605780/xp123com"><img alt="Agile Product Management with Scrum" height="200" src="http://xp123.com/wp-content/uploads/AProdMgmtScrum.jpg" width="132" /></a></td>
<td style="vertical-align: top;"><a href="http://www.amazon.com/exec/obidos/ASIN/0321605780/xp123com"><i>Agile Product Management with Scrum: Creating Products that Customers Love</i></a>, by Roman Pichler. Addison-Wesley, 2010.</p>
<p>This is a fairly easy read (about 120 pages) explaining the role of the Product Owner in Scrum. I&#39;d describe the target as &quot;someone preparing to fill the Scrum Product Owner role who already knows something about product management.&quot; There is a little material on product management techniques, but it&#39;s not the emphasis.&nbsp;</p>
<p>This book is divided into six chapters, talking about the product owner role, envisioning the product, the product backlog, planning, the sprint meeting, and transitioning into the role. There&#39;s a good discussion of simplicity, and a little bit on handling this role on large projects.</p>
<p>I particularly liked that most chapters had a section on &quot;Common Mistakes&quot;; they gave me the sense of getting advice from someone who&#39;d seen and worked through these things with real teams.&nbsp;</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://xp123.com/articles/review-agile-product-management-with-scrum-pichler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

