<?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>George Dinwiddie's blog &#187; Tools and Techniques</title>
	<atom:link href="http://blog.gdinwiddie.com/category/tools-and-techniques/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gdinwiddie.com</link>
	<description>Effective software development</description>
	<lastBuildDate>Mon, 06 Feb 2012 16:35:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Safety Exercise</title>
		<link>http://blog.gdinwiddie.com/2012/02/06/safety-exercise/</link>
		<comments>http://blog.gdinwiddie.com/2012/02/06/safety-exercise/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 11:37:18 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Individuals and Interactions]]></category>
		<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Retrospectives]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=891</guid>
		<description><![CDATA[In my recent posting on Separate Retrospectives, I mentioned sometimes performing a Safety Exercise at the beginning of a retrospective where the situation was unknown or seemed a bit charged with emotion. I was asked about that exercise. I use a simple poll of how safe people feel. I got this from Norm Kerth’s book, [...]]]></description>
			<content:encoded><![CDATA[<p>In my recent posting on <a title="Separate Retrospectives" href="http://blog.gdinwiddie.com/2012/01/30/separate-retrospectives/">Separate Retrospectives</a>, I mentioned sometimes performing a Safety Exercise at the beginning of a retrospective where the situation was unknown or seemed a bit charged with emotion. I was asked about that exercise.</p>
<p>I use a simple poll of how safe people feel. I got this from Norm Kerth’s book, <a title="Project Retrospectives on Amazon" href="http://www.amazon.com/exec/obidos/ISBN=0932633447/alberg30-20" target="_blank">Project Retrospectives</a> (page 110). <span id="more-891"></span> Norm describes this as part of an exercise to increase the sense of safety in the room and promote honest and open speech. In the context of a day-long-or-more end-of-project retrospective, then I can see the value of such an exercise. For an heartbeat retrospective, I don’t attempt this. I’m not optimistic about significantly raising the level of trust in a short period of time. There will be other retrospectives, and there will be time to work on trust issues in between. It’s often helpful, though, to bring the issue of trust and safety to the surface.</p>
<p>For getting a sense of the safety in the room, I’ll ask people to rate their feeling using this scale:</p>
<p>1.    I&#8217;ll just keep my mouth shut<br />
2.    I&#8217;ll agree with whatever the group says<br />
3.    I&#8217;ll discuss the non-controversial topics<br />
4.    I&#8217;ll discuss almost anything<br />
5.    I&#8217;m willing to talk about anything</p>
<p>I have everyone write a number on an index card or sticky note as a private ballot, and fold it so the number is not visible. I will then collect the ballots (or delegate to someone who seems both trusted and without power over others) and count the number of each value. On a whiteboard or flip chart I’ll record these with hashmarks. This gives a simple obvious view of the reported safety.</p>
<p>Sometime I’ll point out that this is only the reported level of safety. After all, if someone doesn’t feel safe, they may not feel safe enough to answer this question openly, either. They may give then number that they think is expected, or the one they think others will give.</p>
<p>Retrospectives are difficult in low-trust situations. They’re also a great tool for building trust over time.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=891&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2012/02/06/safety-exercise/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Contemplating Given-When-Then</title>
		<link>http://blog.gdinwiddie.com/2012/01/23/contemplating-given-when-then/</link>
		<comments>http://blog.gdinwiddie.com/2012/01/23/contemplating-given-when-then/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 17:09:32 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[ATDD]]></category>
		<category><![CDATA[Communication]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[User Stories]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=882</guid>
		<description><![CDATA[This week, Chris Matts tweeted, &#8220;Contemplating whether GIVEN-WHEN-THEN is back to front. The system should do &#60;outcome&#62; WHEN &#60;event&#62; PROVIDED &#60;stimulus context&#62;&#8230; Hmmm.&#8221; Let’s try an example. &#8220;Given I have $500 in my account, when I withdraw $50 then I have $450 in my account&#8221; becomes &#8220;The system should show $450 in my account when [...]]]></description>
			<content:encoded><![CDATA[<p>This week, <a title="the tweet" href="https://twitter.com/#!/PapaChrisMatts/status/160509230833598465" target="_blank">Chris Matts tweeted</a>, &#8220;Contemplating whether GIVEN-WHEN-THEN is back to front. The system should do &lt;outcome&gt; WHEN &lt;event&gt; PROVIDED &lt;<del>stimulus</del> context&gt;&#8230; Hmmm.&#8221; Let’s try an example. &#8220;Given I have $500 in my account, when I withdraw $50 then I have $450 in my account&#8221; becomes &#8220;The system should show $450 in my account when I withdraw $50 provided I had $500 in my account before.&#8221; It doesn’t exactly roll off the tongue, does it? Putting the result first makes the sentence both more complex and more passive. Yet I can understand the impulse that triggered this tweet. <span id="more-882"></span></p>
<p>Given-When-Then describes the scenario in chronological order, which also makes it easier to automate. Often I don’t implement it in that order, though. Instead, I’ll flesh out the Then with code fixtures first, as the results are the primary focus. The When is usually a straightforward single interaction with the system. The Given describes the business pre-requisites, and these get translated into actions that make the When interaction work. Starting with the Given can lead us astray into specifying things that don’t need to be specified for this scenario.</p>
<p>Sometimes we discover that there are other pre-requisites, too. These may be things that are simply taken for granted or implied by the specified context of the test. We take for granted that the system is up and running. Having money in the account implies that the account has been opened. We also assume that there are no special cases in the context that would invalidate this scenario. The account having a hold put on the account by the fraud department is not a reasonable assumption. This is a case that needs checking, but in another scenario where the special context is explicitly mentioned.</p>
<p>If there are other things that need to be initialized for this test that are not mentioned in the Given setup, then it’s time to pause to reflect. Could this indicate a mismatch between the world envisioned by the business and the implementation in the system? That could be something to correct. Or might it be something that is often implicit in business conversation, but needs to be explicit in the test. Maybe the type of account affects whether or not a fee is applied to withdrawals. Sometimes the business gets into the habit of speaking in shorthand that leaves out some important distinctions.</p>
<p>I’m still happy with &#8220;Given &lt;this context&gt;, when &lt;an interaction occurs&gt; then &lt;a result&gt;&#8221; as a formula for acceptance tests or executable requirements. I don’t know that this is the only good formulation. I’m still looking for others that would naturally occur to business people, and would love to hear some examples if you have them. While I don’t think Do-When-Provided is natural business-speak (I could be wrong in some businesses), it’s good to consider alternatives.</p>
<p>Given-When-Then is a formula. While it can help stimulate our thoughts, it shouldn’t limit them.</p>
<p>In the same manner, Mike Cohn’s canonical expression of a User Story, &#8220;As a &lt;type of user&gt;, I want &lt;some goal&gt; so that &lt;some reason&gt;,&#8221; helps us to remember to think about which user and why they’re requesting this. I generally counsel teams not to actually write their stories in this way, as it often results in a wordy and repetitious list that obscures the essence of the story instead of highlighting it. There’s nothing like a long list of &#8220;As a customer, I want &lt;to do something&gt; so that I can make a purchase.&#8221; The formula can lull you to sleep. I’ve seen examples of this were &#8220;making a purchase&#8221; was not really what the customer wanted, it was the way what the customer wanted was implemented. And I’ve seen &#8220;As a user…&#8221; fill in for customer, obscuring the fact that not all users of the system are customers, and not all stakeholders who want something from the system are users.</p>
<p>These formulae are thinking tools. Use them in ways that provoke thinking. If they’re just chores to be done or checkboxes to be checked, they’re not helping.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=882&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2012/01/23/contemplating-given-when-then/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Agile Planning Tools</title>
		<link>http://blog.gdinwiddie.com/2012/01/16/agile-planning-tools/</link>
		<comments>http://blog.gdinwiddie.com/2012/01/16/agile-planning-tools/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 08:09:37 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Individuals and Interactions]]></category>
		<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Distributed Development]]></category>
		<category><![CDATA[Management]]></category>
		<category><![CDATA[Product backlog]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=878</guid>
		<description><![CDATA[One of the most exhilarating moments in my coaching career was when I entered the client team room one Monday morning to find they were pulling the cards and tape off of their backlog corkboard, and arranging it in a different fashion. I knew then that they had taken charge of their own process. That [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most exhilarating moments in my coaching career was when I entered the client team room one Monday morning to find they were pulling the cards and tape off of their backlog corkboard, and arranging it in a different fashion. I knew then that they had taken charge of their own process. That team became one of the best I’ve coached.</p>
<p>One of the low points was when several people, including a business analyst, product owner proxy, and the program manager, individually said that they couldn’t alter the &#8220;user stories&#8221; to cut across multiple components of the system because they were already in the computerized planning tool (and Word documents) and it would be too much work. That team did not appear to be getting much value from their &#8220;Agile approach&#8221; and had significant integration risk that was being studiously ignored.</p>
<p>One of the most frequently asked questions on public mailing lists and forums devoted to Agile development is &#8220;What Agile Planning Tool should we use?&#8221; There is always a chorus of answers touting this or that computerized tool, usually without asking any questions about the context. Is there one best tool?<span id="more-878"></span></p>
<p>Given the number of such tools available, either for purchase or for free, people are still seeking that perfect tool. Like Lord Franklin seeking the Northwest Passage, some pay a heavy price for that search.</p>
<p>What’s the big difference between the two situations described above? The first difference is that one was using a physical planning tool and the other a computer program. Should we take that as evidence that physical tools are always preferred and computer programs should be eschewed? That would be hasty without looking deeper. Our second &#8220;why was one team more successful than the other&#8221; answer is that the first team adapted their process according to the successes and difficulties they were having. The second held to a &#8220;consistent process&#8221; when it was getting in their way.</p>
<p>One of the biggest problems for teams trying to learn how to be successful with Agile techniques is that they often don’t recognize what’s getting in their way. They’re often trying to do things &#8220;by the book&#8221; to learn Agile practices&#8211;which is a good starting point. But they’ve not yet got enough experience to see the early warning signs of Agile impediments, and by the time they do, they often jump to the conclusion that &#8220;Agile doesn’t work.&#8221;</p>
<p>Let’s look at a recent inquiry on the Agile Project Management yahoogroup. The questioner mentioned that his small team was moving to Agile/Scrum and because they were partially distributed, were looking for &#8220;a product management platform at least to enable a virtualized scrum board and some basic reports like the burn down chart, etc.&#8221;</p>
<p>Some people opined that, because they were distributed, only an electronic tool would work. This isn’t necessarily the case. I’ve heard several reports of successfully using physical boards duplicated at each location. I can see some real advantages to this approach. One of the biggest challenges of distributed development is keeping the assumptions and attention of each location in sync with the others. Talking through the changes on the board on a daily (or more frequent) basis is an excellent means to accomplish this. Having silent changes that happen in the background within a computerized tool while you’re not looking, is not.</p>
<p>As it turns out, the team isn’t really distributed. The product owner and another business stakeholder is remote to the development team. The product owner makes an effort to be regularly engaged, but wants to give more visibility to the other business stakeholder. Using a distributed planning tool for this sets off warning bells in my head. It’s making the daily work of those producing the software more difficult for the benefit of someone who is insufficiently engaged in the process. I often hear the counter argument that &#8220;it’s only a few seconds to use the tool.&#8221; That may be, but those few seconds are multiplied many times over during the course of the project. They become a real drag on productivity and lengthen the cycle times. I’ve not measured the effect, but I’ve seen it clearly. Worst of all, it eventually discourages people from making improvements to their process because they’ve got so much invested in the current incarnation.</p>
<p>There are more insidious effects, too, when an electronic tool is being mandated just to observe from afar without engagement. The information that goes into the tool becomes a public record, and people start worrying about how to make it look good to others rather than how to use it to get work done. This is an even greater productivity friction, and it siphons attention away from the original goal.</p>
<p>The product owner of this team would do far better to develop a sprintly summary for the other stakeholder. Business stakeholders don’t really need visibility into the details within a sprint, anyway. If they truly do, then the sprints are too long. Broadcasting all of the minute details of how people are working just invites micromanagement and breeds distrust.</p>
<p>This is just one case study. In other situations, I would call attention to different details and likely offer different advice. Covering all the cases would be far too much for a blog posting. Besides, the real point is that people need to keep their ultimate goals in mind, and not trade thoughtful observation and decisions for the magic of a virtual tool.</p>
<hr />
<p>P.S. Tim Ottinger and Jeff Langr have published <a title="The Only Agile Tools You'll Ever Need" href="http://pragprog.com/magazines/2011-09/the-only-agile-tools-youll-ever-need" target="_blank">some very good advice</a> on this topic.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=878&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2012/01/16/agile-planning-tools/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What is Design?</title>
		<link>http://blog.gdinwiddie.com/2012/01/09/what-is-design/</link>
		<comments>http://blog.gdinwiddie.com/2012/01/09/what-is-design/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 03:58:16 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Architect]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=874</guid>
		<description><![CDATA[I see many discussions get heated or go in circles when the topic is &#8220;design.&#8221; In the field of software development, what is design? There are those looking at it from the point of view of usability and fitness for use. Some, often closely aligned with these, use the word &#8220;design&#8221; to talk about the [...]]]></description>
			<content:encoded><![CDATA[<p>I see many discussions get heated or go in circles when the topic is &#8220;design.&#8221; In the field of software development, what is design?<span id="more-874"></span></p>
<p>There are those looking at it from the point of view of usability and fitness for use. Some, often closely aligned with these, use the word &#8220;design&#8221; to talk about the visual aspects. Others, the user experience.</p>
<p>Others look at the manner in which the software is constructed. Those who use the title of &#8220;Software Architect&#8221; often look at the big picture aspects&#8211;what frameworks will be used and how the system will be distributed. DBAs look at the schema of the persisted data as design. Those who write the code see design in the modules, classes, methods and functions&#8211;and how they interact.</p>
<p>Some people think that design is something you do before building the system, often drawing diagrams to illustrate their ideas. Some go so far as to assert that if this is not done prior, the system is not designed at all. Others maintain they can do just as well designing on the fly, mostly capturing the design directly in the code, but also describing it in conversation and sketches. Still others say the real design is &#8220;as built,&#8221; and the original intent is not so important.</p>
<p>People use &#8220;design&#8221; to refer to all sorts of small tidbits in the development process. They abstract some of these and call them &#8220;design patterns.&#8221;</p>
<p>Sometimes people use the word &#8220;design&#8221; to mean &#8220;the important stuff I do while I leave the mere implementation to others.&#8221;</p>
<p>All this is just about software, and is surely not exhaustive. When you add physical products to the mix, the definitions multiply. Any discussion about design that doesn’t develop a shared understanding of what is meant by &#8220;design&#8221; is sure to cause difficulties. And public utterances about design will always be interpreted differently by some people.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=874&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2012/01/09/what-is-design/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>I feel better, now</title>
		<link>http://blog.gdinwiddie.com/2012/01/05/i-feel-better-now/</link>
		<comments>http://blog.gdinwiddie.com/2012/01/05/i-feel-better-now/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 19:24:43 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Working Software]]></category>
		<category><![CDATA[Craftmanship]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=866</guid>
		<description><![CDATA[Oops! The whole problem started when I wanted to install a new program on the &#8220;entertainment computer&#8221; that’s connected to the TV. The existing version of Ubuntu was no longer supported, so I started what I thought would be a simple upgrade. Oops, it deleted the entire /var directory, including the contents of the second [...]]]></description>
			<content:encoded><![CDATA[<p>Oops! The whole problem started when I wanted to install a new program on the &#8220;entertainment computer&#8221; that’s connected to the TV. The existing version of Ubuntu was no longer supported, so I started what I thought would be a simple upgrade. Oops, it deleted the entire /var directory, including the contents of the second drive mounted there. That drive contained all of our photos and music. Not a problem, I thought. It’s all backed up nightly onto a USB drive. It’s just a bit of bother to copy all of that over the USB interface.</p>
<p>Oops! There are no photos beyond last March. I felt sick to my stomach. That’s a lot of family memories to evaporated. Whew! The program we’ve been using to download the cameras also makes a backup copy local to the machine used to download. I’ve got all the pictures back on the photo server, and now just have to sort them into directories again.</p>
<p>But first, I need to fix the backup script. Why didn’t it warn me when it started to fail?<span id="more-866"></span></p>
<p>I copied a version on a different fileserver to that machine and edited it for the different source and destinations. It’s a simple shell script that mounts the USB drive, runs <code>rsync</code> to duplicate the data, and then unmounts the USB drive. I’d run into a problem once before where the drive wasn’t getting mounted properly, so I’d added some script to detect that and email me using <code>msmtp</code> if it failed. That only worked for mount errors, though, not for <code>rsync</code> errors.</p>
<p>As I hacked in detection and notification of <code>rsync</code> errors, I felt ill at ease. I was duplicating some of the script to send emails. The script was getting harder to read. The script was increasingly inconvenient to test. And I was nervous about introducing new errors.</p>
<p>I started practicing Test Driven Development a decade ago. It has become second-nature to me to test-drive the code I write. Why was this code just hacked together? Mostly because I hadn’t been thinking of it as code. It was just a script. At first, it just replicated the commands I typed on the command-line. I put those into a script to make it easy to run, and then to automate running it via the <code>&lt;del&gt;chron&lt;/del&gt; cron</code> daemon. When I replicated it to another machine, I extracted the paths to variables to make it easier to change the differences. When it had failed to mount a drive, I’d added a check for that and a line to send me an email. That line surely crossed the border between &#8220;a file of commands&#8221; to &#8220;a program,&#8221; but I didn’t notice it at the time. Or, if I did notice it, I didn’t pay attention to it. After all, I don’t generally program in bash scripts and haven’t developed any rigor for doing so. It’s those &#8220;little&#8221; changes that &#8220;can’t possibly&#8221; hurt that bite you the hardest.</p>
<p>The script now &#8220;seems to be working,&#8221; but I’m not satisfied. Wouldn’t it be nice to get advance notice when the disk is getting close to full, rather than waiting until it is?</p>
<p>I now know I’m programming in <code>sh</code>, not just collecting a bunch of command-lines from my <code>.history</code> file. Adding the email notification of <code>rsync</code> errors was harder than I expected due to tiny errors made in an unfamiliar programming environment. In addition to being hard, it just felt &#8220;dirty.&#8221;</p>
<p>A little googling lead me to <a title="Project page for shunit2 shell unit test framework." href="http://code.google.com/p/shunit2/" target="_blank"><code>shunit2</code></a>. After a little difficulty creating a tiny virtual disk under control of the tests, I quickly had a function that extracted the % full output using the <code>du</code> command and returned it as a number. Great! Now I can use that number to provide an early warning. And working test-driven is teaching me better shell scripting habits.</p>
<p>I’ve still got work to do, pulling the existing script into tested functions, but already I feel better. I’m on my way to a reliable and maintainable script.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=866&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2012/01/05/i-feel-better-now/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Tips and Advice: Test Driven Development</title>
		<link>http://blog.gdinwiddie.com/2011/11/17/tips-and-advice-test-driven-development/</link>
		<comments>http://blog.gdinwiddie.com/2011/11/17/tips-and-advice-test-driven-development/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 13:34:59 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=857</guid>
		<description><![CDATA[Yesterday, Bob Payne published one of our informal Tips and Advice discussions on the Agile Toolkit. Check out our Test Driven Development podcast and let me know what you think.]]></description>
			<content:encoded><![CDATA[<p>Yesterday, Bob Payne published one of our informal Tips and Advice discussions on the Agile Toolkit. Check out our <a title="Test Driven Development podcast on The Agile Toolkit" href="http://agiletoolkit.libsyn.com/webpage/tips-and-advice-test-driven-development-bob-payne-and-george-dinwiddie" target="_blank">Test Driven Development podcast</a> and let me know what you think.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=857&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2011/11/17/tips-and-advice-test-driven-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Code of Christmas Past</title>
		<link>http://blog.gdinwiddie.com/2011/11/02/the-code-of-christmas-past/</link>
		<comments>http://blog.gdinwiddie.com/2011/11/02/the-code-of-christmas-past/#comments</comments>
		<pubDate>Thu, 03 Nov 2011 02:34:20 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Craftmanship]]></category>
		<category><![CDATA[TDD]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=832</guid>
		<description><![CDATA[When we write code, we’re often thinking about the short term. We need this code to function correctly so we can deliver within our immediate deadlines. I’ve found it important to also think of the long term. Sooner or later, we might encounter our own code, again. I spent a chunk of my career where [...]]]></description>
			<content:encoded><![CDATA[<p>When we write code, we’re often thinking about the short term. We need this code to function correctly so we can deliver within our immediate deadlines. I’ve found it important to also think of the long term. Sooner or later, we might encounter our own code, again.</p>
<p>I spent a chunk of my career where I often worked solo on projects that might get enhanced every year or two. This taught me a lot about the importance of code readability and what sort of things helped me quickly understand and avoid overlooking important considerations. I’ve also worked on a lot of legacy code bases, so I’m well aware of the pain and problems created by code that’s not readable, or is not organized in a helpful manner.<span id="more-832"></span></p>
<p>Last week at the <a title="AgileDC Conference" href="http://agiledc.org/" target="_blank">AgileDC Conference</a>, someone told me they were working on code I had written ten years ago. My first question was, “Are the unit tests still working?” This code was the first production code I ever wrote test-first, and it taught me a lot doing so. I was glad to hear that they had been maintained. When I was writing them, I couldn’t get anyone else interested in test-first development.</p>
<p>Even more gratifying was hearing that they’d recently used some of my code as an example in a discussion of object-oriented programming. The example they’d used was where I’d wrapped an integer in a class. Why would I do that? Because it wasn’t really an integer. It was a database ID. The integer was just an artifact of the database automatically creating ID values using a sequence. It would make no sense to perform arithmetic on it. And there were IDs for various entities that should not be used interchangeably.</p>
<p><img class="aligncenter size-full wp-image-833" title="NumericID" src="http://blog.gdinwiddie.com/wp-content/uploads/2011/11/NumericID.png" alt="Class diagram for a class wrapping an integer" width="483" height="304" /></p>
<p>The integer value was intended to be used only within the Data Access Object that read and wrote the database.</p>
<p>A few years ago, I was asked if I could change an algorithm in some embedded assembly code that I’d written more than ten years prior, and I hadn’t even seen for over ten years. Setting up the development environment wasn’t easy, as much of the hardware was no longer manufactured. The code, however, was not hard to modify. I had implemented the algorithm using state machines and data tables, and had created semi-readable constants for all of the “magic numbers” used.</p>
<p>Code is read much more frequently than it is written. Writing it clearly and expressively pays off when we have to read it next week or next month. Well-written code is also much more likely to be useful for decades into the future. If you write code only for the short term, it’s likely to have only a short life. People will find it necessary to rewrite it rather than maintain it for the long term.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=832&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2011/11/02/the-code-of-christmas-past/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A Virtue of Imprecise Measurements</title>
		<link>http://blog.gdinwiddie.com/2011/07/27/a-virtue-of-imprecise-measurements/</link>
		<comments>http://blog.gdinwiddie.com/2011/07/27/a-virtue-of-imprecise-measurements/#comments</comments>
		<pubDate>Wed, 27 Jul 2011 15:29:36 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Estimation]]></category>
		<category><![CDATA[Feedback]]></category>
		<category><![CDATA[Progress]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=756</guid>
		<description><![CDATA[I&#8217;ve talked about The Importance of Precise Estimates. In that post, I said, My advice is to measure your progress watch the trends project the trends tentatively into the future and relax.  It’ll work out the best it can.  False precision won’t make it any better. Now I just read The Virtues of the Imprecisely [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve talked about <a title="The Importance of Precise Estimates" href="http://blog.gdinwiddie.com/2010/04/19/the-importance-of-precise-estimates/">The Importance of Precise Estimates</a>. In that post, I said,</p>
<blockquote><p>My advice is to</p>
<ul>
<li>measure your progress</li>
<li>watch the trends</li>
<li>project the trends tentatively into the future</li>
</ul>
<p>and relax.  It’ll work out the best it can.  False precision won’t make it any better.</p></blockquote>
<p>Now I just read <a title="The Virtues of the Imprecisely Measured Self" href="http://blogs.forbes.com/alexknapp/2011/07/25/the-virtues-of-the-imprecisely-measured-self/" target="_blank">The Virtues of the Imprecisely Measured Self</a> by Alex Knapp at Forbes. He tells the tale of <a title="In Praise of Vagueness Malleability of Vague Information as a Performance Booster" href="http://pss.sagepub.com/content/early/2011/04/15/0956797611407208" target="_blank">a study </a>in the journal <cite><abbr title="Psychological Science">Psychological Science</abbr> April 2011</cite> that indicates that precision, whether false or not, inhibits success.  Alex summarizes,</p>
<blockquote><p>Precision can actually be the enemy of performance goals. To be sure, feedback is definitely a positive thing. But it appears that if you want to keep yourself motivated, it’s best to get a more generalized, imprecise feedback that lets you know you’re heading in the right direction, rather than the precise coordinates of where you are on the path.</p></blockquote>
<p>It&#8217;s something to think about.</p>
<p>&nbsp;</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=756&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2011/07/27/a-virtue-of-imprecise-measurements/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Podcast: Story Granularity</title>
		<link>http://blog.gdinwiddie.com/2011/07/14/podcast-story-granularity/</link>
		<comments>http://blog.gdinwiddie.com/2011/07/14/podcast-story-granularity/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 15:48:13 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=741</guid>
		<description><![CDATA[Bob Payne has released another of our conversations, this one on the granularity of stories (and a little tidbit on home remodeling&#8211;that was a surprise). We talk about what makes a good story, and how to get them smaller to make iterative-incremental software development easier and more sustainable.]]></description>
			<content:encoded><![CDATA[<p>Bob Payne has released <a title="The Aglie Tookit podcast" href="http://agiletoolkit.libsyn.com/tips-and-advice-story-sizing-and-granularity" target="_blank">another of our conversations</a>, this one on the granularity of stories (and a little tidbit on home remodeling&#8211;that was a surprise). We talk about what makes a good story, and how to get them smaller to make iterative-incremental software development easier and more sustainable.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=741&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2011/07/14/podcast-story-granularity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t You Have to LOGIN first?</title>
		<link>http://blog.gdinwiddie.com/2011/06/11/dont-you-have-to-login-first/</link>
		<comments>http://blog.gdinwiddie.com/2011/06/11/dont-you-have-to-login-first/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 21:35:49 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Software Design]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[User Stories]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=680</guid>
		<description><![CDATA[In my previous post, Avoiding Iteration Zero, I suggested starting with &#8220;the one obvious thing that needs to be done? (Hint: it’s not &#8216;login.&#8217;)&#8221; As Jon Kern has recently mentioned, this same topic has come up elsewhere. I was also in that list discussion. Jon is, of course, right in a narrow sense. You can [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous post, <a title="Avoiding Iteration Zero" href="http://blog.gdinwiddie.com/2011/05/25/avoiding-iteration-zero/">Avoiding Iteration Zero</a>, I suggested starting with &#8220;the <strong>one obvious thing</strong> that  needs to be done?<em> (Hint: it’s not &#8216;login.&#8217;)</em>&#8221; As <a title="Jon Kern's You Can Start at Login!" href="http://technicaldebt.com/?p=957" target="_blank">Jon Kern has recently mentioned</a>, this same topic has come up elsewhere<em>.</em> I was also in that list discussion.</p>
<p>Jon is, of course, right in a narrow sense. You <em><strong>can</strong></em> start with login, if you want. You can also start with an Iteration Zero. (Or, an Iteration Minus One, as I&#8217;ve seen one organization do when their list of pre-planning outgrew one iteration.) I&#8217;ve observed that you can generally get <strong>better software, faster</strong> if you start somewhere else.</p>
<p>There are some very good reasons for this. <span id="more-680"></span>For one thing, it&#8217;s unlikely that you&#8217;ll find much business value in delivering a system that allows people to login, but do nothing else. Unless you&#8217;re writing a login package for others to integrate into their code, something else is the central idea of the system. Surely there are some things about that central idea that we don&#8217;t yet know in detail. By contrast, &#8220;login&#8221; is fairly widely known and understood (even if sometimes implemented poorly). Even if we decide we can&#8217;t deliver the system without &#8220;login,&#8221; we can learn important things earlier if we work on the central idea first. (And I can imagine, in a pinch, having a usable system where access was controlled by putting the computer in a secure room where only those with authority could touch it.)</p>
<p>Learning important information sooner is one of the subtle but powerful benefits of working in an Agile fashion. It can help the business make better decisions about priority, or even about the direction of the effort. That&#8217;s one of the tenets of the Lean Startup focus, but it works for established organizations, too. There&#8217;s almost always something new about what we&#8217;re doing, or we wouldn&#8217;t be spending money doing it.</p>
<p>This pattern of accelerating learning is powerful for businesses that use it. But it&#8217;s also powerful for programmers working on the code. As we build our application, we can learn about better ways to structure the code, and we can use that information when we&#8217;re writing further code. I&#8217;ve found this to allow me to do a better job when developing code in an iterative-incremental fashion than when creating an up-front design and then following it.</p>
<p>Let&#8217;s look in more detail at Jon&#8217;s suggested beginning:</p>
<blockquote><p>For example, to start, you can simply check that the response has “Login   Succeeded” ( or “Login Failed” for testing that a bogus login attempt   does indeed fail). &#8230;simply:</p>
<pre>Scenario: Successful Login
    When I login as admin
    Then I should be logged in

Scenario: Failed Login
    When I login as asdf56ghasdkfh
    Then I should be not logged in</pre>
<p>And your steps would hide the logic for filling in the login form and checking for success:</p>
<pre>Given /^I login as "([^"]*)"$/ do |login|
  @login_name = login
  visit login_path
  fill_in "login", :with =&gt; login
  fill_in "password", :with =&gt; "password"
  click_button "login_button"
end

Then /^I should be logged in$/ do
  response.should contain "Login Succeeded"
end

Then /^I should not be logged in$/ do
  response.should contain "Login Failed. Please try again."
end</pre>
</blockquote>
<p>Given this simple start, where will we put our access control logic? Most likely in our Controller of MVC or Presenter of MVP. Then we&#8217;ll decide to which page we direct the user. In effect, we&#8217;re protecting the &#8220;Login Succeeded&#8221; page from the unauthenticated. Is that page the asset whose access we want to control?</p>
<p>I once worked with a client who had an application that allowed authorized users to access the documents to which they were authorized. It was not an Agile shop, and they were not working in short iterations using small stories. They had, however, been delivering new functionality in each release for a number of years. And they were very thorough programmers, carefully checking that they were not delivering bugs. Having started with the idea of access control, they had ended up with their authorization check in the Action class of their Struts app. Over time, there was a need for further authorization concerning some documents. Only an authorized user could see any document, but some documents were only available to a subset of users. The Action class checked that the user was logged in, retrieved the list of documents, and then filtered out the ones that particular user was not allowed to see.</p>
<p>Do you see any problem with this scheme?</p>
<p>It works well enough, but it causes some maintenance headaches. Even though there was not a link to the unauthorized documents, there&#8217;s nothing to stop a savvy user from guessing the URL and retrieving it anyway&#8211;so there had to be an authorization check there, too. And there were multiple lists of documents, so each one had to make this check. Sometimes when the authorization logic changed, one of the Action classes would be overlooked. Extracting this authorization filtering code to a method would reduce much of this duplication and make that particular mistake less likely, but some lists had different filtering rules. Also, the Action classes would retain the duplication of the order of steps that each one had to apply in order to properly protect the assets. (That&#8217;s a more subtle flavor of duplication that many overlook.) And there was a requirement to show some documents in the list to people who were not yet authorized to retrieve them.</p>
<p>It was pretty complicated and error-prone. Enforcing the security at the outer layer, instead of directly around the protected assets, resulted in more places and more variability in the implementation. I&#8217;m sure that you and I and Jon Kern would not end up with such an error-prone design. Jon is an excellent software designer&#8211;much better than I am. He can explain why you&#8217;d want to design in a particular way and describe the reasons why. I, on the other hand, have trained myself to be sensitive to duplication. Test-driving code with an aversion to duplication would lead me to a different design.</p>
<p>I helped these programmers implement a new feature&#8211;one that provided government-mandated access to certain documents even if the user wasn&#8217;t logged in at all. Since this required a change to all of these access controls, it provided the impetus to change the design. While adding this new requirement using Test Driven Design, I also refactored code to remove the duplication. As I did so, I pushed the access check lower in the code, passing along a &#8220;AuthenticationToken&#8221; object that could be treated as a black box by intervening layers. Ultimately the access check was made in the database queries themselves, insuring by simple inspection that no path in the user interface could lead to a condition that allowed unauthorized access.</p>
<p>You&#8217;re probably a good programmer, too. I&#8217;m sure you wouldn&#8217;t make a mistake. <a title="Keynote at Agile Development Practices Conference, June 2011" href="http://www.youtube.com/watch?v=QvhOXU72OL4" target="_blank">Linda Rising recently told me </a>that 80% of people think they&#8217;re above average, so you must be good. As it happens, the programmers who built this system were pretty good, but they weren&#8217;t experienced in the technology. This J2EE system was the first Java code they&#8217;d ever written. These programmers generally succeeded by being very careful to check all the paths. Only very occasionally did they miss one and allow a bug to escape to User Integration Testing.</p>
<p>It&#8217;s my contention that by implementing the primary functionality first, in this case the listing and retrieval of documents, then we&#8217;ll be more likely to naturally put the access control directly around the assets that matter. In other situations, there may be other considerations for the access control that would be different from the application I described. In any case, if our primary story is</p>
<blockquote>
<pre>When I do whatever my application does
Then I get the result of doing so</pre>
</blockquote>
<p>in all of the varieties of &#8220;do,&#8221; then the proper place for access control will be obvious for more than 80% of us when we get to the story</p>
<blockquote>
<pre>Given I am not an authorized user
When I do whatever my application does
Then I am denied the result of doing so</pre>
</blockquote>
<p>While it is certainly true that we can get to the desired design anyway, as both Jon&#8217;s blog and my story above illustrate, it&#8217;s easier, more direct, and more likely that we&#8217;ll do so if we start with our primary business functionality before the LOGIN story.</p>
<p>It&#8217;s not a law of the universe, but it&#8217;s a good heuristic: <strong>The Login story is <em>not</em> the place to begin.</strong></p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=680&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2011/06/11/dont-you-have-to-login-first/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Avoiding Iteration Zero</title>
		<link>http://blog.gdinwiddie.com/2011/05/25/avoiding-iteration-zero/</link>
		<comments>http://blog.gdinwiddie.com/2011/05/25/avoiding-iteration-zero/#comments</comments>
		<pubDate>Wed, 25 May 2011 16:42:37 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Working Software]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[Estimation]]></category>
		<category><![CDATA[Time Boxes]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=668</guid>
		<description><![CDATA[Teams new to Agile often realize that they have a lot to do before they get their new development process at full speed. Looking at this big and unknown hill in front of them, many Agile teams choose to do an Iteration Zero (or Sprint Zero) to prepare before they start delivering regular increments of [...]]]></description>
			<content:encoded><![CDATA[<p>Teams new to Agile often realize that they have a lot to do before they get their new development process at full speed. Looking at this big and unknown hill in front of them, many Agile teams choose to do an Iteration Zero (or Sprint Zero) to prepare before they start delivering regular increments of functionality. During this time, they may try to get their ducks in a row with</p>
<ul>
<li>A list of features to be built</li>
<li>A release plan or timeline for those features</li>
<li>Setting up development infrastructure such as version control or continuous integration servers</li>
<li>Studying or practicing skills in new technologies they expect to use</li>
<li>&#8230; and other management, infrastructure, and technical endeavors.</li>
</ul>
<p>They try to get all the preliminaries out of the way so they can hit the ground running full speed in Iteration One. In my experience, they&#8217;re still not ready to go full speed. These things are rarely as complete as expected after one iteration, and often aren&#8217;t quite in tune with the actual needs of the project.  The list of features will likely not be complete, but the attempt to approach completeness will dump in lots of ideas that have been given little thought. Any attempt to project into the future still has no data about how fast things can be accomplished. The infrastructure may or may not be the best for supporting the project, but it is likely that the project will now conform to the infrastructure rather than the other way around. The choice of technologies will be made speculatively rather than driven by the needs of the project. While we may do OK, we&#8217;ll have made a lot of decisions with the least amount of information we&#8217;ll have in the project lifecycle.</p>
<p>And we&#8217;ll have burned an iteration without producing any working software that tests our decisions.</p>
<p>My advice is to borrow an idea from Lean and look at the situation from the output point of view.  Ask yourself, &#8220;what would it take to  start delivering?&#8221;<span id="more-668"></span></p>
<p>The initial backlog really only needs to be one item in order to start  delivering.  If you&#8217;ve got too many unknowns, then just start with one  item.  Get the business stakeholders, the programmers, the testers, and anyone else who  needs to be in on the discussion (User Experience? Ops?) to talks about it.  (I call  this a meeting of <a title="A Lingua Franca between the Three (or more) Amigos" href="http://blog.gdinwiddie.com/2010/02/25/a-lingua-franca-between-the-three-or-more-amigos/" target="_blank">the Three Amigos</a>.)  What is the <strong>one obvious thing</strong> that  needs to be done?<em> (Hint: it&#8217;s not &#8220;login.&#8221; Start with the main purpose of the system.)</em> I can&#8217;t imagine a situation where a project is  started without any ideas at all.</p>
<p>Take that one thing, and <a title="Splitting User Stories" href="http://blog.gdinwiddie.com/2011/05/01/splitting-user-stories/" target="_blank">slice it into thinner slices</a>.  Decide on the  examples that represent acceptance of those slices.  Some of the slices  will have questions that can&#8217;t be answered.  Put those aside for the  moment.  Choose the most central slice that travels through the entire  concept from end to end, or as close to that as possible.  Estimate that  as one team-iteration.  (Estimates don&#8217;t have to be &#8220;right.&#8221; They&#8217;re just  estimates.)  Start building it.</p>
<p>Learn the necessary skills in the technology while accomplishing real work. Learn the parts that aid building the system, rather than developing the system according to some framework. When you don&#8217;t know how to accomplish something, or you think multiple approaches might work, do minimalistic spikes to give the information needed to make a decision.</p>
<p>Along the way, start slowly building your development infrastructure. Set up a local code repository. You can always migrate the code to an &#8220;official corporate&#8221; repository later.  Right now, there&#8217;s not much code. Set up a simple build-and-test script so that everyone builds in the same fashion. You can always add other build targets later. If you&#8217;ve got time, you can set up a Continuous Integration server. Otherwise, just do it manually. Checkout &amp; build into a clean workspace. Do what&#8217;s needed to run the code so that you can show it working.</p>
<p>If you can&#8217;t accomplish this slice in one iteration, it&#8217;s probably not thin enough. Or, maybe you haven&#8217;t yet solved an essential technical problem. Or the goal isn&#8217;t yet clear enough. Figure out what impediment is most in your way, address that, and try again.</p>
<p>More likely, you&#8217;ll get this slice done in less than a iteration length. If you get this slice done before the end of the iteration, then pull in  another slice.  Estimate this as &#8220;the rest of the iteration.&#8221;  Repeat as  needed.  As long as you&#8217;ve gotten one slice done, you&#8217;ve got a  potentially deliverable product increment.</p>
<p>Yes, there will still be development infrastructure to be developed. There&#8217;s no particular rush to get that done. Just keep improving it, so that it helps you get more done. Yes, there will still be technical skills to be developed. That should always be the case. Just keep experimenting and pushing your limits.</p>
<p>Yes, there will still be features to be added to the backlog, refined, prioritized, split into stories, and prioritized again. This should continue throughout the project. It&#8217;s part of the &#8220;steering&#8221; process. Yes, there will still be a need for <a title="Projecting Into the Future" href="http://blog.gdinwiddie.com/2010/04/22/projecting-into-the-future/" target="_blank">projections</a> to estimate when functionality can be released, or how much functionality can be released by a certain date. When you think you&#8217;ve got  enough information about what needs to be done, then consider the  initial release plan.  By then you&#8217;ll also have accumulated a <em>little</em> information about how fast things get done.</p>
<p>There will still be a lot of holes in your knowledge of what needs  to be done and how fast things get done.  Don&#8217;t trust your initial  release plan to be &#8220;right.&#8221;  It&#8217;s just a stick in the sand to help you  judge how things are going.  Keep planning, and move the stick as needed. And as time passes, you&#8217;ll have a better and better indication of how fast the system gets developed. Even when you think the Release Plan is complete, it needs to be continually  reviewed and adjusted. Since it&#8217;s never done until the release, there&#8217;s  no particular hurry for a certain level of completeness.</p>
<p>This sort of beginning is very like the Hudson Bay Start that Johanna  Rothman describes in her book, <a title="Amazon" href="http://www.amazon.com/gp/product/0978739248/ref=as_li_ss_tl?ie=UTF8&amp;tag=alberg30-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399349&amp;creativeASIN=0978739248" target="_blank">Manage It</a> (pp.  52-53).</p>
<blockquote><p>The Hudson Bay Start approach was originated by the Hudson Bay Company in the 1600-1700s in northeastern Canada. The Hudson Bay Company outfitted fur traders. To make sure the traders hadn’t forgotten anything they needed, they left Hudson Bay and camped just a few miles away. By making camp just a few miles away, the traders ensured they hadn’t forgotten any tools or supplies&#8211;before they abandoned civilization. With just a short start to their journey, they had a better idea about their ability to endure the winter.</p></blockquote>
<p>There&#8217;s really no reason (other than &#8220;that&#8217;s not the way we do  things around here&#8221;) that this can&#8217;t work for the start of any team/project. It&#8217;s a great way of learning the right stuff for the current situation while also making a bit of progress. I use this technique in my <a title="Agile in 6 Months" href="http://blog.gdinwiddie.com/2011/03/14/agile-in-6-months/" target="_blank">Agile in Six Months</a> transition plan.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=668&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2011/05/25/avoiding-iteration-zero/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>On Models</title>
		<link>http://blog.gdinwiddie.com/2011/05/22/on-models/</link>
		<comments>http://blog.gdinwiddie.com/2011/05/22/on-models/#comments</comments>
		<pubDate>Sun, 22 May 2011 19:46:12 +0000</pubDate>
		<dc:creator>George Dinwiddie</dc:creator>
				<category><![CDATA[Individuals and Interactions]]></category>
		<category><![CDATA[Tools and Techniques]]></category>
		<category><![CDATA[Learning]]></category>

		<guid isPermaLink="false">http://blog.gdinwiddie.com/?p=656</guid>
		<description><![CDATA[Brian Marick has written a tantilizing post The Stance of Reaction. In it he says At this point, Sr. Naveira has at least four reasonable choices. He can step forward, thereby “asking” Srta. Muzzopappa to move backwards. He can step backwards (typically reversing the sweep). He can turn toward her so that they’re facing, causing [...]]]></description>
			<content:encoded><![CDATA[<p>Brian Marick has written a tantilizing post <a title="Brian Marick's blog posting" href="http://www.exampler.com/blog/2011/05/13/the-stance-of-reaction/" target="_blank">The Stance of Reaction</a>. In it he says</p>
<blockquote><p>At this point, Sr. Naveira has at least four reasonable choices. He  can step forward, thereby “asking” Srta. Muzzopappa to move backwards.  He can step backwards (typically reversing the sweep). He can turn  toward her so that they’re facing, causing her to “collect” (bring her  feet together). He can take no step at all, but turn his chest to the  left, causing her to begin moving counterclockwise around him.</p></blockquote>
<blockquote><p>The important thing about Argentine tango (danced recreationally, though perhaps not in a performance like this) is that <em>she does not know which choice he’ll make</em>. She must be balanced in a stance—physical and mental—that allows her to react gracefully to any legitimate move.</p></blockquote>
<p>I truly hope he&#8217;ll expand on this, and how he applies it to the business of software development. I have great admiration for Brian&#8217;s intellect and inventiveness. I suspect what he says will help me work on some half-baked ideas I have about effective TDD keeping the code in a state in which it&#8217;s prepared to go in any direction, and about Pair Programming being most effective when we work to increase the possibilities open to our partner (<em>a la</em> Improv acting).</p>
<p>So far, Brian seems to be describing the concept of Reaction by saying what it is not&#8211;that it is not a reduction to a model. His description of this dichotomy does not match my understanding of how we use models. Online conversation has not clarified my understanding of his description. I suspect that the difficulty stems from us looking at the situation using different models. The appropriate next step seems (to me) to clarify my own model of how models work and are useful to me.<span id="more-656"></span></p>
<p>I wholeheartedly agree with Brian&#8217;s assertion that we have &#8220;a readiness to reduce (abstract away, simplify, generalize) the world’s  complexity into something simpler that you can work with and think  about.&#8221; This is not just true of knowledge workers, but of people in general. The assault of the universe on our senses is far too much to observe without doing so. As Brian says, &#8220;By default, we mostly act unconsciously, with the unconscious mind forwarding only anomalies to the rational part of the mind.&#8221; In other words, when the world around us is appearing to conform to the models that are most ingrained within us, we can react according to those models without making a conscious choice.</p>
<p>Other models are less ingrained, and we apply them more consciously.  Brian&#8217;s examples of the “homo economicus” and the &#8220;V-model of the Systems Engineering Process&#8221; models are good illustrations of models we&#8217;ve built particularly to help us with situations that our subconscious doesn&#8217;t handle.</p>
<p>Is there a fundamental difference between our unconscious and conscious models? As far as I can tell, it&#8217;s only in our awareness of them.  The <a title="Psychologists Discover We've Been Underestimating The Unconscious Mind" href="http://www.medicalnewstoday.com/releases/225045.php" target="_blank">study Brian uses to illustrate the power of the unconscious mind</a> describes a detectable awareness between a cookie sheet and a chess board.  The unconscious model accounts for putting a cookie sheet into the oven, but does not account for putting a chess board into the oven.  Certainly both cookie sheets and chess boards are too modern to be innate to the species. Instead, the pattern of putting a cookie sheet is one to which we&#8217;ve become accustomed by familiarity. Or, at least, most of us have. Trying the same experiment with people unfamiliar with ovens, cookie sheets, and chess board would assuredly give different results.</p>
<p>Reductionist models are the way that both the conscious and unconscious mind deals with the sensory overload.  But the models we use can lead us astray.  As Brian says,</p>
<blockquote><p>So sticky is the “homo economicus” reduction that economists face the occupational hazard of treating it as the <em>only</em> model of human behavior, which can make them say awfully silly things.  Similarly, elegant and simple software development models like the V-model are <em>so</em> elegant, <em>so</em> simple, <em>so</em> pleasingly linear that their failure to work with real human behavior and limitations is commonly seen as the fault of the <em>people</em>, not the model.</p></blockquote>
<p>H.L. Mencken put it this way, &#8220;For every complex problem, there is a solution that is simple, neat, and wrong.&#8221;  We are more likely to jump to an easy answer when we only know one model that fits the situation, or when we fit a model that&#8217;s so deep in our unconscious that we don&#8217;t notice it&#8217;s there.</p>
<p>If we are to avoid the trap of being limited by an inappropriate model, then we need to know more than one model.  And for the unconscious models, we need to find ways to rethink the situation according to conscious models.</p>
<p>In fact, this latter use is the value I find in the Myers Briggs Type Indicator model that so irks Brian. Brian would like for people to discard MBTI because it&#8217;s not &#8220;true&#8221; and doesn&#8217;t predict peoples&#8217; behavior well. I, on the other hand, don&#8217;t expect either of these things from MBTI. It only aspires to be a model of preference, not behavior. While it often gets misapplied for things such as predicting what career path a person should take, that&#8217;s not, as far as I know, an intended use. And I don&#8217;t believe it&#8217;s &#8220;true&#8221; in the sense of corresponding to entities in the human psyche. Instead, it&#8217;s &#8220;true&#8221; in the sense that it corresponds to human observations, much as putting a cookie sheet in the oven does. I&#8217;m not even convinced that the preferences indicated by the MBTI are constant. I wonder if my preferences change slowly over time, and if they sometimes change rapidly and suddenly in response to the situation.</p>
<p>Whatever the faults of the MBTI as a model for people, it helps me to rethink the application of my unconscious models. As an introvert, my unconscious model might label an extravert as pushy and self-absorbed. Re-evaluating the situation in the light of MBTI, however, may suggest to me that they&#8217;re merely thinking out loud. As an NT (iNtuitive-Thinker), it&#8217;s easy for me to jump to the conclusion that the solution in my head is both correct and obvious. Realizing my preferences helps me to realize that it is unlikely to be obvious to others, and that I should test its correctness with some data.</p>
<p>We would do best if we always beware our implicit trust in our models, especially our deepest and most closely held ones. These are the models that allow us to act immediately and &#8220;instinctively.&#8221; But it is the model we don&#8217;t question that will most likely get us into trouble. From time to time, especially when things are not playing out to our liking, we can view the same situation in light of multiple models and see if they give us different insights.</p>
          <img src="http://blog.gdinwiddie.com/?ak_action=api_record_view&id=656&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blog.gdinwiddie.com/2011/05/22/on-models/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

