<?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>Liz Keogh&#039;s blog &#187; stories</title>
	<atom:link href="http://lizkeogh.com/category/stories/feed/" rel="self" type="application/rss+xml" />
	<link>http://lizkeogh.com</link>
	<description>Software, Training, Coaching, Writing</description>
	<lastBuildDate>Sat, 04 Feb 2012 20:22:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Splitting stories into tasks &#8211; when, why and how (or not)</title>
		<link>http://lizkeogh.com/2011/08/23/splitting-stories-into-tasks-when-why-and-how-or-not/</link>
		<comments>http://lizkeogh.com/2011/08/23/splitting-stories-into-tasks-when-why-and-how-or-not/#comments</comments>
		<pubDate>Tue, 23 Aug 2011 20:57:40 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[feedback]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[stories]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=733</guid>
		<description><![CDATA[Before I write anything about this, I&#8217;d like to clarify what I mean by a task and a story.
A feature is something tangible that works and which we could potentially deliver, if it was enough to provide business benefit. Usually a bit of a screen or page, together with all the logic and validation associated [...]]]></description>
			<content:encoded><![CDATA[<p>Before I write anything about this, I&#8217;d like to clarify what I mean by a <em>task</em> and a <em>story</em>.</p>
<p>A <em>feature</em> is something tangible that works and which we could potentially deliver, if it was enough to provide business benefit. Usually a bit of a screen or page, together with all the logic and validation associated with it, is a feature. A feature is the highest-level thing which a developer could work on without doing significant bits of analysis. It&#8217;s a part of an idea made at least concrete enough to imagine.</p>
<p>A <em>story</em> is a part of a feature on which we can get feedback from relevant stakeholders. For instance, we might code the UI, then the validation and messages, then an aspect or two of the behaviour behind the UI. Each of these would be a possible story. The only real reason for splitting features into stories is to get faster feedback and a better idea of progress.</p>
<p>A <em>task</em> is a part of a story which doesn&#8217;t allow us to get feedback from relevant stakeholders. If you can get feedback, it&#8217;s probably a story rather than a task, because it affects the UI in some way, or at least gives something that can be visibly verified and critiqued and which stakeholders care about. There are lots of UIs and lots of stakeholders and users, so &#8220;put logging in to help maintenance debug the situation where the elephant appears on the screen&#8221; might be a perfectly good story. Anything that&#8217;s just a part of a story is a task.</p>
<p>A task can&#8217;t really be tested either, even by a developer. You have no idea if a database has the right tables or data until you connect it to something. You have no idea if an interface to another system will work until it&#8217;s actually talking to that system. You might unit-test it, or run some queries, but it&#8217;s a level below the feedback and user testing available for features and stories. (There are higher levels of testing too, in which we can look for user capabilities and business outcomes, stakeholder goals, profit / loss, etc. &#8211; so you can&#8217;t really tell if *anything* works until you put it into production &#8211; but that&#8217;s a blog post for another day).</p>
<h3>Why do some teams split stories into tasks?</h3>
<p>A lot of Scrum teams particularly do this, because it&#8217;s traditionally taught as part of the Certified Scrum Master course. Hopefully good CSTs, and their CSMs, are teaching the benefits along with the practices.</p>
<p><strong>It can lead to more accurate estimates.</strong> Splitting stories into tasks can help developers to think about the amount of work involved in a story, and find any pieces they missed.</p>
<p><strong>It can help with collaboration. </strong>By splitting a story into tasks, developers can each take that task &#8211; usually a different horizontal slice &#8211; and work with minimal merge conflicts and just a bit of adjustment to get their piece working with other people&#8217;s. Splitting a story into tasks is useful for swarming, and a lot of swarming teams do this instinctively, even if they haven&#8217;t written the tasks down.</p>
<p><strong>It can help senior developers mentor junior developers</strong> and verify that they&#8217;re taking a good approach towards a story. Some mistakes are worth avoiding.</p>
<p><strong>They can be used as a measure of progress</strong> to someone tracking the team, like a PM or Scrum Master.</p>
<h3>Why don&#8217;t other teams do this?</h3>
<p>Some teams prefer to focus on delivering something on which they can get feedback, and find the tasks distracting.</p>
<p>There are also other ways of getting accurate estimates. Talking through scenarios can help with this. A lot of teams don&#8217;t use estimates anyway, preferring to stick to SLAs or their own instinctive understanding of how much work they can get done and whether they&#8217;re going to release on time. Anther purpose of estimation is usually so that the business stakeholders can have trust and confidence in the team, and there are different ways of getting the trust of stakeholders, too.</p>
<h3>What bad things might happen if we split our stories into tasks?</h3>
<p>Splitting stories into tasks might indeed distract from delivering something on which the team can get feedback. When a developer sees a list of tasks in front of him, he tends to work through those tasks methodically. He might not notice that, for instance, the team isn&#8217;t going to deliver *any* stories this week.</p>
<p>Using tasks to estimate team progress can also be misleading. If all the developers end up working on their own stories, the PM might see lots of tasks being done. If none of those stories are ready for the showcase, though, the team won&#8217;t be able to get feedback from their stakeholders &#8211; and might end up building the wrong things altogether! Also, the Pareto Principle suggests that 20% of the causes are responsible for 80% of the effects &#8211; or that the last 20% of the story might take 80% of the time. Often developers will start with the easy bits and leave the hard things until last.</p>
<p>People seeing the tasks can use them to micro-manage the team, asking who&#8217;s working on which task, or even assigning particular tasks ahead of time! But anyone with a manager or Scrum Master who does this has bigger problems than the task-splitting, I think.</p>
<h3>Why do you absolutely hate people splitting tasks then putting hourly estimates on them?</h3>
<p>First and foremost, this harks back to the old myth that <em>time</em> = <em>work done</em>. Even if developers are only held to be productive 50 or 60% of their &#8220;ideal&#8221; working day, the focus is still on the number of hours spent, rather than useful software being produced. It&#8217;s perfectly possible to spend hours on something that doesn&#8217;t work. A team which signs off all its tasks is subtly encouraged to say that they&#8217;re &#8220;done&#8221; without checking that the software they&#8217;re producing is useful.</p>
<p>What about the developer who plays with something else while turning over a problem in the back of his mind, then delivers an ingenious solution in 2 hours? Or the developer who wants to try out another way of solving the problem which might involve a steep learning curve, but which would benefit the project in the long run? By pinning these developers down to their hourly estimates, insisting on a certain timescale of productivity, we encourage them to tread the path they had in mind when they made the estimate, even if a different idea occurs to them at the time. Since human beings get a kick out of being right &#8211; suffering horribly from confirmation bias and the preference for validation &#8211; just the act of estimating the hours will pin them down subconsciously. They may not even think about the problem or have the new idea! Hourly estimates can stifle innovation, and the less wriggle room there is, the more innovation will be stifled.</p>
<p>Finally, it encourages micro-management. A project manager who sees a developer working on some tasks that should have taken 8 hours, but have taken all week, might wonder why that developer is taking so long. However, uncomfortable enquiries will only cause the developer to pad their estimates next time &#8211; and work expands to fill the time available, so the team will eventually slow down.</p>
<h3>Should we do it or not?</h3>
<p>If you think splitting stories into tasks might be helpful, try it. If it doesn&#8217;t help, stop. However, please resist the urge to put hourly estimates on them &#8211; or to ask that your team does so.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2011/08/23/splitting-stories-into-tasks-when-why-and-how-or-not/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>ATDD vs. BDD, and a potted history of some related stuff</title>
		<link>http://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/</link>
		<comments>http://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/#comments</comments>
		<pubDate>Mon, 27 Jun 2011 20:03:27 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[business value]]></category>
		<category><![CDATA[stories]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=679</guid>
		<description><![CDATA[Another question that people often ask around or to me is, &#8220;What&#8217;s the difference between Acceptance Test Driven Development and Behavior Driven Development?&#8221;
To explain, I&#8217;ll go back to the time when I first learnt BDD.
BDD started at a unit or class level
Dan North started doing BDD at a unit or class level, as a replacement [...]]]></description>
			<content:encoded><![CDATA[<p>Another question that people often ask around or to me is, &#8220;What&#8217;s the difference between Acceptance Test Driven Development and Behavior Driven Development?&#8221;</p>
<p>To explain, I&#8217;ll go back to the time when I first learnt BDD.</p>
<h3>BDD started at a unit or class level</h3>
<p>Dan North <a href="http://dannorth.net/introducing-bdd/">started doing BDD at a unit or class level</a>, as a replacement for TDD &#8211; a mechanism for describing the behaviour of code and providing examples, without using the word &#8220;test&#8221;, because it turned out that this clarified a lot of the confusion (and I still find it much easier to teach TDD if I avoid the word &#8220;test&#8221;, whatever I subsequently call it).</p>
<p>It was only when Chris Matts said, &#8220;That looks quite a lot like analysis,&#8221; that Dan began taking it out to describe the behaviour of whole systems of code.</p>
<h3>ATDD practices at the time weren&#8217;t all that solid</h3>
<p>When I came across BDD (late 2004), I was working on a project which had been driven quite heavily with ATDD &#8211; at least to start with.</p>
<p>This project had 160 acceptance tests. They all consisted of lists of text boxes, button clicks, locating more text boxes and repeating until a particular outcome was reached. They were lengthy. They were rigorous. Unfortunately, at some point someone had introduced a dialog box into the flow, disrupting about 30% of these tests. There were another 10% also failing, possibly for similar reasons.</p>
<p>It took a couple of days for two of us to work through them, fixing the tests. We got most of them working, but not enough for anyone to actually care about them. The acceptance tests were making things hard to change.</p>
<h3>BDD changed the landscape</h3>
<p>Dan has since said that JBehave was &#8220;just a thought experiment&#8221;, and he didn&#8217;t really expect anyone to use it. (That&#8217;s good, because it JBehave 1.0 was pretty unusable, at least at a scenario level). It worked as a thought experiment, though, and lots of people started doing ATDD in a very different way &#8211; creating examples of how their system worked, and using those examples to explore the scope of their systems as well as the responsibility of their classes. Lots of people started working <em>outside-in</em>, from the UIs through which users experienced the system&#8217;s behaviour, to the controllers, the domain models, the utility classes, services, repositories, etc., until they finally had working software that tended to matter more to the stakeholders of the project than software had before.</p>
<p><a href="http://blog.davidchelimsky.net/2007/10/21/story-runner-in-plain-english/">Dave Chelimsky&#8217;s movement over to plain text</a> really helped this movement to take off. When people think of &#8220;BDD&#8221; they often think of the frameworks which have copied this (<a href="http://cukes.info/">Cucumber</a> and <a href="http://jbehave.org">JBehave 2.0</a> amongst them), even though <a href="http://lizkeogh.com/2011/03/04/step-away-from-the-tools/">this isn&#8217;t the complete story</a>. They have certainly encouraged developers &#8211; famous for their introverted natures &#8211; to boldly go into the analysis space.</p>
<h3>BDD enabled conversation</h3>
<p>Whether through frameworks, DSLs or just conversation, the biggest difference between BDD and ATDD was the way in which BDD enabled a common language between users and business stakeholders, because it <a href="http://domaindrivendesign.org/library/north_keogh_gitlevich_2007">supports Domain Driven Design&#8217;s &#8220;ubiquitous language&#8221;</a> (forgive the rabbit-in-the-headlights look, it was my first ever video!), and provides its own ubiquitous language for software development &#8211; the language of examples and behaviour, rather than tests and acceptance criteria.</p>
<p>The second difference was the reusability of steps. This is something which a lot of BDDers are still struggling with, so we&#8217;ve still got a way to go here. (More on steps and business / system capabilities some other time).</p>
<h3>BDD doesn&#8217;t just stop at scenarios, it goes all the way to the project vision</h3>
<p>Finally, Chris Matts introduced <a href="http://www.infoq.com/articles/pulling-power">Feature Injection</a>, which takes BDD&#8217;s patterns all the way into the analysis space.</p>
<p>(I consider Feature Injection and BDD to be children of <a href="http://dannorth.net/">Deliberate Discovery</a> (even though they preceded it), which is itself a child of <a href="http://www.infoq.com/articles/real-options-enhance-agility">Real Options</a>. I summarise Deliberate Discovery as the act of wilfully addressing ignorance. Both Deliberate Discovery and Real Options have implications and uses beyond software development, and I heartily recommend coaches and managers to go read up on them. In fact, everyone who lives a life of any kind of uncertainty should go and read up on them. And if your life is staid and comfortable, maybe it will help you to step into those challenging spaces. Go do it anyway.)</p>
<h3>Or at least, this used to be the difference&#8230;</h3>
<p>So that&#8217;s the past. What about now?</p>
<p>Well, most people who do ATDD nowadays use the Given-When-Then template which Chris introduced (shout-out to <a href="http://gojko.net/">Gojko Adzic</a> for his work in this space). They use domain language in conversation with the business. They&#8217;re interested in discussing what software would actually make a difference, then capturing that and sometimes automating it, with a focus on working out the software which would matter.</p>
<p>I&#8217;m guided by <a href="http://groups.google.com/group/behaviordrivendevelopment/msg/ee750a218b514946">Dan&#8217;s words to the BDD Google Group</a>, which apply both to TDD and ATDD:</p>
<blockquote><p>I think you can over-think these things.<br />
I&#8217;d like to avoid &#8220;BDD is better than TDD because&#8230;&#8221; or even &#8220;BDD is<br />
different from TDD (as originally envisioned) because&#8230;&#8221; </p>
<p>TDD is amazing. Its initial conception was to solve exactly what I&#8217;ve been<br />
trying to do with BDD. Originally it was described as variable scope (i.e.<br />
covering both the space of modern day TDD-in-the-small and what the ATDD/SBE<br />
folks are doing in the functional testing space). It&#8217;s not the *only* way to<br />
come up with good design, and neither is BDD. They&#8217;re just both useful to<br />
have in your back pocket as you go around trying to write decent software to<br />
solve useful problems. </p></blockquote>
<h3>They&#8217;re called different things</h3>
<p>The difference is that one is called Behaviour Driven Development &#8211; and some people find that wording useful &#8211; and one (or two) is called (Acceptance) Test Driven Development &#8211; and some people find that wording useful in a different way.</p>
<h3>And that&#8217;s it.</h3>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2011/06/27/atdd-vs-bdd-and-a-potted-history-of-some-related-stuff/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>They&#8217;re not User Stories</title>
		<link>http://lizkeogh.com/2010/02/02/theyre-not-user-stories/</link>
		<comments>http://lizkeogh.com/2010/02/02/theyre-not-user-stories/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:44:13 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[stories]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=553</guid>
		<description><![CDATA[Reading Simon Baker&#8217;s post on metrics made me smile. I rant about similar misuse of metrics quite a lot. A common reason that I see targets and metrics fail is because they&#8217;re aimed at a perceived circle of responsibility &#8211; for instance, developers who are measured on how few bugs they produce. This ignores the [...]]]></description>
			<content:encoded><![CDATA[<p>Reading <a href="http://blog.energizedwork.com/2010/01/dont-aim-for-target.html">Simon Baker&#8217;s post on metrics</a> made me smile. I rant about <a href="http://lizkeogh.com/2009/11/30/estimation-anti-patterns/">similar misuse of metrics</a> quite a lot. A common reason that I see targets and metrics fail is because they&#8217;re aimed at a perceived circle of responsibility &#8211; for instance, developers who are measured on how few bugs they produce. This ignores the possibility that something outside of the development team might be causing the bugs &#8211; poor analysis, a difficult technical environment, lack of a decent production-like staging platform, etc.</p>
<p>Simon&#8217;s post calls out another common local optimisation. He says, &#8220;&#8230;the true purpose of the people doing the work, which is to improve service and quality and satisfy users.&#8221;</p>
<p>One of the ways in which we can satisfy users is through usability and user experience. At one of the <a href="http://agile2009.agilealliance.org/keynotes">Agile 2009 keynotes</a>, Jared M. Spool gave a beautiful example of why this could be a bad idea. He talked about a company that had reduced a 5-stage process to 2. The users loved it. &#8220;Unfortunately, they forgot that the company was paid per page impression,&#8221; he said. The company went bankrupt shortly after putting the beautiful new website in place.</p>
<p>In Feature Injection, <a href="http://decision-coach.com">Chris Matts</a> calls out the people with the original idea, or the people who are investing in the idea, as the <em>core stakeholders</em>. These are the people who need to be satisfied. Everyone else is incidental, and the vision is usually one that either makes money, saves money or protects money (stops another company spoiling your idea, or stops them from stealing your market share). Everyone else whose input is needed to make the vision a success is an <em>incidental stakeholder</em>. This can include the users.</p>
<p>Here&#8217;s an example of how focusing on the true stakeholder can help. I was talking to a friend at XtC about a user-centric story.</p>
<p><code>As a user<br />
I want register to be emailed when the game is released<br />
So that I can buy it as quickly as possible.</code></p>
<p>I was discussing alternative ways of implementing this story which didn&#8217;t involve email. &#8220;Who really wants the users to be notified? Who&#8217;s actually paying to notify them?&#8221;</p>
<p>&#8220;Marketing, I guess.&#8221;</p>
<p>&#8220;Why do Marketing want the user to be emailed?&#8221;</p>
<p>&#8220;So that they can make a big hype about the game when it&#8217;s released.&#8221;</p>
<p>So, rephrase this from Marketing&#8217;s point of view.</p>
<p><code>In order to make a big hype about the game when it's released<br />
As Fred, the Marketing guy<br />
I want users to register for an email about the release.</code></p>
<p>Now we can see that perhaps, users may not <em>want</em> to register for the game. We might have to entice them with something else. We also see that our goal &#8211; the big hype &#8211; could be met by other methods; with advertising, for instance, or by getting favourable reviews in magazines.</p>
<p>By allowing the developers to focus on the goal, we may come up with different or better solutions. We also come up with different tests. Will the user actually want to navigate through the 5 screens we make them fill in to register? Will we get the big hype we&#8217;re looking for?</p>
<p>I find when using the Feature Injection template that I frequently put the real name of the stakeholder on the card. This means that if we run into trouble, we can go and talk to the stakeholder about alternate ways of achieving their goal.</p>
<p>They&#8217;re not user stories. They&#8217;re <em>stakeholder</em> stories.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2010/02/02/theyre-not-user-stories/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Mocks, outside-in, swarming features and guesswork</title>
		<link>http://lizkeogh.com/2009/10/17/mocks-outside-in-swarming-features-and-guesswork/</link>
		<comments>http://lizkeogh.com/2009/10/17/mocks-outside-in-swarming-features-and-guesswork/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 10:37:41 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[kanban]]></category>
		<category><![CDATA[stories]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=435</guid>
		<description><![CDATA[The paradox of mocking
When we code from the outside-in in BDD, we start with the layer we know &#8211; the UI, often graphical &#8211; establish collaborators for the UI, establish collaborators for those classes, and work our way inwards until we run out of collaborators we haven&#8217;t coded.
We write examples (tests) for each unit of [...]]]></description>
			<content:encoded><![CDATA[<h3>The paradox of mocking</h3>
<p>When we <a href="http://lizkeogh.com/2009/07/01/pixie-driven-development/">code from the outside-in</a> in BDD, we start with the layer we know &#8211; the UI, often graphical &#8211; establish collaborators for the UI, establish collaborators for <em>those</em> classes, and work our way inwards until we run out of collaborators we haven&#8217;t coded.</p>
<p>We write examples (tests) for each unit of code, all the way down, and we usually <a href="http://lizkeogh.com/2009/07/30/we-dont-design-using-mocks/">express the collaborations with mocks</a>.</p>
<p>The trouble is, we don&#8217;t really know how the class we&#8217;re about to code is going to use its collaborators. We can only guess. When I actually come to code the class, I often find that I want to use the collaborator in a different way to the way I expected. When I come to code the collaborator, I might find that it needs more information than its consuming class is giving it to do its job properly.</p>
<p>In this case, I have to back up and change the way that I&#8217;m expressing the collaboration in the examples. I change method names and signatures for my collaborator according to the things I&#8217;ve learnt from actually using it.</p>
<p>I&#8217;d rather do this &#8211; work out how I actually want to use a class, then change the descriptions &#8211; than be forced to conform to the guesswork that I made.</p>
<h3>Multi-pair stories</h3>
<p>Yesterday, one of the development team said, &#8220;If you&#8217;re doing XP, you only have one pair on each story, so if you have four developers, you&#8217;ll have two stories in play. It doesn&#8217;t make any sense to try to limit it to one.&#8221;</p>
<p>I&#8217;ve heard some of the Kanban community talk about &#8220;swarming&#8221; a feature; getting a whole team of, say, 8 developers to take it on and complete it in a short time. I&#8217;ve also found that some of them prefer not to split up the features as finely as I do, into very thin vertical slices; instead, the teams work on something <em>marketable</em>.</p>
<p>This makes sense, if you&#8217;re going to parcel out chunks of code. The idea of slicing things horizontally goes against most of what I teach about how to write stories &#8211; and yet, it does allow a larger team to get something valuable out the door more quickly than BDD&#8217;s pure outside-in.</p>
<p>It turns out that guessing what might need to happen further down a stack isn&#8217;t much different to guessing what happens with a collaborator, before the class is actually written. Realising this has made me revisit my assumptions about the need to do pure outside-in work. So how can we do this and still call it BDD? How can we gain confidence that we&#8217;re writing software that really matters, and doing so efficiently?</p>
<p>I can remember occasions at Thoughtworks where we did this &#8211; particularly, finishing off features to hit deadlines at the Guardian. Some of the developers at my current client are also working this way, as are <a href="http://availagility.wordpress.com/2009/09/25/xp-as-a-kanban-system/">others in the industry</a>. So, here are my suggestions for making this work.</p>
<h3>BDD for swarms</h3>
<ul>
<li><strong>Use scenarios.</strong> Having a clear understanding of the feature and a set of scenarios to which the team can work to helps keep everyone focused on the actual behaviour needed. This means it&#8217;s less likely that pairs and individuals will write code &#8220;just in case&#8221;. If in doubt, <a href="http://en.wikipedia.org/wiki/YAGNI">YAGNI</a>. The scenarios will tell you if you missed something, once all the chunks are integrated.</li>
<li><strong>Get something working.</strong> Start with the happy path or simplest scenario, and integrate this as soon as you can. This will provide a &#8220;backbone&#8221; for the rest of the scenarios. It also lets the team play through the different scenarios to test their work.</li>
<li><strong>Mock out collaborators.</strong> If you need other classes for end-to-end testing, knock up something really simple or use a mock to allow you to get some feedback. For instance, I make a smiley face appear on my Game of Life exercise when I click the button, just so that I can see that the GUI events are wired up. It takes about 5 minutes to do something like this. Name your simple classes in a way which makes it obvious, so that they don&#8217;t get mixed up with the production code and can be safely deleted later.</li>
<li><strong>Talk to the team.</strong> Conversation around what you&#8217;re doing will be crucial! If an interface has been defined at the boundary of the code, and you need to change it, go tell the other teams. They&#8217;ll be able to adapt to, or at least be aware of, the changes.</li>
<li><strong>The rest of the team is your customer.</strong> When it comes to the name of a method or the value that&#8217;s wanted from that method, the &#8220;upstream&#8221; team &#8211; closer to the outside &#8211; trump the downstream team. When it comes to the information that&#8217;s required to do the job, the downstream team win.<br />
<code><br />
List<Pet> pets = petStore.getPets(String name);<br />
</code><br />
The upstream team can ask to change the <code>List</code> to a <code>Set</code>, or the name of the method to <code>getPetsByName</code>. The downstream team can say, &#8220;Hey, we need the type of pet too; we&#8217;ve got a hamster, a rabbit and a kitten all called Snowy.&#8221;</li>
<li><strong>Prefer code that&#8217;s easy to use over code that&#8217;s easy to write.</strong> If you&#8217;re upstream, trust that the rest of your team will be able to solve the problem you&#8217;re about to set for them. Keep pushing the complexity down, and remember: <a href="http://c2.com/cgi/wiki?TellDontAsk">Tell, don&#8217;t ask</a>.</li>
<li><strong>Use examples to drive your code.</strong> When you code a module further down the stack without looking to see what&#8217;s going to use it, you&#8217;re indulging in guesswork. Write some examples of how you expect the consuming class to be using yours, then revisit them when you have more information.</li>
<li><strong>Write examples to help other people code.</strong> Ideally, the upstream team will provide examples of how they want the collaborator to behave to the downstream team. These examples can be built incrementally, as the upstream team come up with features.</li>
<li><strong>Share code.</strong> If the teams check in before the code is finished, their scenarios will fail. If they check in examples which haven&#8217;t yet been coded, those examples will fail. This won&#8217;t be a problem if no one else is modifying the code base; however, if it&#8217;s a subset of a much larger team breaking the build can cause havoc, and the habit of keeping builds green is a good one. Try <a href="http://mercurial.selenic.com/wiki/">distributed version control</a>, which will allow a team to check in on USB keys or a temporary space until the code works. (There are techniques for getting, say, Mercurial, to work alongside, say, Subversion &#8211; mostly by making each system ignore the other). You could also pass around patch files to keep the code in sync.</li>
<li><strong>Delete unused code.</strong> If at all possible, check the code as it&#8217;s being integrated and delete anything which isn&#8217;t actually being used or going to be used. This might include things like database columns, layers of abstraction which aren&#8217;t actually valuable, etc.</li>
<li><strong>Look for quick feedback.</strong> If you haven&#8217;t integrated your code within a few hours, it&#8217;s probably wrong. Making the assumption that it&#8217;s wrong should help you want to integrate it more frequently.</li>
<li><strong>The more, the merrier!</strong> Look over each other&#8217;s shoulders as you pass! There&#8217;s nothing wrong with tripling or quadrupling instead of pairing, if it means that a pair is more likely to write the right software later.</li>
</ul>
<h3>Edit:</h3>
<p> <a href="http://manicprogrammer.com/cs/blogs/willeke/">Eric Willeke</a> responded to my post with <a href="http://manicprogrammer.com/cs/blogs/willeke/archive/2009/10/17/multi-pair-stories-a-response.aspx">his own perspective on swarming</a>. I very much like the idea of having the skeleton (the simplest scenario?) ready in time for the rest of the team to get on board.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2009/10/17/mocks-outside-in-swarming-features-and-guesswork/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Business Velocity</title>
		<link>http://lizkeogh.com/2009/06/16/business-velocity/</link>
		<comments>http://lizkeogh.com/2009/06/16/business-velocity/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 08:55:13 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[business value]]></category>
		<category><![CDATA[stories]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=417</guid>
		<description><![CDATA[Pascal Van Cauwenberghe has written a great post on estimating business value, tying it into a feature-injection style template. I particularly like the idea of calculating business velocity, and showing value earned over cost on a visible chart.
Even though we know that cost accounting isn&#8217;t useful without looking at ROI, many companies still have this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.nayima.be/">Pascal Van Cauwenberghe</a> has written <a href="http://blog.nayima.be/2009/06/08/estimating-business-value/">a great post on estimating business value</a>, tying it into a <a href="http://www.infoq.com/news/2009/05/pulling-power">feature-injection</a> style template. I particularly like the idea of calculating business velocity, and showing value earned over cost on a visible chart.</p>
<p>Even though we know that <a href="http://business.lovetoknow.com/wiki/Cost_Accounting">cost accounting isn&#8217;t useful without looking at ROI</a>, many companies still have this focus (how many people have had problems getting hold of <a href="http://www.sharpie.com/enUS/Product/Sharpie_Fine_Point_Permanent_Marker.html">sharpies</a> because they&#8217;re &quot;too expensive&quot;</a>? Coloured post-its? Free coffee?)</p>
<p>Perhaps by making the return on investment over time apparent to everyone, we can motivate the team, show the value we&#8217;re earning and gain the trust of the business at the same time.</p>
<p>As an aside, I remember one client where the deadline was very tight, but nobody wanted to work overtime or weekends. Our PM asked us if there was anything we&#8217;d like to have which would help us work more effectively. We asked for &#8211; and got &#8211; fresh fruit every day. The difference in our work &#8211; both the amount and quality &#8211; was noticeable! (We already felt very well respected, so I discount the placebo effect here).</p>
<p>It&#8217;s amazing how much difference a few pounds of expense can make.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2009/06/16/business-velocity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pulling Power and Kanban experiences</title>
		<link>http://lizkeogh.com/2009/05/29/pulling-power-and-kanban-experiences/</link>
		<comments>http://lizkeogh.com/2009/05/29/pulling-power-and-kanban-experiences/#comments</comments>
		<pubDate>Fri, 29 May 2009 10:07:18 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[jbehave]]></category>
		<category><![CDATA[kanban]]></category>
		<category><![CDATA[lean]]></category>
		<category><![CDATA[stories]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=414</guid>
		<description><![CDATA[My first ever article, &#8220;Pulling Power: a new Software Lifespan&#8221; is up on InfoQ. BDD, Feature Injection, Lean and Kanban playing nice together!
Big thanks to Dan North, Chris Matts, David Anderson, Amr Elssamadisy and the amalgam of developers who make up &#8220;Jerry&#8221;; also to the Thoughtworkers who reviewed my article and gave me advice, and [...]]]></description>
			<content:encoded><![CDATA[<p>My first ever article, <a href="http://www.infoq.com/news/2009/05/pulling-power">&#8220;Pulling Power: a new Software Lifespan&#8221;</a> is up on <a href="http://www.infoq.com">InfoQ</a>. BDD, Feature Injection, Lean and Kanban playing nice together!</p>
<p>Big thanks to Dan North, Chris Matts, David Anderson, Amr Elssamadisy and the amalgam of developers who make up &#8220;Jerry&#8221;; also to the Thoughtworkers who reviewed my article and gave me advice, and the Kanbanjins like Eric Willeke who patiently talked me through Lean and Kanban. Several times. Anything I still haven&#8217;t understood is my error, not theirs.</p>
<p>I wish I could have put in everything I&#8217;ve learnt about Kanban, which is far larger than this article allows. It strikes me as a lovely, simple, high-discipline, least-wasteful way to deliver software, and it matches my feeling that you should fit your process to reality, not reality to your process.</p>
<p>My experiments with Kanban boards so far have been highly successful. Now I want to know about the problems, too. Have you tried Kanban? What happened? Did you try to introduce it? Did that work out? If not, why not? Did you think about introducing it, but decide not to? Tell me your stories!</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2009/05/29/pulling-power-and-kanban-experiences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Given / When / Then granularity</title>
		<link>http://lizkeogh.com/2009/04/16/given-when-then-granularity/</link>
		<comments>http://lizkeogh.com/2009/04/16/given-when-then-granularity/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 17:24:18 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[jbehave]]></category>
		<category><![CDATA[stories]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=405</guid>
		<description><![CDATA[When we first wrote JBehave 1.0 we quickly recognised that there was power in the scenarios; in the conversations that they could help to drive, and in the reusability of the steps.
I loved the ease with which you could combine smaller steps to make bigger ones, use scenarios as the contexts of further scenarios, and [...]]]></description>
			<content:encoded><![CDATA[<p>When we first wrote <a href="http://jbehave.org">JBehave</a> 1.0 we quickly recognised that there was power in the scenarios; in the conversations that they could help to drive, and in the reusability of the steps.</p>
<p>I loved the ease with which you could combine smaller steps to make bigger ones, use scenarios as the contexts of further scenarios, and take the necessarily procedural automated tests and turn them into sets of reusable objects.</p>
<p>Now BDD is more widely used, and people out there are using JBehave 2 and RSpec, and I hear complaints. Amongst them, this is one of the more common:</p>
<p>&#8220;Every time I change this screen, I have to go through fifteen files and add another step.&#8221;</p>
<p>Since JBehave uses plain text scenarios you can&#8217;t rely on the common refactoring tools, and that can make it a bit more painful than just messing with code. So, I thought I&#8217;d have a go at explaining how I avoid this issue; by sharing some of the ways in which I divide or combine contexts, events and outcomes into reusable components that help me avoid duplication in my scenarios.</p>
<h3>Given a context</h3>
<p>A context is a state which was set up by irrelevant forces, and which is used within the scenario to alter the outcome resulting from the events.</p>
<p>If the manner or time in which the context was set up matters, then that, too, is part of the context; unless it&#8217;s part of the behaviour you&#8217;re looking for, in which case it&#8217;s an event. The only reason for separating the contexts in which a scenario occurs from the events which are performed in the scenario is because it doesn&#8217;t matter how they were created. This means that <a href="http://lizkeogh.com/2008/11/18/four-ways-of-handling-givens/">Givens have more flexibility</a> in implementation than Whens.</p>
<p><strong>A context should matter.</strong> If you can remove the context from the scenario without changing the outcomes, it isn&#8217;t part of the Givens.</p>
<p><strong>A context should be independent of other contexts.</strong> So, I prefer <em>Given a wet newspaper</em> to <em>Given a newspaper / Given that the newspaper is wet</em>. The first is less likely to require refactoring than the second.</p>
<p><strong>A context should create an abandonable artifact.</strong> By this I mean that the forces which created the artifact &#8211; data in the database, files on the disk, a particular page at a given URL &#8211; can safely forget about the context they&#8217;ve created. <em>Given an article about Iraq</em> is a good context. <em>Given I am logged in</em> is not so good, even though we frequently use it as an example. Sorry. If it helps, it&#8217;s a step that rarely needs maintenance. <em>Given we&#8217;ve filled in the comment box and are ready to submit it</em> is likely to cause issues, because of all the other tiny steps that you have to use to get there.</p>
<h3>When an event happens</h3>
<p>An event exercises the feature whose behaviour you&#8217;re interested in when describing or running the scenario.</p>
<p>If you don&#8217;t care whether it works as long as it leaves things in a clean state, it&#8217;s a context. If you don&#8217;t actually need to do anything to cause an outcome &#8211; you&#8217;re simply checking that given some state, some other state is also present &#8211; you don&#8217;t need to write an event; just skip straight from Given to Then.</p>
<p><strong>An event should create a valuable outcome.</strong>The granularity of the ideal event is very similar to that of the ideal context. As a user, I don&#8217;t want to go to the screen with the book, click the purchase button, navigate to the basket, enter the credit card number and click &#8220;submit&#8221;. I just want to buy a book. By specifying the steps which a user purchases a book inside the granularity of this larger step, we capture the value of that step. Since people rarely do things that they (or their sponsor, paymaster, loved one, etc.) don&#8217;t find valuable, this can usually be reused as one large step.</p>
<p><strong>An event may be dependent on context or on another event.</strong> So, when I buy a book, and when I cancel my order within 15 days, then I should not be charged for the book.</p>
<p><strong>An event should cause or contribute to an outcome.</strong> The outcome is something measurable. It could be that the outcome you&#8217;re looking for is an absence of something, for instance if a user&#8217;s preferences have been changed, and you no longer want to see all those Facebook groups. If it doesn&#8217;t cause an outcome, it&#8217;s a fairly irrelevant event.</p>
<h3>Then an outcome occurs</h3>
<p>An outcome describes the benefit that your system or application provides when the events are performed in the given context.</p>
<p><strong>An outcome should have teeth.</strong> If a particular error message doesn&#8217;t have the exact wording expected, the world will not come to an end. If my credit card gets billed for the books but I don&#8217;t get them when I expect, it might.</p>
<p><strong>An Outcome should be Specific, Measurable, Achievable, Relevant and Timeboxed.</strong> Ask a QA if you don&#8217;t know what this means. QAs are wise and can break anything.</p>
<p><strong>An Outcome should represent the valuable purpose of the events.</strong> Instead of checking that a series of menus exist when you navigate to a particular screen, write a scenario that uses those menus and check that the benefits they provide are accessible through them.</p>
<h3>Stories and regression tests</h3>
<p>It can take quite a while to run scenarios. I sometimes like to <a href="http://lizkeogh.com/2007/10/25/bdd-regression-testing-and-some-feature-requests/">turn mine into regression tests</a> by combining them. I like to add contexts, events and outcomes to existing scenarios to better describe the benefits of using any particular feature in any particular context. This may mean that scenarios are related to more than one story. This will help keep them maintainable, and isn&#8217;t a bad thing.</p>
<p>I have never found the need to add a context to a scenario half-way through that scenario, even if it&#8217;s been created from several others.</p>
<p>I do frequently use one scenario as the context for other scenarios.</p>
<h3>Unteaching the business</h3>
<p>Sometimes, we accidentally train our business to talk to us about the solutions they&#8217;d like, occasionally in the language of software development. In that case, they&#8217;ll quite happily discuss the particular steps they need to take in the GUI to achieve the desired outcome, and may even have an idea of the underlying database tables and discuss what ought to be in those tables after the events.</p>
<p>If this happens, try to draw the conversation back to how the data will be used; why it&#8217;s valuable to produce that artifact in the first place. You never know; you may find you need to do less work than you thought you did.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2009/04/16/given-when-then-granularity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dan and I talk about BDD at Oopsla 2007</title>
		<link>http://lizkeogh.com/2008/12/01/dan-and-i-talk-about-bdd-at-oopsla-2007/</link>
		<comments>http://lizkeogh.com/2008/12/01/dan-and-i-talk-about-bdd-at-oopsla-2007/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 16:25:13 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[bdd]]></category>
		<category><![CDATA[stories]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=391</guid>
		<description><![CDATA[Back last year, Vlad Gitlevich kindly made a video of Dan and I talking about BDD.
We concentrated almost exclusively on the principles rather than the technology, which means the video is still very relevant. Particularly we talked about how BDD plays with DDD, outside-in, stories and scenarios and using them in conversation with the business, [...]]]></description>
			<content:encoded><![CDATA[<p>Back last year, Vlad Gitlevich kindly made a video of Dan and I talking about BDD.</p>
<p>We concentrated almost exclusively on the principles rather than the technology, which means the video is still very relevant. Particularly we talked about how BDD plays with DDD, outside-in, stories and scenarios and using them in conversation with the business, and our own experiences.</p>
<p>See it <a href="http://domaindrivendesign.org/events/oopsla2007/dan_north/">here</a>!</p>
<p>Thanks, Vlad!</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2008/12/01/dan-and-i-talk-about-bdd-at-oopsla-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Splitting up stories</title>
		<link>http://lizkeogh.com/2008/09/11/splitting-up-stories/</link>
		<comments>http://lizkeogh.com/2008/09/11/splitting-up-stories/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 14:37:24 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[stories]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=381</guid>
		<description><![CDATA[The high-level vision is made up of Stories of Unusual Size
We have a good idea of where it is we want to go. We have some high-level stories which are quite large. We&#8217;re about to play some of them in our iteration, and we want to know what the real scope of the stories is. [...]]]></description>
			<content:encoded><![CDATA[<h2>The high-level vision is made up of Stories of Unusual Size</h2>
<p>We have a good idea of where it is we want to go. We have some high-level stories which are quite large. We&#8217;re about to play some of them in our iteration, and we want to know what the real scope of the stories is. We&#8217;re also pretty sure that some of these SOUSes are too big to get done in the space of a week or two.</p>
<h2>To get feedback more quickly, we split the stories up</h2>
<p>Occasionally it&#8217;s possible to release part of the original, high-level story. More often, we can split the story up so that we can get feedback about that bit of the story.</p>
<p>Whatever we do with the story, in order to get feedback, it has to show something that the business can understand and on which they can give us feedback. If you can&#8217;t get feedback, nobody cares. If nobody cares, it&#8217;s not a story.</p>
<p>(If you&#8217;re having problems getting feedback from your business, try delivering something.)</p>
<h2>We can&#8217;t split the story up into horizontal layers</h2>
<p>The business don&#8217;t care if
<ul>
<li>We created a CustomerData table with the right columns</li>
<li>We can migrate all the old data into the new database</li>
<li>We are using Spring as our framework</li>
<li>We are using magical pixies to make our site look nice instead of CSS.</li>
</ul>
<p>They care if
<ul>
<li>They can see interesting information on the website</li>
<li>They don&#8217;t have to use two different applications for the same job</li>
<li>They can get changes made quickly and easily</li>
<li>The site is fast enough and makes for a good user experience.</li>
</ul>
<h2>Here are three ways of splitting up stories</h2>
<p>The only valid way to split stories is into slices which the business can understand. That means that there has to be some effect on the interface that the business use! Even if there&#8217;s another computer somewhere else that uses our site, and no user interface at all, we should be able to define the effect of our stories in terms of their effect on the interface.</p>
<p>QAs are used to this. They have a great acronym, &#8220;SMART&#8221;, to remind them that stories should have acceptance criteria, which should be: </p>
<ul>
<li><strong>Specific</strong> &#8211; no generalizations (&#8221;It must be quick enough&#8221; vs. &#8220;It must load 90% of the time within 1 second&#8221;)</li>
<li><strong>Measurable</strong> &#8211; nothing that can&#8217;t be given a quantative measurement (&#8221;Users are happy&#8221; vs. &#8220;Users who express their level of happiness should give us at least 7/10&#8243;)</li>
<li><strong>Achievable</strong> &#8211; nothing that can&#8217;t be done (&#8221;I want my site emblazoned on the side of the moon&#8221;)</li>
<li><strong>Relevant</strong> &#8211; keep it related to the story at hand (&#8221;I want the three latest blog posts and a pony&#8221;)</li>
<li>and <strong>Timeboxed</strong>- work out when it needs to happen (&#8221;I want to be able to duplicate the works of Shakespeare using the random word generator&#8221;)</li>
</ul>
<p>Three ways that I&#8217;ve found to split up stories are:
<ul>
<li>By splitting up the output of the interface</li>
<li>By splitting up the input of the interface</li>
<li>By splitting up the behaviours, or business rules, that connect the input and the output.</li>
</ul>
<h2>We can split stories using the outputs</h2>
<p>Think of a webpage. If you&#8217;re reading this on Wordpress, it&#8217;s a great example. We&#8217;ve got several components on the screen:
<ul>
<li>The blogroll</li>
<li>The archive</li>
<li>The comments</li>
<li>The admin area</li>
<li>The footer</li>
<li>The date of each post</li>
<li>etc.</li>
</ul>
<p>Let&#8217;s say our business have asked for a blog roll. The usability experts have come up with a design that shows the date of each post, who posted it, tags, categories and comments.</p>
<p>We can start capturing blog posts immediately. Not all blog posts have comments. We need to capture the date to show them in order, but we don&#8217;t need to worry about how to display the date. Not all posts have tags or categories, either! So our stories might be titled:
<ul>
<li>Blog posts</li>
<li>Display date on blog posts</li>
<li>Tag blog posts</li>
<li>Categorize blog posts</li>
<li>Comment on blog posts</li>
<li>Stop robots spamming blog posts</li>
<li>etc.</li>
</ul>
<p>An output might be a page with components on it, a particular flow through an application, or a report with content and formatting.</p>
<h2>We can split stories using the inputs</h2>
<p>We can split the story up into the different types of input, and the way in which they effect the output. Search filters are a really great example of this. Take a look at <a href="http://www.google.co.uk/advanced_search?hl=en">Google&#8217;s advanced search</a>.</p>
<p>I doubt that Google started with all those different search options. Maybe they started by letting you search for all words. Then by letting you search for exact words. Then by letting you search for all words, or exact words, but not the unwanted words.</p>
<p>The form of the output is exactly the same &#8211; a list of search results &#8211; but the actual content changes depending on what the input was. We don&#8217;t need to support all those inputs to begin with! So, our stories for a Google Advanced Search page might be titled:
<ul>
<li>All these words</li>
<li>These exact words</li>
<li>Not these words</li>
<li>Paginate results</li>
<li>Search by language</li>
<li>Search within a domain</li>
<li>etc.</li>
</ul>
<p>We might also want to split stories using the state of the application &#8211; the context in which it&#8217;s running. This is similar to changing the input. For instance, the <a href="http://www.google.co.uk/advanced_search?hl=en">iGoogle home page</a> contains some widgets, and has a search bar. We can change how the widgets and search bar look depending on:
<ul>
<li>the skin choice</li>
<li>the order of the widgets</li>
<li>the different tabs</li>
<li>etc.</li>
</ul>
<p>Each of these might also be a different story. The context is another input, and the output changes depending on it.</p>
<h2>We can split stories using the business rules</h2>
<p>Let&#8217;s say we&#8217;re building a payroll system.</p>
<p>The simplest payroll we can create is for a full-time employee, who has an annual salary, and who gets paid monthly. Sometimes these employees might just have arrived, so they won&#8217;t be paid a full month&#8217;s salary. Sometimes they might be in the process of leaving. Perhaps an employee works part-time, so we actually have to look at how many hours they worked that week. Maybe they do overtime. Some of them will get performance bonuses. Some will be on commission. They might have pension contributions, or expenses.</p>
<p>All the information is captured in a database already, so our context isn&#8217;t changing. Our input to the system is just an id! Our output is a cheque with an amount. But our amount changes as we introduce each story &#8211; which means it won&#8217;t work for everyone to start with.</p>
<p>We can support the simplest cases first, and add business rules incrementally to deal with the difficult cases. So, our stories might be titled:
<ul>
<li>Full-time employee</li>
<li>Part-time employee</li>
<li>Employee who just joined</li>
<li>Employee who&#8217;s leaving</li>
<li>Overtime</li>
<li>Pension contributions</li>
<li>Expenses</li>
<li>Commission</li>
<li>Bonuses</li>
<li> etc.</li>
</ul>
<p>As we start adding things to this list, we can start dealing with more and more employees. We can let the legacy system deal with the people who aren&#8217;t on the list. It might be a manual legacy system! But even if that&#8217;s the case, we can start cutting down the work of the admin staff very quickly.</p>
<div style="font-size:smaller">(I can&#8217;t remember who wrote the original tale that inspired this; it ended with the first payroll cheque being framed and put up on the wall. If anyone can give the appropriate credit I&#8217;ll include it here!)</div>
<h2>You can use scenarios to help split up stories</h2>
<p>When we think of examples of the behaviour of our application, we think of stepping through them in the same way that QAs do when testing.</p>
<p>We can say:
<ul>
<li>Given a context</li>
<li>When some events happen</li>
<li>Then some outputs should occur</li>
</ul>
<p>If we have different contexts that change the outputs when the same events happen, then we can split the stories according to those contexts. So using an example of an ATM which does different things depending on the balance of my account and whether or not I have an overdraft limit, I can start splitting the &#8220;Withdraw cash&#8221; story into &#8220;enough money&#8221; and &#8220;overdraft&#8221; stories.</p>
<p>If different events cause different things to happen, there are probably different components on our interface that can be delivered independently. So putting in a value for the amount of money, and pressing the buttons that deliver predefined amounts of cash, might be two different stories.</p>
<p>If we find that we&#8217;re getting the wrong outcomes for particular contexts and events, we&#8217;ve probably got some business rules that we need to include (and we&#8217;ll have to have a strategy for dealing with the exceptions in the meantime). For instance, my card used to work very well in the ATMs abroad! But now, I have to phone my bank and let them know where I&#8217;m going ahead of time &#8211; they&#8217;ve put in a business rule to help cope with international fraud.</p>
<p>So our single story &#8211; &#8220;I can use an ATM to withdraw cash&#8221; &#8211; becomes:
<ul>
<li>Withdraw cash if enough cash</li>
<li>Withdraw cash if enough overdraft</li>
<li>Quick buttons</li>
<li>Limit use abroad</li>
<li>&#8230;and we can probably find some more if we talk to people who know the domain.</li>
</ul>
<h2>These stories are not necessarily releasable</h2>
<p>Sometimes, the business will have a minimum feature set that they want to release. This might be because of training, because they have a certain number of commoditized features that they need to enter a market, or because rolling out the software or making changes to it in a live environment is expensive.</p>
<p>However, the stories should each have something that the business can start playing with, that QAs can test, that we can get feedback on and that we can showcase and feel proud of.</p>
<h2>But they might be!</h2>
<p>We sometimes discover that a story we&#8217;ve broken down can be released with only part of the original functionality in place. This is great, if you&#8217;ve got an immovable deadline!</p>
<p>&#8220;We&#8217;ve just bought out another company. That&#8217;s 1,000 new employees, and they all need paying at the end of the month&#8230;&#8221;</p>
<p>OK. Let&#8217;s work on that first release.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2008/09/11/splitting-up-stories/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Feature Injection and handling technical stories</title>
		<link>http://lizkeogh.com/2008/09/10/feature-injection-and-handling-technical-stories/</link>
		<comments>http://lizkeogh.com/2008/09/10/feature-injection-and-handling-technical-stories/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 15:12:58 +0000</pubDate>
		<dc:creator>liz</dc:creator>
				<category><![CDATA[stories]]></category>
		<category><![CDATA[feature injection]]></category>

		<guid isPermaLink="false">http://lizkeogh.com/?p=380</guid>
		<description><![CDATA[Technical stories don&#8217;t make sense
As I learn more about stories and how they get written, I occasionally come across odd things that don&#8217;t make sense.
One of these is the technical story. Here&#8217;s an example:
As a developer,
I want an automated build
So that I can be sure my code works.
Of course, we&#8217;re resistant to letting developers have [...]]]></description>
			<content:encoded><![CDATA[<h2>Technical stories don&#8217;t make sense</h2>
<p>As I learn more about stories and how they get written, I occasionally come across odd things that don&#8217;t make sense.</p>
<p>One of these is the technical story. Here&#8217;s an example:</p>
<p><code>As a developer,<br />
I want an automated build<br />
So that I can be sure my code works.</code></p>
<p>Of course, we&#8217;re resistant to letting developers have their own stories. So sometimes, instead, the technical story becomes:</p>
<p><code>As a business user,<br />
I want developers to have an automated build<br />
So that they can be sure their code works.</code></p>
<p>This doesn&#8217;t make sense to me either. Surely &#8220;working code&#8221; is part of another story, for any part of that story? Of course, the QAs are busy checking that code works! So why do we even need a build?</p>
<p>If there&#8217;s no benefit to the business, the chances are that a technical story isn&#8217;t really appropriate.</p>
<p><code>As a business user<br />
I want the developers to refactor the UglyClass<br />
So that... um...</code></p>
<p>Maybe not. In this situation, refactoring of UglyClass should happen when it enables some other piece of functionality to be delivered.</p>
<h2>Feature injection helps us talk about the business benefit</h2>
<p>There are some technical stories, though, which really do deliver something the business care about. You can find this out by asking, &#8220;Who cares if I don&#8217;t do this? Who cares if I don&#8217;t have an automated build? If I don&#8217;t write unit tests? If I don&#8217;t write acceptance tests?&#8221;</p>
<p>This is where the feature injection comes in. I&#8217;m flexing <a href="http://abc.truemesh.com/">Chris Matts&#8217;s</a> template a bit to do this; here&#8217;s how mine reads:</p>
<p><code>In order to &lt;deliver some business benefit&gt;<br />
&lt;these people&gt;<br />
will need &lt;these features&gt;.</code></p>
<p>Now we can start working out why it is that we write the automated build.</p>
<p><code>In order to minimize support costs due to poor code quality<br />
The development team will need<br />
To write scenarios and automate them.</code></p>
<p><code>In order to stop wasting money coding things that don't work in production<br />
The development team will need<br />
Automatic integration with a production-like environment.</code></p>
<p><code>In order to minimize the risk of our production environment falling over<br />
The development team will need<br />
Automated performance testing.</code></p>
<h2>Users aren&#8217;t stakeholders</h2>
<p>Interestingly, the people who care most about these things aren&#8217;t always the development team! The maintenance team care about support costs. The business stakeholders care about wasting money on code that doesn&#8217;t work. They also care about the production environment falling over.</p>
<p>We sometimes see this in normal stories too: that the user isn&#8217;t always the person who cares about the story.</p>
<p><code>As a user<br />
I want to fill in a captcha box<br />
so that... what? No! What a waste of my time!</code></p>
<p>Using &#8220;In order to&#8230;&#8221; we can turn this around:</p>
<p><code>In order to stop bots from spamming the site<br />
Users will need<br />
to fill in a captcha box.</code></p>
<p>Now it might be obvious that the beneficiary of this story is the person who has to moderate the site, or the commercial team whose adverts would become worthless in a morass of spam. But just in case it isn&#8217;t, we can capture both the stakeholder and the user:</p>
<p><code>In order to &lt;deliver some business benefit&gt;<br />
As a &lt;role&gt; I want &lt;some other role&gt;<br />
to &lt;do something, or use or be restricted by some feature&gt;.</code></p>
<p><code>In order to stop bots from spamming the site<br />
As a member of the commercial team, I want users<br />
to fill in a captcha box.</code></p>
<h2>Feature injection helps us remove the implementation detail</h2>
<p>So, going back to our technical stories:</p>
<p><code>In order to stop wasting money on code that doesn't work in production<br />
As the budget owner, I want the development team<br />
to integrate their code regularly with a production-like environment.</code></p>
<p>You might notice that when we word technical stories this way, the implementation detail &#8211; <em>how</em> the development team integrate their code &#8211; tends to fall away. All that&#8217;s important is that we do it; if automating that is the easiest way then we&#8217;ll do it that way.</p>
<p>(Interestingly, <a href="http://jbehave.org">JBehave2</a> was developed with no automated builds. Running them manually was enough.)</p>
<h2>Now we can talk about the business benefit of our stories</h2>
<p>We can also see that there are three different things we can do with our new build, for three different stakeholders. Because we&#8217;re splitting up our technical stories appropriately, we can ask each of the stakeholders to help prioritise the stories, and to give us clear acceptance criteria.</p>
<p><code>In order to minimize the risk of our production environment falling over<br />
As the person in charge of advertising revenue, I want the development team<br />
to be able to verify the performance figures.</code></p>
<p>Now you know who you need in the story workshop, too.</p>
<p>&#8220;So, I want 90% of pages to load within 1 second, and it should be able to cope with the Christmas sales.&#8221;</p>
<p>Of course, the language still isn&#8217;t quite perfect, so you can now have the conversations about the <em>real</em> business benefit (maximising advertising revenue and user experience, minimizing the risk of the brand being stigmatized by an embarrassing failure) and splitting up the stories (situation normal vs. peak time).</p>
<p>&#8220;But, you know what? We&#8217;re not going to be able to do this until after we&#8217;ve finished the first internal release and have some idea of what the real content&#8217;s going to look like and which agencies we&#8217;re going to use for the adverts. Can we delay it till then?&#8221;</p>
<p>No problem. Let&#8217;s work on that first release.</p>
]]></content:encoded>
			<wfw:commentRss>http://lizkeogh.com/2008/09/10/feature-injection-and-handling-technical-stories/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

