<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:planet="http://planet.intertwingly.net/" xmlns:indexing="urn:atom-extension:indexing" indexing:index="no"><access:restriction xmlns:access="http://www.bloglines.com/about/specs/fac-1.0" relationship="deny"/>
  <title>Agile Planet</title>
  <updated>2010-07-30T15:17:37Z</updated>
  <generator uri="http://intertwingly.net/code/venus/">Venus</generator>
  <author>
    <name>Ian Davis</name>
    <email>iand@internetalchemy.org</email>
  </author>
  <id>http://www.agileplanet.org/atom.xml</id>
  <link href="http://www.agileplanet.org/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://www.agileplanet.org/" rel="alternate"/>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Ten-Minute-Build-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Ten-Minute-Build-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Ten-Minute Build" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>30 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>This week's excerpt from <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a> is <a href="http://jamesshore.com/Agile-Book/ten_minute_build.html">Ten-Minute Build</a>.</p>

<p>These days, my favorite build tool is Rake. I like to create multiple batch files or shell scripts for running Rake: <code>dev</code>, for building and testing on the local machine; <code>repo</code>, for manipulating the version control repository; and <code>deploy</code>, for shipping iteration and production releases. Each script gets its own Rake file, and then I take advantage of Rake's Ruby underpinnings to put code common to the various rakefiles in shared Ruby classes.

</p><p>Next week's excerpt: something from the <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Planning</a> chapter. Voting is back to normal this week, so please speak up for your choice in the comments. Here are your choices:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/risk_management.html">Risk Management</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Ten-Minute-Build-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-30T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:36Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/ten_minute_build.html</id>
    <link href="http://jamesshore.com/Agile-Book/ten_minute_build.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Ten-Minute Build</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>30 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/version_control.html">Version Control</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Chapter 7: Releasing</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

<p>Build, test, and deploy your entire product at any time with the push of a button.</p>

<p>Your build should be comprehensive but not complex.  Make it compile source code, run tests, configure registry settings, initialize database schemas, set up web servers, launch processes, build installers, and deploy.  Your IDE won't do all this, so learn to use a dedicated build tool.  Make sure your build works when disconnected from the network, too.</p>

<p>Builds should be fast.  If not, look at your tests.  End-to-end integration tests are the typical culprit.  Replace them with faster, more maintainable unit tests.</p>

</blockquote>

<!--

<h3>as haiku</h3>

<blockquote class="haiku">
	<p></p>
	
</blockquote>

-->

<h3>Commentary</h3>

<p><a href="http://jamesshore.com/Blog/Living-in-the-Punch-Card-Era.html">Living in the Punch Card Era</a></p>


<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>

<h2>Ten-Minute Build</h2>

<dl class="audience"><dt>Audience</dt><dd>Programmers</dd></dl>

<p class="goal">We eliminate build and configuration hassles.</p>

<p>Here's an ideal to strive for.  Imagine that you've just hired a new programmer.  On the programmer's first day, you walk him over to the shiny new computer you just added to your open workspace.</p>

<p>"We've found that keeping everything in version control and having a really great automated build makes us a lot faster," you say.  "Here, I'll show you.  This computer is new, so it doesn't have any of our stuff on it yet."</p>

<p>You sit down together.  "Okay, go ahead and check out the source tree."  You walk him through the process and the source tree starts downloading.  "This will take a while because we have all of our build tools and libraries in version control, too," you say.  "Don't worry—like any good version control system, it brings down changes, so it's only slow the first time.  We keep tools and libraries in version control because it allows us to update them easily.  Come on, let me show you around the office while it downloads."</p>

<p>After giving him the tour, you come back.  "Good, it's finished," you say.  "Now, watch this—this is my favorite part.  Go to the root of the source tree and type <code>build</code>."</p>

<p>The new programmer complies, then watches as build information flies by.  "It's not just building the source code," you explain.  "We have a complex application that requires a web server, multiple web services, and several databases.  In the past, when we hired a new programmer, he would spend his first couple of weeks just configuring his workstation.  Test environments were even worse.  We used to idle the whole team for days while we wrestled with problems in the test environment.  Even when the environment worked, we all had to share one environment and we couldn't run tests at the same time.</p>

<p>"All that has changed.  We've automated all of our setup.  Anybody can build and run all of the tests on their own machine, any time they want.  I could even disconnect from the network right now and it would keep building.  The build script is doing everything: it's configuring a local web server, initializing a local database... everything.</p>

<p>"Ah!  It's almost done.  It's built the app and configured the services.  Now it's running the tests.  This part used to be really slow, but we've made it much faster lately by improving our unit tests so we could get rid of our end-to-end tests."</p>

<p>Suddenly, everything stops.  The cursor blinks quietly.  At the bottom of the console is a message: <code>BUILD SUCCESSFUL</code>.</p>

<p>"That's it," you say proudly.  "Everything works.  I have so much confidence in our build and tests that I could take this and install it on our production servers today.  In fact, we could do that right now, if we wanted to, just by giving our build a different command.</p>

<p>"You're going to enjoy working here."  You give the new programmer a friendly smile.  "It used to be hell getting even the simplest things done.  Now, it's like butter.  Everything just works."</p>

<h3>Automate Your Build</h3>

<p>What if you could build and test your entire product—or create a deployment package—at any time, just by pushing a button?  How much easier would that make your life?</p>

<p>Producing a build is often a frustrating and lengthy experience.  This frustration can spill over to the rest of your work.  "Can we release the software?"  "With a few days of work."  "Does the software work?"  "My piece does, but I can't build everything."  "Is the demo ready?"  "We ran into a problem with the build—tell everyone to come back in an hour."</p>

<blockquote class="coach">Automating your build is one of the easiest ways to improve morale and increase productivity.</blockquote>

<p>Sadly, build automation is easy to overlook in the rush to finish features.  If you don't have an automated build, start working on one now.  It's one of the easiest things you can do to make your life better.</p>

<h3>How to Automate</h3>

<p>There are plenty of useful build tools available, depending on your platform and choice of language.  If you're using Java, take a look at Ant.  In .NET, NAnt and MSBuild are popular.  Make is the old standby for C and C++.  Perl, Python, and Ruby each have their preferred build tools as well.</p>

<p>Your build should be comprehensive but not complex.  In addition to compiling your source code and running tests, it should configure registry settings, initialize database schemas, set up web servers, launch processes—everything you need to build and test your software from scratch without human intervention.  Once you get the basics working, add the ability to create a production release, either by creating an install file or actually deploying to servers.</p>

<blockquote class="notetip">
 
 <p>Construct your build so that it provides a single, unambiguous result: <code>SUCCESS</code> or <code>FAILURE</code>.  You will run the build dozens of times per day.  Manual checks are slow, error-prone, and—after the umpteenth time—seriously annoying.</p>
 
</blockquote>

<blockquote class="coach">You should be able to build even when disconnected from the network.</blockquote>

<p>A key component of a successful automated build is the <em>local build</em>.  A local build will allow you to build and test at any time without worrying about other people's activities.  You'll do this every few minutes in XP, so independence is important.  It will also make your builds run faster.</p>

<p>Be cautious of IDEs and other tools that promise to manage your build automatically.  Their capability often begins and ends with compiling source code.  Instead, take control of your build script.  Take the time to understand exactly how and why it works and when to change it.  Rather than starting with a pre-made template, you might be better off creating a completely new script.  You'll learn more, and you'll be able to eliminate the complexity a generic script adds.</p>

<p>The details are up to you.  In my build scripts, I prefer to have all auto-generated content go into a single directory called <code>build/</code>.  The output of each major step (such as compiling source code, running tests, collating files into a release, or building a release package) goes into a separate directory under <code>build/</code>.  This structure allows me to inspect the results of the build process and—if anything goes wrong—wipe the slate clean and start over.</p>

<h3>When to Automate</h3>

<p>At the start of the project, in the very first iteration, set up a bare-bones build system.  The goal of this first iteration is to produce the simplest possible product that exercises your entire system.  That includes delivering a working—if minimal—product to stakeholders.</p>

<blockquote class="coach">Use the build script to configure the integration machine.  Don't configure it manually.</blockquote>

<p>Because the product is so small and simple at this stage, creating a high-quality automated build is easy.  Don't try to cover all of the possible build scenarios you need in the future.  Just make sure that you can build, test, and deploy this one simple product—even if it does little more than "Hello, world!"  At this stage, deployment might be as simple as creating a <code>.zip</code> file.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></dd></dl><p>Once you have the seed of your build script, it's easy to improve.  Every iteration, as you add features that require more out of your build, improve your script.  Use your build script every time you integrate.  To make sure it stays up-to-date, never configure the integration machine manually.  If you find that something needs configuration, modify the build script to configure it for you.</p>

<h3>Automating Legacy Projects</h3>

<p>If you want to add a build script to an existing system, I have good news and bad news.  The good news is that creating a comprehensive build script is one of the easiest ways to improve your life.  The bad news is that you probably have a bunch of technical debt to pay off, so it won't happen overnight.</p>

<p>As with any agile plan, the best approach is to work in small stages that provide value as soon as possible.  If you have a particularly complex system with lots of components, work on one component at a time, starting with the one that's most error-prone or frustrating to build manually.</p>

<p>Once you've picked the right component to automate, start by getting it to compile.  That's usually an easy step, and it allows you to make progress right away.</p>

<p>Next, add the ability to run unit tests and make sure they pass.  You probably compile and run unit tests in your IDE already, so this may not seem like a big improvement.  Stick with it; making your build script able to prove itself is an important step.  You won't have to check the results manually any more.</p>

<p>Your next step depends on what's causing you the most grief.  What is the most annoying thing about your current build process?  What configuration issue springs up to waste a few hours every week?  Automate that.  Repeat with the next-biggest annoyance until you have automated everything.  Once you've finished this, congratulations!  You've eliminated all of your build annoyances.  You're ahead of most teams: you have a good build script.</p>

<p>Now it's time to make a <em>great</em> build script.  Take a look at how you deploy.  Do you create a release package such as an installer, or do you deploy directly to the production servers?  Either way, start automating the biggest annoyances in your deployment process, one at a time.  As before, repeat with the next-biggest annoyance until you run out of nits to pick.</p>

<p>This won't happen overnight, but try to make progress every week.  If you can solve one annoyance every week, no matter how small, you'll see noticeable improvement within a month.  As you work on other things, try not to add new debt.  Include all new work in the build script from the beginning.</p>

<h3>Ten Minutes or Less</h3>

<p>A great build script puts your team way ahead of most software teams.  After you get over the rush of being able to build the whole system any time you want, you'll probably notice something new: the build is slow.</p>

<p>With continuous integration, you integrate every few hours.  Each integration involves two builds: one on your machine and one on the integration machine.  You need to wait for both builds to finish before continuing on because you can never let the build break in XP.  If the build breaks, you have to roll back your changes.</p>

<p>A ten-minute build leads to a twenty-minute integration cycle.  That's a pretty long delay.  I prefer a ten or fifteen-minute integration cycle.  That's about the right amount of time to stretch my legs, get some coffee, and talk over our work with my pairing partner.</p>

<p>The easiest way to keep the build under five minutes (with a ten-minute maximum) is to keep the build times down from the beginning.  One team I worked with started to look for ways to speed up the build whenever it exceeded 100 seconds.</p>

<p>Many new XP teams make the mistake of letting their build get too long.  If you're in that boat, don't worry.  You can fix long build times in the same agile way you fix all technical debt: piece by piece, focusing on making useful progress at each step.</p>

<blockquote class="coach">Slow tests are the most common cause of slow builds.</blockquote>

<p>For most teams, their tests are the source of a slow build.  Usually it's because their tests aren't focused enough.  Look for common problems: are you writing end-to-end tests when you should be writing unit tests and integration tests?  Do your unit tests talk to a database, network, or file system?</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/test_driven_development.html">Test-Driven Development</a></dd></dl><p>You should be able to run about 100 unit tests per second.  Unit tests should comprise the majority of your tests.  A fraction (less than ten percent) should be integration tests, which check that two components synchronize properly.  When the rest of your tests provide good coverage, only a handful—if any—need to be end-to-end tests.  See <a href="http://jamesshore.com/Agile-Book/test_driven_development.html">Test-Driven Development</a> in Chapter 9 for more information.</p>

<p>Although tests are the most common cause of slow builds, if compilation speed becomes a problem, consider optimizing code layout or using a compilation cache or incremental compilation.  You could also use a distributed compilation system or take the best machine available for use as the build master.  Don't forget to take advantage of the dependency evaluation features of your build tool: you don't need to rebuild things that haven't changed.</p>

<p>In the worst-case scenario, you may need to split your build into a "fast" build that you run frequently and a "slow" build that an integration server runs when you check in (see <a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a> later in this chapter).  Be careful—this approach leads to more build failures than a single, fast build.  Keep working on making your build faster.</p>

<h3>Questions</h3>

<h4 class="faq">Who's responsible for maintaining the build script?</h4>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html">Collective Code Ownership</a></dd></dl><p>All of the programmers are responsible for maintaining the script.  As the codebase evolves, the build script should evolve with it.</p>

<p>At first, one person will probably be more knowledgeable about the script than others.  When you need to update the script, pair with this person and learn all you can.</p>

<p>The build script is the center of your project automation universe.  The more you know about how to automate your builds, the easier your life will become and the faster you'll be able to get work done.</p>

<h4 class="faq">We have a configuration management (CM) department that's responsible for maintaining our builds.  We aren't allowed to modify the script ourselves.  What do we do?</h4>

<p>You need to be able to update your scripts continuously to meet your specific needs.  It's unlikely that anybody can be more responsive to your needs than you are.  If the CM department is a bottleneck, ask your project manager for help.  He may be able to give you control over the scripts.</p>

<p>Alternatively, you might be able to use a two-stage build in which you run your own scripts privately before handing control over to the CM department.</p>

<h4 class="faq">How do we find time to improve our build?</h4>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></dd></dl><p>Improving your build directly improves your productivity and quality of life.  It's important enough to include in every iteration as part of your everyday work.  The best way to do this is to include enough slack in your iteration for taking care of technical debt such as slow builds.  If a particular story will require changes to the build script, include that time in your story estimate.</p>

<h4 class="faq">Should we really keep all of our tools and libraries in version control?</h4>

<p>Yes, as much as possible.  See <a href="http://jamesshore.com/Agile-Book/version_control.html">Version Control</a> earlier in this chapter for details.</p>

<h4 class="faq">Does the build have to be under ten minutes?  We're at eleven.</h4>

<p>Ten minutes is a good rule of thumb.  Your build is too long when pairs move on to other tasks before the integration cycle completes.</p>

<h4 class="faq">We use an IDE with an integrated build system.  How can we automate our build process?</h4>

<p>Many IDEs use an underlying build script that you can control.  If not, you may be better off using a different IDE.  Your other alternative is to have a separate command line-based build system, such as Ant, NAnt, or make.  You risk duplicating information about dependencies, but sometimes that cost is worthwhile.</p>

<h4 class="faq">We have different target and development environments.  How do we make this build work?</h4>

<p>If possible, use a cross compiler.  If that doesn't work, consider using a cross-platform build tool.  The benefits of testing the build on your development platform outweigh the initial work in creating a portable system.</p>

<h4 class="faq">How can we build our entire product when we rely on third-party software and hardware?</h4>

<p>Even if your product relies on yet-to-be-built custom hardware or unavailable third-party systems, you still need to build and test your part of the product.  If you don't, you'll discover a ton of integration and bug-fixing work when the system becomes available.</p>

<p>A common solution for this scenario is to build a simulator for the missing system, which allows you to build integration tests.  When the missing system becomes available, the integration tests help you determine if the assumptions you built into the simulator were correct.</p>

<p>Missing components add risk to your project, so try to get your hands on a test system as soon as possible.</p>

<h4 class="faq">How often should we build from scratch?</h4>

<p>At least once per iteration.  Building from scratch is often much slower than an incremental build, so it depends on how fast the build is and how good your build system is.  If you don't trust your build system, build from scratch more often.  You can set up a smoke-testing system that builds the project from scratch on every check-in.</p>

<p>My preference is to reduce build times so that incremental builds are unnecessary, or to fix the bugs in the build system so I trust the incremental builds.  Even so, I prefer to build from scratch before delivering to customers.</p>

<h3>Results</h3>

<p>With a good automated build, you can build a release any time you want.  When somebody new joins the team, or when you need to wipe a workstation and start fresh, it's a simple matter of downloading the latest code from the repository and running the build.</p>

<p>When your build is fast and well-automated, you build and test the whole system more frequently.  You catch bugs earlier and, as a result, spend less time debugging.  You integrate your software frequently without relying on complex background build systems, which reduces integration problems.</p>

<h3>Contraindications</h3>

<p>Every project should have a good automated build.  Even if you have a system that's difficult to build, you can start chipping away at the problem today.</p>

<p>Some projects are too large for the ten-minute rule to be effective.  Before you assume that this is true for your project, take a close look at your build procedures.  You can often reduce the build time much more than you realize.</p>

<h3>Alternatives</h3>

<p>If the project truly is too large to build in ten minutes, it's probably under development by multiple teams or sub-teams.  Consider splitting the project into independent pieces that you can build and test separately.</p>

<p>If you can't build your system in less than ten minutes (yet), establish a maximum acceptable threshhold and stick to it.  Drawing this line helps identify a point beyond which you will not allow more technical debt to accumulate.  Like a sink full of dishes two hours before a dinner party, the time limit is a good impetus to do some cleaning.</p>



<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/version_control.html">Version Control</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Chapter 7: Releasing</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/ten_minute_build.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-30T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:36Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://martinfowler.com/bliki/UtilityVsStrategicDichotomy.html</id>
    <link href="http://martinfowler.com/bliki/UtilityVsStrategicDichotomy.html" rel="alternate" type="text/html"/>
    <title>Bliki: UtilityVsStrategicDichotomy</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>One of the steady themes I've seen throughout my career is that
  of the nature and importance of software development. Recently a
  prospect told one of our salespeople that "software is like sewage
  pipes, I want it to work reliably and I don't want to know about the
  details". This is the kind of approach that Nicholas Carr talked
  about in <a href="http://www.nicholasgcarr.com/articles/matter.html">IT Doesn't
  Matter</a>.
  
  On a contrasting note we've done work for many businesses where IT
  has been a clearer strategic enabler to their business, allowing
  them to enter new markets or significantly increase their market
  share. So is IT a utility, like sewage pipes, or a strategic
  asset?</p><img src="http://martinfowler.com/bliki/images/utilityVsStrategicDichotomy/sketch.png"/><p> I take that the view is that it can be either, depending on the
  system. A classic example of a utility IT project is payroll,
  everyone needs it, but it's something that most people want to 'just
  work'.</p><p>So what is the distinguishing factor between utility and
  strategic projects? To my mind it's all about whether the underlying
  business function is a differentiator or not. If how you do this
  function is a crucial part of what makes you better than the
  competition, then the software that supports this function needs to
  be as good as you can make it. Note that this distinction isn't
  about the software, but the business function. As Ross Pettit <a href="http://www.rosspettit.com/2010/07/separating-utility-from-value-add.html">puts
  it</a> "This is not a separation of IT by the nature of the
  technology, but into what technology does for the host
  business". </p><p>The most important point about this dichotomy is to realize that
  there are two kinds of software projects and they need to be treated
  entirely differently. The way you staff, run, and budget a
  strategic project is entirely different to how you do a utility
  project. Too often people assume that what is good for one is good
  for the other - and trouble inevitably follows.</p><p>Another consequence is that only a few projects are
  strategic. The 80/20 rule applies, except it may be more like
  95/5. While certainly it's most common for people to not recognize
  the dichotomy at all, it's also common for people to think that too
  many projects are strategic.</p><p>One of the most important ways in which these efforts differ is
  where the risks lie. For utility projects the biggest risk is some
  kind of catastrophic error - you don't want the sewage pipe to
  break, or to miss payroll. So you need enough attention to make sure
  that doesn't happen, but other than that you want costs to be as low
  as possible. However with strategic projects, the biggest risk is
  not doing something before your competitors do. So you need to be
  able to react quickly. Cost is much less of an issue because the
  opportunity cost of not doing something is far greater than costs of
  software development itself.</p><p>This is not a static dichotomy. Business
  activities that are strategic can become a utility as time
  passes. Less often, a utility can become strategic if a company
  figures out how to make that activity a differentiator. (Apple did
  something like this with the design of personal computers.) </p><p>One way this dichotomy helps is in deciding between building
  custom software and installing a package. Since the definition of
  utility is that there's no differentiator, the obvious thing is to
  go with the package. For a strategic function you don't want the
  same software as your competitors because that would cripple your
  ability to differentiate.</p><p>Often people realize this and buy a package for a utility
  project, but then spend huge amounts of money customizing this -
  which is just as wasteful. My view is that for a utility function
  you buy the package and adjust your business process to match the
  software. Usually this is politically infeasible, so the workaround
  is to put a low grade software team to work on it. Provide enough
  care to avoid catastrophe, but otherwise you don't need a high-grade
  team.</p><p>Another way the dichotomy makes its influence felt is the role of
  agile methods. Most agilists tend to come from a strategic mindset,
  and the flexibility and rapid time-to-market that characterizes
  agile is crucial for strategic projects. For utility projects,
  however, the advantages of agile don't matter that much. I'm not
  sure whether using an agile approach for a utility project would be
  the wrong choice, but I am sure that it doesn't matter that much.</p><p>Like many classifications, there's a lot of grey in between. Yet
  this is one of those rare cases where I think there's a strong
  argument to turn up the contrast and force more binary thinking. As
  Ross commented in a discussion of a draft of this post: "'shades of
  grey' give license to pile things into the wrong category; things
  that are really utility will be given an inflated importance, rather
  than dispositioned as the utilities they really are." Forcing a
  binary decision, tilted to minimize what's in the strategic bucket,
  would help provide the focus that's often lacking in IT initiatives.</p><p>Ross goes so far as to argue that there
  shouldn't be a single IT department that's responsible for both
  utility and strategic work. The mindset and management attitudes
  that are needed for the two are just too different. It's like
  expecting the same people who design warehouses to design an arts
  museum.</p>
<h3>To explore more...</h3>
<ul><li><a href="http://www.rosspettit.com/2010/07/separating-utility-from-value-add.html">Ross's
    article</a> calls for a Glass-Stegall of IT
    departments.</li><li>Marc McNeil talks of projects as <a href="http://www.dancingmango.com/blog/2010/07/14/tractor-bleedingedge/">Tractors, nuclear power plants and the bleeding edge</a></li><li>Neal Ford points out that integration efforts, such as SOA,
    <a href="http://memeagora.blogspot.com/2009/01/tactics-vs-strategy-soa-tarpit-of.html">can't be strategic</a>.</li><li>There is video of the talk <a href="http://www.amplify.amp.com.au/videos?video=Martin%20Fowler%20-%20What%20if%20enterprise%20software%20was%20cheaper,%20faster,%20better%20AND%20COOL?">I gave on this theme</a> for AMP last year.</li></ul></div>
    </content>
    <updated>2010-07-29T13:58:00Z</updated>
    <category term="agile"/>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://www.m3p.co.uk/?p=503</id>
    <link href="http://www.m3p.co.uk/blog/2010/07/23/bad-code-isnt-technical-debt-its-an-unhedged-call-option/" rel="alternate" type="text/html"/>
    <link href="http://www.m3p.co.uk/blog/2010/07/23/bad-code-isnt-technical-debt-its-an-unhedged-call-option/#comments" rel="replies" type="text/html"/>
    <link href="http://www.m3p.co.uk/blog/2010/07/23/bad-code-isnt-technical-debt-its-an-unhedged-call-option/feed/atom/" rel="replies" type="application/atom+xml"/>
    <title xml:lang="en">Bad code isn’t Technical Debt, it’s an unhedged Call Option</title>
    <summary xml:lang="en">I’d been meaning to write this up for a while, and now Nat Pryce has written up the 140 character version.



This is all Chris Matts‘ idea. He realised that the problem with the “Technical Debt” metaphor is that for managers debt can be a good thing. Executives can be required to take on more debt [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p><span style="font-size: 0.8em;">I’d been meaning to write this up for a while, and now Nat Pryce has written up the <a href="http://twitter.com/natpryce/status/19286162811">140 character version</a>.</span></p>

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

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

<p>I “write” a <a href="http://en.wikipedia.org/wiki/Call_option">Call Option</a> when I sell someone the right, but not the obligation, to buy in the future an agreed quantity of something at an price that is fixed now. So, for a payment now, I agree to sell you 10,000 chocolate santas<sup class="footnote"><a href="http://www.m3p.co.uk/blog/2010/07/23/bad-code-isnt-technical-debt-its-an-unhedged-call-option/#fn1">1</a></sup> at 56 pence each, at any time up to 10th December. You’re prepared to pay the premium because you want to know that you’ll have santas in your stores at a price you can sell.</p>

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

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

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

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

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

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

<p/><hr/><br/>
1) There is an apocryphal story about a trader buying chocolate santa futures and forgetting to sell them on. Eventually a truckload turned up at the Wall Street headquarters.<p/></div>
    </content>
    <updated>2010-07-23T14:15:15Z</updated>
    <published>2010-07-23T14:15:15Z</published>
    <category scheme="http://www.m3p.co.uk" term="Agile Programming"/>
    <category scheme="http://www.m3p.co.uk" term="Software culture"/>
    <author>
      <name>steve.freeman</name>
      <uri>http://www.m3p.co.uk</uri>
    </author>
    <source>
      <id>http://www.m3p.co.uk/feed/atom/</id>
      <link href="http://www.m3p.co.uk" rel="alternate" type="text/html"/>
      <link href="http://www.m3p.co.uk/blog/feed/atom/" rel="self" type="application/atom+xml"/>
      <subtitle xml:lang="en">Working software daily</subtitle>
      <title xml:lang="en">Steve Freeman » Blog</title>
      <updated>2010-07-23T14:15:15Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-The-XP-Team-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-The-XP-Team-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "The XP Team" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>23 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>For this week's excerpt of <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a>, we had a surprise write-in campaign for <a href="http://jamesshore.com/Agile-Book/the_xp_team.html">The XP Team</a> rather than one of the scheduled <a href="http://jamesshore.com/Agile-Book/collaborating_intro.html">Collaborating</a> practices. It won the day, so <a href="http://jamesshore.com/Agile-Book/the_xp_team.html">The XP Team</a> is now online to read and link.</p>

<p>Next week's excerpt will come from the <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Releasing</a> chapter. We have three practices left in that chapter:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/version_control.html">Version Control</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/ten_minute_build.html">Ten-Minute Build</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></li>
</ul>

<p>Vote for the one you'd like to see online first and I'll post it next Friday. Get your votes in early this week--I'm at a conference all next week and I'll need to prep the excerpt in advance (probably over the weekend) to make sure it goes out on time. I'll be closing the voting early as a result.</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-The-XP-Team-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-23T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:36Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/the_xp_team.html</id>
    <link href="http://jamesshore.com/Agile-Book/the_xp_team.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: The XP Team</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>23 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/xp_concepts.html">XP Concepts</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/the_xp_lifecycle.html">The XP Lifecycle</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/the_xp_lifecycle.html">Chapter 3: Understanding XP</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

<p>XP teams are <dfn>self-organizing</dfn> and <dfn>cross-functional</dfn>. This has two important consequences: first, they're responsible for their own success.  This means teams define success (by interviewing stakeholders and sponsors), create plans to achieve success, and execute on those plans without explicit management direction.</p>

<p>Second, XP teams include all the expertise necessary to do so.</p>

<p>In practice, XP teams are composed of business experts ("customers"), implementation experts ("programmers"), and quality experts ("testers").  The whole team works together to create its own plans and deliver successful software.  No single person is "in charge."  Instead, leadership shifts fluidly with the situation.</p>

</blockquote>

<h3>as haiku</h3>

<blockquote class="haiku">

<p>The soil is dry--
<br/>the irrigator has gone
<br/>I start to water

</p></blockquote>

<h3>Commentary</h3>

<p><a href="http://jamesshore.com/Blog/TANSTAAFL.html">TANSTAAFL</a></p>


<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>


<h2>The XP Team</h2>

<p>Working solo on your own project—"scratching your own itch"—can be a lot of fun.  There are no questions about which features to work on, how things ought to work, if the software works correctly, or whether stakeholders are happy.  All the answers are right there in one brain.</p>

<p>Team software development is different.  The same information is spread out among many members of the team.  Different people know:</p>

<ul>
  <li><p>How to design and program the software (programmers, designers, and architects).</p></li>
  <li><p>Why the software is important (product manager)</p></li>
  <li><p>The rules the software should follow (domain experts)</p></li>
  <li><p>How the software should behave (interaction designers)</p></li>
  <li><p>How the user interface should look (graphic designers)</p></li>
  <li><p>Where defects are likely to hide (testers)</p></li>
  <li><p>How to interact with the rest of the company (project manager)</p></li>
  <li><p>Where to improve work habits (coach)</p></li>
</ul>

<p>All of this knowledge is necessary for success.  XP acknowledges this reality by creating <em>cross-functional teams</em> composed of diverse people who can fulfill all of the team's roles.</p>

<h3>The Whole Team</h3>

<p>XP teams sit together in an open workspace.  At the beginning of each iteration, the team meets for a series of activities: an iteration demo, a retrospective, and iteration planning.  These typically take two to four hours in total.  The team also meets for daily stand-up meetings, which usually take five to ten minutes each.</p>

<p>Other than these scheduled activities, everyone on the team plans his own work.  That doesn't mean everybody works independently; they just aren't on an explicit schedule.  Team members work out the details of each meeting when they need to.  Sometimes it's as informal as somebody standing up and announcing across the shared workspace that he would like to discuss an issue.  This <em>self-organization</em> is a hallmark of agile teams.</p>

<h3>On-Site Customers</h3>

<p><em>On-site customers</em>—often just called <em>customers</em>—are responsible for defining the software the team builds.  The rest of the team can and should contribute suggestions and ideas, but the customers are ultimately responsible for determining what stakeholders will find valuable.</p>

<p>Customers' most important activity is release planning.  This is a multi-faceted activity.  Customers need to evangelize the project's vision; identify features and stories; determine how to group features into small, frequent releases; manage risks; and create an achievable plan by coordinating with programmers and playing the planning game.</p>

<p>On-site customers may or may not be real customers, depending on the type of project.  Regardless, customers are responsible for refining their plans by soliciting feedback from real customers and other stakeholders.  One of the venues for this feedback is the weekly iteration demo, which customers lead.</p>

<p>In addition to planning, customers are responsible for providing programmers with requirements details upon request.  XP uses requirements documents only as memory aids for customers.  Customers themselves act as living requirements documents, researching information in time for programmer use and providing it as needed.  Customers also help communicate requirements by creating mock-ups, reviewing work-in-progress and creating detailed customer tests that clarify complex business rules.  The entire team must sit together for this communication to take place effectively.</p>

<p>Typically, product managers, domain experts, interaction designers, and business analysts play the role of the on-site customer.  One of the most difficult aspects of creating a cross-functional team is finding people qualified and willing to be on-site customers.  Don't neglect this role; it's essential to increasing the value of the product you deliver.  A great team will produce technically excellent software without on-site customers, but to truly succeed, your software must also bring value to its investors.  This requires the perspective of on-site customers.</p>

<blockquote class="notetip">
 
 <p>Include exactly one product manager and enough other on-site customers for them to stay one step ahead of the programmers.  As a rule of thumb, start with two on-site customers (including the product manager) for every three programmers.</p>
 
</blockquote>

<p>[Coffin] describes an experience with two nearly identical teams, one that did not have on-site customers and one that did.  The team without on-site customers took fifteen months to produce a product with mediocre value:</p>

<blockquote>
 
 <p>The total cost of the project exceeded initial expectations and the application under delivered on the user's functional expectations for the system... real business value was not delivered until the second and third [releases] and even then the new system was not perceived as valuable by its users because it required them to change while providing no significant benefit.</p>
 
</blockquote>

<p>A team composed of many of the same developers, at the same company, using the same process, later produced a product with compelling value in less than three months:</p>

<blockquote>
 
 <p>The first production release was ready after 9 weeks of development... it surpassed scheduling and functional expectations, while still coming in on-budget...  In the first two months of live production usage over 25,000 citations were entered using the new system.  The application development team continued to deliver new releases to production approximately every six weeks thereafter.  Every release was an exciting opportunity for the team of developers and users to provide value to the company and to improve the user's ability to accomplish their jobs.</p>
 
</blockquote>

<p>One of the primary reasons for this success was customer involvement.</p>

<blockquote>
 
 <p>Many of the shortcomings of the [first] system stemmed from a breakdown in the collaborative atmosphere that was initially established.  Had users been more involved throughout the project, the end result would have been a system that much more closely aligned with their actual needs.  They would have had a greater sense of ownership and communication between the various groups would have been less tense.</p>
 
 <p>...</p>
 
 <p>The success of the [second] system caused many people in the organization to take note and embrace the lessons learned in this project... other projects teams restructured their physical arrangements into a shared project room as the [second] team had done.</p>
 
</blockquote>

<blockquote class="coach">If the customers won't move to the team, move the team to the customers.</blockquote>

<p>Customer involvement makes a huge difference in product success.  Make an extra effort to include customers.  One way to do so is to move to their offices rather than asking them to move to your office.  Make sure the customers agree and that there's adequate space available.</p>

<blockquote class="sidebar"><h3>Why So Many Customers?</h3>
 
 <p>Two customers for every three programmers seems like a lot, doesn't it?  I initially started with a much smaller ratio, but I often observed customers struggling to keep up with the programmers.  I eventually arrived at the two-to-three ratio after trying different ratios on several successful teams.  I also asked other XP coaches about their experiences.  The consensus was that the two-to-three ratio was about right.</p>
 
 <p>Most of those projects involved complex problem domains, so if your software is fairly straightforward, you may be able to have fewer customers.  Keep in mind that customers have a lot of work to do.  They need to figure out what provides the most value, set the appropriate priorities for the work, identify all of the details that programmers will ask about, and fit in time for customer reviews and testing.  They need to do all this while staying one step ahead of the programmers, who are right behind them, crunching through stories like a freight train.  It's a big job.  Don't underestimate it.</p>
 
</blockquote>

<h4>The Product Manager (aka Product Owner)</h4>

<p>The product manager only has one job on an XP project, but it's a doozy.  That job is to <em>maintain</em> and <em>promote</em> the product vision.  In practice, that means documenting the vision, sharing it with stakeholders, incorporating feedback, generating features and stories, setting priorities for release planning, providing direction for the team's on-site customers, reviewing work in progress, leading iteration demos, involving real customers, and dealing with organizational politics.</p>

<blockquote class="notetip">
 
 <p>In addition to maintaining and promoting the product vision, product managers are also often responsible for ensuring a successful deployment of the product to market.  That may mean advertising and promotion, setting up training, and so forth.  These ordinary product management responsibilities are out of the scope of this book.</p>
 
</blockquote>

<p>The best product managers have deep understandings of their markets, whether the market is one organization (as with custom software) or many (as with commercial software).  Good product managers have an intuitive understanding of what the software will provide and why it's <em>the most important thing</em> their project teams can do with their time.</p>

<p>A great product manager also has a rare combination of skills.  In addition to vision, she must have the authority to make difficult trade-off decisions about what goes into the product and what stays out.  She must have the political savvy to align diverse stakeholder interests, consolidate them into the product vision, and to effectively say "no" to wishes that can't be accommodated.</p>

<p>Product managers of this caliber often have a lot of demands on their time.  You may have trouble getting enough attention.  Persevere.  Theirs is one of the most crucial roles on the team.  Enlist the help of your project manager and remind people that software development is very expensive.  If the software isn't valuable enough to warrant the time of a good product manager—a product manager who could mean the difference between success and failure—perhaps it isn't worth developing in the first place.</p>

<p>Make sure your product manager is committed to the project full-time.  Once a team is running smoothly, the product manager might start cutting back on his participation.  Although domain experts and other on-site customers can fill in for the product manager for a time, the project is likely to start drifting off-course unless the product manager participates in every iteration.  [Rooney] experienced that problem, with regrettable results:</p>

<blockquote>
 
 <p>We weren't sure what our priorities were.  We weren't exactly sure what to work on next.  We pulled stories from the overall list, but there was precious little from the Customer [product manager] in terms of what we should be working on.  This went on for a few months.</p>
 
 <p>Then, we found out that the Gold Owner [executive sponsor] was pissed—really pissed.  We hadn't been working on what this person thought we should.</p>
 
</blockquote>

<p>In a predictable environment, and by delegating to a solid set of on-site customers, a product manager might be able to spend most of her time on other things, but she should still participate in every retrospective, iteration demo, and most release planning sessions.</p>

<p>Some companies have a committee play the role of product manager, but I advise against this approach.  The team needs a consistent vision to follow, and I've found that committees have trouble creating consistent, compelling visions.  When I've seen committees succeed, it's been because one committee member acted as <em>de facto</em> product manager.  I recommend that you explicitly find a product manager.  Her role may be nothing more than consolidating the ideas of the committee into a single vision, and that's likely to keep her hands full.  Be sure to choose a product manager with plenty of political acumen in this case.</p>

<h4>Domain Experts (aka Subject Matter Experts)</h4>

<p>Most software operates in a particular industry, such as finance, that has its own specialized rules for doing business.  To succeed in that industry, the software must implement those rules faithfully and exactly.  These rules are <em>domain rules</em> and knowledge of these rules is <em>domain knowledge</em>.</p>

<p>Most programmers have gaps in their domain knowledge, even if they've worked in an industry for years.  In many cases, the industry itself doesn't clearly define all its rules.  The basics may be clear, but there are nitpicky details where domain rules are implicit or even contradictory.</p>

<p>The team's domain experts are responsible for figuring out these details and having the answers at their fingertips.  <em>Domain experts</em>, also known as <em>subject matter experts</em>, are experts in their field.  Examples include financial analysts and PhD chemists.</p>

<p>Domain experts spend most of their time with the team, figuring out the details of upcoming stories and standing ready to answer questions when programmers ask.  For complex rules, they create customer tests (often with the help of testers) to help convey nuances.</p>

<blockquote class="notetip">
 
 <p>On small teams, product managers often double as domain experts.</p>
 
</blockquote>

<h4>Interaction Designers</h4>

<p>The user interface is the public face of the product.  For many users, the UI <em>is</em> the product.  They judge the product's quality solely on their perception of the UI.</p>

<p>Interaction designers help define the product UI.  Their job focuses on understanding users, their needs, and how they will interact with the product.  They perform such tasks as interviewing users, creating user personas, reviewing paper prototypes with users, and observing usage of actual software.</p>

<blockquote class="notetip">
 
 <p>Don't confuse graphic design with interaction design.  <em>Graphic designers</em> convey ideas and moods via images and layout.  <em>Interaction designers</em> focus on the types of people using the product, their needs, and how the product can most seamlessly meet those needs.</p>
 
</blockquote>

<p>You may not have a professional interaction designer on staff.  Some companies fill this role with a graphic designer, the product manager, or a programmer.</p>

<p>Interaction designers divide their time between working with the team and working with users.  They contribute to release planning by advising the team on user needs and priorities.  During each iteration, they help the team create mock-ups of UI elements for that iteration's stories.  As each story approaches completion, they review the look and feel of the UI and confirm that it works as they expected.</p>

<p>The fast, iterative, feedback-oriented nature of XP development leads to a different environment than interaction designers may be used to.  Rather than spending time researching users and defining behaviors before development begins, interactions designers must iteratively refine their models concurrently with iterative refinement of the program itself.</p>

<p>Although interaction design is different under XP than in other methods, it is not necessarily diminished. XP produces working software every week, which provides a rich grist for the interaction designer's mill.  Designers have the opportunity to take real software to users, observe their usage patterns, and use that feedback to effect changes as soon as one week later.</p>

<h4>Business Analysts</h4>

<p>On non agile teams, business analysts typically act as liaisons between the customers and developers, by clarifying and refining customer needs into a functional requirements specification.</p>

<p>On an XP team, business analysts augment a team that already contains a product manager and domain experts.  The analyst continues to clarify and refine customer needs, but the analyst does so in support of the other on-site customers, not as a replacement for them.  Analysts help customers think of details they might otherwise forget and help programmers express technical tradeoffs in business terms.</p>

<h3>Programmers</h3>

<p>A great product vision requires solid execution.  The bulk of the XP team consists of software developers in a variety of specialties.  Each of these developers contributes directly to creating working code.  To emphasize this, XP calls all developers <em>programmers</em>.</p>

<blockquote class="notetip">
 
 <p>Include between four and ten programmers.  In addition to the usual range of expertise, be sure to include at least one senior programmer, designer, or architect who has significant design experience and is comfortable working in a hands-on coding environment.  This will help the team succeed at XP's incremental design and architecture.</p>
 
</blockquote>

<p>If the customers' job is to maximize the value of the product, then the programmers' job is to minimize its cost.  Programmers are responsible for finding the most effective way of delivering the stories in the plan.  To this end, programmers provide effort estimates, suggest alternatives, and help customers create an achievable plan by playing the planning game.</p>

<p>Programmers spend most of their time pair programming.  Using test-driven development, they write tests, implement code, refactor, and incrementally design and architect the application.  They pay careful attention to design quality, and they're keenly aware of technical debt (for an explanation of technical debt, see <a href="http://jamesshore.com/Agile-Book/xp_concepts.html">XP Concepts</a> later in this chapter) and its impact on development time and future maintenance costs.</p>

<p>Programmers also ensure that the customers can choose release the software at the end of any iteration.  With the help of the whole team, the programmers strive to produce no bugs in completed software.  They maintain a ten-minute build that can build a complete release package at any time.  They use version control and practice continuous integration, keeping all but the most recent few hours'  work integrated and passing its tests.</p>

<p>This work is a joint effort of all of the programmers.  At the beginning of the project, the programmers establish coding standards that allow them to collectively share responsibility for the code.  Programmers have the right and responsibility to fix any problems they see, no matter which part of the application it touches.</p>

<p>Programmers rely on customers for information about the software to build.  Rather than guessing when they have a question, they ask one of the on-site customers.  To enable these conversations, programmers build their software to use a ubiquitous language.  They assist in customer testing by automating the customers' examples.</p>

<p>Finally, programmers provide for the long-term maintainability of the product by providing documentation at appropriate times.</p>

<h4>Designers and Architects</h4>

<p>Everybody codes on an XP team, and everybody designs.  Test-driven development combines design, tests, and coding into a single, ongoing activity.</p>

<p>Expert designers and architects are still necessary.  They contribute by guiding the team's incremental design and architecture efforts and helping team members see ways of simplifying complex designs.  They act as peers—that is, as programmers—rather than teachers, guiding rather dictating.</p>

<h4>Technical Specialists</h4>

<p>In addition to the obvious titles (programmer, developer, software engineer), the XP "programmer" role includes other software development roles.  The programmers could include a database designer, a security expert, or a network architect.  XP programmers are generalizing specialists.  While each person has his own area of expertise, everybody is expected to work on any part of the system that needs attention.  (See <a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html">Collective Code Ownership</a> in Chapter 7 for more.)</p>

<h3>Testers</h3>

<p>Testers help XP teams produce quality results from the beginning.  Testers apply their critical thinking skills to help customers consider all possibilities when envisioning the product.  They help customers identify holes in the requirements and assist in customer testing.<sup>1</sup></p>

<p class="aside"><sup>1</sup>This discussion of tester responsibilities is part of my variant of XP (see the sidebar "A Little Lie," earlier in this chapter).  Classic XP doesn't include testers as a distinct role.</p>

<blockquote class="notetip">
 
 <p>Include enough testers for them to stay one step ahead of the programmers.  As a rule of thumb, start with one tester for every four programmers.</p>
 
</blockquote>

<p>Testers also act as technical investigators for the team.  They use exploratory testing to help the team identify whether it is successfully preventing bugs from reaching finished code.  Testers also provide information about the software's nonfunctional characteristics, such as performance, scalability, and stability, by using both exploratory testing and long-running automated tests.</p>

<p>However, testers <em>don't</em> exhaustively test the software for bugs.  Rather than relying on testers to find bugs for programmers to fix, the team should produce nearly bug-free code on their own.  When testers find bugs, they help the rest of team figure out what went wrong so that the team as a whole can prevent those kinds of bugs from occurring in the future.</p>

<p>These responsibilities require creative thinking, flexibility, and experience defining test plans.  Because XP automates repetitive testing rather than performing manual regression testing, testers who are used to self-directed work are the best fit.</p>

<p>Some XP teams don't include dedicated testers.  If you don't have testers on your team, programmers and customers should share this role.</p>

<blockquote class="sidebar"><h3>Why So Few Testers?</h3>
 
 <p>As with the customer ratio, I arrived at the one-to-four tester-to-programmer ratio through trial and error.  In fact, that ratio may be a little high.  Successful teams I've worked with have had ratios as low as one tester for every six programmers, and some XP teams have no testers at all.</p>
 
 <p>Manual script-based testing, particularly regression testing, is extremely labor-intensive and requires high tester-to-programmer ratios.  XP doesn't use this sort of testing.  Furthermore, programmers create most of the automated tests (during test-driven development), which further reduces the need for testers.</p>
 
 <p>If you're working with existing code and have to do a lot of manual regression testing, your tester-to-programmer ratio will probably be higher than I've suggested here.</p>
 
</blockquote>

<h3>Coaches</h3>

<p>XP teams <em>self-organize</em>, which means each member of the team figures out how he can best help the team move forward at any given moment.  XP teams eschew traditional management roles.</p>

<p>Instead, leaders lead by example, helping the team reach its potential rather than creating jobs and assigning tasks.  To emphasize this difference, XP leaders are called <em>coaches</em>.  Over time, as the team gains experience and self-organizes, explicit leadership becomes less necessary and leadership roles dynamically switch from person to person as situations dictate.</p>

<p>A coach's work is subtle; it enables the team to succeed.  Coaches help the team start their process well by arranging for a shared workspace and making sure that the team includes the right people.  They help set up conditions for energized work, and they assist the team in creating an informative workspace.</p>

<p>One of the most important things the coaches can do is to help the team interact with the rest of the organization.  They help the team generate organizational trust and goodwill, and they often take responsibility for any reporting needed.</p>

<p>Coaches also help team members remember to maintain their self-discipline, helping them remain in control of challenging practices such as risk management, test-driven development, slack, and incremental design and architecture.</p>

<blockquote class="notetip">
 
 <p>The coach differs from your mentor (see "Find a Mentor" in Chapter 2).  Your mentor is someone outside the team who you can turn to for advice.</p>
 
</blockquote>

<h4>The Programmer-Coach</h4>

<p>Every team needs a programmer-coach to help them with XP's technical practices.  Programmer-coaches are often senior developers and may have titles such as "technical lead" or "architect".  They can even be functional managers.  While some programmer-coaches make good all-around coaches, others require the assistance of a project manager.</p>

<p>Programmer-coaches also act as normal programmers and participate fully in software development.</p>

<h4>The Project Manager</h4>

<p>Project managers help the team work with the rest of the organization.  They are usually good at coaching nonprogramming practices.  Some functional managers fit into this role as well.  However, most project managers lack the technical expertise to coach XP's programming practices which necessitates the assistance of a programmer-coach.</p>

<p>Project managers may also double as customers.</p>

<blockquote class="notetip">
 
 <p>Include a programmer-coach and consider including a project manager.</p>
 
</blockquote>

<h3>Other Team Members</h3>

<p>The preceding roles are a few of the most common team roles, but this list is by no means comprehensive.  The absence of a role does not mean the expertise is inappropriate for an XP team; an XP team should include exactly the expertise necessary to complete the project successfully and cost-effectively.  For example, one team I worked with included a technical writer and an ISO 9001 analyst.</p>

<h3>The Project Community</h3>

<p>Projects don't live in a vaccuum; every team has an ecosystem surrounding it.  This ecosystem extends beyond the team to the <em>project community</em>, which includes everyone who affects or is affected by the project.<sup>2</sup>  Keep this community in mind as you begin your XP project, as everybody within it can have an impact on your success.</p>

<p class="aside"><sup>2</sup>Thanks to David Schmaltz and Amy Schwartz of True North pgs, Inc., for this term.</p>

<p>Two members of your project community that you may forget to consider are your organization's Human Resources and Facilities departments.  Human Resources often handles performance reviews and compensation.  Their mechanisms may not be compatible with XP's team-based effort (see <a href="http://jamesshore.com/Agile-Book/trust.html">Trust</a> in Chapter 6).  Similarly, in order to use XP, you'll need the help of Facilities to create an open workspace (see <a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a> in Chapter 6).</p>

<h4>Stakeholders</h4>

<p>Stakeholders form a large subset of your project community.  Not only are they affected by your project; they have an active interest in its success.  Stakeholders may include end users, purchasers, managers, and executives.  Although they don't participate in day-to-day development, do invite them to attend each iteration demo.  The on-site customers—particularly the product manager—are responsible for understanding the needs of your stakeholders, deciding which needs are most important, and knowing how to best meet those needs.</p>

<h4>The Executive Sponsor</h4>

<p>The executive sponsor is particularly important: he holds the purse strings for your project.  Take extra care to identify your executive sponsor and understand what he wants from your project.  He's your ultimate customer.  Be sure to provide him with regular demos and confirm that the project is proceeding according to his expectations.</p>

<h3>Filling Roles</h3>

<p>The exact structure of your team isn't that important as long as it has all the knowledge it needs.  The makeup of your team will probably depend more on your organization's traditions than on anything else.</p>

<p>In other words, if project managers and testers are typical for your organization, include them.  If they're not, you don't necessarily need to hire them.  You don't have to have one person for each role—some people can fill multiple roles.  Just keep in mind that someone has to perform those duties even if no one has a specific job title saying so.</p>

<p>At a minimum, however, I prefer to see one person clearly designated as "product manager" (who may do other customer-y things) and one person clearly defined as "programmer-coach" (who also does programmer-y things).</p>

<p>The other roles may blend together.  Product managers are usually domain experts and can often fill the project manager's shoes, too.  One of the customers may be able to play the role of interaction designer, possibly with the help of a UI programmer.  On the programming side, many programmers are generalists and understand a variety of technologies.  In the absence of testers, both programmers and customers should pick up the slack.</p>

<h3>Team Size</h3>

<p>The guidelines in this book assume teams with four to ten programmers (five to 20 total team members).  For new teams, four to six programmers is a good starting point.</p>

<p>Applying the staffing guidelines to a team of six programmers produces a team that also includes four customers, one tester, and a project manager, for a total team size of 12 people.  Twelve people turns out to be a natural limit for team collaboration.</p>

<p>XP teams can be as small as one experienced programmer and one product manager, but full XP might be overkill for such a small team.  The smallest team I would use with full XP consists of five people: four programmers (one acting as coach) and one product manager (who also acts as project manager, domain expert, and tester).  A team of this size might find that the product manager is overburdened; if so, the programmers will have to pitch in.  Adding a domain expert or tester will help.</p>

<p>On the other end of the spectrum, starting with ten programmers produces a 20-person team that includes six customers, three testers, and a project manager.  You can create even larger XP teams, but they require special practices that are out of the scope of this book.</p>

<blockquote class="coach">Prefer <em>better</em> to <em>bigger</em>.</blockquote>

<p>Before you scale your team above twelve people, however, remember that large teams incur extra communication and process overhead, reducing individual productivity.  The combined overhead might even reduce overall productivity.  If possible, hire more experienced, more productive team members rather than scaling to a large team.</p>

<p>A 20-person team is advanced XP.  Avoid creating a team of this size until your organization has had extended success with a smaller team.  If you're working with a team of this size, continuous review, adjustment, and an experienced coach are critical.</p>

<h3>Full-Time Team Members</h3>

<p>All of the team members should sit with the team full-time and give the project their complete attention.  This particularly applies to customers, who are often surprised at the level of involvement XP requires of them.</p>

<p>Some organizations like to assign people to multiple projects simultaneously.  This <em>fractional assignment</em> is particularly common in <em>matrix-managed organization</em>s.  (If team members have two managers, one for their project and one for their function, you're probably in a matrixed organization.)</p>

<blockquote class="coach">Fractional assignment is dreadfully counterproductive.</blockquote>

<p>If your company practices fractional assignment, I have some good news.  You can instantly improve productivity by reassigning people to only one project at a time.  Fractional assignment is dreadfully counterproductive: fractional workers don't bond with their teams, they often aren't around to hear conversations and answer questions. and they must task switch, which incurs a significant hidden penalty.  "[T]he minimum penalty is 15 percent... Fragmented knowledge workers may look busy, but a lot of their busyness is just thrashing."  [DeMarco 2002] (p.19-20)</p>

<blockquote class="notetip">
 
 <p>If your team deals with a lot of ad hoc requests, you may benefit from using a batman, discussed in <a href="http://jamesshore.com/Agile-Book/iteration_planning.html">Iteration Planning</a> in Chapter 8.</p>
 
</blockquote>

<p>That's not to say that everyone needs to work with the team for the entire duration of the project.  You can bring someone in to consult on a problem temporarily.  However, while she works with the team, she should be fully engaged and available.</p>


<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/xp_concepts.html">XP Concepts</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/the_xp_lifecycle.html">The XP Lifecycle</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/the_xp_lifecycle.html">Chapter 3: Understanding XP</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/the_xp_team.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-23T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:36Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/07/agile-quick-links-16.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/vNO7Pi0wC-Y/agile-quick-links-16.html" rel="alternate" type="text/html"/>
    <title>Agile Quick Links #16</title>
    <summary>Courtesy of a few hours delay from Ottawa to LaGuardia, I have some unexpected time to write a Quick Links.
I’m always explaining to clients the problems with traditional Test Automation approaches. With Why Test Automation Costs Too Much Elisabeth Hendrickson explains why Test Last will always fail. Now she just leaves the job of explaining [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Courtesy of a few hours delay from Ottawa to LaGuardia, I have some unexpected time to write a Quick Links.</p>
<p>I’m always explaining to clients the problems with traditional Test Automation approaches. With <a href="http://testobsessed.com/2010/07/19/why-test-automation-costs-too-much/" target="_blank">Why Test Automation Costs Too Much</a> Elisabeth Hendrickson explains why Test Last will always fail. Now she just leaves the job of explaining what to do instead.</p>
<p>Derek Huether found an awesome <a href="http://thecriticalpath.info/2010/07/19/awesome-scrum-intro-video/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+thecriticalpath%2FDyPm+%28The+Critical+Path%29" target="_blank">Scrum Intro Video</a> (by Hamid Shojaee, Founder and CEO of Axosoft) – its only 8 minutes long.</p>
<p>Odopod is an online <a href="http://sketch.odopod.com/" target="_blank">sketch pad</a>, I’ve not spent enough time playing yet but it has support for animation. Might be a great tool for users of Dan Roam’s “<a href="http://www.amazon.com/gp/product/1591843197?ie=UTF8&amp;tag=notesfromatoo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1591843197" target="_blank">Unfolding the Napkin</a>” and Dave Gray’s  “<a href="http://www.amazon.com/gp/product/0596804172?ie=UTF8&amp;tag=notesfromatoo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0596804172">Gamestorming: A Playbook for Innovators, Rulebreakers, and Changemakers</a>” (<em>Caveat Emptor I only just discovered Dave’s book today and so haven’t read it yet).</em></p>
<p><a href="http://www.estherderby.com/2010/07/hiring-for-a-collaborative-team.html" target="_blank">Hiring for a Collaborative Team</a> from Esther Derby has a great set of ideas. I would only add one I recently hear from <a href="http://blog.nayima.be/" target="_blank">Pascal Van Cauwenberghe</a> in an email to the agile games list where he describes introducing a potential hire to his company by playing the XP game with them. </p>
<p><em>Caveat Emptor – if you buy any of the books after clicking on my link I get 4% of the price. In all likelihood that means I might be able to afford a coffee or two.</em></p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/vNO7Pi0wC-Y" width="1"/></div>
    </content>
    <updated>2010-07-19T23:22:21Z</updated>
    <category term="Agile"/>
    <category term="Links"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/07/agile-quick-links-16.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Informative-Workspace-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Informative-Workspace-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Informative Workspace" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>16 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>I'm proud to announce the release of this week's <a href="http://jamesshore.com/Agile-Book/">Art of Agile Development</a> excerpt, <a href="http://jamesshore.com/Agile-Book/">Informative Workspace</a>. This week's release is particularly notable because it's the last practice from the <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Thinking chapter</a>, which means that you can now read the whole chapter online.</p>

<p>This is probably as good a time as any to reflect on my decision to release the book online. First, I want to thank Shane Warden (my co-author) and Mary Treseler (our editor) for their support of this decision. Royalties from technical books are no way to get rich--actually, you'll be lucky to get above the poverty line--but publishing the book online meant we were putting those paltry returns at risk. Shane and Mary didn't even twitch when I suggested the idea.</p>

<p>How did it turn out? Wonderfully! I think. Website traffic is up, unsurprisingly, and an informal review of Amazon rankings hints that the book sales have bumped up to a nice consistent pace. Based on my royalty statements, we sold more books to stores in Q1 this year than we did in Q1 last year. Next quarter's royalty data will tell the real story, though, because I only started putting the book online at the end of February.</p>

<p>Bottom line? It seems to be working out. The main goal was to provide a permanent, comprehensive Agile resource online that people could link to when discussing specific Agile practices. In that respect, we've definitely succeeded. So, thank you! Thank you for linking us, recommending our book to your colleagues, and spreading the word. That's really all we need.</p>

<p class="aside">(If you'd like to do more, the best thing is to buy a copy for a colleague who needs to read it. For colleagues in particular need of new insights, the book also makes a good <a href="http://c2.com/cgi/wiki?ClueByFour">Clue-By-Four</a> when wielded with proper angular momentum.)</p>

<p>Technically, prepping the book for HTML hasn't been too bad. Shane and I authored the book in a markup language called <a href="http://search.cpan.org/~arandal/Pod-PseudoPod-0.16/lib/Pod/PseudoPod.pm">PseudoPOD</a>, and I wrote a little recursive descent parser<sup>1</sup> to convert the POD files to HTML back when we were doing public reviews. To publish a section of the book, I manually incorporate O'Reilly's copyedits and figures back into our source, run the tool, and then paste the output into the appropriate page on my site. The hardest part is figuring out something interesting to say in this weekly announcement.</p>

<p class="footnote"><sup>1</sup>"Recursive descent parser" is one of my favorite phrases. I like to drop it into casual conversation. "Yes, <em>Attack of the Clones</em> was flawed, but nothing that an army of monkeys and a recursive descent parser couldn't fix."</p>

<p>At any rate, that's the <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Thinking</a> chapter. Thanks for reading! Next week's excerpt comes from the <a href="http://jamesshore.com/Agile-Book/collaborating_intro.html">Collaborating</a> chapter. Our choices are:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/stand_up_meetings.html">Stand-Up Meetings</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/coding_standards.html">Coding Standards</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/iteration_demo.html">Iteration Demo</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/reporting.html">Reporting</a></li>
</ul>

<p>Please use the comments to vote for the practice you'd like to me to release next Friday. See you next week!</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Informative-Workspace-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-16T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:36Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/informative_workspace.html</id>
    <link href="http://jamesshore.com/Agile-Book/informative_workspace.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Informative Workspace</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>16 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/root_cause_analysis.html">Root-Cause Analysis</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/energized_work.html">Energized Work</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Chapter 5: Thinking</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

<p>An informative workspace is about information and accessibility.  Surround yourself with information.  Pay attention to the mood and buzz in the room.  Create big charts and plans that graphically show your progress.</p>

<p>Use hand-drawn charts, posted prominently, to ensure that information is constantly visible and easily modified.  Don't let a spreadsheet or project management tool constrain what you can track.</p>

<p>Beware of gaming.  To prevent it, discuss charts as a team.  Review their use often and take them down after a few iterations.  Don't report workspace charts outside of the team and never use them in performance evaluations.</p>

</blockquote>

<h3>as haiku</h3>

<blockquote class="haiku">

<p>
Little plastic nubs...
<br/>tiny green leaves; together,
<br/>meaning in the dirt
</p>

</blockquote>

<h3>Commentary</h3>

<p><a href="http://jamesshore.com/Blog/We-Heart-Tools.html">We ♥ Tools</a></p>

<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>

<h2>Informative Workspace</h2>

<dl class="audience"><dt>Audience</dt><dd>Whole Team</dd></dl>

<p class="goal">We are tuned in to the status of our project.</p>

<p>Your workspace is the cockpit of your development effort.  Just as a pilot surrounds himself with information necessary to fly a plane, arrange your workspace with information necessary to steer your project: create an informative workspace.</p>

<p>An <em>informative workspace</em> broadcasts information into the room.  When people take a break, they will sometimes wander over and stare at the information surrounding them.  Sometimes, that brief zone-out will result in an aha moment of discovery.</p>

<p>An informative workspace also allows people to sense the state of the project just by walking into the room.  It conveys status information without interrupting team members and helps to improve stakeholder trust.</p>

<h3>Subtle Cues</h3>

<blockquote class="coach">Simply poking your head into a project room should give you information about the project.</blockquote>

<p>The essence of an informative workspace is <em>information</em>.  One simple source of information is the feel of the room.  A healthy project is energized.  There's a buzz in the air—not tension, but activity.  People converse, work together, and make the occasional joke.  It's not rushed or hurried, but it's clearly productive.  When a pair needs help, other pairs notice, lend their assistance, then return to their tasks.  When a pair completes something well, everyone celebrates for a moment.</p>

<p>An unhealthy project is quiet and tense.  Team members don't talk much, if at all.  It feels drab and bleak.  People live by the clock, punching in and punching out—or worse, watching to see who is the first one to dare to leave.</p>

<p>Besides the feel of the room, other cues communicate useful information quickly and subconsciously.  If the build token is away from the integration machine, it's not safe to check out the code right now.  By mid-iteration, unless about half of the cards on the iteration plan are done, the team is going faster or slower than anticipated.</p>

<blockquote class="coach">You can never have too many whiteboards.</blockquote>

<p>An informative workspace also provides ways for people to communicate.  This usually means plenty of whiteboards around the walls and stacks of index cards.  A collaborative design sketch on a whiteboard can often communicate far more quickly and effectively than a half-hour PowerPoint presentation.  Index cards are great for Class-Responsibility-Collaborator (CRC) design sessions, retrospectives, and planning with user stories.</p>

<blockquote class="notetip">
 
 <p>Whiteboard design sessions labelled "Do Not Erase" for more than a few days may indicate a problem.  Any programmer on the team should be able to re-create the design from memory, perhaps with a bit of help from reviewing the source code.  If permanent design diagrams are indispensible, you may benefit from simplifying your design and sharing code ownership.</p>
 
</blockquote>

<h3>Big Visible Charts</h3>

<p>An essential aspect of an informative workspace is the <em>big visible chart</em>.  The goal of a big visible chart is to display information so simply and unambiguously that it communicates even from across the room.</p>

<p>The iteration and release planning boards are ubiquitous examples of such a chart.  You'll see variants of these planning boards in every XP project.  For more information about these boards, see the release planning board shown in Figure 8-4 and the iteration planning board shown in Figure 8-9.</p>

<p>Another useful status chart is a team calendar, which shows important dates, iteration numbers, and when team members will be out of the office (along with contact information, if appropriate).  A large plastic perpetual calendar, available at most office supply stores, works well here.</p>

<h3>Hand-Drawn Charts</h3>

<blockquote class="coach">Don't rush to computerize.</blockquote>

<p>Avoid the reflexive temptation to computerize your charts.  The benefits of the informative workspace stem from the information being constantly visible from everywhere in the room.  It's difficult and expensive for computerized charts to meet that criterion; you'd have to install plasma screens or projectors everywhere.</p>

<p>Even if you can afford big screens everywhere, you will constantly change the types of charts you display.  This is easier with flip charts and whiteboards than with computers, as creating or modifying a chart is as simple as drawing with pen and paper. Don't let a spreadsheet or project management software constrain what you can track.</p>

<h3>Process Improvement Charts</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/retrospectives.html">Retrospectives</a></dd></dl><p>One type of big visible chart measures specific issues that the team wants to improve.  Often, the issues come up during a retrospective.  Unlike the planning boards or team calendar, post these charts only as long as necessary.</p>

<p>Create process improvement charts as a team decision and maintain them as a team responsibility.  When you agree to create a chart, agree to keep it up to date.  For some charts, this means taking 30 seconds to mark the board when the status changes.  Each team member should update his own status.  Some charts involve collecting some information at the end of the day.  For these, collectively choose someone to update the chart.</p>

<p>There are many possible types of process improvement charts; they take forms as diverse as the types of problems that teams experience.  The principle behind all of them is the same: they appeal to our innate desire for improvement.  If you show progress towards a mutual goal, people will usually try to improve their status.</p>

<blockquote class="notetip">
 
 <p>I try to create charts in which a line going up or a box filled in indicates improvement.  It's a small way to improve clarity.  Don't knock yourself out trying to follow this guideline, though: it's more important to get back to work than it is to twist your measurements to make a line go up rather than down.</p>
 
</blockquote>

<p>Consider the problems you're facing and what kind of chart, if any, would help.  As an example, XP teams have successfully used charts to help improve:</p>

<ul>
  <li><p>Amount of pairing, by tracking the percentage of time spent pairing versus the percentage of time spent flying solo</p></li>
  <li><p>Pair switching, by tracking how many of the possible pairing combinations actually paired during each iteration (see Figure)</p></li>
  <li><p>Build performance, by tracking the number of tests executed per second (see Figure)</p></li>
  <li><p>Support responsiveness, by tracking the age of the oldest support request (an early chart, which tracked the <em>number</em> of outstanding requests, resulted in hard requests being ignored)</p></li>
  <li><p>Needless interruptions, by tracking the number of hours spent on non-story work each iteration</p></li>
</ul>

<div style="text-align: center;">
 
 
 
 <p><img alt="figure (informative_workspace__sample_charts.gif)" src="http://jamesshore.com/images/art-of-agile/figs/informative_workspace__sample_charts.gif"/></p>
 
<p class="caption">Figure. Sample Charts</p></div>

<p>Try not to go overboard with your process improvement charts.  If you post too many, they'll lose their effectiveness.  My maximum is three to five charts.  That's not to say that your only decorations should be a handful of charts. Team memorabilia, toys, and works in progress, are also welcome.  Just make sure the important charts stand out.</p>

<h3>Gaming</h3>

<p>While having too many process improvement charts can reduce their impact, a bigger problem occurs when the team has too <em>much</em> interest in a chart, that is, in improving a number on a chart.  They often start gaming the process.  <em>Gaming</em> occurs when people try to improve a number at the expense of overall progress.</p>

<p>For example, if programmers focus on too much on improving the number of tests in the system, they might be reluctant to remove out-of-date tests, making maintenance more difficult, or they might add unnecessary or redundant tests.  They may not even realize they're doing so.</p>

<p>To alleviate this problem, use process improvement charts with discretion.  Discuss new charts as a team.  Carefully tie charts to the results you want to see.  Review their use often and take them down after an iteration or two.  By that time, a chart has either done its job or it isn't aren't going to help.</p>

<blockquote class="coach">Never use workspace charts in a performance evaluation.</blockquote>

<p>Above all, never use workspace charts in performance evaluations.  Don't report them outside the team.  People who feel judged according to their performance on a chart are much more likely to engage in gaming.  See <a href="http://jamesshore.com/Agile-Book/reporting.html">Reporting</a> in Chapter 6 for ideas about what to report instead.</p>

<h3>Questions</h3>

<h4 class="faq">We need to share status with people who can't or won't visit the team workspace regularly.  How do we do that without computerized charts?</h4>

<p>A digital camera can effectively capture a whiteboard or other chart.  You could even point a webcam at a chart and webcast it.  Get creative.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/reporting.html">Reporting</a></dd></dl><p>Remember, though, that most information in the team workspace is for the team's use only.  Reporting team progress outside of the team is a separate issue.</p>

<h4 class="faq">Our charts are constantly out of date.  How can I get team members to keep them up-to-date?</h4>

<p>The first question to ask is, "Did the team really agree to this chart?"  An informative workspace is for the team's benefit, so if team members aren't keeping a chart up-to-date, they may not think that it's beneficial.  It's possible that the team is passively-aggressively ignoring the chart rather than telling you that they don't want it.</p>

<blockquote class="coach">If people won't take responsibility, perhaps you're being too controlling.</blockquote>

<p>I find that when no one updates the charts, it's because I'm being too controlling about them.  Dialing back the amount of involvement I have with the charts is often enough to get the team to step in.  Sometimes that means putting up with not-quite-perfect charts or sloppy handwriting, but it pays off.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/retrospectives.html">Retrospectives</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/stand_up_meetings.html">Stand-Up Meetings</a></dd></dl><p>If all else fails, discuss the issue during the retrospective or a stand-up meeting.  Share your frustration and ask for the team's help in resolving the issue. Prepare to abandon some favorite charts if the team doesn't need them.</p>

<h3>Results</h3>

<p>When you have an informative workspace, you feel like you have up-to-the-minute information about all of the important issues your team is facing.  You know exactly how far you've come and how far you have to go in your current plan.  You know whether the team is progressing well or having difficulty, and you know how well you're solving problems.</p>

<h3>Contraindications</h3>

<p>If your team doesn't sit together in a shared workspace, you probably won't be able to create an effective informative workspace.</p>

<h3>Alternatives</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/stand_up_meetings.html">Stand-Up Meetings</a></dd></dl><p>If your team doesn't sit together, but has adjacent cubicles or offices, you might be able to achieve some of the benefits of an informative workspace by posting information in the halls or a common area.  Teams that are more widely distributed may use electronic tools supplemented with daily stand-up meetings.</p>

<p>A traditional alternative is the weekly status meeting, but I find these dreary wastes of time that delay and confuse important information.</p>

<h3>Further Reading</h3>

<p><cite>Agile Software Development</cite> [Cockburn] has an interesting section on "Convection Currents of Information" that describes information as heat and big visible charts as "information radiators."</p>


<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/root_cause_analysis.html">Root-Cause Analysis</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/energized_work.html">Energized Work</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Chapter 5: Thinking</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/informative_workspace.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-16T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:35Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:martinfowler.com,2010-07-15:Pourquoi--pas-comment</id>
    <link href="http://martinfowler.com/snips/201007151824.html" rel="alternate" type="text/html"/>
    <title>Pourquoi, pas comment</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>A couple of weeks ago I was in Paris with Neal Ford to speak at <a href="http://universite-du-si.com/fr/conferences/6-paris-usi-2010">USI 2010</a>. Our talk looked at some aspects of <em>why</em> agile works. Rather than look at the techniques which is how agile does its thing, we looked more at some of the underlying forces - focusing on communication and feedback. The <a href="http://universite-du-si.com/fr/conferences/6/sessions/909">video is now available</a>. (The introduction is in French but the talk is in English. Sadly my French is barely sufficient to order at a restaurant.)</p></div>
    </content>
    <updated>2010-07-15T22:24:00Z</updated>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/07/learning-article-finally-finished.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/lwwTOxGWC9k/learning-article-finally-finished.html" rel="alternate" type="text/html"/>
    <title>Learning Article Finally Finished</title>
    <summary>For the past year every time I give my “Learning Best Approaches for Your Brain Talk”, I’ve promised there would be an article on InfoQ. Well I kept to much work in progress and this week I took care of that problem and we’re live: The Science of Learning: Best Approaches for Your Brain</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://www.agilepainrelief.com/images/WindowsLiveWriter/LearningArticleFinallyFinished_70A9/image.png"><img align="left" alt="image" border="0" height="151" src="http://www.agilepainrelief.com/images/WindowsLiveWriter/LearningArticleFinallyFinished_70A9/image_thumb.png" style="border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; display: inline; border-top: 0px; border-right: 0px;" title="image" width="200"/></a> For the past year every time I give my “Learning Best Approaches for Your Brain Talk”, I’ve promised there would be an article on InfoQ. Well I kept to much work in progress and this week I took care of that problem and we’re live: <a href="http://www.infoq.com/articles/science-of-learning">The Science of Learning: Best Approaches for Your Brain</a></p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/lwwTOxGWC9k" width="1"/></div>
    </content>
    <updated>2010-07-14T12:02:03Z</updated>
    <category term="Brain"/>
    <category term="Science"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/07/learning-article-finally-finished.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blog.gdinwiddie.com/?p=494</id>
    <link href="http://blog.gdinwiddie.com/2010/07/11/je-suis-fatigue/" rel="alternate" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/07/11/je-suis-fatigue/#comments" rel="replies" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/07/11/je-suis-fatigue/feed/atom/" rel="replies" type="application/atom+xml"/>
    <title xml:lang="en">Je suis fatigué.</title>
    <summary xml:lang="en">I’ve been on the go quite a bit the last couple months, and my posting here (or lack thereof) bears witness to that.  I’ve had lots of thoughts too share, but little time and energy to put them into words.
These hurried times included a trip to France, and one of the highlights was visiting the [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>I’ve been on the go quite a bit the last couple months, and my posting here (or lack thereof) bears witness to that.  I’ve had lots of thoughts too share, but little time and energy to put them into words.</p>
<p>These hurried times included a trip to France, and one of the highlights was visiting the <a href="http://wiki.agile-france.org/cgi-bin/wiki.pl?DojoDeveloppement/Lundi5Juillet2010" target="_blank" title="5 July 2010 Dojo">Paris Coding Dojo</a>, the origin of the term.  What an enjoyable evening!  No trip to Paris would be complete without it.  (Well, maybe that’s not true for everyone.)</p>
<p>The short version of the story is that the coding dojo takes a little bit of time to thoughtfully examine our craft and the way we practice it.  The comments made during the dojo were a reflection of the importance that small nuances have in the pursuit of effective programming.  I advise everyone in the software development community to find ways to hone their craft outside of the daily grind of delivering work.</p>
<p>And many thanks to the participants of the Paris Coding Dojo for conducting the meeting principally in English for my benefit.</p>
         <img alt="" src="http://blog.gdinwiddie.com/?ak_action=api_record_view&amp;id=494&amp;type=feed"/></div>
    </content>
    <updated>2010-07-11T18:09:16Z</updated>
    <published>2010-07-11T18:09:16Z</published>
    <category scheme="http://blog.gdinwiddie.com" term="Tools and Techniques"/>
    <author>
      <name>George Dinwiddie</name>
      <uri>http://blog.gdinwiddie.com/</uri>
    </author>
    <source>
      <id>http://blog.gdinwiddie.com/feed/atom/</id>
      <link href="http://blog.gdinwiddie.com" rel="alternate" type="text/html"/>
      <link href="http://blog.gdinwiddie.com/feed/atom/" rel="self" type="application/atom+xml"/>
      <subtitle xml:lang="en">Effective software development</subtitle>
      <title xml:lang="en">George Dinwiddie's blog</title>
      <updated>2010-07-11T18:09:16Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Incremental-Requirements-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Incremental-Requirements-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Incremental Requirements" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>09 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p><a href="http://jamesshore.com/Agile-Book/incremental_requirements.html">Incremental Requirements</a>, this week's excerpt from <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a>, is now online for your viewing pleasure. We're now a little more than half way through the practices. Only four more months to go!</p>

<p>There's no poll this week--next week's excerpt will be from the <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Thinking</a> chapter, and there's only one practice left to release from that chapter (it's <a href="http://jamesshore.com/Agile-Book/informative_workspace.html">Informative Workspace</a>). But you're welcome to say stuff in the comments anyway.</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Incremental-Requirements-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-09T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:36Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/incremental_requirements.html</id>
    <link href="http://jamesshore.com/Agile-Book/incremental_requirements.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Incremental Requirements</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>09 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/customer_tests.html">Customer Tests</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Chapter 9: Developing</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Chapter 9: Developing</a></li>
</ul>

<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>

<h2>Incremental Requirements</h2>

<dl class="audience"><dt>Audience</dt><dd>Customers</dd></dl>

<p class="goal">We define requirements in parallel with other work.</p>

<p>A team using an up-front requirements phase keeps their requirements in a requirements document.  An XP team doesn't have a requirements phase and story cards aren't miniature requirements documents, so where do requirements come from?</p>

<h3>The Living Requirements Document</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></dd></dl><p>In XP, the on-site customers sit with the team.  They're expected to have all of the information about requirements at their fingertips.  When somebody needs to know something about the requirements for the project, she asks one of the on-site customers rather than looking up the information in a document.</p>

<p>Face-to-face communication is much more effective than written communication, as [Cockburn] discusses, and it allows XP to save time by eliminate a long requirements analysis phase.  However, requirements work is still necessary.  The on-site customers need to understand the requirements for the software before they can explain it.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/real_customer_involvement.html">Real Customer Involvement</a></dd></dl><p>The key to successful requirements analysis in XP is <em>expert customers</em>.  Involve real customers, an experienced product manager, and experts in your problem domain (see <a href="http://jamesshore.com/Agile-Book/the_xp_team.html">The XP Team</a> in Chapter 3 and <a href="http://jamesshore.com/Agile-Book/real_customer_involvement.html">Real Customer Involvement</a> in Chapter 6).  Many of the requirements for your software will be intuitively obvious to the right customers.</p>

<blockquote class="notetip">
 
 <p>If you have trouble with requirements, your team may not include the right customers.</p>
 
</blockquote>

<p>Some requirements will require even expert customers to consider a variety of options or do some research before making a decision.  Customers, you can and should include other team members in your discussions if it helps clarify your options.  For example, you may wish to include a programmer in your discussion of user interface options so you can strike a balance between an impressive UI and low implementation cost.</p>

<p>Write down any requirements you might forget.  These notes are primarily for your use as customers so you can easily answer questions in the future and to remind you of the decisions you made.  They don't need to be detailed or formal requirements documents; keep them simple and short.  When creating screen mock-ups, for example, I often prefer to create a sketch on a whiteboard and take a digital photo.  I can create and photograph a whiteboard sketch in a fraction of the time it me to make a mock-up in an electronic tool.</p>

<blockquote class="notetip">
 
 <p>Some teams store their requirements notes in a Wiki or database, but I prefer to use normal office tools and check the files into version control.  This allows you to use all of the tools at your disposal, such as word processors, spreadsheets, and presentation software.  It also keeps requirements documents synchronized with the rest of the project and allows you to travel back in time to previous versions.</p>
 
</blockquote>

<h3>Work Incrementally</h3>

<p>Work on requirements <em>incrementally</em>, in parallel with the rest of the team's work.  This makes your work easier and ensures that the rest of the team won't have to wait to get started.  Your work will typically parallel your release planning horizons, discussed in <a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a> in Chapter 8.</p>

<h4>Vision, Features, and Stories</h4>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></dd></dl><p>Start by clarifying your project vision, then identify features and stories as described in <a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a> in Chapter 8.  These initial ideas will guide the rest of your requirements work.</p>

<h4>Rough Expectations</h4>

<p>Figure out what a story means to you and how you'll know it's finished slightly before you ask programmers to estimate it.  As they estimate, programmers will ask questions about your expectations; try to anticipate those questions and have answers ready.  (Over time, you'll learn what sorts of questions your programmers will ask.)  A rough sketch of the visible aspects of the story might help.</p>

<h4>Mock-Ups, Customer Tests, and Completion Criteria</h4>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/customer_tests.html">Customer Tests</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/done_done.html">"Done Done"</a></dd></dl><p>Figure out the details for each story just before programmers start implementing it.  Create rough mock-ups that show what you expect the work to look like when it's done.  Prepare customer tests that provide examples of tricky domain concepts and describe what "done done" means for each story.  You'll typically wait for the corresponding iteration begins to do most of this work.</p>

<blockquote class="notetip">
 
 <p>Sometimes the best way to create a UI mock-up is to work in collaboration with the programmers.  The iteration planning meeting might be the best time for this work.</p>
 
</blockquote>

<h4>Customer Review</h4>

<blockquote class="coach">Only working applications show customers what they're really going to get.</blockquote>

<p>While stories are under development, before they're "done done," review each story to make sure it works as you expected.  You don't need to exhaustively test the application—you can rely on the programmers to test their work—but you should check those areas where programmers might think differently than you do.  These areas include terminology, screen layout, and interactions between screen elements.</p>

<blockquote class="notetip">
 
 <p>Prior to seeing the application in action, every conversation is theoretical.  You can discuss options and costs, but until you have an implementation, everyone can only imagine how the choices will feel.  Only working applications show you what you're really going to get.</p>
 
</blockquote>

<p>Some of your findings will reveal errors due to miscommunication or misunderstanding.  Others, while meeting your requirements, won't work as well in practice as you had hoped.  In either case, the solution is the same: talk with the programmers about making changes.  You can even pair with programmers as they work on the fixes.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></dd></dl><p>Many changes will be minor and the programmers will be able to fix them as part of their iteration slack.  If there are major changes, however, the programmers may not have time to fix them in the current iteration.  (This can happen even when the change seems minor from the customer's perspective.)  Create story cards for these changes.  Before scheduling such a story into your release plan, consider whether the value of the change is worth its cost.</p>

<p>Over time, programmers will learn about your expectations for the application.  Expect the number of issues you discover to decline each iteration.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/exploratory_testing.html">Exploratory Testing</a></dd></dl><blockquote class="sidebar"><h3>A Customer Review Session</h3>
 
 <p><em>By Elisabeth Hendrickson</em></p>
 
 
 
 <p>"Jill, do you have a moment?" Mary asked, walking over to Jill's workstation.  "I need to review a story and I was hoping you could show me some of your exploratory testing techniques."</p>
 
 <p>"Sure, I'd be happy to," Jill said.  "What's the charter for our session?"</p>
 
 <p>"I want to explore the Defaults story that Pradeep and Jan are working on," Mary said.  "They're not done yet, but they said that the UI is mostly filled in.  I wanted to make sure they're going in the right direction."</p>
 
 <p>"Okay," Jill said as she wrote "Explore Defaults UI" on a card.  "Let's start by setting some explicit defaults in the Preferences page."  She navigated to that area of the application, and Mary picked up a notepad, ready to take notes.</p>
 
 <p>Jill reached the Preferences page.  "Here are the defaults users can set explicitly," she said, pointing at the screen.  "Is this what you were expecting?"</p>
 
 <p>Mary nodded.  "We sketched out a mock-up of the screen with the programmers earlier in the iteration.  Now that I look at it, though, it seems crowded.  I think an icon would be better than those repeated <em>Set Default</em> links."  She made a note to bring the issue up with the programmers.</p>
 
 <p>"Let's look at the default credit cards next," Jill said.  "It's newest."</p>
 
 <p>Mary clicked over to the credit cards screen.  "This user has several credit cards, and one has already been marked as the default.  We should be able to change it by clicking this radio button," she said, and did so.  "Nice!  I like how they enabled the <em>Undo</em> button when I clicked.  But does the save button have to be labeled <em>Submit</em>?"  She laughed as she made a few notes.  "I feel like I'm on the set of a B movie whenever I see that.  <em>Submit to your computer master, puny mortal!</em>"</p>
 
 <p>Jill grinned.  "I never thought of it that way."  She paused to considering.  "Let's use the zero/one/many heuristic<sup>1</sup> to see what happens when we create a new user with no credit cards."  She created a new user, logged in, then navigated back to the Preferences page.  The default credit card area on the page showed the heading and no credit cards.</p>
 
 <p>"Hmmm," Mary said, then pointed at the screen.  "I hadn't thought about this before, but I'd like to have an <em>Add New Card</em> button here.  Users will be able to add credit cards both here and on the Payment Method page when they go to check out.  I wonder if Pradeep and Jan have time to get that in this iteration?"  She made a note to talk to the programmers about the new button.</p>
 
 <p>"In the meantime, we can add a new credit card from the payment screen," Jill said.  "I wonder what happens when you add the first card..."</p>
 
</blockquote>

<p class="aside"><sup>1</sup>See <a href="http://jamesshore.com/Agile-Book/exploratory_testing.html">Exploratory Testing</a> later in this chapter.</p>

<h3>Questions</h3>

<h4 class="faq">Our customers don't know what the team should build.  What should we do?</h4>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></dd></dl><p>Do you have a clear, compelling vision?  If so, your customers should know where to start.  If you don't, you may not have the right customers on your team.  In this case, you can use traditional requirements gathering techniques (see "Further Reading" at the end of this section) to determine the software's requirements, but you're better off involving real experts (see <a href="http://jamesshore.com/Agile-Book/the_xp_team.html">The XP Team</a> in Chapter 3 and <a href="http://jamesshore.com/Agile-Book/real_customer_involvement.html">Real Customer Involvement</a> in Chapter 6).</p>

<h4 class="faq">What if the customer review finds too many problems for us to deal with?</h4>

<p>This is most likely to happen at the beginning of the project, before programmers have learned what the customers like.  If this happens to you, spend more time with programmers so that your perspective is captured sooner and more accurately.  In some cases, customers should pair with programmers as they work on error-prone areas.</p>

<h4 class="faq">As a programmer, I'm offended by some of the things customers find in their reviews.  They're too nitpicky.</h4>

<p>Things that can seem nitpicky to programmers—such as the color of the screen background, or a few pixels of alignment in the UI—represent polish and professionalism to customers.  This goes both ways: some things that seem important to programmers, such as quality code and refactoring, often seem like unnecessary perfectionism to customers.</p>

<p>Rather than getting upset about these differences of perspective, try to learn what your customers care about and why.  As you learn, you will anticipate your customers' needs better, which will reduce the need to make changes.</p>

<h3>Results</h3>

<p>When customers work out requirements incrementally, programmers are able to work on established stories while customers figure out the details for future stories.  Customers have ready answers to requirements questions, allowing estimation and iteration planning to proceed quickly and smoothly.  By the time a story is "done done," it reflects the customers' expectations, and customers experience no unpleasant surprises.</p>

<h3>Contraindications</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></dd></dl><p>In order to incrementally define requirements, the team must include on-site customers who are dedicated to working out requirements details throughout the entire project.  Without this dedicated resource, your team will struggle with insufficient and unclear requirements.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/no_bugs.html">No Bugs</a></dd></dl><p>When performing customer reviews, think of them as tools for conveying the customers' perspective rather than as bug-hunting sessions.  The programmers should be able to produce code that's nearly bug-free (see <a href="http://jamesshore.com/Agile-Book/no_bugs.html">No Bugs</a> in Chapter 7); the purpose of the review is to bring customers' expectations and programmers' work into alignment.</p>

<h3>Alternatives</h3>

<p>The traditional approach to requirements definition is to perform requirements analysis sessions and document the results.  This requires an up-front requirements gathering phase, which takes extra time and introduces communication errors.</p>

<p>You can use an up-front analysis phase with XP, but good on-site customers should make that unnecessary.</p>

<h3>Further Reading</h3>

<p><cite>Software Requirements</cite> [Wiegers 1999] is a good resource for classic approaches to requirements gathering.</p>


<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/customer_tests.html">Customer Tests</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Chapter 9: Developing</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Chapter 9: Developing</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/incremental_requirements.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-09T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:35Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/07/agile-metrics.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/zvi3eT-96k0/agile-metrics.html" rel="alternate" type="text/html"/>
    <title>Agile Metrics</title>
    <summary>I’m frequently getting requests for good Agile Metrics and I’m never quite sure how to respond. Courtesy of some time waiting at LGA, I’ve been giving this some more thought. For many organizations metrics are irrelevant, don’t bother collecting them as they will just waste your time (and money).
If you must collect metrics, here [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://www.agilepainrelief.com/images/WindowsLiveWriter/AgileMetrics_103FB/IncrementalGrowth.jpg"><img align="left" alt="Business Graph" border="0" height="180" src="http://www.agilepainrelief.com/images/WindowsLiveWriter/AgileMetrics_103FB/IncrementalGrowth_thumb.jpg" style="margin: 0px 5px 0px 0px; display: inline; border-width: 0px;" title="Business Graph" width="240"/></a> I’m frequently getting requests for good Agile Metrics and I’m never quite sure how to respond. Courtesy of some time waiting at <a href="http://www.panynj.gov/airports/laguardia.html" target="_blank">LGA</a>, I’ve been giving this some more thought. For many organizations metrics are irrelevant, don’t bother collecting them as they will just waste your time (and money).</p>
<p>If you must collect metrics, here is what I would consider.</p>
<p><strong>Running Tested Purchased Features – </strong>Ron Jeffries is famous the metric <a href="http://xprogramming.com/articles/jatrtsmetric/" target="_blank">Running Tested Features</a> (RTF). I suggest that you consider taking it one step further until you’ve sold the feature to the customer you don’t know if they value it or not. For most product organizations this is a bit of stretch to measure in which case stick with Ron’s advice.</p>
<p>Questions to ask:</p>
<ul>
<li>What would you like to change?</li>
<li>If you had the information the metric provided what action would you take? Can you take that action now without the proof of the metric?</li>
<li>Your key measure (i.e. RTF), should measure your widest span of control – Sold Features &gt; Deployed &gt; Automated Acceptance Tests &gt; …</li>
<li><em>Measure Cycle Time – i.e. how long it takes to get something done and not people.</em></li>
<li>Other measures can be used: i.e. test coverage from Unit Tests, but be careful they might measure what you think they mean.</li>
<li>Measures can be gamed/fooled (intentionally or otherwise): For example test coverage measures whether or not a line of code has been visited. It doesn’t measure if there its meaningfully tested. If you must use a measure like this pay attention to the trend and not the absolute number. In this case a large jump might indicate someone having written a not very useful test of the outside api of your application.</li>
<li>Metrics have best before dates. Eventually you will stop getting real value from them. At that stage throw them away.</li>
<li>Ask can I get this information by walking around, observing and asking questions.</li>
</ul>
<p>Alright you made it this far you deserve some options:</p>
<p>Martin Fowler says: <a href="http://www.martinfowler.com/bliki/CannotMeasureProductivity.html">CannotMeasureProductivity</a>. Dave Nicolette presented on this at <a href="http://davenicolette.wikispaces.com/Agile+Metrics" target="_blank">Agile 2009</a> (this article links to heaps of others). I wrote this for InfoQ last year:  <a href="http://www.infoq.com/news/2009/11/good-agile-metrics" target="_blank">What is a Good Agile Metric?</a>. InfoQ also has: <a href="http://www.infoq.com/presentations/agile-metrics" target="_blank">Metrics in an Agile World</a>.</p>
<p>The following tools will help you measure, but please remember they often have many bad measures (<em>comments?</em>) turned with the good ones. Think carefully when choosing your rulesets:</p>
<ul>
<li><a href="http://www.sonarsource.org/" target="_blank">Sonar</a> – has a bunch of interesting measures: Cyclomatic Complexity, Duplicated code, … <em>. </em>While there are other plugins, its of most use in the Java world.</li>
<li><a href="http://www.clarkware.com/software/JDepend.html" target="_blank">JDepend</a> – helps you spot good vs. bad dependencies.</li>
<li>PMD, FindBugs, JLint – <a href="http://www.cs.umd.edu/~jfoster/papers/issre04.pdf" target="_blank">see a comparison of all three</a> (pdf). Some of these tools check some pointless things: method name too short or too long? missing Javadoc comments? Please configure these with the help of a grown adult. But they can also be configured to spot methods (&gt; 30-40 lines) and classes (&gt;300-400 lines) that are too long.</li>
<li><a href="http://www.ndepend.com/" target="_blank">NDepend</a> like JDepend and heaps more measures. Again please be careful configure only with an adults help :-) <em>Caveat Emptor I’ve been given a free copy of NDepend (that I’ve never had a chance to use).</em></li>
<li>Sonar for C# – yes according to <a href="http://stackoverflow.com/questions/1877663/is-there-a-c-equivalent-of-sonar" target="_blank">StackOverflow</a>.</li>
</ul>
<p><em>When paying attention to measures of the code, what matters is the trend and not the absolute numbers. Finally just because a tool can measure it doesn’t mean its worth measuring, conversely some of the best measures don’t have tools to measure them. In this case note that none of the above tools measure cycle time.<br/>
</em></p>
<p><em>Updated to make clear the point that you shouldn’t measure people and the limitations of tools.</em></p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/zvi3eT-96k0" width="1"/></div>
    </content>
    <updated>2010-07-02T23:20:20Z</updated>
    <category term=".NET"/>
    <category term="Agile"/>
    <category term="Agile FAQ"/>
    <category term="Java"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/07/agile-metrics.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-The-Planning-Game-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-The-Planning-Game-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "The Planning Game" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>02 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>I've released the full text of <a href="http://jamesshore.com/Agile-Book/the_planning_game.html">The Planning Game</a> from <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a>.</p>

<p>Next week, I'll post a practice from the <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Developing</a> chapter. Which would you like to see online next? Make your vote known in the comments.</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/incremental_requirements.html">Incremental Requirements</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/customer_tests.html">Customer Tests</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/refactoring.html">Refactoring</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/simple_design.html">Simple Design</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/performance_optimization.html">Performance Optimization</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/exploratory_testing.html">Exploratory Testing</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-The-Planning-Game-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-02T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:36Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/the_planning_game.html</id>
    <link href="http://jamesshore.com/Agile-Book/the_planning_game.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: The Planning Game</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>02 Jul 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/risk_management.html">Risk Management</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Chapter 8: Planning</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

<p>Customers have the most information about <em>value</em>: what best serves the organization. Programmers have the most information about <em>cost</em>: what it takes to implement and maintain those features. And remember, every decision to <em>do</em> something is a decision to <em>not do</em> something else.</p>

<p>The planning game brings together customers and programmers so that they may maximize value while minimizing costs. Anybody may create stories. Programmers estimate the stories, and customers prioritize them. Programmers and customers may question each others' decisions, but each group has final say over its area of expertise.</p>

<p>The end result is a single prioritized list.</p>
	
</blockquote>

<h3>Commentary</h3>

<p><a href="http://jamesshore.com/Blog/Coulda-Shoulda-Woulda.html">Coulda, Shoulda, Woulda</a></p>

<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>


<h2>The Planning Game</h2>

<dl class="audience"><dt>Audience</dt><dd>Whole Team</dd></dl>

<p class="goal">Our plans take advantage of both business and technology expertise.</p>

<p>You may know when and what to release, but how do you actually construct your release plan?  That's where <em>the planning game</em> comes in.</p>

<p>In economics, a <em>game</em> is something in which "players select actions and the payoffs depend on the actions of all players."<sup>1</sup>  The study of these games "deals with strategies for maximizing gains and minimizing losses... [and are] widely applied in the solution of various decision making problems."<sup>2</sup></p>

<p class="aside"><sup>1</sup>Deardorff's Glossary of International Economics, <cite>http://www-personal.umich.edu/~alandear/glossary/g.html</cite></p>

<p class="aside"><sup>2</sup>Dictionary definition of "game theory", <cite>http://dictionary.reference.com/search?q=game theory&amp;x=0&amp;y=0</cite></p>

<p>That describes the planning game perfectly.  It's a structured approach to creating the best possible plan given the information available.</p>

<p>The planning game is most notable for the way it maximizes the amount of information contributed to the plan.  As a result, it is a strikingly effective way to plan.  Althought it has limitations, if you work within them, I know of no better way to plan.</p>

<h3>How to Play</h3>

<p>XP assumes that customers have the most information about <em>value</em>: what best serves the organization.  Programmers have the most information about <em>costs</em>: what it will take to implement and maintain those features.  To be successful, the team needs to maximize value while minimizing costs.  A successful plan needs to take into account information from both groups, as every decision to <em>do</em> something is also a decision <em>not</em> to do something else.</p>

<p>Accordingly, the planning game requires the participation of both customers and programmers.  (Testers may assist, but they do not have an explicit role in the planning game.)  It's a <em>cooperative game</em>; the team as a whole wins or loses, not individual players.</p>

<p>Because programmers have the most information about costs—they're most qualified to say how long it will take to implement a story—they <em>estimate</em>.</p>

<p>Because customers have the most information about value—they're most qualified to say what is important—they <em>prioritize</em>.</p>

<p>Neither group creates the plan unilaterally.  Instead, both groups come together, each with their areas of expertise, and play the planning game:</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/estimating.html">Estimating</a></dd></dl><ol>
  <li><p>Anyone creates a story or selects an unplanned story.</p></li>
  <li><p>Programmers estimate the story.</p></li>
  <li><p>Customers place the story into the plan in order of its relative priority.</p></li>
  <li><p>Repeat until all stories have been estimated and placed into the plan.</p></li>
</ol>

<blockquote class="notetip">
 
 <p>The planning game doesn't always follow this neat and orderly format.  As long as programmers estimate and customers prioritize, the details aren't important.  For example, the programmers may estimate a stack of stories all at once for the customers to prioritize later.  Typically, most stories are created at the beginning of each release, during initial release planning sessions, as the team brainstorms what to include.</p>
 
</blockquote>

<p>During the planning game, programmers and customers may ask each other questions about estimates and priorities, but each group has final say over its area of expertise.</p>

<p>The result of the planning game is a plan: a list of stories in priority order.  Even if two stories are of equivalent priority, one must come before the other.  If you're not sure which to put first, pick one at random.</p>

<h4>Overcoming Disagreements</h4>

<p>Release planning is always a difficult process because there are many more stories to do than there is time available to do them.  Also, each stakeholder has his own priorities, and balancing these desires is challenging.  Tempers rise and the discussion gets heated—or worse, some people sit back and tune out, only to complain later.  This struggle is a natural and happens on <em>any</em> project, XP or not, that tries to prioritize conflicting needs.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></dd></dl><p>My favoriate way to plan is to gather the team, along with important stakeholders, around a large conference table.  Customers write stories on index cards, programmers estimate them, and customers place them on the table in priority order.  One end of the table represents the stories to do first and the other end represents stories to do last.  The plan tends to grow from the ends towards the middle, with the most difficult decisions revolving around stories that are neither critical nor useless.</p>

<blockquote class="coach">Use index cards to focus disagreements away from individuals.</blockquote>

<p>Using index cards and spreading them out on a table allows participants to point to stories and move them around.  It reduces infighting by demonstrating the amount of work to be done in a visible way.  The conversation focuses on the cards and their relative priorities rather than vague discussions of principles or on "must have / not important" distinctions.</p>

<blockquote class="sidebar"><h3>On Disappointment</h3>
 
 <p>The planning game is certain to give you information that makes you unhappy.  You may feel tempted to blame the messenger and stop playing the planning game, or stop using XP altogether.  That would be a mistake.  As David Schmaltz of True North pgs says, every project has a fixed amount of disappointment associated with it.  You can either use the planning game to dole out the disappointment in measured doses... or save it all up for the end.</p>
 
</blockquote>

<h3>How to Win</h3>

<p>When customers and programmers work directly together throughout this process, something amazing happens. I call it <em>the miracle of collaboration</em>.  It really is a miracle because time appears out of nowhere.</p>

<p>Like all miracles, it's not easy to achieve.  When programmers give an estimate, customers often ask a question that causes every programmer's teeth to grind:  "Why does it cost so much?"</p>

<p>The instictive reaction to this question is defensive. "It costs so much because software development is hard, damn it! Why are you questioning me!?"</p>

<p>Programmers, there's a better way to react.  Reword the customer's question in your head into a simple request for information: "Why is this expensive?"  Answer by talking about what's easy and what's difficult.</p>

<p>For example, imagine that a product manager requests a toaster to automatically pop up the toast when it finishes.  The programmers reply that the feature is very expensive, and when the product manager asks why, the programmers calmly answer, "Well, popping up the toast is easy; that's just a spring. But detecting when the toast is done—that's new. We'll need an optical sensor and some custom brownness-detecting software."</p>

<p>This gives the product manager an opportunity to ask, "What about all those other toasters out there? How do they know when the toast is done?"</p>

<p>The programmers respond: "They use a timer, but that doesn't really detect when the toast is done. It's just a kludge."</p>

<p>Now the product manager can reply, "That's okay! Our customers don't want a super toaster. They just want a regular toaster. Use a timer just like everyone else."</p>

<p>"Oh, okay. Well, that won't be expensive at all."</p>

<p>When you have honest and open dialog between customers and programmers, the miracle of collaboration occurs and extra time appears out of nowhere. Without communication, customers tend not to know what's easy and what's not, and they end up planning stories that are difficult to implement.  Similarly, programmers tend not to know what customers think is important, and they end up implementing stories that aren't very valuable.</p>

<p>With collaboration, the conflicting tendencies can be reconciled.  For example, a customer could ask for something unimportant but difficult, and the programmers could point out the expense and offer easier alternatives.  The product manager could then change direction and save time.  Time appears out of nowhere. It's the miracle of collaboration.</p>

<h3>Questions</h3>

<h4 class="faq">Won't programmers pad their estimates or slack off if they have this much control over the plan?</h4>

<p>In my experience, programmers are highly educated professionals with high motivation to meet customer expectations.  [McConnell 1996] (pp. 255-256) validates this experience: "Software developers like to work.  The best way to motivate developers is to provide an environment that makes it easy for them to focus on what they like doing most, which is developing software... [Developers] have high achievement motivation: they will work to the objectives you specify, but you have to tell them what those objectives are."</p>

<p>Although programmer estimates may be higher than you like, it's most likely because they want to set realistic expectations.  If the estimates do turn out to be too high, the team will achieve a higher velocity and automatically do more each iteration to compensate.</p>

<h4 class="faq">Won't customers neglect important technical issues if they have this much control over the plan?</h4>

<p>Customers want to ship a solid, usable product.  They have to balance that desire with the desire to meet crucial market windows.  As a result, they may sometimes ask for options that compromise important technical capabilities.  They do so because they aren't aware of the nuances of technical trade-offs in the same way that programmers are.</p>

<p>Programmers, you are most qualified to make decisions on technical issues, just as the customers are most qualified to make decisions on business issues.  When the customers ask for an explanation of an estimate, don't describe the technical options.  Instead, <em>interpret</em> the technology and describe the options in terms of business impact.</p>

<p>That is, rather than describing the options like:</p>

<blockquote>
 
 <p>We're thinking about using a Mark 4 Wizzle-Frobitz optical sensor here for optimal release detection.  We could use a Mark 1 spring-loaded countdown timer, too.  We'd have to write some custom software to use the Mark 4, but it's very sophisticated, cutting edge stuff and it will allow us to detect the exact degree of brownness of the bread.  The Mark 1 is ancient tech without dynamic detection abilities, but it won't take any extra time to implement.  Which would you prefer?</p>
 
</blockquote>

<p>... try instead:</p>

<blockquote>
 
 <p>We have two choices for popping up toast.  We can either use an optical sensor or a timer.  The optical sensor will allow us to toast the bread to the user's exact preference, but it will increase our estimate by three days.  The timer won't take any extra time but the user is more likely to have undercooked or burned toast.  Which would you prefer?</p>
 
</blockquote>

<p>If a technical option simply isn't appropriate, don't mention it, or mention your decision in passing as part of the cost of doing business:</p>

<blockquote>
 
 <p>Because this is the first iteration, we need to install a version control system.  We've included that cost in the estimate for our first story.</p>
 
</blockquote>

<h4 class="faq">Our product manager doesn't want to prioritize.  He says everything is important.  What can we do?</h4>

<p>Be firm.  Yes, everything is important, but something has to come first and something will come last.  Someone has to make the tough schedule decisions.  That's the product manager's job.</p>

<h3>Results</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></dd></dl><p>When you play the planning game well, both customers and programmers feel that they have contributed to the plan.  Any feelings of pressure and stress focus on the constraints of the plan and possible options, rather than on individuals and groups.  Programmers suggest technical options for reducing scope while maintaining the project vision.  Customers ruthlessly prioritize the stories that best serve the vision.</p>

<h3>Contraindications</h3>

<p>The planning game is a simple, effective approach that relies on many of XP's simplifying assumptions, such as:</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/the_xp_team.html">The XP Team</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/estimating.html">Estimating</a></dd></dl><ol>
  <li><p>Customer-centric stories</p></li>
  <li><p>Story dependencies that customers can manage effectively (in practice, this means no technical dependencies and simple business dependencies)</p></li>
  <li><p>Customers capable of making wise prioritization decisions</p></li>
  <li><p>Programmers capable of making self-consistent estimates</p></li>
</ol>

<p>If these conditions are not true on your team, you may not be able to take advantage of the planning game.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/incremental_design.html">Incremental Design And Architecture</a></dd></dl><p>The planning game also relies on the programmers' abilities to implement design and architecture incrementally.  Without this capability, the team will find itself creating technical stories or strange story dependencies that make planning more difficult.</p>

<p>Finally, the planning game assumes that the team has a single dominant constraint.  (For more information about the Theory of Constraints, see <a href="http://jamesshore.com/Agile-Book/xp_concepts.html">XP Concepts</a> in Chapter 3.)  It's very rare for a system to exhibit two constraints simultaneously, so this shouldn't be a problem.  Similarly, the planning game assumes that the programmers are the constraint.  If this isn't true for your team, discuss your options with your mentor.</p>

<h3>Alternatives</h3>

<p>There are a wide variety of project planning approaches.  The most popular seems to be Gantt charts that assume task-based plans and schedule what each individual person will do.</p>

<p>In contrast to that approach, the planning game focuses on what the <em>team produces</em>, not on what <em>individuals do</em>.  The team has the discretion to figure out how to produce each story and organizes itself to finish the work on time.</p>

<p>This focus on results, rather than tasks, combined with the planning game's ability to balance customer and programmer expertise makes it the most effective approach to software planning I've experienced.  However, if you wish to use another approach to planning, you can do so.  Talk with your mentor about how to make your preferred approach to planning work with the rest of the XP practices.</p>


<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/risk_management.html">Risk Management</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Chapter 8: Planning</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/the_planning_game.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-07-02T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T15:17:36Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/06/agile-quick-links-15.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/AqTfSOt2q3Q/agile-quick-links-15.html" rel="alternate" type="text/html"/>
    <title>Agile Quick Links #15</title>
    <summary>Its been a busy few months since I last did one of these. 
Whenever I collaborate on a presentation, article or some other activity where I can’t see the person I’m working with I use an online post it note tool (i.e. lino.it). Every tool I’ve used so far has some small annoying limitation so [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Its been a busy few months since I last did one of these. </p>
<p>Whenever I collaborate on a presentation, article or some other activity where I can’t see the person I’m working with I use an online post it note tool (i.e. lino.it). Every tool I’ve used so far has some small annoying limitation so I was recently happily surprised to discover <a href="http://www.edistorm.com/index.php" target="_blank">Edistorm</a> via @<a href="http://www.gerrykirk.net/4-online-tools-for-engaging-connecting-sharing-at-conferences-part-2-of-3/" target="_blank">GerryKirk</a> and <a href="http://blog.technicalmanagementinstitute.com/2010/04/edistorm-online-stickies-with-dot-voting-whee.html" target="_blank">Hillary Johnson</a>.</p>
<p>In “<a href="http://pillartechnology.com/blog/?p=101" target="_blank">Mechanical Agile</a>” Daryl Kulak tells five fictional (I hope) stories of teams went from be Agile to Fragile. Very funny as long as these are not your problems.</p>
<p>With “<a href="http://www.daxkonation.com/agile-not-just-for-software-development-anymore/" target="_blank">Agile: Not Just for Software Development Anymore</a>” April B. (<em>no last name</em>) described the transition of the DAXKO Association marketing team to Agile.</p>
<p>James Carr describes his experience “<a href="http://blog.james-carr.org/2010/06/10/using-innovation-games-as-retrospective-activities/">Using Innovation Games as Retrospective Activities</a>”. Interesting, I’m currently exploring Innovation Games so this comes at a timely juncture.</p>
<p>Roger Brown has two items this week: “<a href="http://www.agilecoachjournal.com/index.php/2010-06-28/training/adventures-in-accelerated-learning/" target="_blank">Adventures in Accelerated Learning</a>” which provides a couple of interesting and timely challenges. “<a href="http://www.infoq.com/articles/multitasking-problems" target="_blank">Multitasking Gets You There Later</a>”.</p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/AqTfSOt2q3Q" width="1"/></div>
    </content>
    <updated>2010-06-30T03:42:25Z</updated>
    <category term="Uncategorized"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/06/agile-quick-links-15.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Documentation-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Documentation-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Documentation" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>25 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>This week's practice from <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a> is <a href="http://jamesshore.com/Agile-Book/documentation.html">Documentation</a>. Documentation's role in Agile is often misunderstood. It's not completely abandoned, as some would have you believe, but it's not used in the same way as non-Agile projects, either. <a href="http://jamesshore.com/Agile-Book/documentation.html">See for yourself</a> how it works.

</p><p><a href="http://jamesshore.com/Blog/Agile-Friday-Real-Customer-Involvement-Now-Online.html">Last week's experiment</a> with asking for votes in the comments worked well. There were fewer votes, unsurprisingly (about a tenth as many), but I really liked the context people included with their votes. My site runs faster without the poll script bogging it down, too.</p>

<p>Next week's practice will come out of the <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Planning</a> chapter. The choices are:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/the_planning_game.html">The Planning Game</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/risk_management.html">Risk Management</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></li>
</ul>

<p>Which one would you like to see next week? Post your choice in the comments.</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Documentation-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-25T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T02:17:13Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/documentation.html</id>
    <link href="http://jamesshore.com/Agile-Book/documentation.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Documentation</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>25 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Chapter 8: Planning</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html">Collective Code Ownership</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Chapter 7: Releasing</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

<p>Projects use three main types of documents: work-in-progress; product; hand-off.</p>

<p>Work-in-progress documents communicate, and other forms of communication may replace them. High-bandwidth communication replaces some work-in-progress documents. Test-driven development creates executable low-level design specifications. Customer tests describe high-level behavior, and a ubiquitous language further clarifies intent.</p>

<p>Product documents have business value--schedule them with stories.</p>

<p>Handoff documents are best and most accurate at the end of the project. Set aside time after delivery to create them, and consider conducting an incremental handoff using pair programming and collective ownership.</p>

</blockquote>

<h3>Commentary</h3> 

<p><a href="http://jamesshore.com/Blog/The-Documentation-Myth.html">The Documentation Myth</a></p>

<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>


<h2>Documentation</h2>

<dl class="audience"><dt>Audience</dt><dd>Whole Team</dd></dl>

<p class="goal">We communicate necessary information effectively.</p>

<p>The word <em>documentation</em> is full of meaning.  It could mean written instructions for end-users, or detailed specifications, or an explanation of APIs and their use.  Still, these are forms of <em>communication</em>—that's the commonality.</p>

<p>Communication happens all the time in a project.  Some helps you get your work done; you ask a specific question, get a specific answer, and use that to solve a specific problem.  This is the purpose of <em>work-in-progress documentation</em>, such as requirements documents and design documents.</p>

<p>Other communication provides business value, as with <em>product documentation</em> such as user manuals and API documentation.  A third type—<em>handoff documentation</em>—supports the long-term viability of the project by ensuring that important information is communicated to future workers.</p>

<h3>Work-In-Progress Documentation</h3>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/ubiquitous_language.html">Ubiquitous Language</a></dd></dl><p>XP has the whole team sit together to promote the first type of communication.  Close contact with domain experts and the use of ubiquitous language create a powerful oral tradition that transmits information when necessary.  There's no substitute for face-to-face communication.  Even a phone call loses important nuances in conversation.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/test_driven_development.html">Test-Driven Development</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/customer_tests.html">Customer Tests</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/ubiquitous_language.html">Ubiquitous Language</a></dd></dl><p>XP teams also use test-driven development to create a comprehensive test suite.  When done well, this captures and communicates details about implementation decisions as unambiguous, executable design specifications that are readable, runnable, and modifiable by other developers.  Similarly, the team uses customer testing to communicate information about hard-to-understand domain details.  A ubiquitous language helps to further reveal the intent and purpose of the code.</p>

<p>The team does document some things, such as the vision statement and story cards, but these act more as reminders than as formal documentation.  At any time, the team can and should jot down any notes that help them do their work, such as design sketches on a whiteboard, details on a story card, or hard-to-remember requirements in a wiki or spreadsheet.</p>

<p>In other words, XP teams don't need traditional written documentation to do their work.  The XP practices support work-in-progress communication in other ways—ways that are actually more effective than written documentation.</p>

<h3>Product Documentation</h3>

<p>Some projects need to produce specific kinds of documentation to provide business value.  Examples include user manuals, comprehensive API reference documentation, and reports.  One team I worked with created code coverage metrics—not because they needed them, but because senior management wanted the report to see if XP would increase the amount of unit testing.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/the_planning_game.html">The Planning Game</a></dd></dl><p>Because this documentation carries measurable business value but isn't otherwise necessary for the team to do its work, schedule it in the same way as all customer-valued work: with a story.  Create, estimate, and prioritize stories for product documentation just as you would any other story.</p>

<h3>Handoff Documentation</h3>

<p>If you're setting the code aside or preparing to hand the project off to another team (perhaps as part of final delivery), create a small set of documents recording big decisions and information.  Your goal is to summarize the most important information you've learned while creating the software—the kind of information necessary to sustain and maintain the project.</p>

<p>Besides an overview of the project and how it evolved in design and features, your summary should include nonobvious information.  Error conditions are important.  What can go wrong, when might it occur, and what are the possible remedies?  Are there any traps or sections of the code where the most straightforward approach was inappropriate?  Do certain situations reoccur and need special treatment?</p>

<p>This is all information you've discovered through development as you've learned from writing the code.  In clear written form, this information helps to mitigate the risk of handing the code to a fresh group.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html">Collective Code Ownership</a></dd></dl><p>As an alternative to handoff documentation, you can gradually migrate ownership from one team to another.  Exploit pair programming and collective code ownership to move new developers and other personnel onto the project and to move the previous set off in phases.  Rather than a sharp break (or big thud) as one team's involvement ends and the other begins, the same osmotic communication that helps a team grow can help transition, repopulate, or shrink a team.</p>

<h3>Questions</h3>

<h4 class="faq">Isn't it a risk to reduce the amount of documentation?</h4>

<p>It could be.  In order to reduce documentation, you have to replace it with some other form of communication.  That's what XP does.</p>

<p>Increasing the amount of written communication also increases your risk.  What if that information goes out of date?  How much time does someone need to spend updating that documentation, and could that person spend that time updating the tests or refactoring the code to communicate that information more clearly?</p>

<p>The real risk is in decreasing the amount and accuracy of appropriate communication for your project, not in favoring one medium of communication.  Favoring written communication may decrease your agility, but favoring spoken communication may require more work to disseminate information to the people who need it.</p>

<h3>Results</h3>

<p>When you communicate in the appropriate ways, you spread necessary information effectively.  You reduce the amount of overhead in communication.  You mitigate risk by presenting only necessary information.</p>

<h3>Contraindications</h3>

<p>Alistair Cockburn describes a variant of Extreme Programming called "Pretty Adventuresome Programming":<sup>1</sup></p>

<p class="aside"><sup>1</sup><cite>http://c2.com/cgi/wiki?PrettyAdventuresomeProgramming</cite>, accessed 24 May 2007</p>

<blockquote>
 
 <p>A PrettyAdventuresomeProgrammer says:</p>
 
 <p>"Wow! That ExtremeProgramming stuff is neat! We almost do it, too! Let's see...</p>
 
 <p>"Extreme Programming requires:</p>
 
 <ul>
  <li><p>You do pair programming.</p></li>
  <li><p>You deliver an increment every three<sup>2</sup> weeks.</p></li>
  <li><p>You have a user on the team full time.</p></li>
  <li><p>You have regression unit tests that pass 100% of the time.</p></li>
  <li><p>You have automated acceptance tests which define the behavior of the system.</p></li>
</ul>
 
 <p>"As a reward for doing those,</p>
 
 <ul>
  <li><p>You don't put comments in the code.</p></li>
  <li><p>You don't write any requirements or design documentation.</p></li>
</ul>
 
 <p>"Now on this project, we're pretty close...</p>
 
 <ul>
  <li><p>well, actually a couple of our guys sit in the basement, a couple on the 5th floor, and a couple 2 hours drive from here, so we don't do pair programming,</p></li>
  <li><p>and actually, we deliver our increments every 4-6 months,</p></li>
  <li><p>we don't have users anywhere in sight,</p></li>
  <li><p>and we don't have any unit tests,</p></li>
</ul>
 
 <p>"<strong>but at least</strong> <em>we don't have any design documentation</em><sup>3</sup>, and we don't comment our code much! So in a sense, you're right, we're almost doing ExtremeProgramming!"</p>
 
 <p>Those people aren't doing XP, they are doing PAP [Pretty Adventuresome Programming]. PAP is using XP (in name) to legitimize not doing the things one doesn't want to do, without doing the XP practices that protects one from not doing the other things. E.g., changing the code all the time, but not writing unit tests; not writing documentation, but not writing clear code either. Not...(almost anything)... but not sitting close together. etc<sup>4</sup>.</p>
 
</blockquote>

<p class="aside"><sup>2</sup>Most teams now use one or two-week iterations.  I recommend one-week iterations for new teams; see <a href="http://jamesshore.com/Agile-Book/iteration_planning.html">Iteration Planning</a> in Chapter 8.</p>

<p class="aside"><sup>3</sup>Emphasis in original.</p>

<p class="aside"><sup>4</sup>Alistair later added, "I am interested in having available a sarcasm-filled derisively delivered phrase to hit people with who use XP as an excuse for sloppy, slap-dash development.  I, of all people, think it actually is possible to turn dials to different numbers [Alistair means that you don't have to go as far as XP does to be successful], but I have no patience with people who slap the XP logo on frankly sloppy development."</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></dd></dl><p>In other words, continue to create documentation until you have practices in place to take its place.  You have to be rigorous in your practice of XP in order to stop writing work-in-progress documentation.  Particularly important is a whole team (with all of the team roles filled—see <a href="http://jamesshore.com/Agile-Book/the_xp_team.html">The XP Team</a> in Chapter 3) that sits together.</p>

<p>Some organizations value written documentation so highly that you can't eliminate work-in-progress documents.  In my experience, these organizations usually aren't interested in trying XP.  If yours is like this, but wants to do XP anyway, talk with management about why those documents are important and whether XP can replace them.  Perhaps handoff documents are an acceptable compromise.  If not, don't eliminate work-in-progress documents.  Either schedule the documents with stories or include the cost of creating and updating documents in your estimates.</p>

<h3>Alternatives</h3>

<p>If you think of documents as <em>communication mechanisms</em> rather than printed paper, you'll see that there are a wide variety of alternatives for documentation.  Different media have different strengths.  Face-to-face conversations are very high bandwidth but can't be referenced later, whereas written documents are very low bandwidth (and easily misunderstood) but can be referred to again and again.</p>

<p>Alistair Cockburn suggests an intruiging alternative to written documents for handoff documentation: rather than creating a design overview, use a video camera to record a whiteboard conversation between an eloquent team member and a programmer who doesn't understand the system.  Accompany the video with a table of contents that provides timestamps for each portion of the conversation.</p>



<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Chapter 8: Planning</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html">Collective Code Ownership</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Chapter 7: Releasing</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/documentation.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-25T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-30T02:17:14Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Real-Customer-Involvement-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Real-Customer-Involvement-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Real Customer Involvement" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>18 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>I've released the full text of <a href="http://jamesshore.com/Agile-Book/real_customer_involvement.html">Real Customer Involvement</a> from <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a>.  I particularly like our discussion of the different types of software development in this one.</p>

<p>The provider I was using for doing polls (<a href="http://www.micropoll.com">Micropoll</a>, if you're interested) turned out to be unreliable, and I haven't found a good replacement. As a result, I won't be posting any more polls for upcoming chapters. Instead, please give your preferences in the comments.</p>

<p>Next week's practice comes from the <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Releasing</a> chapter. The choices are:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/version_control.html">Version Control</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/ten_minute_build.html">Ten-Minute Build</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></li>
	<li><a href="http://jamesshore.com/Agile-Book/documentation.html">Documentation</a></li>
</ul>

<p>Which one should I post next week? Speak up for your choice in the comments.</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Real-Customer-Involvement-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-18T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-23T08:17:29Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/real_customer_involvement.html</id>
    <link href="http://jamesshore.com/Agile-Book/real_customer_involvement.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Real Customer Involvement</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>18 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/ubiquitous_language.html">Ubiquitous Language</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/collaborating_intro.html">Chapter 6: Collaborating</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

	<p>To widen your perspective, involve real customers.  The best approach depends on your market.</p>
	
	<p>Personal development: you <em>are</em> the real customer.  Congratulations.  <span title="Or, more properly, 'Forth go, algorithms write and'">Go forth and write algorithms</span>.</p>
	
	<p>In-house custom development: turn your real customers into on-site customers.</p>
	
	<p>Outsourced custom development: get real customers to be on-site customers.  If you can't, stay in touch and meet face-to-face frequently.</p>
	
	<p>Vertical-market and horizontal-market software: beware of giving one customer too much control.  Appoint a product manager to understand customer needs.  Create opportunities to solicit feedback.  Examples: customer review board, beta releases, and user experience testing.</p>

</blockquote>

<h3>as haiku</h3>

<blockquote class="haiku">

	<p>roses, cucumbers--
	<br/>I chose beauty, but Sensei
	<br/>desires to eat</p>

</blockquote>

<h3>Commentary</h3>

<p><a href="http://jamesshore.com/Blog/The-Importance-of-Personal-Success.html">The Importance of Personal Success</a></p>

<h3>Poster</h3>

<a href="http://jamesshore.com/downloads/art-of-agile/project-community.pdf"><img alt="'Project Community' poster" class="framed" src="http://jamesshore.com/images/art-of-agile/project-community-thumb.jpg" width="200"/></a>
<p><a href="http://jamesshore.com/downloads/art-of-agile/project-community.pdf">Download</a> this poster!</p>

<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>


<h2>Real Customer Involvement</h2>

<dl class="audience"><dt>Audience</dt><dd>Coaches</dd><dd>Customers</dd></dl>

<p class="goal">We understand the goals and frustrations of our customers and end-users.</p>

<p>An XP team I worked with included a chemist whose previous job involved the software that the team was replacing.  She was an invaluable resource, full of insight about what did and didn't work with the old product.  We were lucky to have her as one of our on-site customers—thanks to her, we created a more valuable product.</p>

<p>In an XP team, on-site customers are responsible for choosing and prioritizing features.  The value of the product is in their hands.  This is a big responsibility—as an on-site customer, how do you know which features to choose?</p>

<p>Some of that knowledge comes from your expertise in the problem domain and with previous versions of the software.  You can't think of everything, though.  Your daily involvement with the project, although crucial, includes the risk of <em>tunnel vision</em>—you could get so caught up in the daily details of the project that you lose track of your real customers' interests.</p>

<p>To widen your perspective, you need to involve real customers.  The best approach to doing so depends on who you're building your software for.</p>

<h3>Personal Development</h3>

<p>In <em>personal development</em>, the development team is its own customer.  They're developing the software for their own use.  As a result, there's no need to involve external customers—the team <em>is</em> the real customer.</p>

<blockquote class="notetip">
 
 <p>I include this type of development primarily for completeness.  Most personal development is for small, throwaway applications that don't involve a full-blown XP team.</p>
 
</blockquote>

<h3>In-House Custom Development</h3>

<p><em>In-house custom development</em> occurs when your organization asks your team to build something for the organization's own use.  This is classic IT development.  It may include writing software to streamline operations, automation for the company's factories, or producing reports for accounting.</p>

<p>In this environment, the team has multiple customers to serve: the executive sponsor who <em>pays for</em> the software and the end-users who <em>use</em> the software.  Their goals may not be in alignment.  In the worst case, you may have a committee of sponsors and multiple user groups to satisfy.</p>

<p>Despite this challenge, in-house custom development makes it easy to involve real customers because they're easily accessible.  The best approach is to bring your customers onto the team—to turn your <em>real</em> customers into <em>on-site</em> customers.</p>

<p>To do so, recruit your executive sponsor or one of his trusted lieutenants to be your product manager.  He will make decisions about priorities, reflecting the desire of the executive sponsor to create software that provides value to the organization.</p>

<p>Also recruit some of the end-users of the software to act as domain experts.  As with the chemist in the introduction, they will provide valuable information about how real people use the software.  They will reflect the end-users' desire to use software that makes their jobs better.</p>

<blockquote class="notetip">
 
 <p>If your software has multiple sponsors or user groups, use the ideas in "Vertical Market Software," later in this chapter.</p>
 
</blockquote>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/iteration_demo.html">Iteration Demo</a></dd></dl><p>To avoid tunnel vision, the product manager and other on-site customers should solicit feedback from their colleagues by demonstrating some of the builds created for the iteration demo and discussing their plans for the future.</p>

<h3>Outsourced Custom Development</h3>

<p><em>Outsourced custom development</em> is similar to in-house development, but you may not have the connections that an in-house team does.  As a result, you may not be able to recruit real customers to act as the team's on-site customers.</p>

<p>Still, you should try.  One way to recruit real customers is to move your team to your customer's offices rather than asking them to join you at yours.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></dd></dl><p>If you can't bring real customers on to the team, make an extra effort to involve them.  Meet in person with your real customers for the first week or two of the project so you can discuss the project vision and initial release plan.  If you're located near each other, meet again for each iteration demo, retrospective, and planning session.</p>

<p>If you're far enough apart that regular visits aren't feasible, stay in touch with instant messaging and phone conferences.  Try to meet face-to-face at least once per month to discuss plans.  If you are so far apart that monthly meetings aren't feasible, meet at least once per release.</p>

<h3>Vertical-Market Software</h3>

<p>Unlike custom development, <em>vertical-market software</em> is developed for many organizations.  Like custom development, however, it's built for a particular industry and it's often customized for each customer.</p>

<blockquote class="coach">Be careful about giving real customers too much control over vertical-market software.</blockquote>

<p>Because vertical market software has multiple customers, each with customized needs, you have to be careful about giving real customers too much control over the direction of the product.  You could end up making a product that, while fitting your on-site customer's needs perfectly, alienates your remaining customers.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></dd></dl><p>Instead, your organization should appoint a product manager who understands the needs of your real customers impeccably.  His job—and it's a tough one—is to take into account all of your real customers' needs and combine them into a single, compelling vision.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/iteration_demo.html">Iteration Demo</a></dd></dl><p>Rather than involving real customers as members of the team, create opportunities to solicit their feedback.  Some companies create a <em>customer review board</em> filled with their most important customers.  They share their release plans with these customers and—on a rotating basis—provide installable iteration demo releases for customers to try.</p>

<p>Depending on your relationship with your customers, you may be able to ask your customers to donate real end-users to join the team as on-site domain experts.  Alternatively, as with the chemist in the introduction, you may wish to hire previous end-users to be your domain experts.</p>

<p>In addition to the close relationship with your customer review board, you may also solicit feedback through trade shows and other traditional sources.</p>

<h3>Horizontal-Market Software</h3>

<p><em>Horizontal-market software</em> is the visible tip of the software development iceberg: software that's intended to be used across a wide range of industries.  The rows of shrinkwrapped software boxes at your local electronics store are a good example of horizontal-market software.  So are many web sites.</p>

<p>As with vertical-market software, it's probably better to set limits on the control that real customers have over the direction of horizontal-market software.  Horizontal-market software needs to appeal to a wide audience and real customers aren't likely to have that perspective.  Again, an in-house product manager who creates a compelling vision based on all customers' needs is a better choice.</p>

<p>As a horizontal-market developer, your organization may not have the close ties with customers that vertical-market developers do.  Thus a customer review board may not be a good option for you.  Instead, find other ways to involve customers: focus groups, user experience testing, community previews, beta releases, and so forth.</p>

<blockquote class="notetip">
 
 <p>Web-based software, with its invisible deployment, offers a powerful option for involving real customers.  You can roll out minimalist features, mark them "beta", and watch customer reactions.  Another option, reportedly used by Amazon, is to deploy changes to a small percentage of visitors and observe how their usage patterns change.</p>
 
</blockquote>

<h3>Questions</h3>

<h4 class="faq">Who should we use as on-site customers be when we can't include real customers on the team?</h4>

<p>You organization should supply a product manager and domain experts.  See <a href="http://jamesshore.com/Agile-Book/the_xp_team.html">The XP Team</a> in Chapter 3.</p>

<h4 class="faq">We're creating a web site for our marketing department.  What kind of development is that?</h4>

<p>At first glance, this may seem like custom development, but because the actual audience for the web site is the outside world, it's closer to vertical-market or horizontal-market development.  The product manager should come from the marketing department, if possible, but you should also solicit the input of people who will be visiting the site.</p>

<h3>Results</h3>

<p>When you include real customers, you improve your knowledge about how they use the software in practice.  You have a better understanding of their goals and frustrations and you use that knowledge to revise what your produce.  You increase your changes of delivering a truly useful and thus successful product.</p>

<h3>Contraindications</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></dd></dl><p>One danger of involving real customers is that they won't necessarily reflect the needs of <em>all</em> your customers.  Be careful that they don't steer you towards creating software that's only useful for them.  Your project should remain based on a compelling vision.  Customer desires inform the vision and may even change it, but ultimately the product manager holds final responsibility for product direction.</p>

<p>End-users often think in terms of making their existing work better, rather than in terms of finding completely new ways of working.  For this reason, end-users should be <em>involved</em> but not <em>in control</em>.  If innovation is important to your project, give innovative thinkers—such as a visionary product manager or interaction designer—a prominent role on your team.</p>

<h3>Alternatives</h3>

<p>Real customer involvement is helpful but not crucial.  Sometimes the best software comes from people who have a strong vision and pursue it vigorously.  This software tends to be either completely new or a strong rethinking of existing products.</p>

<p>In the absence of real customer involvement, be sure to have a visionary product manager.  It's best if this person understands the domain well, but you can also hire domain experts to join the team.</p>

<p>Still, feedback from real customers is always informative, even if you choose to ignore it.  It's especially useful when you've deployed software to them; their reaction to working software gives you valuable information about how likely you are to reach the greatest levels of success.</p>


<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>

<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/ubiquitous_language.html">Ubiquitous Language</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/collaborating_intro.html">Chapter 6: Collaborating</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/real_customer_involvement.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-18T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-23T08:17:29Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-us">
    <id>http://www.codeodor.com/index.cfm/2010/6/16/Transformation-Over-Conditional-Execution/3206</id>
    <link href="http://www.codeodor.com/index.cfm/2010/6/16/Transformation-Over-Conditional-Execution/3206" rel="alternate" type="text/html"/>
    <title>Transformation Over Conditional Execution</title>
    <summary>It seems easy to add an if statement the first time you need to deal with a difference between legacy data and new data models. It's still easy the second and third times.
 
Certainly it's easier than transforming the legacy data to fit the new schema.
 
Induction doesn't hold though. At some point, it becomes a tangled mess of code that has to deal with too many conditions and your mental model of it turns into total disarray.
 
This is one case where laziness and instant gratification can steer you in the wrong direction. Avoid the spaghetti; just transform the ...</summary>
    <updated>2010-06-16T16:07:40Z</updated>
    <category term="Programming"/>
    <category term="Databases"/>
    <author>
      <name>Sammy Larbi</name>
    </author>
    <source>
      <id>http://www.codeodor.com/</id>
      <link href="http://www.codeodor.com/" rel="alternate" type="text/html"/>
      <link href="http://www.codeodor.com/rss/" rel="self" type="application/rss+xml"/>
      <subtitle>Posts about Ruby, Java, Coldfusion, OOAD, TDD, DSLs, and more (some not TLAs!)...</subtitle>
      <title>My Secret Life as a Spaghetti Coder</title>
      <updated>2010-07-30T15:16:12Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://martinfowler.com/bliki/TeamRoom.html</id>
    <link href="http://martinfowler.com/bliki/TeamRoom.html" rel="alternate" type="text/html"/>
    <title>Bliki: TeamRoom</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>A common thing you find in agile projects is that the development
  team sits in a single open team room. It was advocated early on in
  Extreme Programming and called out as one of primary practices in
  the second edition. Agilists favor a open team room as it promotes
  lots of informal and deep communication between people on the
  team.</p><img height="471" src="http://martinfowler.com/bliki/images/teamRoom/teamRoomBeijing.jpg" width="800"/>
<h3>Why</h3>
<p>Software development is an intense exercise in
    collaboration. An open space encourages regular conversations and
    interactions between people. You can see what everyone's doing and
    easily ask for help when you need to. Often you get serendipitous
    communication, where you overhear something that's really useful.</p><p>Hearing this, some people are concerned about noise, and would
    prefer private offices. In practice I find that teams don't find
    noise to be a serious issue. There's usually a hum of conversation
    going on, after all pair programming often accompanies this style
    of development. But the conversation isn't usually that
    distracting, particularly as you're focused on the conversation with
    your pair. I suspect the reason it's not that distracting is
    because the team has a common purpose around a collaborative
    activity. It isn't comparable to an open-plan office where
    everyone is doing something different.</p>
<h3>Tips for a good Team Room</h3>
<p>First make sure it is the right size for the team. While a team
    room should be open within itself, it should be closed to everyone
    else. In an ideal world you'd like flexible walls that can
    insulate one team from another, so an office consists of pods of
    teams. This is hard to do in practice. Our offices tend to be
    completely open, with little barriers between teams. This seems to
    work well-enough, although there are some complaints about the
    inter-team noise.</p><p>Pay attention to natural light. Humans are used to seeing the
    outside world, and all sorts of natural rhythms work off of
    light. So it's no surprise that people get very cranky if there
    isn't enough light about. I've spent plenty of days in enclosed
    conference rooms, and it certainly wears down my energy.</p><p>Provide enough space: about 50 square feet per person (4.5
    square meters for those on metric).</p><p>With the right kind of space the next key thing is to ensure
    that the team has control over that space. An important part of
    agile thinking is that the team is responsible for how it works,
    and how it organizes its space is part of that. Ideally you want a
    team to have complete control over their space, with freedom to
    configure it how they like and reconfigure it at will. Things
    should be done so it's easy to move things around, because during
    the project the team will need to change things as the project
    changes.</p>
<div class="photo" style="width: 400px;"><img height="290px" src="http://martinfowler.com/bliki/images/teamRoom/desk.jpg" width="400px"/>
<p>The purpose-built tables in our Beijing office have
    handy baskets for power and other cables.</p>
</div>
<p>An immediate consequence of this is to ditch any kind of
    modular furniture that requires a facilities group to move more than
    an inch. Most teams I see use simple tables, and you can certainly
    go cheap here.</p><p>The biggest hassle is wires - primarily for power and network
    access. Ideally you want these underfloor or overhead so that
    people can easily route wires to the tables, wherever the tables
    happen to be.</p><p>The place to spend money on furniture is for good quality
    chairs. Programmers spend a lot of time sitting, and any physical
    damage due to poor posture will have a direct effect on the team's
    productivity - so don't stint here. It may be that some people
    will want strange chairs, such as balls or kneeling chairs. Do
    your best to accommodate them.</p><p>Some people are big fans of tables that can be adjusted between
    a sitting and standing height, as they find that standing for a
    while helps with back pain. These are harder to find, but worth
    looking into if your team members need it. Back pain is a common
    issue, but everyone's pain (and treatment) is different.</p><p>You'll need lots of wall space, as agilists love their <a href="http://alistair.cockburn.us/Information+radiator">information
    radiators</a>. You want plenty of room for story walls,
    architectural diagrams, whatever people want to stick on the
    wall. A good bit of this wall space should be whiteboards so
    people can draw something whenever the mood takes them. Include
    some wheeled whiteboards. Make sure there's a digital camera
    around so people can easily record what's on the board. Now that
    displays are so cheap, consider getting some just for wall
    displays - this is particularly handy for dynamic displays such as
    build status. I've seen one team have projectors trained on a wall
    with various kinds of information displays.</p><p>The traditional layout is to have people working around clumps
    of desks. This gives you regular eye contact with the rest of your
    team. However I've heard many people sing the praises of the
    <a href="http://martinfowler.com/bliki/UPod.html">UPod</a>. </p><p>People will occasionally need some private space, so ensure
    there are one or two small conference rooms available, with
    telephones. These can be used for privacy or when there's a
    concern about distraction. A large meeting room that the team can
    gather in for meetings away from the working space is also
    handy. </p><p>I've always been a big proponent of lots of monitor
    space. Clever software with multiple virtual workspaces is a great
    feature, but nothing is faster than just moving your eyes. Every
    workstation should have a couple of 20 inch monitors as a bare
    minimum. My desk has a pair of 20 inch monitors for my Ubuntu
    machine and a 25 inch for my mac laptop. I don't think that's at
    all excessive.</p><p>Software development is inherently creative, so expect to see
    lots of baubly distractions. Toys are commonly found around our
    teams (as Neal Ford says: "every team needs a plastic
    kangaroo"). There are good cognitive reasons why this is valuable,
    it's all about keeping the brain stimulated and creative.</p><p>Similarly do provide easy access to snacks and drinks. This
    helps support informal, conversational breaks in the team
    area. It's hard to be creative when you have to pay for awful
    coffee.</p><p>If you're working with remote workers, make it easy to set up a
    video link. Indeed many teams like having permanent video links to
    any remote workers so you can always maintain that casual video
    contact.</p>
<h3>Useful Links</h3>
<ul><li><a href="http://www.infoq.com/articles/agile-team-room-wishlist">InfoQ
      summary</a> of things for a team room.</li><li>William Pietri describes a <a href="http://www.scissor.com/resources/teamroom/">team room he's
      used.</a></li><li>Bill Wake's <a href="http://www.xp123.com/xplor/room-gallery/index.shtml">gallery of
      team rooms and charts.</a></li><li>Rachel Davies's advice on <a href="http://agilecoach.typepad.com/agile-coaching/2010/05/building-an-agile-environment.html">building
      an agile environment</a>.</li><li>Joel Spolsky is perhaps the <a href="http://www.joelonsoftware.com/items/2008/12/29.html">best illustration</a> for using
      individual offices rather than a single team room.</li><li>Rajeev Singh's <a href="http://bizvalu.blogspot.com/2007/10/open-space-configuration-dawn-of-new.html">thoughts</a>
      on moving into this kind of team room at ThoughtWorks
      India.</li></ul><p>My thanks to my ThoughtWorks colleagues for helping compile
    this information.</p></div>
    </content>
    <updated>2010-06-14T13:31:00Z</updated>
    <category term="agile"/>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Energized-Work-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Energized-Work-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Energized Work" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>11 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p><a href="http://jamesshore.com/Agile-Book/energized_work.html">Energized Work</a> is this week's release from <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a>.</p>

<p>We're getting close to the end of the <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Thinking</a> chapter; <a href="http://jamesshore.com/Agile-Book/informative_workspace.html">Informative Workspace</a> is the only one remaining. It will be posted in five weeks, on July 16th. Next week will bring a practice from the <a href="http://jamesshore.com/Agile-Book/collaborating_intro.html">Collaborating</a> chapter. <a href="http://jamesshore.com/Blog/Agile-Friday-Spike-Solutions-Now-Online.html">The poll</a> is still open for that one.</p>

<p>The following week, June 25th, will feature a practice from the <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Releasing</a> chapter. Which one would be most useful to have online first?</p>


<p><em>Poll closed.</em></p>


<p>Here are the full results of the poll for this week's excerpt:</p>

<ul>
	<li><img alt="**" src="http://jamesshore.com/images/star.gif"/> <a href="http://jamesshore.com/Agile-Book/energized_work.html">Energized Work</a> - 62%</li>
	<li><a href="http://jamesshore.com/Agile-Book/informative_workspace.html">Informative Workspace</a> - 38%</li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Energized-Work-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-11T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-16T06:17:11Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/energized_work.html</id>
    <link href="http://jamesshore.com/Agile-Book/energized_work.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Energized Work</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>11 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/informative_workspace.html">Informative Workspace</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Chapter 5: Thinking</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

<p>Professionals do their best, most productive work when they're energized and motivated.  To achieve this, combine quality time away with focused attention while at work.</p>

<p>Go home on time every day.  Spend time with family and friends and engage in activities that take your mind off of work.  Eat healthy foods, exercise, and get plenty of sleep.</p>

<p>While at work, give it your full attention.  Silence your phone and turn off interruptions like email and instant messaging.</p>

<p>Support energized work by providing a compelling vision and creating achievable plans.  Shield team members from destructive organizational politics and useless meetings.</p>

</blockquote>

<h3>as haiku</h3>

<blockquote class="haiku">

<p>the cicadas sing--
<br/>tired, sore, I'm ready for
<br/>a perfect evening</p>

</blockquote>

<h3>Commentary</h3>

<p><a href="http://jamesshore.com/Blog/How-to-Turn-Smart-People-into-Ordinary-People.html">How to Turn Smart People into Ordinary People</a></p>

<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>



<h2>Energized Work</h2>

<dl class="audience"><dt>Audience</dt><dd>Coaches</dd><dd>Whole Team</dd></dl>

<p class="goal">We work at a pace that allows us to do our best, most productive work indefinitely.</p>

<p>I enjoy programming.  I enjoy solving problems, writing good code, watching tests pass, and especially removing code while refactoring.  I program in my spare time and sometimes even think about work in the shower.</p>

<p>In other words, I love my work.  Yet put me on a team with unclear goals, little collective responsibility, arguing, and infighting, and I'll wake up dreading going into work.  I'll put in my hours at the office, but I'll be tempted to spend my mornings reading email and my afternoons picking at code while surfing through marginally related technical websites.</p>

<p>We've all been in this situation.  Because we're professionals, we strive to produce quality work even when we feel demoralized.  Still, consider the times of greatest productivity in your career.  Do you notice a big difference when you wake up and feel blessed to go into work? Isn't it much more satisfying to leave on time at the end of the day, knowing that you accomplished something solid and useful?</p>

<p>XP's practice of <em>energized work</em> recognizes that, although professionals can do good work under difficult circumstances, they do their best, most productive work when they're energized and motivated.</p>

<h3>How to Be Energized</h3>

<blockquote class="coach">Go home on time.</blockquote>

<p>One of the simplest ways to be energized is to take care of yourself.  Go home on time every day.  Spend time with family and friends and engage in activities that take your mind off of work.  Eat healthy foods, exercise, and get plenty of sleep.  While you're busy with these other things, your brain will turn over the events of the day.  You'll often have new insights in the morning.</p>

<p>If quality time off is the yin of energized work, focused work is the yang.  While at work, give it your full attention.  Turn off interruptions such as email and instant messaging.  Silence your phones.  Ask your project manager to shield you from unnecessary meetings and organizational politics.</p>

<p>When the yin and yang mesh perfectly, you'll wake up in the morning well-rested and eager to start your day.  At the end of the day, you'll be tired—though not exhausted—and satisfied with the work you've done.</p>

<p>This isn't easy.  Energized work requires a supportive workplace and home life.  It's also a personal choice; there's no way to force someone to be energized.  However, you can remove roadblocks.</p>

<h3>Supporting Energized Work</h3>

<blockquote class="coach">Stay home when you're sick.  You risk getting other people sick, too.</blockquote>

<p>One of my favorite techniques as a coach is to remind people to go home on time.  Tired people make mistakes and take shortcuts.  The resulting errors can end up costing more than the work is worth.  This is particularly true when someone is sick; in addition to doing poor work, she could infect other people.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></dd></dl><p>Pair programming is another way to encourage energized work.  It encourages focus like no other practice I know.  After a full day of pairing, you'll be tired but satisfied.  It's particularly useful when you're not at your best: pairing with someone who's alert can help you stay focused.</p>

<p>It may sound silly, but having healthy food available in the workplace is another good way to support energized work.  Breakfast really is the most important meal of the day.  Mid-afternoon lows are also common.  Cereal, milk, vegetables, and energy snacks are a good choice.  Donuts and junk food, while popular, contribute to the mid-afternoon crash.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a></dd></dl><p>The nature of the work also makes a difference.  [McConnell 1996] reports that software developers are motivated to do good, intellectually challenging work.  Not every project can feed the poor or solve NP-complete problems, but a clear, compelling statement of why the product is important can go a long way.  Creating and communicating this vision is the product manager's responsibility.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/the_planning_game.html">The Planning Game</a></dd></dl><p>An achievable goal goes hand-in-hand with a compelling vision.  Nothing destroys morale faster than being held accountable for an unachievable goal.  The planning game addresses this issue by combining customer value with developer estimates to create achievable plans.</p>

<p>Speaking of plans, every organization has some amount of politics.  Sometimes, politics lead to healthy negotiation and compromising.  Other times, they lead to unreasonable demands and blaming.  The project manager should deal with these politics, letting the team know what's important and shielding them from what isn't.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/informative_workspace.html">Informative Workspace</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/reporting.html">Reporting</a></dd></dl><p>The project manager can also help team members do fulfilling work by pushing back unnecessary meetings and conference calls.  Providing an informative workspace and appropriate reporting can eliminate the need for status meetings.  In an environment with a lot of external distractions, consider setting aside core hours each day—maybe just an hour or two to start—during which everyone agrees not to interrupt the team.</p>

<p>Finally, jelled teams have a lot of energy.  They're a lot of fun, too.  You can recognize a jelled team by how much its members enjoy spending time together.  They go to lunch together, share in-jokes, and may even socialize outside of work.  Like energized work, you can't force jelling, but you can encourage it; many of XP's practices do so.  The classic work on this subject, [DeMarco &amp; Lister 1999]'s <cite>Peopleware</cite>, is well worth reading.</p>

<h3>Taking Breaks</h3>

<blockquote class="coach">Stop when you're making more mistakes than progress.</blockquote>

<p>When you're making more mistakes than progress, it's time to take a break.  If you're like me, though, that's the hardest time to stop.  I feel like the solution is just around the corner—even if it's been just around the corner for the last 45 minutes—and I don't want to stop until I find it.  That's why it's helpful for someone else to remind me to stop.  After a break or a good night's sleep, I usually see my mistake right away.</p>

<p>Sometimes a snack or walk around the building is good enough.  For programmers, switching pairs can help.  If it's already the end of the day, though, going home is a good idea.</p>

<p>You can usually tell when somebody needs a break.  Angry concentration, cursing at the computer, and abrupt movements are all signs.  In a highly collaborative environment, <em>going dark</em>—not talking—can also be a sign that someone needs a break.  When I notice a pair of programmers whispering to each other, I ask how long it's been since their last passing test.  I often get a sheepish reply, and that's when I remind them to take a break.</p>

<p>Suggesting a break requires a certain amount of delicacy.  If someone respects you as a leader, then you might be able to just tell him to stop working.  Otherwise, get him away from the problem for a minute so he can clear his head.  Try asking him to help you for a moment, or to take a short walk with you to discuss some issue you're facing.</p>

<h3>Questions</h3>

<h4 class="faq">What if I'm not ready to check in my code and it's time to go home?</h4>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/test_driven_development.html">Test-Driven Development</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></dd></dl><p>If you're practicing test-driven development and continuous integration, your code should be ready to check in every few minutes.  If you're struggling with a problem and can't check in, go home anyway.  Often the answer will be obvious in the morning.</p>

<p>Some teams revert (delete) code that doesn't pass all of its tests at the end of the day.  This sounds harsh, but it's a good idea: if you can't easily check in, you've gone far off track.  You'll do better work in the morning.  If you're practicing continuous integration well, the loss of code will be minimal and you'll still have learned from the experience.</p>

<h4 class="faq">I work in a startup and 40 hours just isn't enough.  Can I work longer hours?</h4>

<blockquote class="coach">If you dread going to work in the morning, you aren't energized.</blockquote>

<p>A startup environment often has a lot of excitement and camaraderie.  This leads to more energy and might mean that you can work long hours and still focus.  On the other hand, startups sometimes confuse long work hours with dedication to the cause.  Be careful not to let dedication override your good judgment about when you're too tired to make useful contributions.</p>

<h4 class="faq">We have an important deadline and there's no way to make it without putting our heads down and pushing through.  Do we set aside energized work for now?</h4>

<p>A sprint to the finish line might boost your energy.  There's nothing quite like a late-night codefest when the team brings in pizza, everybody works hard, all cylinders fire, and the work comes together at the last moment.  A great sprint can help the team jell, giving it a sense of accomplishing something in important in the face of adversity.  However...</p>

<blockquote class="coach">Extended overtime will not solve your schedule problems.</blockquote>

<p>Sprinting to the finish line is one thing; sprinting for miles is another.  Extended overtime will not solve your schedule problems.  In fact, it has serious negative consequences.  DeMarco calls extended overtime "an important productivity-reduction technique," leading to reduced quality, personnel burnout, increased turnover of staff, and ineffective use of time during normal hours [DeMarco 2002] (p. 64).</p>

<p>If you work overtime one week (whatever "overtime" means in your situation), don't work overtime again the next week.  If I see a team sprinting more than once or twice per quarter, I look for deeper problems.</p>

<h3>Results</h3>

<p>When your team is energized, there's a sense of excitement and camaraderie.  As a group, you pay attention to detail and look for opportunities to improve your work habits.  You make consistent progress every week and feel able to maintain that progress indefinitely.  You value health over short-term progress and feel productive and successful.</p>

<h3>Contraindications</h3>

<p>Energized work is not an excuse to goof off.  Generate trust by putting in a fair day's work.</p>

<p>Some organizations may make energized work difficult.  If your organization uses the number of hours worked as a yardstick to judge dedication, you may be better off sacrificing energized work and working long hours.  The choice between quality of life and career advancement is a personal one that only you and your family can make.</p>

<h3>Alternatives</h3>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></dd></dl><p>If your organization makes energized work difficult, mistakes are more likely.  Pair programming could help tired programmers stay focused and catch each other's errors.  Additional testing may be necessary to find the extra defects. If you can, add additional contingency time to your release plan for fixing them.</p>

<p>The extreme form of this sort of organization is the <em>death march</em> organization, which requires (or "strongly encourages") employees to work extensive overtime week after week.  Sadly, "Death march projects are the norm, not the exception." [Yourdon] (p. ix).</p>

<p>To add insult to injury, [DeMarco &amp; Lister 2003] (p. 161) weighs in: "In our experience, the one common characteristic among death-march projects is low expected value.  They are projects aimed at putting out products of monumental insignificance.  The only real justification for the death march is that with value so minuscule, doing the project at normal cost would clearly result in costs that are greater than benefits... if the project is so essential, why can't the company spend the time and money to do it properly?"</p>

<h3>Further Reading</h3>

<p><cite>Peopleware</cite> [DeMarco &amp; Lister 1999] is a classic work on programmer motivation and productivity.  It should be at the top of every software development manager's reading list.</p>

<p><cite>Rapid Development</cite> [McConnell 1996] has a chapter on "Motivation" with a nice chart comparing programmer motivations to the motivations of managers and the general population.</p>

<p><cite>Slack</cite> [DeMarco 2002] looks at the effects of extended overtime and overscheduling.</p>

<p><cite>Death March</cite> [Yourdon] describes how to survive a "death march" project.</p>


<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/informative_workspace.html">Informative Workspace</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Chapter 5: Thinking</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/energized_work.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-11T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-16T06:17:11Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:martinfowler.com,2010-06-08:Craigslist-Scam</id>
    <link href="http://martinfowler.com/snips/201006081041.html" rel="alternate" type="text/html"/>
    <title>Craigslist Scam</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Over the weekend I’ve had a few emails from people in response to <a href="http://www.craigslist.org/about/scams">scams on craigslist</a>. The scammer has been posting fake job adverts, using my name, for a driver or personal assistant. In case someone checks here I thought I should make it clear that I have never made any postings on craigslist and any postings you see there with my name are false.</p></div>
    </content>
    <updated>2010-06-08T14:41:00Z</updated>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Does-the-Pask-Award-Have-a-Future.html</id>
    <link href="http://jamesshore.com/Blog/Does-the-Pask-Award-Have-a-Future.html" rel="alternate" type="text/html"/>
    <title>Does the Pask Award Have a Future? You Tell Us.</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>06 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>There's a debate occurring on the Pask Award selection committee list. Should the Pask Award continue? We'd like to hear your thoughts.</p>

<p>The <a href="http://www.paskaward.org/">Gordon Pask Award</a> was instigated by <a href="http://www.exampler.com/blog/">Brian Marick</a> five years ago. He was concerned that the Agile movement was going to die out if the community didn't cultivate its next generation of leaders. At his urging, the Agile Alliance created the award and put substantial monetary resources behind it. Today, the award is given to two people each year who the selection committee believes have the potential to be future leaders in the Agile movement. The award goes to relative unknowns in hopes that the attention provided by the award will give their leadership potential a significant boost.</p>

<p>The award is not without controversy. Some people believe that the award is divisive. Others believe that it acts as an <a href="http://jamesshore.com/Blog/The-Stunning-Truth.html">extrinsic motivator</a>, hurting people's intrinsic motivation to lead. Some point to the apparent bias of the award, correctly noting that the committee has yet to recognize a woman, or saying that the committee is biased towards Extreme Programming practitioners, or towards consultants. The award is creating an <a href="http://en.wikipedia.org/wiki/Old_boy_network">old boy network</a>, they charge.</p>

<p>On the other hand, the award has succeeded in raising the community's awareness of thought leaders. People like Naresh Jain, Arlo Belshee, and Laurent Bossavit. If imitation is the sincerest form of flattery, then <a href="http://www.limitedwipsociety.org/2010/04/25/brickell-key-awards-recognizes-kanban-community-contributions/">David Anderson's comments</a> at the 2010 Lean Software and Systems Conference are gold indeed:</p>

<blockquote>
	<p>The Gordon Pask Award now in its 5th year has been shown to be a positive influence on the Agile
community. In turn, it has given its winners the status of "tenured professors" within the community. The winners are able to propose unfashionable, counter-intuitive or dissenting ideas and the community will respect their opinion and pay attention. As such, the Pask Award has been a force for inclusion and
diversity within the Agile community.</p>
</blockquote>

<p>As a past recipient of the award, I'm a member of the selection committee. The current program chair, J. B. Rainsberger, has posed a question: Should the award continue? I'd like to hear your thoughts. Is the Pask Award a positive force within the Agile community? Or has it outlived its usefulness? <a href="http://jamesshore.com/Blog/Does-the-Pask-Award-Have-a-Future.html#comments">Your comments</a> will tip the balance.</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Does-the-Pask-Award-Have-a-Future.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-06T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-09T07:17:06Z</updated>
    </source>
  </entry>

  <entry xml:lang="en-us">
    <id>http://www.codeodor.com/index.cfm/2010/6/5/How-to-get-your-EEE-Linux-Box-Up-and-Running/3205</id>
    <link href="http://www.codeodor.com/index.cfm/2010/6/5/How-to-get-your-EEE-Linux-Box-Up-and-Running/3205" rel="alternate" type="text/html"/>
    <title>How to get your EEE Linux Box Up and Running</title>
    <summary>I recently got the EEE Box "Nettop PC" (Linux version) and was surprised to find Red Flag Linux as the preinstalled flavor of choice.
My goal is to use it as a wireless NAS , but keep it both expandable with external drives and available for use in home automation .
 
 
    
 
 source code for r-house available via github 
  
 Skip to instructions 
 
Back to the Linux EEE Box: I didn't expect to have a problem (neither with the OS nor changing it), but the "User'   s Manual" came with instructions for Windows ...</summary>
    <updated>2010-06-05T05:15:39Z</updated>
    <category term="Miscellany"/>
    <category term="Tools"/>
    <category term="Hardware"/>
    <category term="Linux"/>
    <author>
      <name>Sammy Larbi</name>
    </author>
    <source>
      <id>http://www.codeodor.com/</id>
      <link href="http://www.codeodor.com/" rel="alternate" type="text/html"/>
      <link href="http://www.codeodor.com/rss/" rel="self" type="application/rss+xml"/>
      <subtitle>Posts about Ruby, Java, Coldfusion, OOAD, TDD, DSLs, and more (some not TLAs!)...</subtitle>
      <title>My Secret Life as a Spaghetti Coder</title>
      <updated>2010-07-30T15:16:12Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://martinfowler.com/bliki/iPad.html</id>
    <link href="http://martinfowler.com/bliki/iPad.html" rel="alternate" type="text/html"/>
    <title>Bliki: iPad</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I've not seen myself as an iFanboy. I didn't get an iPhone for
  ages after it came out, and only got one because it was the only way
  to upgrade my data plan to 3G. I use a mac, but I also have an
  Ubuntu desktop. But I have got an iPad, and I think it's a
  significant product.</p><img height="300" src="http://martinfowler.com/bliki/images/ipad.jpg" width="400"/><p>I knew I wanted one right from the announcement. A while ago I
  used my desktop for work and kept my laptop floating about the
  house. I liked that arrangement as it allowed me to get away from my
  desk for reading the web and doing email. But now that I use
  Keynote, Aperture, and Omnigraffle I need to use my Mac with a big
  screen. So my laptop is stuck on my desktop while I'm at home. To
  compensate I bought a cheap laptop. But using a laptop like this was always
  kludgy. The clam shell is awkward when I'm reading rather than
  typing. The low battery life means I try to keep plugged in as
  much as I can. So a few weeks ago I splashed out.</p>
<h3>The Good</h3>
<ul><li>The form factor and low weight makes it comfortable to use
      on a sofa.</li><li>There's enough battery life that I can forget about it as
      long as I charge it overnight.</li><li>The screen is gorgeous: bright, clear and sharp.</li><li>The touch UI is familiar (due to the iPhone) and works
      really well on a tablet device.</li><li>Reading books using the Kindle app works really well. I
      don't miss having a paper book and I appreciate the lighter
      weight.</li><li>Web surfing is mostly very good. I find myself using the
      news apps from BBC, New York Times and NPR a lot.</li><li>It's good for watching a movie. (The Netflix app could be
      really big here, although I haven't used it yet.) I appreciated
      the mix of reading and movie watching while flying back and
      forth to San Francisco in a middle seat; not to mention the fact
      that I used less than half my battery in the process.</li></ul>
<h3>The Bad</h3>
<ul><li>I worry about the lock-in when buying an electronic book. So
      far I'm thinking Amazon is less likely to lock me into a
      specific platform than iBooks. But I do worry that I'll have
      lots of books that I can't read any more some day.</li><li>Web-app sites, such as Google's, often don't work too
      well. For regular use they make good use of the difference
      between hover and click - and this doesn't work with the
      iPad. This pushed me to get an app for reading my news feeds,
      even though I like Google Reader.</li><li>Like with my Android phone and the iPhone, it's awkward to
      sync some text or html files from my other computers to my
      iPad. This is annoying as I like sharing information this
      way. Dropbox may be the answer, we'll see.</li><li>Hotels with restrictive wifi are a real pain. I want to work
      on my laptop with wifi and use that nice Netflix app on my
      iPad. Paying for wifi is bad enough, being unable to use it on
      multiple devices is awful.</li><li>While it's ok to look at my inbox, the mail app doesn't work
      well for threaded discussions on mailing lists.</li><li>I would really like to be able to change the font size in
      the web browser.</li></ul>
<h3>The Puzzling</h3>
<ul><li>Apple gets a lot of heat for being a curated software
      system, rather than the traditional open one. Given how much of
      my life I've lost to sorting out software incompatibilities I'm
      not sure whether to like curation of not. In any case the
      competition with Android and the like will prove
      interesting.</li></ul>
<h3>The Bottom Line</h3>
<p>After a few hours with the iPad, I realized that I was feeling
    a sensation I'd only remembered once before: back in 1995 when
    someone showed me the World Wide Web. There's no dramatic new
    technology, we've seen tablets before just as we'd seen hypertext
    before. But the overall package was game-changer. I don't know if
    the iPad will be The Device, but I do think that this kind of
    device will make huge difference to how we read and watch things
    in the future. I certainly need to work at making sure what I
    produce in the future is built with these kinds of devices in
    mind.</p></div>
    </content>
    <updated>2010-06-04T17:49:00Z</updated>
    <category term="writing"/>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Spike-Solutions-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Spike-Solutions-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Spike Solutions" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>04 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>In a surprise victory, <a href="http://jamesshore.com/Agile-Book/spike_solutions.html">Spike Solutions</a> won the poll for this week's excerpt from <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a>. I'm surprised because it was tied with <a href="http://jamesshore.com/Agile-Book/simple_design.html">Simple Design</a> and <a href="http://jamesshore.com/Agile-Book/refactoring.html">Refactoring</a> right up until the end, and those are much more fundamental practices. But <a href="http://jamesshore.com/Agile-Book/spike_solutions.html">Spike Solutions</a> is a nice little practice, and it's a quick read.</p>

<p>Here are the full results:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/incremental_requirements.html">Incremental Requirements</a> - 10%</li>
	<li><a href="http://jamesshore.com/Agile-Book/customer_tests.html">Customer Tests</a> - 14%</li>
	<li><a href="http://jamesshore.com/Agile-Book/refactoring.html">Refactoring</a> - 19%</li>
	<li><a href="http://jamesshore.com/Agile-Book/simple_design.html">Simple Design</a> - 19%</li>
	<li><img alt="**" src="http://jamesshore.com/images/star.gif"/> <a href="http://jamesshore.com/Agile-Book/spike_solutions.html">Spike Solutions</a> - 24%</li>
	<li><a href="http://jamesshore.com/Agile-Book/performance_optimization.html">Performance Optimization</a> - 10%</li>
	<li><a href="http://jamesshore.com/Agile-Book/exploratory_testing.html">Exploratory Testing</a> - 5%</li>
</ul>

<p>Next week's practice comes from the <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Thinking</a> chapter (<a href="http://jamesshore.com/Blog/Agile-Friday-Iteration-Planning-Now-Online.html">poll here</a>). The following week's excerpt is scheduled to come from the <a href="http://jamesshore.com/Agile-Book/collaborating_intro.html">Collaborating</a> chapter. Which one should I put up next?</p>


<p><em>Poll closed.</em></p>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Spike-Solutions-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-04T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-02T06:17:18Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/spike_solutions.html</id>
    <link href="http://jamesshore.com/Agile-Book/spike_solutions.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Spike Solutions</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>04 Jun 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/performance_optimization.html">Performance Optimization</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/incremental_design.html">Incremental Design</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Chapter 9: Developing</a></li>
</ul>


<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>

<h2>Spike Solutions</h2>

<dl class="audience"><dt>Audience</dt><dd>Programmers</dd></dl>

<p class="goal">We perform small, isolated experiments when we need more information.</p>

<p>You've probably noticed by now that XP values concrete data over speculation.  Whenever you're faced with a question, don't speculate about the answer—conduct an experiment!  Figure out how you can use real data to make progress.</p>

<p>That's what spike solutions are for, too.</p>

<h3>About Spikes</h3>

<p>A <em>spike solution</em>, or <em>spike</em>, is a technical investigation.  It's a small experiment to research the answer to a problem.  For example, a programmer might not know whether Java throws an exception on arithmetic overflow.  A quick ten-minute spike will answer the question.</p>

<blockquote><pre>  public class ArithmeticOverflowSpike {
      public static void main(String[] args) {
          try {
              int a = Integer.MAX_VALUE + 1;
              System.out.println("No exception: a = " + a);
          }
          catch (Throwable e) {
              System.out.println("Exception: " + e);
          }
      }
  }

  <em>No exception: a = -2147483648</em>

</pre></blockquote>

<blockquote class="notetip">
 
 <p>Although this example is written as a stand-alone program, small spikes such as this one can also be written inside your test framework.  Although they don't actually call your production code, the test framework provides a convenient way to quickly run the spike and report on the results.</p>
 
</blockquote>

<h3>Performing the Experiment</h3>

<p>The best way to implement a spike is usually to create a small program or test that demonstrates the feature in question.  You can read as many books and tutorials as you like, but it's my experience that nothing helps me understand a problem more than writing working code.  It's important to work from a practical point of view, not just a theoretical one.</p>

<p>Writing code, however, often takes longer than reading a tutorial.  Reduce that time by writing small, standalone programs.  You can ignore all the complexities necessary to write production code—just focus on getting something working.  Run from the command-line or your test framework.  Hardcode values.  Ignore user input, unless absolutely necessary.  I often end up with programs a few dozen lines long that run almost everything from <code>main()</code>.</p>

<blockquote class="coach">Spike solutions clarify technical issues by setting aside the complexities of production code.</blockquote>

<p>Of course, this approach means that you can't reuse this code in your actual production codebase, as you didn't develop it with your the normal discipline and care.  That's fine.  It's an <em>experiment</em>.  When you finish, throw it away, check it in as documentation, or share it with your colleagues, but don't treat it as anything other than an experiment.</p>

<blockquote class="notetip">
 
 <p>I discard the spikes I create to clarify a technical question (such as "Does this language throw an exception on arithmetic overflow?"), but generally keep the ones that demonstrate how to accomplish a specific task (such as "How do I send HTML email?").  I keep a separate <code>spikes/</code> directory in my repository just for these sorts of spikes.</p>
 
</blockquote>

<blockquote class="sidebar"><h3>Design Spikes</h3>
 
 <p>Sometimes you'll need to test some approach to your production code.  Perhaps you want to see how a design possibility will work in practice, or you need to see how a persistence framework will work on your production code.</p>
 
 <p>In this case, go ahead and work on production code.  Be sure to check in your latest changes before you start the spike and be careful not to check any of your spike code.</p>
 
</blockquote>

<h3>Scheduling Spikes</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></dd></dl><p>Most spikes are performed on the spur of the moment.  You see a need to clarify a small technical issue, and you write a quick spike to do so.  If the spike takes more than a few minutes, your iteration slack absorbs the cost.</p>

<p>If you anticipate the need for a spike when estimating a story, include the time in your story estimate.  Sometimes, you won't be able to estimate a story at all until you've done your research; in this case, create a spike story and estimate that instead (see <a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a> in Chapter 8).</p>

<h3>Questions</h3>

<h4 class="faq">Your spike example is terrible!  Don't you know that you should never catch <code>Throwable</code>? </h4>

<p>Exactly.  Production code should never catch <code>Throwable</code>, but a spike isn't production code.  Spike solutions are the one time that you can forget about writing good code and just focus on short-term results.  (That said, for larger spikes, you may find that code that's <em>too</em> sloppy is hard to work with and slows you down.)</p>

<h4 class="faq">Should we pair on spikes?</h4>

<p>It's up to you.  Because spikes aren't production code, even teams with strict pair programming rules (see <a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a>) don't require writing spikes in pairs.</p>

<p>One very effective way to pair on a spike is to have one person research the technology while the other person codes.  Another option is for both people to work independently on separate approaches, each doing their own research and coding, then coming back together to review progress and share ideas.</p>

<h4 class="faq">Should we really throw away the code from our spikes?</h4>

<p>Unless you think someone will refer to it again later, toss it.  Remember, the purpose of a spike solution is to give you the information and experience to know <em>how</em> to solve a problem, not to produce the code that solves it.</p>

<h4 class="faq">How often should we be doing spikes?</h4>

<p>Perform a spike whenever you have a question about if or how some piece of technology will work.</p>

<h4 class="faq">What if the spike reveals that the problem is more difficult than we thought?</h4>

<p>That's good; it gives you more information.  Perhaps the customer will reconsider the value of the feature, or perhaps you need to think of another way to accomplish what you want.</p>

<p>Once, a customer asked me for a feature I thought might work in a certain way, but my spike demonstrated that the relevant Internet standard actually prohibited the desired behavior.  We came up with a different design for implementing the larger feature.</p>

<h3>Results</h3>

<p>When you clarify technical questions with well-directed, isolated experiments, you spend less time speculating about how your program will work.  You focus your debugging and exploratory programming on the problem at hand rather than the ways in which your production code might be interacting with your experiment.</p>

<h3>Contraindications</h3>

<p>Avoid the temptation to create useful or generic programs out of your spikes.  Focus your work on answering a specific technical question, and stop working on the spike as soon as it answers that question.  Similarly, there's no need to create a spike when you already understand a technology well.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/test_driven_development.html">Test-Driven Development</a></dd></dl><p>Don't use spikes as an excuse to avoid disciplined test-driven development and refactoring.  Never copy spike code into production code.  Even if it is exactly what you need, rewrite it using test-driven development so that it meets your production code standards.</p>

<h3>Alternatives</h3>

<p>Spike solutions are a learning technique based on performing small, concrete experiments.  Some people perform these experiments in their production code, which can work well for small experiments (such as the arithmetic overflow example), but it increases the scope of possible error.  If something doesn't work as expected, is it because your understanding of the technology is wrong?  Is it due to an unseen interaction with the production code or test framework?  Standalone spikes eliminate this uncertainty.</p>

<p>For stories that you can't estimate accurately, an alternative to scheduling a spike story is to provide a high estimate.  This is risky, because some stories will take longer than your highest estimate, and some may not be possible at all.</p>

<p>Another option is to research problems by reading about the underlying theory and finding code snippets in books or online.  This is often a good way to get started on a spike, but the best way to really understand what's going on is to create your own spike.  Simplify and adapt the example.  Why does it work?  What happens when you change default parameters?  Use the spike to clarify your understanding.</p>


<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/performance_optimization.html">Performance Optimization</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/incremental_design.html">Incremental Design</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Chapter 9: Developing</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/spike_solutions.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-06-04T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-09T07:17:07Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/06/new-people-on-your-project.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/vu7gTkTNBxU/new-people-on-your-project.html" rel="alternate" type="text/html"/>
    <title>New People on Your Project</title>
    <summary>Your project schedule says that you will get 2 more team members this week and 3 more next month. How do you integrate them into the team? How do you bring them on board? How do you avoid slowdowns? In a word you can’t avoid the slowdown – adding new people to the project will [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><img align="right" alt="A man standing" src="http://www.sxc.hu/pic/m/m/mz/mzacha/1186837_a_man_standing.jpg" style="margin: 0px; display: inline;"/>Your project schedule says that you will get 2 more team members this week and 3 more next month. How do you integrate them into the team? How do you bring them on board? How do you avoid slowdowns? In a word you can’t avoid the slowdown – adding new people to the project will slow the existing team down.</p>
<p>On any project it will take from 2-4 months for the team to integrate a new person and recover from the slowdown:</p>
<ul>
<li>The person will need to be trained: In your code base, how your application works, what coding style is, how you application works, … </li>
<li>This person will disrupt the Teams Formation (see <a href="http://en.wikipedia.org/wiki/Tuckman%27s_stages_of_group_development" target="_blank">Tuckman’s model of team formation</a>) – this is an especially important cost when the team has already reached the performing stage. This happens because the new person alters communication paths and will force people to renegotiate relationships around the <strong>entire</strong> team. </li>
<li>The person will be a drag on the team requiring support to learn new tasks. </li>
<li>The person will increase the communication complexity (i.e. the number of communication paths) within the team. </li>
</ul>
<p>All of this leads us to discover <a href="http://en.wikipedia.org/wiki/Brooks's_law" target="_blank">Brook’s law</a>: “adding manpower to a late software project makes it later” (from the Mythical Man Month 1975, reprinted in 1995). The physics of people hasn’t changed in 35 years.</p>
<p>So what can you do to solve this problem?</p>
<ul>
<li>Say no – if its too late in the project – in many cases 4-5 months before release is too late. </li>
<li>Can’t say no consider what Project Udall (<a href="http://www.amazon.com/gp/product/0201498340?ie=UTF8&amp;tag=notesfromatoo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0201498340">Surviving Object-Oriented Projects</a> Alistair Cockburn, p20) did: Halt the big project, start a small project and add only the people who can contribute to its success to the new project. <em>While its expensive to have people sitting idle, it may be cheaper than having them slow the project down.</em> </li>
<li>Bring on all the new people at once so at least you pay the costs once in the life of the project as opposed one person at a time. </li>
<li>Create a new team staffed by the new people with one or two old timers. They won’t get very much done for a while, but at least they get in the way of the others. </li>
<li>Get them to help with the exploratory testing, with the focus being the stories that are being written in that Sprint of iteration. </li>
<li>Ask them to write or refactor some automated acceptance tests. </li>
<li>Get them to read and write Unit tests – start by reading existing Unit tests, after all these should explain the code. If they’re not already <a href="http://www.infoq.com/news/2009/07/Better-Unit-Tests" target="_blank">Good Unit Tests</a> then take the time to improve. If they’re good then do some small refactorings in the main code base – after you can trust your tests can’t you :-) </li>
<li>Ask them to <a href="http://agilepainrelief.com/notesfromatooluser/2007/12/pair-programmin.html" target="_blank">pair</a> with another developer </li>
</ul>
<p>Just remember adding more people to a project is a way of slowing your project down.</p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/vu7gTkTNBxU" width="1"/></div>
    </content>
    <updated>2010-06-03T21:49:00Z</updated>
    <category term="Agile"/>
    <category term="People"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/06/new-people-on-your-project.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:martinfowler.com,2010-06-03:Brazil-Visit</id>
    <link href="http://martinfowler.com/snips/201006030926.html" rel="alternate" type="text/html"/>
    <title>Brazil Visit</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>In a couple of weeks, I’ll be making my first trip to Brazil (and South America). I’ll arrive in Rio on Jun 13 and <a href="http://www.thoughtworks.com/design-de-software-rio">give a talk</a> there on the 14th. After that I’ll head over to Porto Alegre and hang out at our office until <a href="http://www.agilebrazil.com/2010/">Agile Brazil</a>, where I’ll be doing a Keynote. My Rio and Agile Brazil talks will be similar - in that I’ll be doing a <a href="http://martinfowler.com/bliki/SuiteOfTalks.html">suite of talks</a>, although I’ll probably not use the same suite in each place.</p></div>
    </content>
    <updated>2010-06-03T13:26:00Z</updated>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:martinfowler.com,2010-06-02:Continuous-Delivery-Book</id>
    <link href="http://martinfowler.com/snips/201006021426.html" rel="alternate" type="text/html"/>
    <title>Continuous Delivery Book</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table>

<tbody><tr style="vertical-align: top;">

<td><img height="216" src="http://martinfowler.com/continuousDelivery.jpg" width="163"/></td>

<td style="padding-left: 1em;">

<p>My signature series is actually getting two new books, as well as my
DSL book, there is a probably more important book on <a href="http://martinfowler.com/books.html#continuousDelivery">Continuous
Delivery</a>. The book is written by two long-time friends and colleagues
and talks about how to use deployment pipelines to get you that last
mile  from Continuous Integration to deployment</p>
<p>As well as the book I'll be doing some tutorials on Continuous
Delivery with Jez Humble over the next few months. Our first one is at
<a href="http://agile2010.agilealliance.org">Agile 2010</a>.  You
find more details about talks Jez is doing at <a href="http://continuousDelivery.com">continuousDelivery.com</a>.</p>

</td></tr></tbody></table></div>
    </content>
    <updated>2010-06-02T18:26:00Z</updated>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:martinfowler.com,2010-06-01:Final-Draft-of-DSL-book-on-RoughCut</id>
    <link href="http://martinfowler.com/snips/201006011727.html" rel="alternate" type="text/html"/>
    <title>Final Draft of DSL book on RoughCut</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>After sorting out the Final Draft for production, I rebuilt the <a href="http://my.safaribooksonline.com/9780132107549">rough-cut</a>, which is now live on the site.</p>

<p>The biggest change with the content of the Final Draft is that I have three new pattern chapters for external DSLs from my colleague Rebecca Parsons: Regex Table Lexer, Recursive Descent Parser, and Parser Combinator. I’ve also reworked the “Hello Antlr” topic into the Parser Generator pattern.</p></div>
    </content>
    <updated>2010-06-01T21:27:00Z</updated>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/05/confidentiality-yours-and-mine.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/ETkfocjfOcI/confidentiality-yours-and-mine.html" rel="alternate" type="text/html"/>
    <title>Confidentiality, Yours and Mine</title>
    <summary>A recent challenge has made me realize that some things I thought were implicit need to be made explicit.
Yours
If you hire me to do some coaching, training or any other work you can be assured that your name and company name will never appear in my blog, twitter or any other public place. The most [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><img align="left" alt="-Blank Notes-" src="http://www.sxc.hu/pic/m/s/sp/spekulator/996749_-blank_notes-.jpg" style="margin: 0px 5px 0px 0px; display: inline;"/>A recent challenge has made me realize that some things I thought were implicit need to be made explicit.</p>
<h3>Yours</h3>
<p>If you hire me to do some coaching, training or any other work you can be assured that your name and company name will never appear in my blog, twitter or any other public place. The most I will do is mention your name in private conversation. I will only violate this with your explicit permission i.e. we write an Experience Report for a conference. I will occasionally discuss issues that I see at a specific client in a general fashion, but you should find no specific mentions of your business. If you feel I’ve made a mistake contact me and I will correct it as quickly as possible.</p>
<h3>Mine</h3>
<p>If I hire you do some work on behalf of me or my business, I expect the same courtesy. I expect that all discussions whether over email, Campfire, IM, … are private and are between the originally agreed on parties. I don’t expect to see our discussions played out on your blog.</p>
<p>In general if we have a discussion privately over email (whether or not we have a business relationship) to be kept in the strictest of confidence.</p>
<p>If I discuss something on this blog or a <a href="http://agilepainrelief.com/notesfromatooluser/2009/06/agile-mailing-lists.html" target="_blank">mailing list, Yahoo/Google/LinkedIn groups</a> then feel free to quote me. If you’re feeling generous please tell (so I can respond) and link to this site.</p>
<p>The only gray area is twitter, while its fun, all the ideas I and anyone else express are context free. 140 chars is cute, but no more. If you want to quote or think my ramblings unclear please take the time to contact me, I will be delighted to clarify.</p>
<h3>The Problem</h3>
<p>I employed <a href="http://foliovision.com/2010/05/07/logo-worth-agile-pain-relief" target="_blank">foliovision</a> early this year to help:</p>
<ul>
<li>Port my old <a href="http://tooluser.typepad.com/" target="_blank">typepad</a> blog to Wordpress</li>
<li>Make some small changes to my <a href="http://themeforest.net/item/wooituts-advanced-community-theme/full_screen_preview/57718" target="_blank">WooTuits</a> theme two support two domains (the original notesfromatooluser.com and the new agilepainrelief.com)</li>
</ul>
<p>So far so good. They did that very well and made some other small changes as well. As it happens <a href="http://foliovision.com/2010/05/07/logo-worth-agile-pain-relief" target="_blank">foliovision</a> is also a design firm and they offered to design a logo for me. Naively I didn’t ask about price up front. Very quickly the price of the logo jumped to be approximately half as much again as the originally quoted price for the job. I asked them to stop work on the logo and on reflection realized that the pill they showed in front of the <a href="http://foliovision.com/2010/05/07/logo-worth-agile-pain-relief" target="_blank">logo</a> didn’t reflect my ethos. My approach to coaching and consulting isn’t swallow a pill and it isn’t one size fits all. I work in an adaptive, iterative fashion in keeping with the “Inspect and Adapt” principle of Agile. Instead I created my current logo: a person carrying a doctor’s bag because its closer to reflecting me.</p>
<p>I also promised the people at foliovision that I would eventually write a followup post to thank them for time and to recommend them to others. Unfortunately I haven’t gotten around to that.</p>
<p>Imagine my surprise when I noticed a <a href="http://foliovision.com/2010/05/07/logo-worth-agile-pain-relief" target="_blank">blog post</a> that mentioned me by name, discussed my business choices and denigrated my own logo. I contacted folivision to raise my concerns but they were dismissed. I would quote Alec’s remarks to me in private, but that would violate my promise above. Suffice it to say I can no longer recommend foliovision since you don’t know whether they will treat your discussions with any confidentiality.</p>
<p>To be clear I acknowledge that this site needs some design work, its on my backlog. At the end of the day I put more time and effort into helping clients, personal contact and writing. Less into the site itself. </p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/ETkfocjfOcI" width="1"/></div>
    </content>
    <updated>2010-06-01T02:10:25Z</updated>
    <category term="Business"/>
    <category term="Other"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/05/confidentiality-yours-and-mine.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Architecture-Review-Mock-Driven-Three-Layer-Architecture.html</id>
    <link href="http://jamesshore.com/Blog/Architecture-Review-Mock-Driven-Three-Layer-Architecture.html" rel="alternate" type="text/html"/>
    <title>Architecture Review: Mock-Driven Three-Layer Architecture</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>30 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>Last week, I posted an <a href="http://jamesshore.com/Blog/Architectural-Design-Challenge.html">Architectural Design Challenge</a>. <a href="https://code.google.com/p/jamesshorearcdesignchallenge/">Ralf Westphal</a> and <a href="http://github.com/jcbozonier/The-Jim-Shore-Architecture-Challenge">Justin Bozonier</a> were both good enough to respond with some intriguing approaches, and I hope to review their submissions soon. First, though, I wanted to establish a baseline implementation: a classic <a href="http://github.com/jamesshore/Architectural-Design-Challenge/tree/master/mocks/">mock-driven three-layer architecture</a>. (Those links all lead to source code.)</p>

<h3>The Mock-Driven Three-Layer Architecture</h3>

<p>I'm not a mockist (see the sidebar), so let's start with solid ground. A classic three-layer architecture consists of a User Interface layer, a Domain layer, and a Persistence layer. Each layer is only aware of the layer below it, so the UI layer talks to the domain layer, and the domain layer talks to the persistence layer.</p>

<p>Since the UI talks to the domain layer, not the persistence layer, the domain layer puts a domain-centric face on the persistence layer concepts. Although the persistence layer might provide methods like <code>insert()</code>, <code>update()</code>, and <code>query()</code>, the domain layer will hide those details behind methods like <code>save()</code> and <code>load()</code>.</p>

<p>The problem arises when you want to test this code. Naturally, when you test your persistence layer's <code>insert()</code>, <code>update()</code>, and <code>query()</code> methods, you'll want to make sure you're actually putting bits on a disk. It's central to what those methods do. But when you test your domain objects' <code>save()</code> and <code>load()</code> methods, you don't want to test all the way down to the actual database. Those bits are a pain to set up and tear down and they're slow, too. Orders of magnitude slower than testing memory.</p>

<p>Enter mock objects. Mock objects (combined with <a href="http://jamesshore.com/Blog/Dependency-Injection-Demystified.html">dependency injection</a>) allow you to replace real objects with objects that are just for testing. They check that you called the methods you planned and they return pre-specified values when necessary.</p>

<p>A <em>mock-driven</em> approach goes a few steps further. The mock-driven approach starts with an end-to-end test and works from the outside in. At first, all but the top layer is mocked out. At each step of the way, your test identifies the collaborators that need to be written next (which are implemented entirely with mocks, to start with). Each mock is successively replaced with a real implementation, which causes more collaborators to be identified, and so on until the code is finished. Proponents say that this approach makes the design smaller and simpler.</p>

<p>Let's see.</p>

<blockquote class="notetip">

	<h3>Truth in Advertising: I'm Not a Mockist</h3>
	
	<p>I don't actually use the mock-driven approach on my projects. When I first heard about mock objects in 2000, I used them heavily on one project, but they confused my colleagues and inhibited our refactoring efforts (in part because the tools back then weren't as good as they are today). I've chosen other approaches ever since. In <a href="http://martinfowler.com/articles/mocksArentStubs.html">Martin Fowler's terms</a>, I'm a classicist, not a mockist.</p>
	
	<p>I think I understand the mock-driven philosophy fairly well, but in tweeting about my preparations for this article, I got some disgruntled responses that implied I wasn't up-to-date. Nobody responded to my requests for specifics, though. Hopefully any major mistakes will be corrected in the comments.</p>
	
	<p>The definitive resource on the mock-driven approach is the recently-released <a href="http://www.growing-object-oriented-software.com/">Growing Object-Oriented Software, Guided by Tests</a>, by Steve Freeman and Nat Pryce. I haven't read the book yet, but the authors are the inventors of mock objects and leaders of the mock-driven school of thought. It's sure to be a good read.</p>

</blockquote>

<h3>The Critique</h3>

<p>You can find <a href="http://github.com/jamesshore/Architectural-Design-Challenge/tree/master/mocks/">the example code</a> referenced in this critique on Github. To critique the code, I'll use the criteria set out in my <a href="http://jamesshore.com/Blog/Architectural-Design-Challenge.html">design challenge</a>. To recap, I'll be judging the code based on test design, coupling and cohesion, simplicity, and "Quality Without a Name."</p>

<p class="aside">(I only did part one of the challenge for this example.)</p>

<h4>Test Design</h4>

<p><strong>Criteria:</strong></p>

<ul>
	<li>All code is tested. (See <a href="http://jamesshore.com/Agile-Book/test_driven_development.html">my book</a> for precise definitions of the terms <em>unit test</em>, <em>focused integration test</em>, and <em>end-to-end integration test</em>.)</li>
	<li>The test code is as high-quality as the production code.</li>
	<li>All business logic code (that is, the ROT13 code) is tested with <em>unit tests</em> that don't do any I/O.</li>
	<li>All integration code (that is, the file and console I/O) is tested with <em>focused integration tests</em> that validate that the I/O libraries each work as expected, independently of the rest of the system.</li>
	<li><em>End-to-end integration tests</em> (that is, tests that check the system as a whole) are kept to a minimum, or better still, entirely unneeded.</li>
</ul>

<p>With one major flaw, this architecture leads to excellent tests, thanks to the heavy use of mocks. Integration tests are only used where necessary and unit tests abound. Even exceptions are easily tested, as illustrated in <a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/_UITest.java">_UITest</a>:</p>



<p>There is that flaw, however. Because each object is only tested in relation to its close collaborators, and because mock objects are injected throughout the system, it's easy to create code that passes all of its tests but isn't actually wired together correctly for production use. I made that mistake while coding the example and didn't discover it until I wrote my end-to-end test.<sup>1</sup> In order to make sure everything is wired up correctly, good coverage with end-to-end tests is essential.</p>

<p class="footnote">(<sup>1</sup>The eagle-eyed reader will note that I didn't write my end-to-end test first, as is done in the mock-driven style. It's true: I didn't learn all of the details of the mock-driven style until most of the example was complete. The final result is equivalent, though, as far as I know.)</p>

<p>This is a significant flaw because end-to-end tests suffer several big problems: first, getting good test coverage requires a lot of tests. Second, end-to-end tests run very slowly. (A project I'm currently working on takes <em>five minutes</em> to run a single end-to-end test!) Third, end-to-end tests are expensive to maintain: they're complicated to set up and verify, and they tend to break when any part of the system's externally-visible behavior changes.</p>

<p><strong>Verdict:</strong> While the mock-driven approach leads to great unit and integration tests, this advantage is offset by a reliance on end-to-end tests.</p>

<h4>Coupling and Cohesion</h4>

<p><strong>Criteria:</strong></p>

<ul>
	<li>The code reflects the usage and the external behavior of the system more than it reflects the techniques used in coding, so that any concept (such as "loads and saves files" or "rot13") can be clearly related to specific code.</li>
	<li>Code related to a single concept is grouped together.</li>
	<li>Code for unrelated concepts (such as "rot13" and "file handling") is stored in separate locations.</li>
</ul>

<p>The mock-driven approach does a great job of separating concepts from implementation--to a fault, in fact, as we'll see when we look at simplicity. When it comes to keeping code decoupled, though, this architecture excels. Take a look at this partial list of classes:</p>

<ul>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/CommandLine.java">CommandLine</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/Configuration.java">Configuration</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/ConsoleDisplay.java">ConsoleDisplay</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/FileSystem.java">FileSystem</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/Rot13String.java">Rot13String</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/UI.java">UI</a></li>
</ul>

<p>Each class clearly relates to a specific concept, and the concepts are expressed in the language of the system rather than the language of the technology.</p>

<p>The architecture is pretty cohesive, too, with one Achilles' heel: it doesn't easily allow you to put static constructors on a class, because static methods can't be mocked out (as far as I know). Instead, the static methods must be put into a separate factory class.</p>

<p>For example, <code>Rot13String</code> has a <code>saveAs()</code> method that saves the current string to a file. You might expect it to have a static <code>load</code> method as well, perhaps like this:</p>



<p>That's a pretty nice idiom, but it doesn't work with the mock-driven approach. Instead, the load method is in a different class. In this case, the awkwardly named <code>Rot13StringFileSystemLoader</code>.</p>





<p><strong>Verdict:</strong> The mock-driven architecture is nicely decoupled and allows you to express your concepts cleanly. Cohesion isn't a problem either, with the exception that static methods have to be moved to a separate class.</p>


<h4>Simplicity</h4>

<p><strong>Criteria:</strong>

</p><ul>
	<li>Classes' public interfaces are clear and easy to understand.</li>
	<li>Individual lines of code read well.</li>
	<li>Boilerplate code is kept to a minimum.</li>
	<li>Lines of code are kept to a minimum.</li>
	<li>There is no code that anticipates part two of the challenge.</li>
</ul>

<p>Simplicity isn't this architecture's strong point. The mock-driven approach emphasizes using interfaces to express "roles"--and, in fact, the <a href="http://www.jmock.org/">JMock framework</a> used in my example will only mock interfaces. This leads to most classes requiring an associated interface--nearly doubling the number of files.</p>

<p>Remember that list of classes (above) that showed how nice and clean the concepts were? Here's the actual list:</p>

<ul>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/CommandLine.java">CommandLine</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/Configuration.java">Configuration</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/ConsoleDisplay.java">ConsoleDisplay</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/Display.java">Display</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/FileSystem.java">FileSystem</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/PersistenceMechanism.java">PersistenceMechanism</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/Rot13String.java">Rot13String</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/Rot13StringFileSystemLoader.java">Rot13StringFileSystemLoader</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/Rot13StringLoader.java">Rot13StringLoader</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/TransformableString.java">TransformableString</a></li>
	<li><a href="http://github.com/jamesshore/Architectural-Design-Challenge/blob/master/mocks/src/UI.java">UI</a></li>
</ul>
	
<p>Many of those files are completely content-free. Although they might be useful abstractions in the future, they're just not needed now. They're a maintenance burden. The role-based naming makes finding the real code harder and obscures the relationship between ham ("Rot13String") and spam ("TransformableString").</p>

<p>In fact, <code>Rot13String</code> is an example that's particularly bloated. It's turned into four classes (<code>Rot13String</code>, <code>TransformableString</code>, <code>Rot13StringFileSystemLoader</code>, and <code>Rot13StringLoader</code>) because the static <code>load()</code> method had to be moved to its own class and both classes needed an interface.</p>

<p>The interfaces also make it harder to create good public APIs for your classes. Because the interfaces are abstracted to roles, the methods must be abstracted, too. So instead of the descriptive <code>FileSystem.readFile()</code> or even <code>readAllTextFromFile()</code>, we have the vague <code>PersistenceMechanism.read()</code>.

</p><p>Creating mocks also takes several lines of boilerplate code. This is worse when combined with the three-layer architecture's approach of encapsulating the persistence layer behind the domain layer. Each domain object has a few single-line method calls that just delegate to another object. Each one takes half a dozen lines of test code. Here's an excerpt from <code>Rot13String</code>'s tests. This tests <em>two lines</em> of production code:



</p><p>In addition to requiring a lot of code, you can also see duplication with the production code. The first test above specifies that <code>saveAs()</code> will call <code>oneOf (_fileSystem).overwrite("filename", "abc")</code>. The production code is written as <code>_fileSystem.overwrite(filename, _string);</code>. There's not a lot of value-add in that test, especially when you consider that it's just wiring code--and production dependency errors aren't tested.</p>

<p>But wait, there's more: mocks use dependency injection heavily. That leads to a lot of boilerplate constructors that take a dependency injection parameter. This wasn't too bad in practice, although there was a funky bit of code to construct the graph of object dependencies in the top-level <code>UI</code> class constructor:</p>



<p><strong>Verdict:</strong> The clean separation of concerns and clear domain language is obfuscated by unneeded interfaces and premature abstraction. Tests can be oversized, particularly when simple delegation is involved, and sometimes duplicate the implementation. Dependency injection adds to the verbosity.</p>

<h4>Quality Without a Name</h4>

<p>The mock-driven three-layer architecture leads to some beautiful classes that reflect system concepts nicely. It's too bad those beautiful classes are mixed in with a bunch of noise.</p>

<p>In addition, the three-layer approach of hiding the persistence layer behind the domain layer doesn't work well with the limitations of the mock approach. It adds more dependency injection noise and the idiom of putting static constructors on the domain objects doesn't work at all. The methods that just delegate to the layer below require a lot of test code and provide little benefit in return.</p>

<p>Overall, this is a solid architecture with room for improvement. The great encapsulation of concepts makes up for a lot of flaws, and I suspect many of the noise issues fade into the background as the team gets used to their codebase.</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Architecture-Review-Mock-Driven-Three-Layer-Architecture.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-30T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-07-02T06:17:18Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://www.m3p.co.uk/?p=468</id>
    <link href="http://www.m3p.co.uk/blog/2010/04/25/not-a-charter-for-hackers/" rel="alternate" type="text/html"/>
    <link href="http://www.m3p.co.uk/blog/2010/04/25/not-a-charter-for-hackers/#comments" rel="replies" type="text/html"/>
    <link href="http://www.m3p.co.uk/blog/2010/04/25/not-a-charter-for-hackers/feed/atom/" rel="replies" type="application/atom+xml"/>
    <title xml:lang="en">Not a charter for hackers</title>
    <summary xml:lang="en">Just had to turn off comments since this post has become a spam target. Sorry. 

Update: Kent since tweeted this nice one-liner:
a complete engineer can code for latency or throughput and knows when and how to switch

Kent Beck’s excellent keynote at the Startup Lessons Learned Conference has been attracting some attention on The Interweb. In [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p><span style="font-size: 0.8em; font-style: italic;">Just had to turn off comments since this post has become a spam target. Sorry. </span></p>

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

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

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

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

<p>As Brian Marick <a href="http://www.exampler.com/blog/2010/04/04/about-business-value/">pointed out recently</a>, it’s about achieving more (much more) through relationships, not one side or another achieving dominance. </p></div>
    </content>
    <updated>2010-05-28T20:19:27Z</updated>
    <published>2010-04-25T07:55:05Z</published>
    <category scheme="http://www.m3p.co.uk" term="Organisations"/>
    <category scheme="http://www.m3p.co.uk" term="Software culture"/>
    <author>
      <name>steve.freeman</name>
      <uri>http://www.m3p.co.uk</uri>
    </author>
    <source>
      <id>http://www.m3p.co.uk/feed/atom/</id>
      <link href="http://www.m3p.co.uk" rel="alternate" type="text/html"/>
      <link href="http://www.m3p.co.uk/blog/feed/atom/" rel="self" type="application/atom+xml"/>
      <subtitle xml:lang="en">Working software daily</subtitle>
      <title xml:lang="en">Steve Freeman » Blog</title>
      <updated>2010-07-23T14:15:15Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Iteration-Planning-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Iteration-Planning-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Iteration Planning" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>28 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p><a href="http://jamesshore.com/Agile-Book/iteration_planning.html">Iteration Planning</a> is this week's excerpt from <a href="http://jamesshore.com/Agile-Book/">The Art of Agile Development</a>.</p>

<p>Next week brings another <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Developing</a> excerpt (<a href="http://jamesshore.com/Blog/Agile-Friday-Collective-Code-Ownership-Now-Online.html">poll here</a>) and the week after that loops us back around to the <a href="http://jamesshore.com/Agile-Book/thinking_intro.html">Thinking</a> chapter.  We're down to the last two practices in that chapter--which one should I post first?</p>

<p><em>Poll closed.</em></p>

<p>Here are the full results of the poll for this week's excerpt:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/vision.html">Vision</a> - 22%</li>
	<li><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a> - 11%</li>
	<li><a href="http://jamesshore.com/Agile-Book/the_planning_game.html">The Planning Game</a> - 11%</li>
	<li><a href="http://jamesshore.com/Agile-Book/risk_management.html">Risk Management</a> - 6%</li>
	<li><img alt="**" src="http://jamesshore.com/images/star.gif"/> <a href="http://jamesshore.com/Agile-Book/iteration_planning.html">Iteration Planning</a> - 28%</li>
	<li><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a> - 22%</li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Iteration-Planning-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-28T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-25T06:17:13Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/iteration_planning.html</id>
    <link href="http://jamesshore.com/Agile-Book/iteration_planning.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Iteration Planning</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>28 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/risk_management.html">Risk Management</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Chapter 8: Planning</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">
	
	<p>Iterations are timeboxed to one week and follow a strict schedule:</p>
	
	<ol>
		<li>Plan iteration</li>
		<li>Commit to delivering stories</li>
		<li>Develop stories</li>
		<li>Prepare release</li>
		<li>Demonstrate release</li>
		<li>Hold retrospective</li>
	</ol>
	
	<p>To plan, measure the velocity of the previous iteration (total the estimates of "done done" stories). Select stories from the release plan that match the velocity. It shouldn't take long.</p>
	
	<p>Assuming programmers are your constraint, they brainstorm and estimate engineering tasks. Ask the on-site customer about detailed requirements when necessary. Compare the task estimates to last iteration's to confirm the plan's feasability.</p>
	
	<p>Post the stories and tasks prominently and mark them when complete.</p>
	
</blockquote>

<h3>New Information</h3>

<p><a href="http://jamesshore.com/Blog/Kanban-Systems.html">Kanban Systems</a></p>


<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>

<h2>Iteration Planning</h2>

<dl class="audience"><dt>Audience</dt><dd>Whole Team</dd></dl>

<p class="goal">We stop at predetermined, unchangeable time intervals and compare reality to plan.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></dd></dl><p>Iterations are the heartbeat of an XP project.  When an iteration starts, stories flow in to the team as they select the most valuable stories from the release plan.  Over the course of the iteration, the team breathes those stories to life.  By the end of the iteration, they've pumped out working, tested software for each story and are ready to begin the cycle again.</p>

<p>Iterations are an important safety mechanism.  Every week, the team stops, looks at what it's accomplished, and shares those accomplishments with stakeholders.  By doing so, the team coordinates its activities and communicates its progress to the rest of the organization.  Most importantly, iterations counter a common risk in software projects: the tendency for work to take longer than expected.</p>

<h3>The Iteration Timebox</h3>

<p>Programming schedules die in inches.  At first you're on schedule:  "I'll be done once I finish this test."  Then you're limping. "I'll be done as soon as I fix this bug."  Then gasping.  "I'll be done as soon as I research this API flaw... no, really."  Before you know it, two days have gone by and your task has taken twice as long as you estimated.</p>

<p>Death by inches sneaks up on a team.  Each delay is only a few hours, so it doesn't feel like a delay, but they multiply across the thousands of tasks in a project.  The cumulative effects are devastating.</p>

<p>Iterations allow you to avoid this surprise.  Iterations are exactly one week long and have a strictly defined completion time.  This is a <em>timebox</em>: work ends at a particular time regardless of how much you've finished.  Although the iteration timebox doesn't <em>prevent</em> problems, it <em>reveals</em> them, which gives you the opportunity to correct the situation.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/iteration_demo.html">Iteration Demo</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></dd></dl><p>In XP, the iteration demo marks the end of the iteration.  Schedule the demo at the same time every week.  Most teams schedule the demo first thing in the morning, which gives them a bit of extra slack the evening before for dealing with minor problems.</p>

<h3>The Iteration Schedule</h3>

<p>Iterations follow a consistent, unchanging schedule:</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/iteration_demo.html">Iteration Demo</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/retrospectives.html">Retrospectives</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/ten_minute_build.html">Ten-Minute Build</a></dd></dl><ul>
  <li><p>Demonstrate previous iteration (up to half an hour)</p></li>
  <li><p>Hold retrospective on previous iteration (one hour)</p></li>
  <li><p>Plan iteration (half an hour to four hours)</p></li>
  <li><p>Commit to delivering stories (five minutes)</p></li>
  <li><p>Develop stories (remainder of iteration)</p></li>
  <li><p>Prepare release (less than ten minutes)</p></li>
</ul>

<blockquote class="coach">Choose an iteration start time that works for your team and stick with it.</blockquote>

<p>Many teams start their iterations on Monday morning and end Friday evening, but I prefer iterations that start on Wednesday morning.  This allows people to leave early on Friday or take Monday off without missing important events.  It also allows the team to conduct releases before the weekend.</p>

<h3>How to Plan an Iteration</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/done_done.html">"Done Done"</a></dd></dl><p>After the iteration demo and retrospective are complete, iteration planning begins.  Start by measuring the velocity of the previous iteration.  Take all of the stories that are "done done" and add up their original estimates.  This number is the amount of story points you can reasonably expect to complete in the upcoming iteration.</p>

<blockquote class="notetip">
 
 <p>Be sure to use <em>estimated</em> time, not actual time, when calculating velocity.  This allows the velocity to account for interruptions and other overhead.</p>
 
</blockquote>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></dd></dl><p>With your velocity in hand, you can select the stories to work on this iteration.  Ask your customers to select the most important stories from the release plan.  Select stories that exactly add up to the team's velocity.  You may need to split stories (see <a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a> later in this chapter) or include one or two less important stories to make the estimates add up perfectly.</p>

<blockquote class="notetip">
 
 <p>Avoid using the iteration planning meeting for extensive release planning.  Do the bulk of your release planning during the previous iteration.</p>
 
</blockquote>

<p>Because the iteration planning meeting takes stories from the front of the release plan, you should have already estimated and prioritized those stories.  As a result, selecting stories for the iteration plan should only take a few minutes, with perhaps ten or 15 minutes more to explain:</p>

<blockquote>
 
 <p>Product Manager: Okay, here we are again.  What is it this time?  Iteration 23?  <em>[Writes "Iteration 23" at top of the blank iteration planning whiteboard.]</em>  What was our velocity in the previous iteration?</p>
 
 <p>Programmer: <em>[Counts up stories.]</em> Fourteen, same as usual.</p>
 
 <p>Product Manager: <em>[Writes "Velocity: 14" on the whiteboard.]</em>  Okay, let's roll the release planning board in here.  <em>[Helps drag the planning board over, then points at it.]</em>  The other customers and I had some tough decisions to make after our recent release.  Our users love what we've been doing, which is good, and they're making all kinds of suggestions, which is also good, but some of their ideas could easily derail us, which is not so good.  Anyway, you don't need to worry about that.  Bottom line is that we're sticking with the same plan as before, at least for this next iteration.  So, let's see, 14 points... <em>[starts picking stories off of the release planning board]</em>  three... five... six, seven... ten... twelve... fourteen.  <em>[He puts them on the table.]</em>  All right, everybody, that's our iteration.  Good luck—I have to go talk with our division VP.  Mary's going to stick around to answer any questions you have about these stories.  I'll be back this afternoon if you need anything.</p>
 
 <p>Mary: Good luck, Brian.  <em>[The product manager leaves.]</em>  We've talked about these stories before, so I'll just refresh your memory...</p>
 
</blockquote>

<p>After you have chosen the stories for the iteration, everybody but the programmers can leave the meeting, although anybody is welcome to stay if she likes.  At least one customer should stick around to answer programmer questions and to keep an ear out for misunderstandings.</p>

<blockquote class="notetip">
 
 <p>The team's constraint determines how much the team can do in each iteration (see <a href="http://jamesshore.com/Agile-Book/xp_concepts.html">XP Concepts</a> in Chapter 3 for more about the Theory of Constraints).  This book assumes programmers are the constraint, so the iteration plan is based entirely on programmer tasks and estimates.  Other team members may conduct their own iteration planning sessions if they wish, but it isn't required.</p>
 
</blockquote>

<p>At this point, the real work of iteration planning begins.  Start by breaking the stories down into engineering tasks.</p>

<p><em>Engineering tasks</em> are concrete tasks for the programmers to complete.  Unlike stories, engineering tasks don't need to be customer-centric.  Instead, they're programmer-centric.  Typical engineering tasks include:</p>

<ul>
  <li><p>Update build script</p></li>
  <li><p>Implement domain logic</p></li>
  <li><p>Add database table and associated ORM objects</p></li>
  <li><p>Create new UI form</p></li>
</ul>

<p>Brainstorm the tasks that you need in order to finish all the iteration's stories.  Some tasks will be specific to a single story; others will be useful for multiple stories.  Focus only on tasks that are necessary for completing the iteration's stories.  Don't worry about all-hands meetings, vacations, or other interruptions.</p>

<blockquote class="notetip">
 
 <p>Some non-programming stories, such as a story to estimate a stack of other stories, can't be broken into tasks.  Re-estimate the story in terms of ideal hours (see <a href="http://jamesshore.com/Agile-Book/estimating.html">Estimating</a> later in this chapter) and leave it at that.</p>
 
</blockquote>

<p>Brainstorming tasks is a <em>design</em> activity.  If everybody has the same ideas about how to develop the software, it should go fairly quickly.  If not, it's a great opportunity for discussion before coding begins.  Although brainstorming engineering tasks is a design activity, you don't need to go into too much detail.  Each engineering task should take a pair one to three hours to complete.  (This translates into about two to six hours of estimated effort.)  Let pairs figure out the details of each task when they get to them.</p>

<p>As each team member has an idea for a task, he should write it down on a card, read it out loud, and put it on the table.  Everybody can work at once.  You'll be able to discard duplicate or inappropriate tasks later.</p>

<p>As you work, take advantage of your on-site customer's presence to ask about the detailed requirements for each story.  What do the customers expect when the story is done?</p>

<blockquote>
 
 <p>Amy, John, Kim, Fred, Belinda, and Joe continue planning.  Mary, one of the on-site customers, sits off to the side, working on some email.</p>
 
 <p>"Okay, here we are again," deadpans John, mimicking their product manager.</p>
 
 <p>Amy snickers.  "These stories look pretty straightforward to me.  Obviously, we need to implement new domain logic for each story.  This warehouse stocking story looks like it will affect the warehouse and SKU classes."  She takes an index card and writes, "Update warehouse and SKU classes for warehouse stocking."</p>
 
 <p>"Speaking of products, now that we're going to be storing the weight of each SKU, we need to update the SKU class for that, too," says Belinda.  She takes another card and writes, "Update SKU class to include weight."  She pauses to consider.  "Maybe that's too small to be a task."</p>
 
 <p>Joe speaks up.  "That weight story is mostly a UI change at this point.  We'll need to update the SKU configuration screen and the administration screen.  We can put weight into the SKU class at the same time."  He starts writing another task card.</p>
 
 <p>"Wait a second, Joe."  Mary, the on-site customer, looks up from her email.  "Did you say that the weight issue was only a UI change?"</p>
 
 <p>"That's right," says Joe.</p>
 
 <p>"That's not entirely true," says Mary.  "Although we mostly need to add the ability to enter weight into the system for later use, we do want it to show up on our inventory report."</p>
 
 <p>"Oh, good to know," says Joe.  He writes, "Update inventory report with SKU weight" on a task card.</p>
 
 <p>Kim and Fred have been talking off to the side.  Now they speak up.  "We've made some cards for the database changes we'll need this iteration," Kim says.  "Also, I think we need to update our build script to do a better job of updating schemas, so I wrote a task card for that, too."</p>
 
 <p>"Sounds good," says John.  "Now, I think these other stories also need domain logic changes...."</p>
 
</blockquote>

<p>After you've finished brainstorming tasks, spread them out on the table and look at the whole picture.  Are these tasks enough to finish all of the stories?  Are there any duplicates or overlaps?  Is anybody uncertain about how the plan works with the way the software is currently designed?  Discuss and fix any problems.</p>

<blockquote class="coach">Finish brainstorming before you start estimating.</blockquote>

<p>Next, estimate the tasks.  As with brainstorming, this can occur in parallel, with individual programmers picking up cards, writing estimates, and putting them back.  Call out the estimates as you finish them.  If you hear somebody call out an estimate that you disagree with, stop to discuss it and come to consensus.</p>

<p>Estimate the tasks in <em>ideal hours</em>.  How long would the task take if you had perfect focus on the task, suffered no interruptions, and could have the help of anybody on the team?  Estimate in person-hours as well: a task that takes a pair two hours is a four-hour estimate.  If any of the tasks are bigger than six hours of effort, split them into smaller tasks.  Combine small tasks that are less than an hour or two.</p>

<p>Finally, stop and take a look at the plan again.  Does anybody disagree with any of the estimates?  Does everything still fit together?</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></dd></dl><p>As a final check, add up the estimates and compare them to the total task estimates from your previous iteration.  Using this plan, can you commit to delivering all the stories?  Is there enough slack in the plan for dealing with unexpected problems?</p>

<blockquote class="notetip">
 
 <p>Comparing the total of your task estimates to last week's total will help you get a feel for whether the iteration is achievable.  The two numbers don't need to match exactly.</p>
 
 <p>Don't bother comparing your estimate to the actual number of hours you'll be working.  There are too many variables outside of your control, such as estimate accuracy, interruptions, and nonproject meetings, for there to be a useful corollation.</p>
 
</blockquote>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></dd></dl><p>You may discover that you aren't comfortable committing to the plan you have.  If so, see if there are any tasks you can remove or simplify.  Discuss the situation with your on-site customers.  Can you replace a difficult part of a story with something easier but equally valuable?  If not, split or remove a story.</p>

<p>Similarly, if you feel that you can commit to doing more, add a story to the plan.</p>

<p>Continue to adjust the plan until the team is ready to commit to delivering its stories.  With experience, you should be able to make plans that don't need adjustment.</p>

<h3>The Commitment Ceremony</h3>

<p><em>Commitment</em> is a bold statement.  It means that you're making a promise to your team and to stakeholders to deliver all of the stories in the iteration plan.  It means that you think the plan is achievable and that you take responsibility, as part of the team, for delivering the stories.</p>

<p>Hold a little ceremony at the end of the iteration planning meeting.  Gather the whole team together—customers, testers, and programmers—and ask everyone to look at the stories.  Remind everybody that the team is about to commit to delivering these stories at the end of the iteration.  Ask each person, in turn, if he can commit to doing so.  Wait for a verbal "yes".</p>

<blockquote class="coach">Openly discuss problems without pressuring anybody to commit.</blockquote>

<p>It's okay to say "no".  If anybody seems uncomfortable saying "yes" out loud, remind them that "no" is a perfectly fine answer.  If somebody does say no, discuss the reason as a team and adjust the plan accordingly.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/trust.html">Trust</a></dd></dl><p>Commitment is important because it helps the team consistently deliver iterations as promised, which is the best way to build trust in the team's ability.  Commitment gives people an opportunity to raise concerns before it's too late.  As a pleasant side effect, it helps the team feel motivated to work together to solve problems during the iteration.</p>

<h3>After the Planning Session</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></dd></dl><p>After you finish planning the iteration, work begins.  Decide how you'll deliver on your commitment.  In practice, this usually means that programmers volunteer to work on a task and ask for someone to pair with them.  As pairs finish their tasks, they break apart.  Individuals pick up new tasks from the board and form new pairs.</p>

<p>Other team members each have their duties as well.  XP assumes that programmers are the constraint in the system, so other team members rarely have a task planning board like the programmers do.  Instead, the customers and testers keep an eye on the programmers' progress and organize their work so it's ready when the programmers need it.  This maximizes the productivity of the whole team.</p>

<blockquote class="coach">Every team member is responsible for the successful delivery of the iteration's stories.</blockquote>

<p>As work continues, revise the iteration plan to reflect the changing situation.  (Keep track of your original task and story estimates, though, so you can use them when you plan the next iteration.)  Remember that your commitment is to deliver <em>stories</em>, not tasks, and ask whether your current plan will succeed in that goal.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/ten_minute_build.html">Ten-Minute Build</a></dd></dl><p>At the end of the iteration, release your completed software to stakeholders.  With a good ten-minute build, this shouldn't require any more than a button press and a few minutes' wait.  The following morning, start a new iteration by demonstrating what you completed the night before.</p>

<h3>Dealing with Long Planning Sessions</h3>

<p>Iteration planning should take anywhere from half an hour to four hours.  Most of that time should be for discussion of engineering tasks.  For established XP teams, assuming they start their iteration demo first thing in the morning, planning typically ends by lunchtime.</p>

<p>New teams often have difficulty finishing planning so quickly.  This is normal during the first several iterations.  It will take a little while for you to learn your problem space, typical approaches to design problems, and how best to work together.</p>

<p>If iteration planning still takes a long time after the first month or so, look for ways to speed it up.  One common problem is spending too much time doing release planning during the iteration planning meeting.  Most release planning should happen during the previous iteration, primarily among customers, while the programmers work on stories.  Picking stories for the iteration plan should be a simple matter of taking stories from the front of the release plan.  It should only take a few minutes because you won't estimate or discuss priorities.</p>

<blockquote class="notetip">
 
 <p>The team may have a few new stories as a result of stakeholder comments during the iteration demo.  In general, though, the customers should have already prioritized most of the stories.</p>
 
</blockquote>

<p>Long planning sessions also result from spending a lot of time trying to break the stories down into engineering tasks.  This may be a result of doing too much design work.  Although iteration planning <em>is</em> a design activity, it's a very high level one.  Most of the real design work will happen during the iteration as pairs work on specific tasks.  If you spend much time discussing possible design details, ask yourself whether you really need to solve these problems in order to come up with good engineering tasks.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html">Collective Code Ownership</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></dd></dl><p>If you find that team members don't understand the existing design, or if you have long discussions about how it works, you may lack shared design understanding.  Remedy this problem with collective code ownership and more pair programming.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/simple_design.html">Simple Design</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/test_driven_development.html">Test-Driven Development</a></dd></dl><p>If you find yourselves speculating about possible design choices, your problem may be a result of trying to make your design too general.  Remember to keep the design simple.  Focus on the requirements that you have today.  Trust pairs doing test-driven development to make good decisions on their own.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></dd></dl><p>Design speculation can also occur when you don't understand the requirements well.  Take advantage of the on-site customer in your meeting.  Ask him to explain the details of each story and why the system needs to behave in a particular way.</p>

<h3>Tracking the Iteration</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/informative_workspace.html">Informative Workspace</a></dd></dl><p>Like your release plan, your iteration plan should be a prominent part of your informative workspace.  Put your stories and tasks on a magnetic whiteboard, as shown in Figure.  When you start work on a task, take it off of the whiteboard and clip it to your workstation.  (Mark your initials on the whiteboard so people know where the task went.)  As you finish each task, put it back on the board and circle it with a green marker.</p>

<div style="text-align: center;">
 
 
 
 <p><img alt="figure (iterations__iteration_planning_board.png)" src="http://jamesshore.com/images/art-of-agile/figs/iterations__iteration_planning_board.png"/></p>
 
<p class="caption">Figure. Iteration Planning Board</p></div>

<p>One of the difficulties in iteration planning is identifying that things are going wrong in time to fix them.  I take a brief look at our progress every day.  Is there a task that's been in progress for more than a day?  It might be a problem.  If it's halfway through the iteration, are about half of the cards marked green?  If not, we might not finish everything on time.</p>

<p>After the iteration ends, take your cards down from the board, add a card on top with some vital statistics (iteration number, dates, whatever else you think is relevant), clip them together, and file them in a drawer.  Alternatively, you can just throw them away.  You're unlikely to come back to the cards, but most teams prefer archiving them just in case.</p>

<h3>When Things Go Wrong</h3>

<p>Does making a big deal out of commitment mean that you always deliver everything as promised?  No, of course not.  Commitment is about working around problems and doing what's necessary to deliver the iteration's stories—but sometimes a problem comes up that you can't work around.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></dd></dl><p>When you discover a problem that threatens your iteration commitment, first see if there's any way you can change your plan so that you still meet your commitments.  Would using some of your iteration slack help?  Is there an engineering task that you can simplify or postpone?  Discuss your options as a team and revise your plan.</p>

<p>Sometimes, the problem will be to big to absorb.  In this case, you'll usually need to reduce the scope of the iteration.  Typically, this involves splitting or removing a story.  As a team, discuss your options and make the appropriate choice.</p>

<blockquote class="notetip">
 
 <p>Always stay in control of your iteration, even if you have to change your plan to do so.  Any iteration that delivers all of the stories in the current plan—even you changed the plan—is a success.</p>
 
 <p>Under no circumstances, however, should you change the iteration deadline.</p>
 
</blockquote>

<p>After changing the plan, the customers should re-establish trust with stakeholders by explaining what happened, why, and what the team is doing to prevent this sort of problem in the future.</p>

<p>Despite your best efforts, you may have a bad week and end up with nothing at all to demonstrate to your stakeholders.  Some teams declare a <em>lost iteration</em> when this happens.  They roll back their code and use their previous velocity as if the lost iteration never happened.  Every team makes mistakes, so this is a fine approach if it happens rarely (less than once per quarter).  If it happens more often, something is wrong.  Ask your mentor for help.</p>

<h3>Partially Done Work</h3>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/done_done.html">"Done Done"</a></dd></dl><p>At the end of the iteration, every story should be "done done".  Partially-completed stories should be rare: they reflect a planning problem.  That said, they will happen occasionally, particularly when you're new to XP.</p>

<p>Some teams feel that the best way to handle partially-completed stories is to delete all of the code for uncompleted stories and deliver only what's completely done.  This sounds harsh, but it's a good idea.  "With true timeboxing, the software is either accepted or thrown away at the timebox deadline.  That makes it clear that the quality level must be acceptable at all times.  The success of timeboxing depends on being able to meet tight schedules by limiting the product's scope, not its quality." [McConnell, p.581]</p>

<blockquote class="coach">You may delete code, but you won't delete what you've learned.</blockquote>

<p>If you follow this practice, you probably won't throw away much code—the iteration is only a week long.  Starting fresh may require you to rewrite code, but you'll retain everything you learned when you wrote it the first time.  The second attempt will often produce better code and may even finish more quickly.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/version_control.html">Version Control</a></dd></dl><p>If you think this is extreme, as long as you know you will definitely work on that story during the next iteration, it's okay to keep the code.  However, if you will not <em>immediately</em> continue to work on that story, it's best to delete the code.  Get it out of your way.  It's technical debt and baggage.  If you ever need it, you can always get it out of version control.</p>

<h3>Emergency Requests</h3>

<p>It's inevitable.  You're on the third day of the iteration, everything is going well, and a customer comes up to you and says, "Pat, we really need to get this story in."  What do you do?</p>

<p>As a programmer, it's very tempting to tell your customer to take a hike—right over the edge of a cliff.  Changing direction in the middle of an iteration, after all, means an interruption in concentration, delays, and lost work.</p>

<p>On the other hand, responsiveness to business needs is a core agile value, so suppress that homicidal urge, smile, and provide your customer with options.</p>

<p>You can change the iteration schedule under the condition that you take out as much work as you add.  In other words, if you're adding a two-point story to the plan, a two-point story needs to come out of the plan.</p>

<p>In addition, you may only replace stories that you haven't started yet.  A two-point story that's half-done isn't a two-point story any more—but it's not a one-point story either.  It's too difficult to tell how much work you have left on a story until it's "done done", and replacing it will lead to technical debt in the form of half-finished code.</p>

<p>Before making any changes, however, remember that your next planning meeting is less than a week away.  Rather than inserting chaos into the team's work, ask yourself how much of an emergency you're really facing.  Maybe it can wait until the next planning meeting.  After all, it's only a day or three away.</p>

<h3>The Batman</h3>

<p>Dealing with an emergency request every now and then is fine—it's a great way for the team to be responsive.  On the other hand, an emergency in every iteration means that something is wrong.</p>

<p>After the second or third iteration in a row with an emergency request, take a look at what's happening.  Perhaps your on-site customers need to be more disciplined about release planning.  Perhaps stakeholders need stronger reminders that requests can wait until the next iteration.  Often the requests will die down as your organization adapts to the iteration heartbeat.</p>

<p>In some cases, however, the team has a legitimate need to provide ongoing support for ad hoc requests.  If this is true for your team, sacrifice a programmer to be the batman.</p>

<blockquote class="notetip">
 
 <p>Some teams have a dedicated phone for emergency support requests; this is, of course, the bat-phone.</p>
 
</blockquote>

<p>"Batman" is a military term as well as a comic book character: it refers to a soldier assigned to deal with chores so that officers can focus on officering.  On an XP team, the <em>batman</em> deals with organizational emergencies and support requests so the other programmers can focus on programmering.  The batman has no other duties: he doesn't work on stories or the iteration plan.</p>

<p>Rotate a new programmer into the batman role every iteration to prevent burn-out.  If the load is particularly high, you may need two or more batmen per iteration.</p>

<p>Depending on your situation, you may be better off using daily iterations rather than a batman.  A daily iteration allows you to postpone all emergencies until the next morning, which enables the team to focus better (see the "Daily Iterations" sidebar).  It's appropriate for teams that primarily deal with small ad-hoc issues, such as bug-fixes and minor enhancements, and don't have a long-term release plan.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/the_planning_game.html">The Planning Game</a></dd></dl><blockquote class="sidebar"><h3>Daily Iterations</h3>
 
 
 
 <p>If you have a particularly chaotic environment, you probably won't be able to use a lot of the XP practices.  However, iterations—particularly daily iterations—can be a great way to bring structure to this environment.</p>
 
 <p>One team I worked with was struggling under a crushing load of support requests.  They had resorted to <em>firefighting</em>: they responded to whichever request seemed like the biggest emergency.</p>
 
 <p>We instituted a simple daily iteration—nothing else—in which the team prioritized outstanding support requests using the planning game.  They deferred any new requests that came in during the day until the next planning game.  That was acceptable because the team planned every morning.</p>
 
 <p>The results were remarkable.  Productivity increased, morale shot up, and the team actually found itself with free time.  Daily iterations helped the team tame the chaos and, in so doing, dramatically improved their effectiveness.</p>
 
 <p>If you find yourself struggling with firefighting, daily iterations might help your team, too.</p>
 
</blockquote>

<h3>Questions</h3>

<h4 class="faq">How should we schedule time for fixing bugs?</h4>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/no_bugs.html">No Bugs</a></dd></dl><p>You should fix bugs as soon as you find them, preferably as you work on each task.  This time is part of the overhead of your iteration.  Don't batch them up for fixing later, even if "later" is as soon as the end of the iteration.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></dd></dl><p>Some bugs will be too big to absorb into your iteration slack.  Create story cards for these and schedule them as soon as possible—or decide that they aren't worth fixing at all.</p>

<h4 class="faq">If we don't estimate stories during iteration planning, when do we estimate stories?</h4>

<p>Estimate new stories as they appear throughout the iteration.  If this is too much of an interruption, batch up the stories and estimate them at a particular time every day.</p>

<p>If you have a lot of stories to estimate, as often happens near the beginning of a project, schedule time for estimation with a story.</p>

<h4 class="faq">All the available tasks depend on tasks that other pairs are working on right now.  What should I work on?</h4>

<p>This happens less frequently than you might think; breaking stories into engineering tasks helps modularize the design.  However, it does happen.</p>

<p>It's okay to have two pairs working on the same class.  In this case, discuss the issue and come to agreement about the names of the class and the public methods that both pairs will be using.  Then pick one pair to write the class.  The other pair creates the exact same class but, instead of writing real code, stubs in some hardcoded return values.</p>

<p>When you integrate, replace the fake class with the real one and make sure the tests still pass.</p>

<h4 class="faq">What should the batman do when there are no outstanding support requests?</h4>

<p>Whatever she likes, as long as she can easily put it aside when a support request comes in.  Don't try to squeeze every last drop of efficiency out of the batman; doing so will likely slow the team down and make the batman's job even more tedious.</p>

<h3>Results</h3>

<p>When you use iterations well, your team has a consistent, predictable velocity.  Stakeholders know what to expect from the team and trust that it will deliver on its commitments.  The team discovers mistakes quickly and deals with them while still meeting its commitments.  Rarely, the team meets its commitments by replanning, changing its commitments, and communicating these changes to stakeholders.</p>

<h3>Contraindications</h3>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/stories.html">Stories</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/simple_design.html">Simple Design</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/incremental_design.html">Incremental Design And Architecture</a></dd></dl><p>XP's iterations assume the use of customer-centric stories.  To successfully deliver software in such a short timescale, the team must use simultaneous phases as well as simple design and incremental design and architecture.  If you don't use these practices, XP-style iterations probably won't work for you.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></dd></dl><p>In order to achieve a consistent velocity and deliver on commitments, your iteration must include slack.  Never artificially inflate your velocity.  Similarly, don't use commitment as a club.  Never force team members to commit to a plan they don't agree with.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/energized_work.html">Energized Work</a></dd></dl><p>Energized work is also important.  Without it, the team will have trouble maintaining equilibrium and a stable velocity.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/release_planning.html">Release Planning</a></dd></dl><p>Finally, there's little value to a strict iteration schedule unless you pay close attention to the feedback cycles of velocity, planning, and frequent releases.  A disciplined iteration schedule may improve predictability and estimation, but you must notice and react to changes in order to take advantage of it.</p>

<h3>Alternatives</h3>

<p>Some methods use longer iterations that release to real customers, not just to internal stakeholders, at the end of each iteration.  Other methods use independent phases instead of simultaneous phases and iterations.  Either of these approaches can work, but most of XP's practices assume the presence of short iterations.  If you don't use XP-style iterations, talk with your mentor about whether XP will work in your situation.</p>

<p>Some established XP teams don't use engineering tasks at all.  Instead, they use very small stories that can each be finished in less than a day.  This approach works best for established products.  Other teams use engineering tasks but don't estimate them.  Either approach can work well, but they're advanced techniques.  I recommend explicitly creating and estimating engineering tasks to start.</p>

<h4>Iteration Length</h4>

<p>Throughout this book, I've assumed that your team uses one-week iterations.  However, iterations may be of any length.  Many teams prefer two-week iterations.</p>

<p>I've found that shorter iteration lengths are better for teams new to XP.  Teams seem to mature in their understanding of XP based on how many <em>iterations</em> they've undertaken rather than how many <em>weeks</em> they've experienced.  As a result, shorter iterations means more rapid improvement for a team new to XP.</p>

<p>Short iterations allow the team to practice core XP skills more frequently.  A short iteration leads to more planning, more internal releases, more iteration demos, and more retrospectives.  They reduce the team's ability to use overtime to cover up scheduling flaws, which helps the team learn to estimate and plan well.</p>

<p>One-week iterations also make decisions easier by reducing schedule risk.  If a discussion is taking too long, you can say, "This may not be perfect, but we'll review it again next week."  This makes planning and retrospectives easier.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/energized_work.html">Energized Work</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/refactoring.html">Refactoring</a></dd></dl><p>On the other hand, one-week iterations put more pressure on the team.  This makes energized work more difficult and can limit refactoring.  Velocity is less stable in one-week iterations, because even one holiday represents a big loss of time for the iteration.</p>

<p>I prefer one-week iterations for new teams.  For established teams that are comfortable with all of the XP practices, I prefer two-week iterations.  Two-week iterations are a little less stressful and lead to a more stable velocity.</p>

<p>Three and four-week iterations seem too long to me.  They don't provide enough feedback to the team or the larger organization.  However, if you think that a longer iteration would be useful for your team, please try it.  Be careful: longer iterations are more sensitive to mistakes, because it takes longer to expose and to recover from those mistakes.</p>

<blockquote class="coach">Shorten your iteration length if you're having trouble with XP.</blockquote>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/energized_work.html">Energized Work</a></dd></dl><p>Don't use longer iterations if you feel that you need more time to get your work done.  Longer iterations won't change the amount of time you have; they only change how often you check your progress.  If you have difficulty getting your work done, <em>shorten</em> your iteration length (to a minimum of one week) and look at what you're doing to support energized work.  Be sure to reduce your workload in each iteration proportionally.  Shortening your iteration length will reduce the amount of work you have to do each iteration and will help you identify problems in your process.</p>

<p>Some teams base their iterations on a number of business days rather than a calendar.  For example, rather than having a seven calendar-day iteration, the team's iterations are five business days long.  This is helpful for one-week iterations because it reduces the impact of holidays on the team's velocity.  However, I don't recommend business-day iterations because they're harder to schedule with stakeholders.  The regular heartbeat of the XP team is an excellent way to generate trust, and business-day iterations don't have the same impact.  It's nice to know that Wednesday is <em>always</em> the start of a new iteration.</p>

<h3>Further Reading</h3>

<p><cite>Agile Estimating and Planning</cite> [Cohn] and <cite>Planning Extreme Programming</cite> [Beck &amp; Fowler] each provide alternative ways of approaching iteration planning.</p>




<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/slack.html">Slack</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/risk_management.html">Risk Management</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Chapter 8: Planning</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/iteration_planning.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-28T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-25T06:17:14Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/05/agile-retrospectives.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/zasWPNq-TBE/agile-retrospectives.html" rel="alternate" type="text/html"/>
    <title>Agile Retrospectives</title>
    <summary>Continuous Improvement and Short Feedback loops (think: Test Driven Development; Sprint Demo/Review; …) are at the core of any Agile process. Without a structured improvement process it can be difficult for teams to improve and without improvement we stagnate. For methods like Scrum, XP and et al Retrospectives are that tool.
What is a Retrospective? [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://www.agilepainrelief.com/images/WindowsLiveWriter/AgileRetrospectives_FB41/teamwork2.jpg"><img align="left" alt="teamwork 2" border="0" height="240" src="http://www.agilepainrelief.com/images/WindowsLiveWriter/AgileRetrospectives_FB41/teamwork2_thumb.jpg" style="border-bottom: 0px; border-left: 0px; margin: 0px 5px 0px 0px; display: inline; border-top: 0px; border-right: 0px;" title="teamwork 2" width="192"/></a> Continuous Improvement and Short Feedback loops (think: Test Driven Development; Sprint Demo/Review; …) are at the core of any Agile process. Without a structured improvement process it can be difficult for teams to improve and without improvement we stagnate. For methods like Scrum, XP and et al Retrospectives are that tool.</p>
<p><strong>What</strong> is a Retrospective? It is a moment for the team to stop, breathe and take a break from the day to day grind. Its a chance to step back and reflect on the past iteration. To find things that worked well, things that need improvement and what the team has the energy to improve. </p>
<p>How do Retrospectives differ from Post Mortems (see <a href="http://www.cioupdate.com/reports/article.php/2202921/Post-Mortems-Key-to-Successful-Future-Projects.htm" target="_blank">CIO Update</a> and <a href="http://www.pragmaticsw.com/Newsletters/newsletter_2004_12_SP.htm" target="_blank">PragmaticSW</a>)? </p>
<ul>
<li>Post Mortems occur after the project is done (or even dead), when it’s too late to improve that project. </li>
<li>Post Mortems are long feedback loops, once per project might mean every 6-18 months </li>
<li>Post Mortems often generate nice reports that are placed on a shelf and ignored (also called write only documentation). </li>
<li>Post Mortems sometimes turn into blame and shame events. </li>
</ul>
<p>Well run retrospectives provide an opportunity for small improvements. The keys to a well run Retrospective:</p>
<ul>
<li><b><a href="http://www.retrospectives.com/pages/retroPrimeDirective.html" target="_blank">Retrospective Prime Directive</a></b> (Norman Kerth): “Regardless of what we discover, we understand and truly believe that everyone did the best job they could, given what they knew at the time, their skills and abilities, the resources available, and the situation at hand.” <em>The key here is to remind participants at the start of every retrospective this is not a blame and shame. Its about understanding what happened in the course of the last iteration. The focus is on events and not the people.</em> </li>
<li>A clear agenda – a simple one:
<ul>
<li>What happened in the last iteration (including what SMART goals did we achieve?) </li>
<li>What would like to celebrate/remember/… </li>
<li>What areas need improvement? </li>
<li>What do we have the energy to improve in the next two weeks? </li>
</ul>
</li>
<li>Clear Ground Rules see: <a href="http://agilepainrelief.com/notesfromatooluser/2008/08/meeting-ground-rules-updated.html" target="_blank">Meeting Ground Rules Updated</a> </li>
<li>An Open Mind from all team members with the focus on solutions and not the problems. </li>
<li><a href="http://www.ebgconsulting.com/newsarchive.php?pid=business-analysis-nov08#article" target="_blank">Appreciations</a> – just take a few minutes to share something that you really appreciate that someone else on the team did. <em>Interesting twist I just noticed that <a href="http://www.ebgconsulting.com/newsarchive.php?pid=business-analysis-nov08#article" target="_blank">Ellen Gottesdiener</a> puts appreciations at the beginning of her Retrospective. That’s very interesting, that will help put people in a positive frame of mind and make it easier to tackle the problems later. Elegant.</em> </li>
<li>Once you decide what you have the energy to tackle, set SMART Goals (Specific, Measurable, Attainable, Realistic/Relevant, Timely). See: <a href="http://www.goal-setting-guide.com/smart-goal-setting-a-surefire-way-to-achieve-your-goals" target="_blank">SMART Goal Setting</a>. In the context of an Agile/Scrum team I would always make timely less than two weeks, so that you check back in the next retrospective. </li>
<li>A great facilitator who is able to stay out of the conversation and maintain the flow. Bring an outsider in occasionally, just to see a different approach.</li>
<li>Mix-up your retrospective activities to maintain the energy and interest
<ul>
<li><a href="http://www.amazon.com/gp/product/0977616649?ie=UTF8&amp;tag=notesfromatoo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0977616649">Agile Retrospectives: Making Good Teams Great</a> by Diana Larsen and Esther Derby,</li>
<li><a href="http://blog.james-carr.org/2008/09/04/retrospective-patterns/" target="_blank">Timelines and Mad/Sad/Glad</a>:  (lots of other good retrospective ideas too) </li>
<li><a href="http://fairlygoodpractices.com/samolo.htm" target="_blank">SaMoLo</a> (Same of; More of; Less of)</li>
<li><a href="http://retrospectivewiki.org/index.php?title=Main_Page" target="_blank">Retrospective Wiki</a></li>
</ul>
</li>
</ul>
<p>Follow-up:</p>
<ul>
<li>Post your SMART goals on the team’s Information Radiator and check up on them in the Daily Scrum. </li>
<li>If you don’t make the improvements that people choose then Retrospectives will quickly lose their value as people say: “Nothing ever happens from these”. </li>
</ul>
<p><strong>When</strong>: At the end of every iteration or sprint. Allow one hour for every week of iteration. So a 1 week sprint would have 1 hr, 2 weeks a 2 hour retrospective. 3 weeks a 3 hour retrospective, 4 weeks – no one does those anymore right?</p>
<p><strong>Who</strong>: The whole team – I like to see (or hear) the Product Owner and the Scrum Master. Some people will tell you that the PO isn’t necessary. Fine, but if they’re not there they can’t help make things better.</p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/zasWPNq-TBE" width="1"/></div>
    </content>
    <updated>2010-05-28T01:56:29Z</updated>
    <category term="Agile"/>
    <category term="Agile FAQ"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/05/agile-retrospectives.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blog.gdinwiddie.com/?p=488</id>
    <link href="http://blog.gdinwiddie.com/2010/05/26/new-tips-and-advice-on-agile-toolkit/" rel="alternate" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/05/26/new-tips-and-advice-on-agile-toolkit/#comments" rel="replies" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/05/26/new-tips-and-advice-on-agile-toolkit/feed/atom/" rel="replies" type="application/atom+xml"/>
    <title xml:lang="en">New “Tips and Advice” on Agile toolkit</title>
    <summary xml:lang="en">Bob Payne has release another of our conversations.  This one take off from my post, 3 Legs to Standing Up an Agile Project.  This is your opportunity to hear Bob’s thoughts on these ideas.
Ooh, it’s got some stuff about including UX specialists in the development process. I’d forgotten talking about that.
     [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>Bob Payne has release <a href="http://agiletoolkit.libsyn.com/agile_tips_and_advice_index_cards_wave_of_the_past_present_and_future" target="_blank" title="The Agile Toolkit">another of our conversations</a>.  This one take off from my post, <a href="http://blog.gdinwiddie.com/2010/02/18/3-legs-to-standing-up-an-agile-project/" title="prior blog posting">3 Legs to Standing Up an Agile Project</a>.  This is your opportunity to hear Bob’s thoughts on these ideas.</p>
<p>Ooh, it’s got some stuff about including UX specialists in the development process. I’d forgotten talking about that.</p>
         <img alt="" src="http://blog.gdinwiddie.com/?ak_action=api_record_view&amp;id=488&amp;type=feed"/></div>
    </content>
    <updated>2010-05-27T03:49:53Z</updated>
    <published>2010-05-27T03:42:45Z</published>
    <category scheme="http://blog.gdinwiddie.com" term="Tools and Techniques"/>
    <author>
      <name>George Dinwiddie</name>
      <uri>http://blog.gdinwiddie.com/</uri>
    </author>
    <source>
      <id>http://blog.gdinwiddie.com/feed/atom/</id>
      <link href="http://blog.gdinwiddie.com" rel="alternate" type="text/html"/>
      <link href="http://blog.gdinwiddie.com/feed/atom/" rel="self" type="application/atom+xml"/>
      <subtitle xml:lang="en">Effective software development</subtitle>
      <title xml:lang="en">George Dinwiddie's blog</title>
      <updated>2010-07-11T18:09:16Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blog.gdinwiddie.com/?p=475</id>
    <link href="http://blog.gdinwiddie.com/2010/05/25/normally-id-relish-a-mention-on-infoq/" rel="alternate" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/05/25/normally-id-relish-a-mention-on-infoq/#comments" rel="replies" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/05/25/normally-id-relish-a-mention-on-infoq/feed/atom/" rel="replies" type="application/atom+xml"/>
    <title xml:lang="en">Normally, I’d relish a mention on InfoQ</title>
    <summary xml:lang="en">This article on InfoQ bothers me.  It seems to draw only from Dave Nicolette’s blog post and the subsequent comments.  Dave’s post is similar, in my mind, to a trip report that someone might give to an organization after a class or conference.  He goes into some detail about what happened at the first ever [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>This <a href="http://www.infoq.com/news/2010/05/reactions-first-csd-course" target="_blank" title="Reactions to the First Certified Scrum Developer Course by Vikas Hazrati">article on InfoQ</a> bothers me.  It seems to draw only from <a href="http://dnicolet1.tripod.com/agile/index.blog?entry_id=2020614" target="_blank" title="Looking back on the first Certified Scrum Developer course by Dave Nicolette">Dave Nicolette’s blog post</a> and the subsequent comments.  Dave’s post is similar, in my mind, to a trip report that someone might give to an organization after a class or conference.  He goes into some detail about what happened at the first ever Certified Scrum Developer course, and muses about what he learned.  The bulk of the comments are an interchange between Dave and Tobias Mayer where, it appears to me, Tobias doesn’t think that the course comes up to the standard of the CSM course.  This is, of course, based on Dave’s description, as Tobias wasn’t present at the course.</p>
<p>The InfoQ article mentions me by name, but doesn’t mention other participants other than Dave.  It also misquotes Dave [now edited without any indication of doing so], and implies that the learnings that Dave got out of our retrospective conversation after the course was a list agreed upon by both of us.  There was apparently no fact checking done on this article.  Certainly no one spoke with Ron Jeffries or with me about it.  I find the article misleading enough that I need to respond.</p>
<p>I had planned to write about the course, but this isn’t the article I’d planned.<span id="more-475"/></p>
<p>On Twitter, [a person who now wishes to be anonymous] took exception to Ron Jeffries’ comments on InfoQ and on Twitter about the article failing basic tenets of journalism.  [He] is an editor at InfoQ, but thinks that he (and Vikas) are not journalists.  Ryan Slobojan, Chief Editor at InfoQ, expressed a similar opinion in an email to me.</p>
<blockquote><p>I have no formal training as an editor, I’m not a journalist, and before I became Chief Editor in August 2009 I was doing it on the side in addition to my full-time job – this is a common pattern for all of our editors, and it’s how we end up with a diverse team of experts from (literally) all over the world.</p></blockquote>
<p>I have important information for both [Anonymous] and Ryan.  They <em>are</em> journalists, whether they have trained to be, or think of themselves as journalists, or not.  They are participating in the business of “<a href="http://www.merriam-webster.com/dictionary/journalism" target="_blank" title="Merriam-Webster dictionary">the collection and editing of news for presentation through the media</a>.”  The fact that they do not realize that’s what they do, that they have not trained themselves in the basics of journalism, and that they sometimes do it badly, doesn’t change the fact that they are journalists.</p>
<p>In a way, that brings us full-circle on the developer training/certification/craftsmanship issue.  It’s not only developers that can benefit from a certification class to give them some basic knowledge.  When Ron mentioned “Journalism 101″ he was talking about that very thing.  Neither Ron (I checked my facts) nor I have a degree or certificate in journalism.  Clearly, though, we both think that there are some journalistic standards that should be observed.</p>
<p>The difference between our viewpoint and that of [Anonymous] and Ryan reminded me of Jerry Weinberg’s classification of software development organization cultures (taken from page 9 of Quality Software Management: First Order Measurement)</p>
<blockquote><p>0. <strong>Oblivious</strong>: “We don’t even know that we’re performing a process.”<br/>
1. <strong>Variable</strong>: “We do whatever we feel like at the moment.”<br/>
2. <strong>Routine</strong>: “We follow our routines (except when we panic).”<br/>
3. <strong>Steering</strong>: “We choose among our routines by the results they produce.”<br/>
4. <strong>Anticipating</strong>: “We establish routines based on our past experience with them.”<br/>
5. <strong>Congruent</strong>: “Everyone is involved in improving everything all the time.”</p></blockquote>
<p>It occurs to me that these same levels can be applied to individual software developers, to journalists, and to publishers.  [Anonymous] and Ryan are journalists at level 0; they don’t know they’re performing journalism.  I’m perhaps at level 1 or 2 in journalism.  Perhaps that’s enough for the depth of my involvement with journalism.</p>
<p>Software developers sometime do not realize that’s what they are, also.  Consider the case of the businessman who tweaks his spreadsheet.  He’s writing software, but doesn’t think of it that way.</p>
<p>In Ron and Chet’s CSD class premier, I would expect that everyone who participated generally operates at level 4 or 5.  Even such knowledgeable and experienced practitioners, however, can panic under time pressure. It takes time to calmly evaluate a situation and make a decision.  It takes more time to do so as a team.  If you fail to take that time, your decisions will suffer from the lack of evaluating enough of the situation.  I think that’s <em>one</em> of the <em>many</em> things that was going on in that class.</p>
<p>As I said, this is not the article I’d intended to post about the class.  That article will have to be written another day.  I think this one has some value, too–value far beyond the disclaimer that Vikas Hazrati’s article is not a valid representation of the CSD class.</p>
<p>I’ll still try to find the time to write that article.  In the mean time, <strong>if you’re writing software, I think you’ll find value in the CSD class</strong>.  If you’re reporting the news, I think you’ll find value in learning a little about journalism.</p>
         <img alt="" src="http://blog.gdinwiddie.com/?ak_action=api_record_view&amp;id=475&amp;type=feed"/></div>
    </content>
    <updated>2010-05-27T01:08:45Z</updated>
    <published>2010-05-26T03:41:10Z</published>
    <category scheme="http://blog.gdinwiddie.com" term="Individuals and Interactions"/>
    <category scheme="http://blog.gdinwiddie.com" term="certification"/>
    <category scheme="http://blog.gdinwiddie.com" term="Craftmanship"/>
    <author>
      <name>George Dinwiddie</name>
      <uri>http://blog.gdinwiddie.com/</uri>
    </author>
    <source>
      <id>http://blog.gdinwiddie.com/feed/atom/</id>
      <link href="http://blog.gdinwiddie.com" rel="alternate" type="text/html"/>
      <link href="http://blog.gdinwiddie.com/feed/atom/" rel="self" type="application/atom+xml"/>
      <subtitle xml:lang="en">Effective software development</subtitle>
      <title xml:lang="en">George Dinwiddie's blog</title>
      <updated>2010-07-11T18:09:16Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:martinfowler.com,2010-05-26:DSL-Book-now-at-Final-Draft</id>
    <link href="http://martinfowler.com/snips/201005261418.html" rel="alternate" type="text/html"/>
    <title>DSL Book now at Final Draft</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I’ve now reached another significant step in my DSL book: Final Draft. This is the moment when I declare that I’m done with my content and release it to production. Copy-editing will begin soon, as well indexing, and various other sundry task to turn final text into a book ready to go to the printers.</p>

<p>It doesn’t mean that I’m completely done with the book. I will have to review the copy edits to ensure they are OK. I will also be working intimately with the production process, helping to improve the output for Safari Books Online and assisting the print production. I’ll also fix any errors spotted in the content, such as from people commenting on the <a href="http://my.safaribooksonline.com/9780132107549">rough-cut</a>.</p>

<p>But the important step is that I’m done with the major thinking. I can’t do any big work on the content now unless it’s an emergency, so I’ll only be tidying up little things. I feel a sense of relief, a knowledge that it’s time to let the book go.</p></div>
    </content>
    <updated>2010-05-26T18:18:00Z</updated>
    <source>
      <id>http://martinfowler.com/feed.atom</id>
      <author>
        <name>Martin Fowler</name>
        <email>fowler@acm.org</email>
        <uri>http://martinfowler.com</uri>
      </author>
      <link href="http://martinfowler.com/feed.atom" rel="self" type="application/atom+xml"/>
      <link href="http://martinfowler.com" rel="alternate" type="text/html"/>
      <subtitle>Master feed of news and updates from martinfowler.com</subtitle>
      <title>Martin Fowler</title>
      <updated>2010-07-29T13:58:00Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://me.andering.com/?p=788</id>
    <link href="http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/" rel="alternate" type="text/html"/>
    <title>I didn’t know it was hard</title>
    <summary>During the debrief of Steve Freeman’s Paradigms  of Programming: Hands On workshop an interesting side discussion emerged about the origins of object oriented programming. Steve’s quote of Ivan Sutherland struck a chord:
Ivan Sutherland invented the graphical user interface and the lightpen, as well as object oriented programming (he talked about “hens and chickens” instead [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><em>During the debrief of <a href="http://www.m3p.co.uk/blog/" target="_blank">Steve Freeman</a>’s <a href="http://www.spaconference.org/spa2010/sessions/session314.html">Paradigms  of Programming: Hands On</a> workshop an interesting side discussion emerged about the origins of object oriented programming. Steve’s quote of Ivan Sutherland struck a chord:</em></p>
<div class="wp-caption aligncenter" id="attachment_789" style="width: 510px;"><a href="http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/i_did_not_know_it_was_hard/" rel="attachment wp-att-789"><img alt="small comic. Interviewer asks Ivan Sutherland &quot;How did you invent this&quot; he says &quot;I didn't know it was hard&quot;. In between the two character is a display containing objects and a lightpen." class="size-medium wp-image-789" height="320" src="http://me.andering.com/wp-content/uploads/2010/05/i_did_not_know_it_was_hard-500x320.png" title="&quot;I did not know it was hard&quot;" width="500"/></a><p class="wp-caption-text">"I didn't know it was hard"</p></div>
<p>Ivan Sutherland invented the graphical user interface and the lightpen, as well as object oriented programming (he talked about “hens and chickens” instead of objects, a bit more poetic <img alt=":)" class="wp-smiley" src="http://me.andering.com/wp-includes/images/smilies/icon_smile.gif"/>  ). I found the quote Steve mentioned on Wikipedia:</p>
<p style="padding-left: 30px;">“How could you possibly have done the first interactive graphics  program, the first non-procedural programming language, the first object  oriented software system, all in one year?” Ivan replied: “Well, I  didn’t know it was hard.”</p>
<div class="wp-caption aligncenter" id="attachment_792" style="width: 510px;"><a href="http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/ivan-sutherland/" rel="attachment wp-att-792"><img alt="" class="size-medium wp-image-792" height="378" src="http://me.andering.com/wp-content/uploads/2010/05/ivan-sutherland-500x378.jpg" title="ivan-sutherland" width="500"/></a><p class="wp-caption-text">Ivan Sutherland with Sketchpad</p></div>
<p>I’m not sure whether Steve and <a href="http://www.michaelfeathers.com" target="_blank">Michael Feathers</a> (his co-host who was stuck in the USA) intended to have ‘creating a programming language is not hard, as long as you don’t think about it’ as a feature of the workshop, but thinking about it afterwards, every single one of us participated in the design of no less than four programming languages in the space of a few hours! Armed with nothing more than pens, papers, peers and a high level description of the language features we managed to create programming languages that were expressive enough to solve the problem at hand. To be fair, we created examples of programming languages and reasoned about how the examples would run in our programming language. But still, the process felt pretty fluid.</p>
<p>Some things, like designing a programming language are hard, if you think about them a lot. I recently wanted to do more with drawing, as developing and communicating ideas visually is often a lot more effective than working with words alone. I started to ask people who were facilitating with visuals (<a href="http://www.agilexp.com" target="_blank">Rachel Davies</a>, <a href="http://www.c2.com/cgi/wiki?SergeBeaumont" target="_blank">Serge Beaumont</a>) or drawing comics (<a href="http://www.decision-coach.com" target="_blank">Chris Matts</a>) how they went about it, and I got a few books on drawing. The overall feeling I took away from it, is that it is easy, as long as you don’t believe that it is difficult; drawing doesn’t have to be hard, as long as you don’t believe it has to be art.</p>
<p>What are the things you are doing that other people believe are hard, while you do it easily? What are the things you believe to be hard, that might be easy if you just stopped thinking about it?</p>
<h4>References:</h4>
<p>Sutherland, Ivan <a href="http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-574.pdf" rel="nofollow">Sketchpad: A man-machine graphical  communication system</a>PDF (3.90 <a href="http://en.wikipedia.org/wiki/Mebibyte" title="Mebibyte">MiB</a>),  Ivan Sutherland’s PhD Thesis.</p>
<p><a href="http://en.wikipedia.org/wiki/Sketchpad" title="Sketchpad">Sketchpad </a>and <a href="http://en.wikipedia.org/wiki/Ivan_Sutherland" title="Ivan  Sutherland">Ivan Sutherland</a> pages on Wikipedia.</p>
<p>Dan Roam, <a href="http://www.thebackofthenapkin.com" target="_blank">The back of the napkin, solving problems and selling ideas with pictures</a>.</p>
<p>Betty Edwards, <a href="http://www.drawright.com" target="_blank">Drawing on the right side of the brain</a></p>


<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-spaced sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;title=I+didn%27t+know+it+was+hard" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;title=I+didn%27t+know+it+was+hard" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;title=I+didn%27t+know+it+was+hard" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;submitHeadline=I+didn%27t+know+it+was+hard&amp;submitSummary=During%20the%20debrief%20of%20Steve%20Freeman%27s%20Paradigms%20%20of%20Programming%3A%20Hands%20On%20workshop%20an%20interesting%20side%20discussion%20emerged%20about%20the%20origins%20of%20object%20oriented%20programming.%20Steve%27s%20quote%20of%20Ivan%20Sutherland%20struck%20a%20chord%3A%0D%0A%0D%0A%0D%0A%0D%0AIvan%20Sutherland%20invented%20the%20graphical%20user%20interface%20and%20the%20lightpen%2C%20&amp;submitCategory=science&amp;submitAssetType=text" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;title=I+didn%27t+know+it+was+hard" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;t=I+didn%27t+know+it+was+hard" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=I+didn%27t+know+it+was+hard+-+http://is.gd/clTdb+(via+@most_alive)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22I%20didn%27t%20know%20it%20was%20hard%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22During%20the%20debrief%20of%20Steve%20Freeman%27s%20Paradigms%20%20of%20Programming%3A%20Hands%20On%20workshop%20an%20interesting%20side%20discussion%20emerged%20about%20the%20origins%20of%20object%20oriented%20programming.%20Steve%27s%20quote%20of%20Ivan%20Sutherland%20struck%20a%20chord%3A%0D%0A%0D%0A%0D%0A%0D%0AIvan%20Sutherland%20invented%20the%20graphical%20user%20interface%20and%20the%20lightpen%2C%20%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/" rel="nofollow" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;title=I+didn%27t+know+it+was+hard&amp;summary=During%20the%20debrief%20of%20Steve%20Freeman%27s%20Paradigms%20%20of%20Programming%3A%20Hands%20On%20workshop%20an%20interesting%20side%20discussion%20emerged%20about%20the%20origins%20of%20object%20oriented%20programming.%20Steve%27s%20quote%20of%20Ivan%20Sutherland%20struck%20a%20chord%3A%0D%0A%0D%0A%0D%0A%0D%0AIvan%20Sutherland%20invented%20the%20graphical%20user%20interface%20and%20the%20lightpen%2C%20&amp;source=me.andering - Willem van den Ende" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;title=I+didn%27t+know+it+was+hard" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=I+didn%27t+know+it+was+hard&amp;link=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-ning">
			<a href="http://bookmarks.ning.com/addItem.php?url=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;T=I+didn%27t+know+it+was+hard" rel="nofollow" title="Add this to Ning">Add this to Ning</a>
		</li>
		<li class="sexy-techmeme">
			<a href="http://twitter.com/home/?status=Tip+@Techmeme+http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/+&quot;I+didn%27t+know+it+was+hard&quot;" rel="nofollow" title="Tip this to TechMeme">Tip this to TechMeme</a>
		</li>
		<li class="sexy-pingfm">
			<a href="http://ping.fm/ref/?link=http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/&amp;title=I+didn%27t+know+it+was+hard&amp;body=During%20the%20debrief%20of%20Steve%20Freeman%27s%20Paradigms%20%20of%20Programming%3A%20Hands%20On%20workshop%20an%20interesting%20side%20discussion%20emerged%20about%20the%20origins%20of%20object%20oriented%20programming.%20Steve%27s%20quote%20of%20Ivan%20Sutherland%20struck%20a%20chord%3A%0D%0A%0D%0A%0D%0A%0D%0AIvan%20Sutherland%20invented%20the%20graphical%20user%20interface%20and%20the%20lightpen%2C%20" rel="nofollow" title="Ping this on Ping.fm">Ping this on Ping.fm</a>
		</li>
</ul>
<div style="clear: both;"/>
</div>
<!-- End SexyBookmarks Menu Code --></div>
    </content>
    <updated>2010-05-23T14:53:37Z</updated>
    <category term="people &amp; systems"/>
    <category term="creativity"/>
    <category term="inspiration"/>
    <category term="software development"/>
    <author>
      <name>Willem</name>
    </author>
    <source>
      <id>http://me.andering.com</id>
      <link href="http://me.andering.com/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://me.andering.com" rel="alternate" type="text/html"/>
      <subtitle>Systems thinking about software development</subtitle>
      <title>me.andering - Willem van den Ende</title>
      <updated>2010-07-30T15:17:09Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Calendar/2010-11-17.html</id>
    <link href="http://jamesshore.com/Calendar/2010-11-17.html" rel="alternate" type="text/html"/>
    <title>November 17th in Portland, Oregon: Blurring the Line Between Dev &amp; QA Roles</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>23 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Calendar/">James Shore/Calendar</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    <p/><p>The Software Association of Oregon's Dev Forum and QA Forum and producing a one-day Open Space event titled <em>Blurring the line between QA &amp; Dev roles in an Agile environment</em>. I'll post registration links when they become available.</p><p/><p><i><a href="http://jamesshore.com/Calendar/2010-11-17.html">Read More...</a></i></p>
    
    
    <p><a href="http://jamesshore.com/Calendar/2010-11-17.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-23T08:00:00Z</updated>
    <category term="/Calendar"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-11T04:17:16Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Calendar/2010-08-11.html</id>
    <link href="http://jamesshore.com/Calendar/2010-08-11.html" rel="alternate" type="text/html"/>
    <title>August 11th in Orlando, Florida: Bloody Stupid Johnson Teaches Agile</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>23 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Calendar/">James Shore/Calendar</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    <p/><p>Arlo Belshee and I will be at the <a href="http://agile2010.agilealliance.org/">Agile 2010</a> conference in Orlando, Florida with a particularly unique and fun presentation: <em>Bloody Stupid Johnson Teaches Agile</em>. It will be on Wednesday at 1:30 in the Asia 2 room. It's billed as an "Introductory" session, but I think anybody will enjoy it. We're going to have a lot of fun with it. And yes, there <em>will</em> be costumes.</p><p/><p><i><a href="http://jamesshore.com/Calendar/2010-08-11.html">Read More...</a></i></p>
    
    
    <p><a href="http://jamesshore.com/Calendar/2010-08-11.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-23T08:00:00Z</updated>
    <category term="/Calendar"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-18T02:17:19Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Calendar/2010-06-15.html</id>
    <link href="http://jamesshore.com/Calendar/2010-06-15.html" rel="alternate" type="text/html"/>
    <title>June 15th in Salt Lake City, Utah: Ten Years of Agile Acceptance Testing</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>23 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Calendar/">James Shore/Calendar</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    <p/><p>I recently posted two essays: <a href="http://jamesshore.com/Blog/The-Problems-With-Acceptance-Testing.html">The Problems With Acceptance Testing</a> and <a href="http://jamesshore.com/Blog/Alternatives-to-Acceptance-Testing.html">Alternatives to Acceptance Testing</a>. Now I'll explore the topic further at the excellent <a href="http://www.agileroots.com">Agile Roots</a> conference in Salt Lake City, Utah. My session will be on Tuesday during lunch in a low-key, conversational setting.</p><p/><p><i><a href="http://jamesshore.com/Calendar/2010-06-15.html">Read More...</a></i></p>
    
    
    <p><a href="http://jamesshore.com/Calendar/2010-06-15.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-23T08:00:00Z</updated>
    <category term="/Calendar"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-11T04:17:16Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Architectural-Design-Challenge.html</id>
    <link href="http://jamesshore.com/Blog/Architectural-Design-Challenge.html" rel="alternate" type="text/html"/>
    <title>An Architectural Design Challenge</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>23 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>I'm experiencing a rare treat: my current <a href="http://jamesshore.com/Consulting/Immersion.html">total immersion</a> team is working on a brand-new, green-field product. We've had to create a new codebase entirely from scratch using somewhat unusual technology. Combine that with my immersion coaching and you have the recipe for a lot of interesting exploration.</p>

<p>Lately, we've been exploring software architecture. How can we make our code testable, clear, concise, and mutable? We've come up with some interesting ideas, which makes me want to try more ideas on my own. The problem is that exploring architecture takes a lot of code. It's hard to have a problem that's small enough for one person to write in a spare afternoon, but large enough to be architecturally interesting.</p>

<p class="aside">(How do I define "architecture," you ask? Well, it all has to do with...  Look, a penguin!)</p>

<p>So I've created this challenge. It's artificial--<em>very</em> artificial--but I think it raises several interesting architectural questions. It has a UI, a persistence mechanism, and test/production configuration differences. It's a toy problem, to be sure, but I hope the rules I provide make it relevant. If not, I'll expand the problem.</p>

<p>I have some architectural ideas I intend to explore in a future essay, and I hope you'll chime in with your own ideas. How would you solve this problem using mock objects? What about a dependency injection framework? How about 100% immutable objects? Aggressively late evaluation? Share your solutions and we'll see how they compare.</p>


<h3>The Challenge: Part One</h3>

<p>Write a command-line program that loads a file into memory, <a href="http://en.wikipedia.org/wiki/ROT13">ROT-13s</a> it, displays the result on the screen, and writes the result to a file.</p>

<blockquote class="notetip">
	<p>For example, assume you had a file named <code>in.txt</code> that contained the text "The dog barks at midnight." Running the command <code>rot13 in.txt out.txt</code> would display "Gur qbt onexf ng zvqavtug." on the screen and write the same text to a file named <code>out.txt</code>.</p>
</blockquote>

<p>Of course, ROT-13 isn't the challenge. That can be done trivially from a Unix command prompt. No, the real challenge is to demonstrate an architectural approach that would hold up in real-world use. So here are the real rules:</p>

<ol>
	<li>Write the ROT-13 tool described above. Note that the input file must be loaded entirely <em>into memory</em>.</li>
	<li>Provide a configuration mechanism that reads and writes files from one directory when "in testing" and another directory when "in production."</li>
	<li>Wrap your platform's console and file I/O methods as if each call actually required a dozen lines of code. Your configuration mechanism can use file I/O directly, though.</li>
	<li>No slideware allowed. You can use diagrams to illustrate your architecture, but you must code the entire solution. This prevents seemingly-elegant solutions that don't work in practice.</li>
	<li>Use <a href="http://jamesshore.com/Agile-Book/test_driven_development.html">test-driven development</a> to code everything.</li>
</ol>

<p>Judge solutions on:</p>

<ul>
	<li><strong>Test Design.</strong><ul>
		<li>All code is tested. (See <a href="http://jamesshore.com/Agile-Book/test_driven_development.html">my book</a> for precise definitions of the terms <em>unit test</em>, <em>focused integration test</em>, and <em>end-to-end integration test</em>.)</li>
		<li>The test code is as high-quality as the production code.</li>
		<li>All business logic code (that is, the ROT13 code) is tested with <em>unit tests</em> that don't do any I/O.</li>
		<li>All integration code (that is, the file and console I/O) is tested with <em>focused integration tests</em> that validate that the I/O libraries each work as expected, independently of the rest of the system.</li>
		<li><em>End-to-end integration tests</em> (that is, tests that check the system as a whole) are kept to a minimum, or better still, entirely unneeded.</li>
	</ul></li>
	
	<br/><li><strong>Coupling and Cohesion.</strong><ul>
		<li>The code reflects the usage and the external behavior of the system more than it reflects the techniques used in coding, so that any concept (such as "loads and saves files" or "rot13") can be clearly related to specific code.</li>
		<li>Code related to a single concept is grouped together.</li>
		<li>Code for unrelated concepts (such as "rot13" and "file handling") is stored in separate locations.</li>
	</ul></li>
	
	<br/><li><strong>Simplicity.</strong><ul>
		<li>Classes' public interfaces are clear and easy to understand.</li>
		<li>Individual lines of code read well.</li>
		<li>Boilerplate code is kept to a minimum.</li>
		<li>Lines of code are kept to a minimum.</li>
		<li>There is no code that anticipates part two of the challenge.</li>
	</ul></li>
		
	<br/><li><strong><a href="http://jamesshore.com/Articles/Quality-With-a-Name.html">Quality Without a Name.</a></strong><ul>
		<li>The code feels beautiful and well designed.</li>
		<li>The system follows the spirit of the rules: it illustrates a general architectural approach, not a problem-specific hack.</li>
	
	</ul></li>
</ul>


<h3>The Challenge: Part Two</h3>

<p>Once you have part one coded, post it. Then modify your code to support arbitrarily large files. In other words, rather than loading the whole input file into memory, operate directly on the input stream. Post your result.</p>

<p>Judge this portion of the challenge using the rules for part one, and also:</p>

<ul>
	<li><strong>Mutability.</strong><ul>
		<li>A minimum number of lines of code needed to be changed.</li>
		<li>A minimum--preferably zero--of the code not related to file-handling needed to be changed.</li>
		<li>Most--preferably all--of the file-handling changes were in a single place.</li>
	</ul></li>
</ul>


<h3>Post Your Solutions!</h3>

<p>This challenge isn't particularly difficult, but I suspect that it will be hard to create code that's well tested <em>and</em> performs optimally on all of the other points. In particular, I think the unit testing requirement and limitation on end-to-end tests will be difficult. (I haven't tried it yet, so I can't be sure.) Give it a try! I'd particularly like to see some baseline solutions, such as a classic three-layer architecture using mock objects or heavy use of a dependency injection framework, as well as some more radical ideas.</p>

<p>If you give this challenge a try, please post a link to your solution in the comments. I'm looking forward to seeing what you come up with.</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Architectural-Design-Challenge.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-23T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-18T02:17:18Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Collective-Code-Ownership-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Collective-Code-Ownership-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Collective Code Ownership" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>21 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>It's that time again. This week's <a href="http://jamesshore.com/Agile-Book/">Art of Agile Development</a> excerpt is <a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html">Collective Code Ownership</a>. An underrated practice that's at the heart of team success.</p>

<p>It's really more than code ownership, which we didn't emphasize enough in the book. To be successful as a truly self-organizing team, the way I teach it--without requiring a technical lead, a development manager, or a Scrum Master--the team has to have the ability to solve problems without explicit direction. This requires group ownership and good group decision-making skills. This doesn't magically happen on its own; teams have to work at it. But I think it's an essential part of what makes good Agile teams <a href="http://jamesshore.com/Blog/The-Crucible-of-Great-Teams.html">great</a>.</p>

<p>Next week's excerpt comes from the <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Planning chapter</a> and there's still time <a href="http://jamesshore.com/Blog/Agile-Friday-Ubiquitous-Language-Now-Online.html">to vote</a> on which excerpt I'll post. After that, on June 4th, comes the always-popular <a href="http://jamesshore.com/Agile-Book/developing_intro.html">Developing chapter</a>. Which section should I post next?</p>

<noscript>&lt;div&gt;&lt;a href="http://www.micropoll.com/akira/mpview/847433-256656"&gt;Click Here for Poll&lt;/a&gt;&lt;/div&gt;</noscript><!-- END MICROPOLL JAVASCRIPT CODE -->

<p>Here are the full results of the poll for this week's excerpt:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/version_control.html">Version Control</a> - 9%</li>
	<li><a href="http://jamesshore.com/Agile-Book/ten_minute_build.html">Ten-Minute Build</a> - 23%</li>
	<li><a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a> - 23%</li>
	<li><img alt="**" src="http://jamesshore.com/images/star.gif"/> <a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html">Collective Code Ownership</a> - 27%</li>
	<li><a href="http://jamesshore.com/Agile-Book/documentation.html">Documentation</a> - 18%</li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Collective-Code-Ownership-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-21T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-04T04:17:41Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/collective_code_ownership.html</id>
    <link href="http://jamesshore.com/Agile-Book/collective_code_ownership.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Collective Code Ownership</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>21 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/documentation.html">Documentation</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Chapter 7: Releasing</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

<p>With collective code ownership, everyone shares responsibility for code quality.  Anyone can make necessary changes anywhere, and everyone is expected to fix problems they find.  To make it work, let go of your ego.  Take as much pride in the <em>team's</em> code as in your <em>own</em> code.</p>

<p>When working with unfamiliar code, ask the local expert to pair with you.  If he's unavailable, infer high-level class responsibilities and method behaviors from their names, and rely on unit tests for further documentation and as your safety net.  As you work, help the next person by taking opportunities to refactor.</p>

</blockquote>

<!--

<h3>as haiku</h3>

<blockquote class="haiku">
	<p></p>
	
</blockquote>

-->

<h3>Commentary</h3>

<p><a href="http://jamesshore.com/Blog/The-Crucible-of-Great-Teams.html">The Crucible of Great Teams</a></p>

<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>

<h2>Collective Code Ownership</h2>

<dl class="audience"><dt>Audience</dt><dd>Programmers</dd></dl>

<p class="goal">We are all responsible for high quality code.</p>

<p>There's a metric for the risk imposed by concentrating knowledge in just a few people's heads—it's called the <em>truck number</em>.  How many people can get hit by a truck before the project suffers irreparable harm?</p>

<p>It's a grim thought, but it addresses a real risk.  What happens when a critical person goes on holiday, stays home with a sick child, takes a new job, or suddenly retires?  How much time will you spend training a replacement?</p>

<p><em>Collective code ownership</em> spreads responsibility for maintaining the code to all the programmers.  Collective code ownership is exactly what it sounds like: everyone shares reponsibility for the quality of the code.  No single person claims ownership over any part of the system, and anyone can make any necessary changes anywhere.</p>

<blockquote class="coach">Fix problems no matter where you find them.</blockquote>

<p>In fact, improved code quality may be the most important part of collective code ownership.  Collective ownership allows—no, <em>expects</em>—everyone to fix problems they find.  If you encounter duplication, unclear names, or even poorly designed code, it doesn't matter who wrote it.  It's <em>your</em> code.  Fix it!</p>

<h3>Making Collective Ownership Work</h3>

<p>Collective code ownership requires letting go of a little bit of ego.  Rather than taking pride in <em>your</em> code, take pride in <em>your team's</em> code.  Rather than complaining when someone edits your code, enjoy how the code improves when you're not working on it.  Rather than pushing your personal design vision, discuss design possibilities with the other programmers and agree on a shared solution.</p>

<blockquote class="coach">Always leave the code a little better than you found it.</blockquote>

<p>Collective ownership requires a joint commitment from team members to produce good code.  When you see a problem, fix it.  When writing new code, don't do a half-hearted job and assume somebody else will fix your mistakes.  Write the best code you can.</p>

<p>On the other hand, collective ownership means that you don't have to be perfect.  If you've produced code that works, is of reasonable quality, and you're not sure how to make it better, don't hesitate to let it go.  Someone else will improve it later, if and when it needs it.</p>

<h3>Working with Unfamiliar Code</h3>

<p>If you're working on a project that has <em>knowledge silos</em>—in other words, little pockets of code that only one or two people understand—then collective code ownership might seem daunting.  How can you take ownership of code that you don't understand?</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></dd></dl><p>To begin, take advantage of pair programming.  When somebody picks a task involving code you don't understand, volunteer to pair with him.  When you work on a task, ask the local expert to pair with you.  Similarly, if you need to work on some unfamiliar code, take advantage of your shared workspace to ask a question or two.</p>

<p>Rely on your inference skills as well.  You don't need to know exactly what's happening in every line of code.  In a well-designed system, all you need to know is what each package (or namespace) is responsible for.  Then you can infer high-level class responsibilities and method behaviors from their names.  (See <a href="http://jamesshore.com/Agile-Book/refactoring.html">Refactoring</a> in Chapter 9.)</p>

<blockquote class="notetip">
 
 <p>Inferring high-level design from a brief review of the code is a black-belt design skill that's well worth learning.  Take advantage of every opportunity to practice.  Check your inferences by asking an expert to summarize class responsibilities and relationships.</p>
 
</blockquote>

<p>Rely on the unit tests for further documentation and as your safety net.  If you're not sure how something works, change it anyway and see what the tests say.  An effective test suite will tell you when your assumptions are wrong.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/refactoring.html">Refactoring</a></dd></dl><p>As you work, look for opportunities to refactor the code.  In particular, I often find that refactoring code helps me to understand it.  It benefits the next person too; well-factored code tends toward simplicity, clarity, and appropriate levels of abstraction.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/test_driven_development.html">Test-Driven Development</a></dd></dl><p>If you're just getting started with XP, you might not yet have a great set of unit tests and the design might be a little flaky.  In this case, you may not be able to infer the design, rely on unit tests, or refactor, so pairing with somebody who knows the code well becomes more important.  Be sure to spend extra time introducing unit tests and refactoring so that the next person can take ownership of the code without extra help.</p>

<h3>Hidden Benefits</h3>

<blockquote>
 
 <p>"Of course nobody can understand it... it's job security!"</p>
 
 <p>—Old programmer joke</p>
 
</blockquote>

<p>It's not easy to let a great piece of code out of your hands.  It's difficult sometimes to subsume the desire to take credit for a particularly clever or elegant solution, but it's necessary for your team to take advantage of all of the benefits of collaboration.</p>

<p>It's also good for you as a programmer.  Why?  The whole codebase is yours—not just to modify, but to support and improve.  You get to expand your skills.  Even if you're an absolute database guru, you don't have to write only database code through out the project.  If writing a litte UI code sounds interesting, find a programming partner and have at it.</p>

<p>You also don't have to carry the maintenance burden for a piece of code someone assigned you to write.  Generally, the pair that finds a bug fixes the bug.  They don't need your permission.  Even better, they don't necessarily need your help; they may know the code now as well as you did when you wrote it.</p>

<p>It's a little scary at first to come into work and not know exactly what you'll work on, but it's also freeing.  You no longer have long subprojects lingering overnight or over the weekend.  You get variety and challenge and change.  Try it—you'll like it.</p>

<h3>Questions</h3>

<h4 class="faq">We have a really good UI designer/database programmer/scalability guru.  Why not take advantage of those skills and specialties?</h4>

<p>Please do!  Collective code ownership shares knowledge and improves skills, but it won't make everyone an expert at everything.</p>

<p>Don't let specialization prevent you from learning other things, though.  If your specialty is databases and the team is working on user interfaces this week, take on a user interface task.  It can only improve your skills.</p>

<h4 class="faq">How can everyone learn the entire codebase?</h4>

<p>People naturally gravitate to one part of the system or another.  They become experts in particular areas.  Everybody gains a general understanding of the overall codebase, but each person only knows the details of what he's worked with recently.</p>

<p>The tests and simple design allow this approach to work.  Simple design and its focus on code clarity make it easier to understand unfamiliar code.  The tests act both as a safety net and as documentation.</p>

<h4 class="faq">Doesn't collective ownership increase the possibility of merge conflicts?</h4>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></dd></dl><p>It does, and so it also requires continuous integration.  Continuous integration decreases the chances of merge conflicts.</p>

<p>In the first week or two of the project, when there isn't much code, conflicts are more likely.  Treat the code gently for the first couple of iterations.  Talk together frequently and discuss your plans.  As you progress, the codebase will grow, so there will be more room to make changes without conflict.</p>

<h4 class="faq">We have some pretty junior programmers, and I don't trust them with my code.  What should we do?</h4>

<p>Rather than turning your junior programmers loose on the code, make sure they pair with experienced members of the team.  Keep an eye on their work and talk through design decisions and trade-offs.  How else will they learn your business domain, learn your codebase, or mature as developers?</p>

<h4 class="faq">Different programmers on our team are responsible for different projects.  Should the team collectively own all of these projects?</h4>

<p>If you have combined programmers working on several projects into a single team (as described in the discussion of team size in <a href="http://jamesshore.com/Agile-Book/is_xp_right_for_us.html">Is XP Right For Us?</a> in Chapter 4), then yes, the whole team should take responsibility for all code. If your programmers have formed multiple separate teams, then they usually should not share ownership across teams.</p>

<h3>Results</h3>

<p>When you practice collective code ownership, you constantly make minor improvements to all parts of the codebase, and you find that the code you've written improves without your help.  When a team member leaves or takes a vacation, the rest of the team continues to be productive.</p>

<h3>Contraindications</h3>

<p>Don't use collective code ownership as an excuse for <em>no</em> code ownership.  Managers have a saying: "shared responsibility is no responsibility at all."  Don't let that happen to your code. Collective code ownership doesn't mean someone else is responsible for the code; it means <em>you</em> are responsible for the code—all of it.  (Fortunately, the rest of the team is there to help you.)</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></dd></dl><p>Collective code ownership requires good communication.  Without it, the team cannot maintain a shared vision, and code quality will suffer.  Several XP practices help provide this communication: a team that includes experienced designers, sitting together, and pair programming.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/test_driven_development.html">Test-Driven Development</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/simple_design.html">Simple Design</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/coding_standards.html">Coding Standards</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/refactoring.html">Refactoring</a></dd></dl><p>Although they are not strictly necessary, good design and tests make collective code ownership is easier.  Proceed with caution unless you use test-driven development, simple design, and agree on coding standards.  To take advantage of collective ownership's ability to improve code quality, the team must practice relentless refactoring.</p>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/version_control.html">Version Control</a></dd></dl><p>To coordinate changes, you must use continuous integration and a concurrent model of version control.</p>

<h3>Alternatives</h3>

<p>A typical alternative to collective code ownership is <em>strong code ownership</em>, in which each module has a specific owner and only that person may make changes.  A variant is <em>weak code ownership</em>, in which one person owns a module but others can make changes so long as they coordinate with the owner.  Neither approach, however, shares knowledge or enables refactoring as well as collective ownership does.</p>

<dl class="practice"><dt>Ally</dt><dd><a href="http://jamesshore.com/Agile-Book/pair_programming.html">Pair Programming</a></dd></dl><p>If you cannot use collective code ownership, you need to adopt other techniques to spread knowledge and encourage refactoring.  Pair programming may be your best choice.  Consider holding weekly design workshops as well to review the overall design and brainstorm improvements.</p>

<p>I recommend against strong code ownership.  It encourages rigid silos of knowledge, making you vulnerable to any team member's absence.  Weak code ownership is a better choice, although it still doesn't provide the benefits of collective ownership.</p>

<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/documentation.html">Documentation</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/continuous_integration.html">Continuous Integration</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Chapter 7: Releasing</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/collective_code_ownership.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-21T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-06T21:17:23Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Test-Driven-Javascript.html</id>
    <link href="http://jamesshore.com/Blog/Test-Driven-Javascript.html" rel="alternate" type="text/html"/>
    <title>Test-Driven Javascript</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>20 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>Last year, I founded a start-up with Arlo Belshee and Kim Wallmark. It didn't go anywhere, but one legacy of that project was some interesting solutions to the problem of using <a href="http://jamesshore.com/Agile-Book/test_driven_development.html">test-driven development</a> (TDD) with Javascript code.</p>

<p>We're weren't the first ones to solve this particular problem, but the question of how to test Javascript comes up often enough that I though it would be interesting to describe our approach here.</p>

<p>Our techniques were far from perfect. We were new to Javascript and AJAX, solved just the problems we needed to and no more, and only worked for about a month. Our ideas are likely obvious to <a href="http://cjohansen.no/en/javascript/test_driven_javascript_the_book">anyone who's solved this problem before</a>, and I'm sure the code would be cleaner if we had worked on it longer. I doubt we came up with the best answers. So use these ideas as a starting point, not as gospel.</p>

<p>Our approach can be divided into three parts:</p>

<ul type="i">
	<li>Run Your Tests in the Browser</li>
	<li>Automate Cross-Browser Testing</li>
	<li>Isolate the Client From the Server</li>
</ul>

<h3>Part I: Run Your Tests in the Browser</h3>

<p>Early approaches to TDD'ing Javascript involved running command-line Javascript interpreters. That's nice for automation, but the majority of Javascript code interacts with the browser DOM. That's where the bugs are too. A tool could simulate the DOM, but every browser is slightly different and making a truly bug-for-bug compatible DOM simulator isn't really feasible.</p>

<p>Running tests directly in the browser avoids that can of worms. We used <a href="http://docs.jquery.com/QUnit">QUnit</a> for the task; to make it work, you provide a boilerplate HTML page and your tests, then load the HTML page into a browser to run.</p>

<p>QUnit wasn't actually that good: the UI was primitive and the API minimalistic at best. So I'm not recommending it. I think we chose it because it was the testing tool used by the excellent <a href="http://jquery.com">JQuery</a> library's developers. If I were to choose a TDD tool today, I'd look at alternatives.</p>

<p>Still, QUnit worked well enough. The biggest problem was that it required us to duplicate the HTML of the page under test. It would have been better operate directly against the page under test. I thought about seeing if an <code>iframe</code> would allow that to work, but never tried gave it a serious look. There might be security restrictions that prevent that approach.</p>


<h3>Part II: Automate Cross-Browser Testing</h3>

<p>We used Watir and FireWatir to automate our tests and perform cross-browser testing. I'm a big believer in <a href="http://jamesshore.com/Agile-Book/ten_minute_build.html">fast, automated builds</a>. Watir was perfect for our needs:</p>

<ul>
	<li>It runs a browser rather than simulating the DOM</li>
	<li>It runs both IE (Watir) and Firefox (FireWatir) with the same API</li>
	<li>It has a great API and plays well with Rake, my preferred build scripting language</li>
</ul>

<p>Having an automated command-line build that ran all of our tests against multiple browsers allowed us to develop in Firefox, using the excellent <a href="http://getfirebug.com">Firebug</a> plug-in, but still fully test our code on IE. We found some <em>awesome</em><sup>1</sup> incompatibilities between Firefox and IE this way. My favorite was when we discovered that the variable <code>top</code> (or something similar) worked fine in Firefox but was <span class="language">verboten</span> in IE.</p>

<p class="footnote"><sup>1</sup>"Awesome" as in "That was <strong>so awesome</strong> I must now gouge my brain out with a spatula! Yay!"</p>

<p>Crashes deserve special mention. I don't know if the problem was specific to QUnit or if this is just a Javascript problem, but it was entirely possible for the tests to fail--perhaps because of a missing semicolon--and us to not know about it. The QUnit test runner would just report <em>fewer test runs</em>. (The mind boggles.) We would usually notice that our test counts had dropped when running the tests manually while developing in Firefox, but not when the automated IE test ran from the command-line. We fixed the problem by comparing the total number of tests across the two browsers. If they didn't match, we knew there was a problem.</p>

<p>Here's our (Fire)Watir code for automated cross-browser testing. To use this, we called <code>run_qunit</code> from our <code>rake</code> build. (More about that in a <a href="http://jamesshore.com/Blog/Agile-Startup-Build-and-Deploy.html">previous essay</a>.)</p>

<blockquote class="code">
require 'watir'
<br/>require 'firewatir'
<br/>
<br/><span class="function">def run_qunit</span>
<br/>    ieNum = run_on(Watir::IE.new, "IE")
<br/>    firefoxNum = run_on(FireWatir::Firefox.new, "Firefox")
<br/>  
<br/>    if(ieNum != firefoxNum)
<br/>        print "FAILED\n";
<br/>        raise "Test counts don't match (IE: " + ieNum.to_s + "; Firefox: " + firefoxNum.to_s + ")"
<br/>    end
<br/><span class="function">end</span>
<br/>
<br/><span class="function">def run_on(browser, name)</span>
<br/>    printf "Testing %s... ", name
<br/>  
<br/>    numTests = test_page(browser, name, "home");
<br/>    numTests += test_page(browser, name, "pagewide");
<br/>    <span class="comment"># etc</span>
<br/>   
<br/>    print "ok\n"
<br/>    browser.close
<br/>    return numTests;
<br/><span class="function">end</span>
<br/>
<br/><span class="function">def test_page(browser, name, filename)</span>
<br/>    browser.goto "http://localhost:8086/test/" + filename
<br/>  
<br/>    failures = Integer(browser.span(:class, "bad").text)
<br/>    numTests = Integer(browser.span(:class, "all").text)
<br/>  
<br/>    if (failures == 0 &amp;&amp; numTests != 0)
<br/>        return numTests;
<br/>    else
<br/>        print "FAILED\n"
<br/>        raise name + " failed " + failures.to_s + " of " + numTests.to_s + " tests on " + filename
<br/>    end
<br/><span class="function">end</span>


</blockquote>

<p>I understand that there's an <a href="http://code.google.com/p/js-test-driver/">even better ways</a> to do cross-browser Javascript testing now, but I haven't tried any of them. Again, use these ideas as a starting point for your own exploration.</p>

<h3>Part III: Isolate the Client From the Server</h3>

<p>Almost every Javascript test will end up triggering a call to the server if you're not careful. That's a problem, because that means you have to do expensive and difficult server-side test setup. Generally, you end up in the land of end-to-end tests, which are slow, brittle, and lead to a false sense of confidence. To prevent this problem, we isolated our client-side tests from the server-side code.</p>

<p>Our application was heavily AJAX-based. The meat of the program was just one web page that had a lot of Javascript and made a lot of calls to the server. In order to isolate our tests, we stubbed out the AJAX calls. We solved this one thanks to Arlo's code-foo and some tricky<sup>2</sup> hacks. Using a function called <code>check_for_ajax</code> (and other related functions), we actually cancelled the JQuery-based AJAX call mid-stream and replace it with our own handler.</p>

<p class="footnote"><sup>2</sup>Some might say "nasty," but we ignore them. Pttthhbbbt.</p>

<p>These tools gave us the ability to stub out the server, but we also designed our code so that most tests didn't have to worry about it. Only the tests that were directly executing AJAX-related code needed to be isolated from the server, because the other tests didn't trigger server calls.

</p><p>Here's an example of a test using <code>check_for_ajax</code>. In this example, we were testing that a particular UI object (a "token") was marked as pending--which meant it would pulse using JQuery's animation capabilities--while the AJAX call was in progress:</p>

<blockquote class="code">
<br/><span class="function">test('token is marked "pending" while it is being sent to server', function() {</span>
<br/>  var token;
<br/>  check_for_ajax(
<br/>    <span class="function">function(request) {</span>
<br/>      <span class="comment">// Runs the code under test</span>
<br/>      token = battlemat.click(3, 4);
<br/>    <span class="function">}</span>,
<br/>    {
<br/>      <span class="function">before_send: function(request) {</span>
<br/>        <span class="comment">// Runs after AJAX call is made, but before (stubbed-out) HTTP call</span>
<br/>        ok(token.is_pending(), 'should be pending while ajax call is in progress');
<br/>      <span class="function">}</span>,
<br/>      <span class="function">populate_xhr: function(xhr) {</span>
<br/>        <span class="comment">// The return value from the AJAX call</span>
<br/>        xhr.status = 200;
<br/>      <span class="function">}</span>,
<br/>      <span class="function">after_response: function(request) {</span>
<br/>        <span class="comment">// Runs after the AJAX callbacks completed</span>
<br/>        ok(!token.is_pending(), 'should not be pending after ajax call');
<br/>      <span class="function">}</span>
<br/>    }
<br/>  );
<br/><span class="function">});</span>
</blockquote>

<p>Here's the code for <code>check_for_ajax</code> and the other functions we used for client-side isolation. Yes, we even had tests on our test code. It's one of the rare cases where I've done that--this code was so complicated and hard to write we needed the tests to just to get it to work!</p>

<blockquote class="code">
<br/><span class="function">function FakeXhr() {</span>
<br/>  var self = this;
<br/>  self.headers = {};
<br/>
<br/>  <span class="comment">// standard xhr properties and methods</span>
<br/>  self.status;
<br/>  <span class="function">self.getResponseHeader = function(name) {</span>
<br/>    return self.headers[name];
<br/>  <span class="function">}</span>
<br/><span class="function">}</span>
<br/>
<br/><span class="function">check_for_ajax = function(function_that_performs_ajax, hooks) {</span>
<br/>  var send_happened = false;
<br/>  var request;
<br/>  var xhr = new FakeXhr();
<br/>
<br/>  if(!hooks) { hooks = {}; }
<br/>  validate_hooks(hooks);
<br/>
<br/>  $(document).ajaxSend(<span class="function">function(_, xhr_in, req) {</span>
<br/>    send_happened = true;
<br/>    request = req;
<br/>    if (hooks.populate_xhr)
<br/>      hooks.populate_xhr(xhr);
<br/>    xhr_in.abort();
<br/>  <span class="function">}</span>);
<br/>  function_that_performs_ajax();
<br/>  $(document).unbind('ajaxSend');
<br/>  ok(send_happened, 'should call ajax');
<br/>  if (send_happened) {
<br/>    if(hooks.before_send)
<br/>      hooks.before_send(request);
<br/>    if(request.success)
<br/>      request.success("", "success");
<br/>    if(request.complete)
<br/>      request.complete(xhr, "success");
<br/>    if(hooks.after_response)
<br/>      hooks.after_response(request, xhr);
<br/>  }
<br/><span class="function">};</span>
<br/>
<br/><span class="function">function prevent_network_traffic(f) {</span>
<br/>  check_for_ajax(f);
<br/><span class="function">}</span>
<br/>
<br/><span class="function">ensure_no_ajax_happens = function(function_that_performs_ajax) {</span>
<br/>  var send_happened = false;
<br/>
<br/>  $(document).ajaxSend(<span class="function">function(_, xhr_in, req) {</span>
<br/>    send_happened = true;
<br/>    xhr_in.abort();
<br/>  <span class="function">}</span>);
<br/>  function_that_performs_ajax();
<br/>  $(document).unbind('ajaxSend');
<br/>  ok(!send_happened, 'should not call ajax');
<br/><span class="function">};</span>
<br/>
<br/><span class="function">function validate_hooks(hooks) {</span>
<br/>  var valid_hooks = ['before_send', 'populate_xhr', 'after_response'];
<br/>  for(var hook in hooks) {
<br/>    var found = false;
<br/>    for (var i = 0; i &lt; valid_hooks.length; i++) {
<br/>      if(hook == valid_hooks[i]) found = true;
<br/>    }
<br/>    if (!found) ok(false, hook + ' is not a valid check_for_ajax hook');
<br/>  }
<br/><span class="function">}</span>
<br/>
<br/><span class="function">$(function(){</span>
<br/>  module("Testing AJAX-testing util");
<br/>
<br/>  <span class="function">test('Works with a "complete" handler', function() {</span>
<br/>    var was_called = false;
<br/>    check_for_ajax(
<br/>      <span class="function">function() {</span>
<br/>        $.ajax({
<br/>          url: '/blah',
<br/>          type: 'POST',
<br/>          data: 'a=b',
<br/>          <span class="function">complete: function(xhr) {</span>
<br/>            was_called = true;
<br/>          <span class="function">}</span>
<br/>        });
<br/>      <span class="function">}</span>,
<br/>      {
<br/>        <span class="function">after_response: function() {</span>
<br/>          ok(was_called, 'should have been called');
<br/>        <span class="function">}</span>
<br/>      }
<br/>    );
<br/>  <span class="function">});</span>
<br/>
<br/>  <span class="function">test('We can set the response in a callback', function() {</span>
<br/>    check_for_ajax(
<br/>      <span class="function">function() {</span>
<br/>        $.post('/foo', '', <span class="function">function(req) {}</span>);
<br/>      <span class="function">}</span>,
<br/>      {
<br/>        <span class="function">populate_xhr: function(xhr) {</span>
<br/>          xhr.headers['foo'] = 'bar';
<br/>        <span class="function">}</span>,
<br/>        <span class="function">after_response: function(response, xhr) {</span>
<br/>          equals('bar', xhr.getResponseHeader('foo'), 'should have modified xhr');
<br/>        <span class="function">}</span>
<br/>      <span class="function">}</span>
<br/>    );
<br/>  <span class="function">});</span>
<br/>
<br/>  <span class="function">test('populate_xhr unbinds properly', function() {</span>
<br/>    var num_calls = 0;
<br/>    check_for_ajax(
<br/>      <span class="function">function() {</span>
<br/>        $.post('/foo', '', <span class="function">function() {}</span>);
<br/>      <span class="function">}</span>,
<br/>      {
<br/>        <span class="function">populate_xhr: function() {</span>
<br/>          num_calls++;
<br/>        <span class="function">}</span>,
<br/>        <span class="function">after_response: function() {</span>
<br/>          equals(1, num_calls, 'should be called the first time');
<br/>        <span class="function">}</span>
<br/>      }
<br/>    );
<br/>    check_for_ajax(
<br/>      <span class="function">function() {</span>
<br/>        $.post('/foo', '', <span class="function">function() {}</span>);
<br/>      <span class="function">}</span>,
<br/>      {
<br/>        <span class="function">after_response: function() {</span>
<br/>          equals(1, num_calls, 'should not be called the second time');
<br/>        <span class="function">}</span>
<br/>      }
<br/>    );
<br/>  <span class="function">});</span>
<br/>
<br/>  <span class="function">test("nested AJAX calls shouldn't interfere with each other", function() {</span>
<br/>    check_for_ajax(
<br/>      <span class="function">function() {</span>
<br/>        $.get('/foo');
<br/>      <span class="function">}</span>,
<br/>      {
<br/>        <span class="function">before_send: function(outer_req) {</span>
<br/>          inner_ajax_happened = check_for_ajax(
<br/>            <span class="function">function() {</span>
<br/>              $.get('/bar');
<br/>            <span class="function">}</span>,
<br/>            {
<br/>              <span class="function">before_send: function(req) {</span>
<br/>                equals('/bar', req.url);
<br/>              <span class="function">}</span>,
<br/>              <span class="function">after_response: function(req) {</span>
<br/>                equals('/bar', req.url);
<br/>              <span class="function">}</span>
<br/>            }
<br/>          );
<br/>          equals('/foo', outer_req.url);
<br/>        },
<br/>        <span class="function">after_response: function(req) {</span>
<br/>          equals('/foo', req.url);
<br/>        <span class="function">}</span>
<br/>      }
<br/>    );
<br/>  <span class="function">});</span>
<br/><span class="function">});</span>

</blockquote>

<h3>Future: Problems We Didn't Solve</h3>

<p>The biggest problem we didn't solve was visual: we had no automated way of checking that changes to our HTML didn't break the look of the app. CSS was a particular problem, because a small change to the CSS could break a completely different page from the one we were working on.</p>

<p>Visuals are hard because we they change so frequently and they're so hard to test automatically. One idea I've kicked around is to have a pseudo-automated approach. The tests would automatically take screen-shots of reference pages (but possibly not real pages, as they would change too often) and compare them to a known-good render. If no change, If the screen had changed, it would pop up a dialog showing the two screen shots and asking if the changes were okay.</p>

<p>Other problems to solve included testing pages directly rather than copying HTML into our test page, testing more browsers (including multiple versions of each browser), and stubbing out other server interactions in addition to AJAX, such as following links or posting forms.</p> 

<p>At any rate, that's how we approached the problem of test-driven Javascript. None of it's rocket science. The real lesson here: if testing is important to you--and I hope it is--you can make it happen. Keep pushing. It will take a while to get working smoothly, but the lowered friction and increase productivity will be worth it.</p>

    
    
    <p><a href="http://jamesshore.com/Blog/Test-Driven-Javascript.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-20T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-06-04T04:17:43Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/05/thanks-to-xptoronto-agile-quebec-and-an-apology.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/sApsJ_OtnsM/thanks-to-xptoronto-agile-quebec-and-an-apology.html" rel="alternate" type="text/html"/>
    <title>Thanks to XPToronto, Agile Quebec and an Apology</title>
    <summary>In the past two days I’ve presented “Learning Best Approaches for Your Brain” to two audiences. First in Toronto for XPToronto and then Quebec City for AgileQuebec. We got fair sized audiences for each and both groups seemed to have a lot of fun. Given my lack of French I’m truly amazed about how engaged [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><img alt="Header" src="http://www.xptoronto.com/images/header.jpg?1245384112"/></p>
<p>In the past two days I’ve presented “Learning Best Approaches for Your Brain” to two audiences. First in Toronto for <a href="http://www.xptoronto.com/" target="_blank">XPToronto</a> and then Quebec City for <a href="http://www.agilequebec.ca/event.php?id=13" target="_blank">AgileQuebec</a>. We got fair sized audiences for each and both groups seemed to have a lot of fun. Given my lack of French I’m truly amazed about how engaged the Quebec audience was – neuroscience doesn’t transcend language barriers easily.</p>
<p>I would to thank  the organizers of XPToronto (Lawrence Ludlow, Michael Sahota, and anyone else I missed) you created a great evening. I would especially like to thank Lawrence for picking me up from the airport and bringing me into Intelliware for the day.</p>
<p>I would like to thank Karl Metivier for remembering me from Agile2009, inviting me to Quebec City and driving to pick me up. I would to thank <a href="http://www.nihahi-tech.com/blog/" target="_blank">Louis-Phillippe Carignan</a>, Alex and George (sorry I didn’t get last names), for organizing Agile Quebec and growing it, to its current size.</p>
<p>I was asked for my current slides, even with the notes they’re not very helpful. Nonetheless here they are: <a href="http://agilepainrelief.com/images/2010/05/Learning-Best-Approaches-for-your-Brain-2010.pdf" target="_blank">Learning Best Approaches for Your Brain</a>.</p>
<p>Finally after the presentation I was made aware that I hurt (emotionally) one of my attendees. During my survey he said that he “wanted to learn about Agile”, I wanted to say that this presentation wouldn’t help, but that isn’t what he understood. He felt attacked. Later on I made use of his example again, I can’t remember what I said. He felt attacked again. I apologized in person and he said he didn’t buy it. I accept that. This is my public apology. I pride myself on being a ‘human focused’ Agile coach and obviously didn’t live up to my own standards. For that I’m truly sorry.</p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/sApsJ_OtnsM" width="1"/></div>
    </content>
    <updated>2010-05-20T03:39:43Z</updated>
    <category term="Agile"/>
    <category term="Brain"/>
    <category term="Science"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/05/thanks-to-xptoronto-agile-quebec-and-an-apology.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://me.andering.com/?p=773</id>
    <link href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/" rel="alternate" type="text/html"/>
    <title>Cleaner code in other languages</title>
    <summary>At SPA2010 Rob Westgeest, Marc Evers and yours truly hosted the workshop “Flying horses, Cleaner code in other languages”. This is a quick writeup accompanied by the flipcharts that were created by the groups to summarize what they learned.
We brought one exercise, to be carried out by pair programming. A pair can choose what ever [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><em>At SPA2010 <a href="http://notaresource.blogspot.com" target="_blank">Rob Westgeest</a>, <a href="http://blog.piecemealgrowth.net" target="_blank">Marc Evers</a> and yours truly hosted the workshop “Flying horses, Cleaner code in other languages”. This is a quick writeup accompanied by the flipcharts that were created by the groups to summarize what they learned.</em></p>
<p>We brought one exercise, to be carried out by pair programming. A pair can choose what ever programming language they want to use. We try of course to get an interesting variety of languages to learn from. We ran three 40 minute timeboxes. Each timebox consists of 25 minutes for actual work, and 15 minutes reflecting (about three different solutions presented on the projector accompanied by discussion). Some people switch pairs from one timebox to the next, so they can get hands-on experience of trying to solve the same problem in different languages. The goal of the exercise is not to finish first, or have the cleverest solution, but develop a solution that is idiomatic in the language one is solving it in, so that we could compare notes afterwards.<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1270/" rel="attachment  wp-att-780"><img alt="" class="aligncenter size-medium wp-image-780" height="333" src="http://me.andering.com/wp-content/uploads/2010/05/IMG_1270-499x333.jpg" title="Flying Horses - cleaner code in other languages at  SPA2010 - group shot" width="499"/></a></p>
<p>This time we had three pairs working in smalltalk (<a href="http://www.cincomsmalltalk.com" target="_blank">cincom smalltalk</a> as well as <a href="http://www.squeak.org" target="_blank">squeak</a>), two pairs in ruby, two java, and further pairs in Scala and Haskell.</p>
<p>A few pairs wrote examples using Rspec or Scalaspec, most pairs wrote ‘classic’ XUnit style tests. Some worked completely outside-in, other bottom up, and quite a few from the middle outward (me and my pair amongst others).</p>
<p>Some things that struck me:</p>
<ul>
<li>at least one of the smalltalk solutions I saw did not strike me as very idiomatic smalltalk (admittedly, the presenter said it needed refactoring, so they went for make it work/make it right).</li>
<li>Nat Pryce noticed that collections were processed easier (and with less code) in the Haskell and Smalltalk solutions than in Java.</li>
<li>The smalltalk pairs were the first ones to finish setting up their development environment and getting to work (Rob did a timecheck, the smalltalkers were the only ones working on the problem already). Having an environment that contains almost all the tools and libraries that you need gives a big speed boost at the beginning. What was more striking still was that all smalltalkers used environments they just installed and had not used before; I installed <a href="http://www.squeak.org" target="_blank">squeak</a> last weekend, the others were using a fresh beta version of their environment.</li>
<li>Many people had not seen (much of) haskell/ruby/smalltalk style of iterating over collections using blocks/closures, luckily these idioms seem to be trickling down to Java and C#.</li>
</ul>
<p>As with the previous instance of Flying Horses, the Haskell pair was moving towards a complete solution the fastest. This may be because the exercise we use seems to find itself in Haskell’s sweet spot (parsing and manipulating data).<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1270/" rel="attachment wp-att-780"/></p>
<p>On the whole, the level of engagement was pretty intense (about half the participants continued working through the breaks, even though we emphatically tried to get them to stop <img alt=";)" class="wp-smiley" src="http://me.andering.com/wp-includes/images/smilies/icon_wink.gif"/> ), participants said they got to see some very different ways of solving a problem from what they knew, so they came out of the workshop with puzzles to investigate further.</p>
<p>As one participant mentioned, code presentations work up to a point. They show what a pair has done, but it is hard to see what steps they have taken to get to the solution. Seeing the sequence of steps (and experiencing it) when you are part of a pair (especially with someone you don’t know) is very valuable. I’m interested in suggestions for getting more of the sequence of events (rather than the solution) out into the presentations.</p>
<p>We have tried letting people work with task lists and presenting from there (works somewhat, but may cause pairs to loose to much time on their small design up front).</p>
<p>Let a thousand languages bloom <img alt=";)" class="wp-smiley" src="http://me.andering.com/wp-includes/images/smilies/icon_wink.gif"/>  Below are the flipcharts summarizing some of the things people learnt from the workshop.</p>

<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1270/" title="Flying Horses - cleaner code in other languages at SPA2010 - group shot"><img alt="" class="attachment-thumbnail" height="150" src="http://me.andering.com/wp-content/uploads/2010/05/IMG_1270-150x150.jpg" title="Flying Horses - cleaner code in other languages at SPA2010 - group shot" width="150"/></a>
<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1271/" title="IMG_1271"><img alt="" class="attachment-thumbnail" height="150" src="http://me.andering.com/wp-content/uploads/2010/05/IMG_1271-150x150.jpg" title="IMG_1271" width="150"/></a>
<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1273/" title="IMG_1273"><img alt="" class="attachment-thumbnail" height="150" src="http://me.andering.com/wp-content/uploads/2010/05/IMG_1273-150x150.jpg" title="IMG_1273" width="150"/></a>
<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1272/" title="IMG_1272"><img alt="" class="attachment-thumbnail" height="150" src="http://me.andering.com/wp-content/uploads/2010/05/IMG_1272-150x150.jpg" title="IMG_1272" width="150"/></a>
<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1274/" title="IMG_1274"><img alt="" class="attachment-thumbnail" height="150" src="http://me.andering.com/wp-content/uploads/2010/05/IMG_1274-150x150.jpg" title="IMG_1274" width="150"/></a>
<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1275-2/" title="IMG_1275"><img alt="" class="attachment-thumbnail" height="150" src="http://me.andering.com/wp-content/uploads/2010/05/IMG_12751-150x150.jpg" title="IMG_1275" width="150"/></a>
<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/img_1275/" title="IMG_1275"><img alt="" class="attachment-thumbnail" height="150" src="http://me.andering.com/wp-content/uploads/2010/05/IMG_1275-150x150.jpg" title="IMG_1275" width="150"/></a>



<!-- Begin SexyBookmarks Menu Code -->
<div class="sexy-bookmarks sexy-bookmarks-expand sexy-bookmarks-spaced sexy-bookmarks-bg-enjoy">
<ul class="socials">
		<li class="sexy-delicious">
			<a href="http://del.icio.us/post?url=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;title=Cleaner+code+in+other+languages" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="sexy-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;title=Cleaner+code+in+other+languages" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="sexy-reddit">
			<a href="http://reddit.com/submit?url=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;title=Cleaner+code+in+other+languages" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="sexy-yahoobuzz">
			<a href="http://buzz.yahoo.com/submit/?submitUrl=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;submitHeadline=Cleaner+code+in+other+languages&amp;submitSummary=At%20SPA2010%20Rob%20Westgeest%2C%20Marc%20Evers%20and%20yours%20truly%20hosted%20the%20workshop%20%22Flying%20horses%2C%20Cleaner%20code%20in%20other%20languages%22.%20This%20is%20a%20quick%20writeup%20accompanied%20by%20the%20flipcharts%20that%20were%20created%20by%20the%20groups%20to%20summarize%20what%20they%20learned.%0D%0A%0D%0AWe%20brought%20one%20exercise%2C%20to%20be%20carried%20out%20by%20pair%20progr&amp;submitCategory=science&amp;submitAssetType=text" rel="nofollow" title="Buzz up!">Buzz up!</a>
		</li>
		<li class="sexy-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;title=Cleaner+code+in+other+languages" rel="nofollow" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="sexy-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;t=Cleaner+code+in+other+languages" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="sexy-twitter">
			<a href="http://twitter.com/home?status=Cleaner+code+in+other+languages+-+http://is.gd/cdhpd+(via+@most_alive)" rel="nofollow" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="sexy-mail">
			<a href="mailto:?subject=%22Cleaner%20code%20in%20other%20languages%22&amp;body=I%20thought%20this%20article%20might%20interest%20you.%0A%0A%22At%20SPA2010%20Rob%20Westgeest%2C%20Marc%20Evers%20and%20yours%20truly%20hosted%20the%20workshop%20%22Flying%20horses%2C%20Cleaner%20code%20in%20other%20languages%22.%20This%20is%20a%20quick%20writeup%20accompanied%20by%20the%20flipcharts%20that%20were%20created%20by%20the%20groups%20to%20summarize%20what%20they%20learned.%0D%0A%0D%0AWe%20brought%20one%20exercise%2C%20to%20be%20carried%20out%20by%20pair%20progr%22%0A%0AYou%20can%20read%20the%20full%20article%20here%3A%20http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/" rel="nofollow" title="Email this to a friend?">Email this to a friend?</a>
		</li>
		<li class="sexy-comfeed">
			<a href="http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/feed" rel="nofollow" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
		<li class="sexy-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;title=Cleaner+code+in+other+languages&amp;summary=At%20SPA2010%20Rob%20Westgeest%2C%20Marc%20Evers%20and%20yours%20truly%20hosted%20the%20workshop%20%22Flying%20horses%2C%20Cleaner%20code%20in%20other%20languages%22.%20This%20is%20a%20quick%20writeup%20accompanied%20by%20the%20flipcharts%20that%20were%20created%20by%20the%20groups%20to%20summarize%20what%20they%20learned.%0D%0A%0D%0AWe%20brought%20one%20exercise%2C%20to%20be%20carried%20out%20by%20pair%20progr&amp;source=me.andering - Willem van den Ende" rel="nofollow" title="Share this on Linkedin">Share this on Linkedin</a>
		</li>
		<li class="sexy-google">
			<a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;title=Cleaner+code+in+other+languages" rel="nofollow" title="Add this to Google Bookmarks">Add this to Google Bookmarks</a>
		</li>
		<li class="sexy-friendfeed">
			<a href="http://www.friendfeed.com/share?title=Cleaner+code+in+other+languages&amp;link=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/" rel="nofollow" title="Share this on FriendFeed">Share this on FriendFeed</a>
		</li>
		<li class="sexy-ning">
			<a href="http://bookmarks.ning.com/addItem.php?url=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;T=Cleaner+code+in+other+languages" rel="nofollow" title="Add this to Ning">Add this to Ning</a>
		</li>
		<li class="sexy-techmeme">
			<a href="http://twitter.com/home/?status=Tip+@Techmeme+http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/+&quot;Cleaner+code+in+other+languages&quot;" rel="nofollow" title="Tip this to TechMeme">Tip this to TechMeme</a>
		</li>
		<li class="sexy-pingfm">
			<a href="http://ping.fm/ref/?link=http://me.andering.com/2010/05/17/cleaner-code-in-other-languages/&amp;title=Cleaner+code+in+other+languages&amp;body=At%20SPA2010%20Rob%20Westgeest%2C%20Marc%20Evers%20and%20yours%20truly%20hosted%20the%20workshop%20%22Flying%20horses%2C%20Cleaner%20code%20in%20other%20languages%22.%20This%20is%20a%20quick%20writeup%20accompanied%20by%20the%20flipcharts%20that%20were%20created%20by%20the%20groups%20to%20summarize%20what%20they%20learned.%0D%0A%0D%0AWe%20brought%20one%20exercise%2C%20to%20be%20carried%20out%20by%20pair%20progr" rel="nofollow" title="Ping this on Ping.fm">Ping this on Ping.fm</a>
		</li>
</ul>
<div style="clear: both;"/>
</div>
<!-- End SexyBookmarks Menu Code --></div>
    </content>
    <updated>2010-05-17T15:59:07Z</updated>
    <category term="programming"/>
    <category term="conference"/>
    <category term="workshop"/>
    <author>
      <name>Willem</name>
    </author>
    <source>
      <id>http://me.andering.com</id>
      <link href="http://me.andering.com/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://me.andering.com" rel="alternate" type="text/html"/>
      <subtitle>Systems thinking about software development</subtitle>
      <title>me.andering - Willem van den Ende</title>
      <updated>2010-07-30T15:17:08Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://agilepainrelief.com/notesfromatooluser/2010/05/speaking-in-toronto-and-quebec-city.html</id>
    <link href="http://feedproxy.google.com/~r/NotesFromAToolUser/~3/v14lSZaY7Zo/speaking-in-toronto-and-quebec-city.html" rel="alternate" type="text/html"/>
    <title>Speaking in Toronto and Quebec City</title>
    <summary>I will speaking at XPToronto on Tuesday May 18th at 7pm and Quebec City on the following evening at 6pm. Hopefully I can visit Montreal and Waterloo another time.
Learning Best Approaches for Your Brain
Do you wonder why people don’t understand the idea you’re trying to get across in a meeting? Are you mentoring another developer [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><img alt="Promouvoir l'agilit&#xE9; &#xE0; Qu&#xE9;bec" border="0" src="http://agilequebec.ca/images/img_banner.jpg" style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 5px; border-top: 0px; border-right: 0px;"/></p>
<p>I will speaking at <a href="http://www.xptoronto.com/" target="_blank">XPToronto</a> on Tuesday May 18th at 7pm and <a href="http://agilequebec.ca/event.php?id=13" target="_blank">Quebec City</a> on the following evening at 6pm. <em>Hopefully I can visit Montreal and Waterloo another time.</em></p>
<h3>Learning Best Approaches for Your Brain</h3>
<p>Do you wonder why people don’t understand the idea you’re trying to get across in a meeting? Are you mentoring another developer and struggling to understand why the still don’t get it? Do you run training courses and wonder why the attendees only learn 10% of the material. All of us are teachers whether as informal mentors, coaches, trainers or parents. Yet only professional educators receive training in this area. </p>
<p>Only Twenty years ago most people in the world of neuroscience believed that the connections between the neurons in your brain were fixed by the time you were a teenager (or even younger)<a href="http://feeds.feedburner.com/NotesFromAToolUser#_ftn1_2490" name="_ftnref1_2490">[1]</a>. Now we understand that our wiring continues to change (even new neurons can grow) as we grow older. It’s just the rate of change that slows down. This is called Neuroplasticity, the discoveries around it are what make this presentation possible. </p>
<p>To find out more come attend the sessions. Can’t make it? Join me at Agile2010.</p>
<img height="1" src="http://feeds.feedburner.com/~r/NotesFromAToolUser/~4/v14lSZaY7Zo" width="1"/></div>
    </content>
    <updated>2010-05-14T22:17:24Z</updated>
    <category term="Agile"/>
    <category term="Agile 2010"/>
    <category term="Brain"/>
    <category term="Science"/><feedburner:origLink xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://agilepainrelief.com/notesfromatooluser/2010/05/speaking-in-toronto-and-quebec-city.html</feedburner:origLink>
    <author>
      <name>Mark Levison</name>
    </author>
    <source>
      <id>http://agilepainrelief.com</id>
      <link href="http://agilepainrelief.com" rel="alternate" type="text/html"/>
      <link href="http://feeds.feedburner.com/NotesFromAToolUser" rel="self" type="application/atom+xml"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Best practices for your goals</subtitle>
      <title>Agile Pain Relief » Blog</title>
      <updated>2010-07-20T12:16:38Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Blog/Agile-Friday-Ubiquitous-Language-Now-Online.html</id>
    <link href="http://jamesshore.com/Blog/Agile-Friday-Ubiquitous-Language-Now-Online.html" rel="alternate" type="text/html"/>
    <title>Agile Friday: "Ubiquitous Language" Now Online</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>14 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Blog/">James Shore/Blog</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<p>Voting was close in the race for this week's <a href="http://jamesshore.com/Agile-Book/">Art of Agile Development</a> excerpt, with a three-way tie that included <a href="http://jamesshore.com/Agile-Book/real_customer_involvement.html">Real Customer Involvement</a> and <a href="http://jamesshore.com/Agile-Book/coding_standards.html">Coding Standards</a>, but <a href="http://jamesshore.com/Agile-Book/ubiquitous_language.html">Ubiquitous Language</a> won out in the end.</p>

<p>In other book-related news, Diana Larsen and I are offering <a href="http://jamesshore.com/Blog/Art-of-Agile-Training-Courses-This-October.html">training courses based on my book</a> in October. This is the third year we've offered the courses and they've always gotten a positive reception. (Free with your purchase: <a href="http://jamesshore.com/Blog/Your-Certification-is-Meaningless.html">no bullshit certifications</a>.)</p>

<p>Next week's excerpt is from the <a href="http://jamesshore.com/Agile-Book/releasing_intro.html">Releasing</a> chapter and <a href="http://jamesshore.com/Blog/Agile-Friday-Retrospectives-Now-Online.html">the poll</a> is still open at the time of this writing. The following week brings us to the <a href="http://jamesshore.com/Agile-Book/planning_intro.html">Planning</a> chapter. Which practice should I put online first?</p>

<noscript>&lt;div&gt;&lt;a href="http://www.micropoll.com/akira/mpview/847433-255258"&gt;Click Here for Poll&lt;/a&gt;&lt;/div&gt;</noscript><!-- END MICROPOLL JAVASCRIPT CODE -->

<p>And here are the results of the poll for this week's excerpt:</p>

<ul>
	<li><a href="http://jamesshore.com/Agile-Book/real_customer_involvement.html">Real Customer Involvement</a> - 24%</li>
	<li><img alt="**" src="http://jamesshore.com/images/star.gif"/> <a href="http://jamesshore.com/Agile-Book/ubiquitous_language.html">Ubiquitous Language</a> - 32%</li>
	<li><a href="http://jamesshore.com/Agile-Book/stand_up_meetings.html">Stand-Up Meetings</a> - 8%</li>
	<li><a href="http://jamesshore.com/Agile-Book/coding_standards.html">Coding Standards</a> - 24%</li>
	<li><a href="http://jamesshore.com/Agile-Book/iteration_demo.html">Iteration Demo</a> - 8%</li>
	<li><a href="http://jamesshore.com/Agile-Book/reporting.html">Reporting</a> - 4%</li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Blog/Agile-Friday-Ubiquitous-Language-Now-Online.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-14T08:00:00Z</updated>
    <category term="/Blog"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-05-28T03:17:13Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://jamesshore.com/Agile-Book/ubiquitous_language.html</id>
    <link href="http://jamesshore.com/Agile-Book/ubiquitous_language.html" rel="alternate" type="text/html"/>
    <title>The Art of Agile Development: Ubiquitous Language</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><table border="0" width="100%">
      <tbody><tr>
        <td align="left">
          <b>14 May 2010</b>
        </td>
        <td align="right">
          <i> <a href="http://jamesshore.com/Agile-Book/">James Shore/Agile-Book</a> </i>
        </td>
      </tr>
    </tbody></table>
  
    
    
      
<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/stand_up_meetings.html">Stand-Up Meetings</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/collaborating_intro.html">Chapter 6: Collaborating</a></li>
</ul>

<h3>in 99 words</h3>

<blockquote class="ninetynine_words">

<p>Programmers should speak the language of domain experts to avoid miscommunication, delays, and errors.  To avoid mental translation between domain language and code, design your software to use the language of the domain.  Reflect in code how users of the software <em>think</em> and <em>speak</em> about their work.  One powerful approach is to create a domain model.</p>

<p>The ubiquitous language is a living language.  Domain experts influence design and code and the issues discovered while coding influence domain experts.  When you discover discrepancies, it's an opportunity for conversation and joint discovery.  Then update your design to reflect the results.</p>

</blockquote>

<h3>as haiku</h3>

<blockquote class="haiku">
	<p><span title="Some species of fireflies imitate the flashes...">Fireflies light the night--</span>
	<br/><span title="...of other species, in order to lure them close...">Signaling for a mate, or</span>
	<br/><span title="...so they may eat them.  Glomp!">perhaps, a dinner</span></p>
</blockquote>

<h3>Commentary</h3>

<p><a href="http://jamesshore.com/Blog/That-Funky-Metaphor-Stuff.html">That Funky Metaphor Stuff</a></p>

<h3>Full Text</h3>

<p>The following text is excerpted from <cite>The Art of Agile Development</cite> by James Shore and Shane Warden, published by O'Reilly. Copyright © 2008 the authors. All rights reserved.</p>

<h2>Ubiquitous Language</h2>

<dl class="audience"><dt>Audience</dt><dd>Programmers</dd></dl>

<p class="goal">We understand each other.</p>

<p>Try describing the business logic in your current system to a nonprogrammer domain expert.  Are you able to explain how the system works in terms the domain expert understands?  Can you avoid programmer jargon, such as the names of design patterns or coding styles?  Is your domain expert able to identify potential problems in your business logic?</p>

<p>If not, you need a ubiquituous language.</p>

<h3>The Domain Expertise Conundrum</h3>

<p>One of the challenges of professional software development is that programmers aren't necessarily experts in the areas for which they write software.  For example, I've helped write software that controls factory robots, directs complex financial transactions, and analyzes data from scientific instruments.  When I started on these projects, I knew nothing about those things.</p>

<p>It's a conundrum.  The people who are experts in the problem domain—the <em>domain experts</em>—are rarely qualified to write software.  The people who are qualified to write software—the programmers—don't always understand the problem domain.</p>

<blockquote class="notetip">
 
 <p>Hiring programmers with expertise in a particular domain will reduce this problem, but it won't eliminate it.  In addition, given the choice between a great programmer with no domain experience and a poor programmer with lots of domain experience, I would choose the better programmer.</p>
 
</blockquote>

<p>Overcoming this problem is, fundamentally, an issue of communication.  Domain experts communicate their expertise to programmers, who in turn encode that knowledge in software.  The challenge is communicating that information <em>clearly</em> and <em>accurately</em>.</p>

<h3>Two Languages</h3>

<p>Imagine for a moment that you're driving to a job interview.  You forgot your map, so you're getting directions from a friend on your cell phone (hands free, of course!):</p>

<blockquote>
 
 <p>"I just passed a gas station on the right," you say.  "That was a major intersection."</p>
 
 <p>"Wait..." says your friend, as he puzzles over a map.  "What street are you on?  Which direction are you going?"</p>
 
 <p>"I can't tell!" you yelp, slamming on the brakes as a bright yellow sports car cuts you off.  "Uh... sorry.  It's a pretty twisty road—does that help?  Wait... I just passed Hanover."</p>
 
 <p>"Hanover <em>Street</em> or Hanover <em>Loop</em>?" asks your friend.</p>
 
</blockquote>

<p>The problem in this scenario is that you and your friend are speaking two different languages.  You're talking about what you see on the road and your friend is talking about what he sees on his map.  You need to translate between the two, and that adds delay and error. You'll get to your job interview eventually, but you'll probably miss a few turns along the way and you might not get there on time.</p>

<p>A similar problem occurs between programmers and domain experts.  Programmers program in the language of technology: classes, methods, algorithms, and databases.  Domain experts talk in the language of their domain: financial models, chip fabrication plants, and the like.</p>

<p>You <em>could</em> try to translate between the two languages, but it will add delays and errors.  You'd produce some software eventually, but you'd probably introduce some bugs along the way.  Instead, pick just one language for the whole team to use... a <em>ubiquitous language</em>.</p>

<h3>How to Speak the Same Language</h3>

<p>Programmers should speak the language of their domain experts, not the other way around.</p>

<p>Imagine that you're creating a piece of software for typesetting musical scores.  The publishing house you're working for provides an XML description of the music and you need to render it properly.  This is a difficult task, filled with seemingly minor stylistic choices that are vitally important to your customers.</p>

<p>In this situation, you <em>could</em> focus on XML elements, parents, children, and attributes.  You could talk about device contexts, bitmaps, and glyphs.  If you did, your conversation might sound something like this:</p>

<blockquote>
 
 <p>Programmer: "We were wondering how we should render this clef element.  For example, if the element's first child is <code>G</code> and the second child is <code>2</code>, but the octave-change element is <code>-1</code>, which glyph should we use?  Is it a treble clef?"</p>
 
 <p>Domain expert: <em>(Thinking, "I have no idea what these guys are talking about.  But if I admit it, they'll respond with something even more confusing.  I'd better fake it.")</em> "Um... sure, G, that's treble.  Good work."</p>
 
</blockquote>

<p>Instead, focus on domain terms rather than technical terms.</p>

<blockquote>
 
 <p>Programmer: "We were wondering how we should print this G clef.  It's on the second line of the staff but one octave lower.  Is that a treble clef?"</p>
 
 <p>Domain expert: <em>(Thinking, "An easy one.  Good.")</em>  "That's often used for tenor parts in choral music.  It's a treble clef, yes, but because it's an octave lower we use two symbols rather than one.  Here, I'll show you an example."</p>
 
</blockquote>

<p>The domain expert's answer is different the second time because he unsderstands the question.  The conversation in the first example would have led to a bug.</p>

<h3>Ubiquitous Language in Code</h3>

<p>As a programmer, you might have trouble speaking the language of your domain experts.  When you're working on a tough problem, it's difficult to make the mental translation from the language of code to the language of the domain.</p>

<p>A better approach is to design your code to use the language of the domain.  You can name your classes, methods, and variables <em>anything</em>.  Why not use the terms that your domain experts use?</p>

<blockquote class="coach">Reflect how the users think and speak about their work.</blockquote>

<p>This is more than learning the domain to write the software; this is reflecting <em>in code</em> how the users of the software <em>think</em> and <em>speak</em> about their work.  By encoding your understanding of the domain, you refine your knowledge and—due to code's uncompromising need for precision—expose gaps in your knowledge that would otherwise result in bugs.</p>

<p>To continue the example, a program to typeset a musical score based on XML input <em>could</em> be designed around XML concepts.  A better approach, though, would be to design it around domain concepts, as shown in Figure.</p>

<div style="text-align: center;">
 
 
 
 <p><img alt="figure (ubiquitous_language__design.gif)" src="http://jamesshore.com/images/art-of-agile/figs/ubiquitous_language__design.gif"/></p>
 
<p class="caption">Figure. XML and Domain-Centric Design</p></div>

<p>One powerful way to design your application to speak the language of the domain is to create a <em>domain model</em>.  This process deserves its own book; [Evans] and [Wirfs-Brock &amp; McKean] are two worthy examples.</p>

<blockquote class="notetip">
 
 <p>The process of creating a domain-centric design is <em>domain-driven design</em> or <em>domain modelling</em>.  Some people consider it synonymous with <em>object-oriented design</em>.  In this case, domain-centric design is sometimes called <em>"true" object-oriented design</em> in order to contrast it with object-oriented designs that don't emphasize domain concepts.</p>
 
</blockquote>

<h3>Refining the Ubiquitous Language</h3>

<p>The ubiquitous language informs programmers, but the programmers' need for rigorous formalization also informs the rest of the team.  I often see situations in which programmers ask a question—inspired by a coding problem—that in turn causes domain experts to question some of their assumptions.</p>

<p>Your ubiquitous language, therefore, is a living language.  It's only as good as its ability to reflect reality.  As you learn new things, improve the language as well.  There are three caveats about doing this, however.</p>

<p>First, ensure that the whole team—especially the domain experts—understands and agrees with the changes you're proposing.  This will probably require a conversation to resolve any conflicts.  Embrace that!</p>

<p>Second, check that the changes clarify your understanding of the business requirements.  It may seem clearer to make a change, but the language must still reflect what the users need to accomplish with the software.  Keep out programmer jargon—you can help domain experts refine their understanding of complicated corner cases, but don't replace their language with your own.</p>

<p>Third, update the design of the software with the change.  The model and the ubiquitous language must always stay in sync.  A change to the language implies a change to the model.  Yes, this does mean that you should refactor the code when your understanding of the domain changes.  Delaying these changes introduces an insidious type of technical debt: a mismatch between your design and reality, which will lead to ugly kludges and bugs.</p>

<h3>Questions</h3>

<h4 class="faq">Should we avoid the use of technical terms altogether?  Our business domain doesn't mention anything about GUI widgets or a database.</h4>

<p>It's okay to use technical language in areas that are unrelated to the domain.  For example, it's probably best to call a database connection a "connection" and a button a "button."  However, you should typically encapsulate these technical details behind a domain-centric face.</p>

<h3>Results</h3>

<p>When you share a common language between customers and programmers, you reduce the risk of miscommunication.  When you use this common language within the design and implementation of the software, you produce code that's easier to understand and modify.</p>

<p>When the whole team uses the ubiquitous language while sitting together, everyone can overhear domain discussions, especially during pairing sessions.  Team members overhear domain and implementation discussions and join in the conversation to resolve questions and expose hidden assumptions.</p>

<h3>Contraindications</h3>

<dl class="practice"><dt>Allies</dt><dd><a href="http://jamesshore.com/Agile-Book/real_customer_involvement.html">Real Customer Involvement</a></dd><dd class="separated"><a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></dd></dl><p>If you don't have any domain experts sitting with your team, you may have trouble understanding the domain experts' thought process deeply enough to have a ubiquitous language.  Attempting a ubiquitous language is even more important in this situation, though, as it will allow you to communicate more effectively with domain experts when you do have the opportunity to speak with them.</p>

<p>On the other hand, some problems are so technical they don't involve non-programmer domain knowledge at all.  Compilers and web servers are examples of this category.  If you're building this sort of software, the language of technology <em>is</em> the language of the domain.  You'll still have a ubiquitous language, but that language will be technical.</p>

<p>Some teams have no experience creating domain-centric designs.  If this is true of your team, proceed with caution.  Domain-centric designs require a shift in thinking that can be difficult.  See "Further Reading" at the end of this section to get started and consider hiring a programmer with experience in this area to help you learn.</p>

<h3>Alternatives</h3>

<p>It's always a good idea to speak the language of your domain experts.  However, avoiding a domain-centric design <em>can</em> lead to simpler designs in small, technology-centric projects involving trivial business rules.  Be careful, though: this design approach leads to defects and complex, unmaintainable designs in larger projects.  See [Fowler 2002a] for further discussion of this trade-off.</p>

<blockquote class="notetip">
 
 <p>Even small XP projects typically involve four programmers working for several months, so most XP projects are big enough to need a domain-centric design.  Talk to your mentor (see "Find a Mentor" in Chapter 2) before deciding to use another approach.</p>
 
</blockquote>

<h3>Further Reading</h3>

<p><cite>Domain-Driven Design</cite> [Evans] is an excellent and thorough discussion of how to create a domain-centric design.</p>

<p><cite>Object Design</cite> [Wirfs-Brock &amp; McKean] discusses roles, responsibilities, and behaviors in the context of modelling applications.</p>

<p><cite>Patterns of Enterprise Application Architecture</cite> [Fowler 2002a] has a good discussion of the trade-offs between domain models and other architectural approaches.</p>


<ul class="book_nav">
	<li>Next: <a href="http://jamesshore.com/Agile-Book/stand_up_meetings.html">Stand-Up Meetings</a></li>
	<li>Previous: <a href="http://jamesshore.com/Agile-Book/sit_together.html">Sit Together</a></li>
	<li>Up: <a href="http://jamesshore.com/Agile-Book/collaborating_intro.html">Chapter 6: Collaborating</a></li>
</ul>

    
    
    <p><a href="http://jamesshore.com/Agile-Book/ubiquitous_language.html#comments">Comments</a><a/></p><p/></div>
    </summary>
    <updated>2010-05-14T08:00:00Z</updated>
    <category term="/Agile-Book"/>
    <source>
      <id>http://jamesshore.com</id>
      <author>
        <name>James Shore</name>
      </author>
      <link href="http://jamesshore.com" rel="alternate" type="text/html"/>
      <link href="http://www.jamesshore.com/Blog/index.rss" rel="self" type="application/rss+xml"/>
      <rights>Copyright 2000-2006, James Shore</rights>
      <subtitle>The Art of Agile</subtitle>
      <title>James Shore</title>
      <updated>2010-05-30T09:17:19Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blog.gdinwiddie.com/?p=468</id>
    <link href="http://blog.gdinwiddie.com/2010/05/13/the-importance-of-detailed-planning/" rel="alternate" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/05/13/the-importance-of-detailed-planning/#comments" rel="replies" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/05/13/the-importance-of-detailed-planning/feed/atom/" rel="replies" type="application/atom+xml"/>
    <title xml:lang="en">The Importance of Detailed Planning</title>
    <summary xml:lang="en">I recently wrote on The Importance of Precise Estimates.  This is a related topic.
Mark Levison called my attention to an article by Michael Hugos subtitled ‘Agile projects require more planning and coordinating than waterfall projects‘ on CIO.com.  In this article he advocates answering the question, “Has the scope of any project task changed?” at every [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>I recently wrote on <a href="http://blog.gdinwiddie.com/2010/04/19/the-importance-of-precise-estimates/" title="earlier blog post">The Importance of Precise Estimates</a>.  This is a related topic.</p>
<p>Mark Levison called my attention to an article by Michael Hugos subtitled ‘<a href="http://advice.cio.com/michael_hugos/9997/agile_development_project_management_and_five_easy_questions" target="_blank" title="Agile Development, Project Management and Five [Easy] Questions">Agile projects require more planning and coordinating than waterfall projects</a>‘ on CIO.com.  In this article he advocates answering the question, “Has the scope of any project task changed?” at every daily standup.  He uses this information to update a detailed Gantt chart to provide to senior management.  In Michael’s words,</p>
<blockquote><p>It also gives senior managers who are not on the project (but who are still ultimately responsible for what happens) the information they need to feel comfortable. And that saves project team members from being distracted by endless management questions and misplaced advice (and nothing kills agility faster than endless management questions and misplaced advice…).</p></blockquote>
<p>Michael, in LOLspeak, “Ur doin it wrong.”<span id="more-468"/></p>
<p>You’d do well to review Hubert Smit’s presentation on <a href="http://www.rallydev.com/downloads/document/2-five-levels-of-agile-planning-from-enterprise-product-vision-to-team-stand-up.html" target="_blank" title="whitepaper on Rally website">Five Levels of Agile Planning</a>.</p>
<p>A Gantt chart is <em>way too much work</em> to keep up to date with such volatile and detailed data.  I suggest <a href="http://blog.gdinwiddie.com/2010/04/22/projecting-into-the-future/" title="earlier blog post">using a burn-up chart</a>, instead.  Developer tasks is <em>way too detailed</em> a view for senior management.  Steering the company requires a higher level view.  A task level view by senior management invites the very micromanagement Michael fears, and suggests that middle management isn’t doing useful work.  If middle management is tracking individual tasks at a daily level, then they are also micromanaging, and destroying the development team’s ability to self-organize.</p>
<p>For Agile development to work, you have to delegate appropriate levels of organization to the people doing work at that level.  You have to treat people as living, thinking beings–not just a pair of hands to do your bidding.  It’s not a means to drive them harder, squeezing the slack out their days.</p>
<p>The good news is that letting people organize their own tasks frees you to look at a bigger picture.  You can track if and when a project is going astray much more easily that way, than you can by presuming you’re the only person who knows all the tasks that need to be done, in what order, and by whom.</p>
         <img alt="" src="http://blog.gdinwiddie.com/?ak_action=api_record_view&amp;id=468&amp;type=feed"/></div>
    </content>
    <updated>2010-05-13T17:38:40Z</updated>
    <published>2010-05-13T14:06:48Z</published>
    <category scheme="http://blog.gdinwiddie.com" term="Individuals and Interactions"/>
    <category scheme="http://blog.gdinwiddie.com" term="Tools and Techniques"/>
    <category scheme="http://blog.gdinwiddie.com" term="Agile"/>
    <category scheme="http://blog.gdinwiddie.com" term="Management"/>
    <category scheme="http://blog.gdinwiddie.com" term="Planning"/>
    <author>
      <name>George Dinwiddie</name>
      <uri>http://blog.gdinwiddie.com/</uri>
    </author>
    <source>
      <id>http://blog.gdinwiddie.com/feed/atom/</id>
      <link href="http://blog.gdinwiddie.com" rel="alternate" type="text/html"/>
      <link href="http://blog.gdinwiddie.com/feed/atom/" rel="self" type="application/atom+xml"/>
      <subtitle xml:lang="en">Effective software development</subtitle>
      <title xml:lang="en">George Dinwiddie's blog</title>
      <updated>2010-07-11T18:09:16Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blog.gdinwiddie.com/?p=457</id>
    <link href="http://blog.gdinwiddie.com/2010/05/12/3-legs-to-running-an-agile-transition/" rel="alternate" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/05/12/3-legs-to-running-an-agile-transition/#comments" rel="replies" type="text/html"/>
    <link href="http://blog.gdinwiddie.com/2010/05/12/3-legs-to-running-an-agile-transition/feed/atom/" rel="replies" type="application/atom+xml"/>
    <title xml:lang="en">3 Legs to Running an Agile Transition</title>
    <summary xml:lang="en">A while back, I wrote 3 Legs to Standing Up an Agile Project from the perspective of an Agile team just getting started.  Lately, I’ve been thinking about the same sort of thing, but from the perspective of a coach or an executive that wants to transform the organization.  At first glance, this seems no [...]</summary>
    <content type="xhtml" xml:lang="en"><div xmlns="http://www.w3.org/1999/xhtml"><p>A while back, I wrote <a href="http://blog.gdinwiddie.com/2010/02/18/3-legs-to-standing-up-an-agile-project/" title="earlier blog post">3 Legs to Standing Up an Agile Project</a> from the perspective of an Agile team just getting started.  Lately, I’ve been thinking about the same sort of thing, but from the perspective of a coach or an executive that wants to transform the organization.  At first glance, this seems no different. Further reflection, however, reveals that this is less about “how to work in an Agile fashion” and more about “how to introduce change in the way people work.”  The earlier post was a description what an Agile project needs.  This one is a recipe for creating what an Agile project needs.<span id="more-457"/></p>
<h1>Teamwork</h1>
<p>The fundamental practice of teamwork remains essential.  Agile succeeds in large part by reducing wasted effort, and much wasted effort is the result of various people pulling in different directions.  Even slightly different directions will create enough friction to noticeably slow the project.  It’s well worth spending some time and effort on building an effective team within the context of the project.  The two practices most essential for supporting teamwork in an Agile transition are working with a <strong>whole team</strong> in a <strong>common area</strong>.</p>
<h2>Whole Team</h2>
<p>While collaborative teamwork among all the developers, for example, is beneficial to any project, it’s not enough to accomplish a transition to Agile.  At a core, you’ll need high-bandwidth collaboration between your Product Owner, Scrummaster, and Developers.  This is the minimum, in Scrum terms.  In most organizations, Developers really includes both programmers and testers; in some it includes user experience designers.  Yours may include people with other titles, such as architect, database administrator, security officer, system administrator, operations engineer, technical writer….</p>
<p>Your project community will also consist of other stakeholders, such as executives, customers, end users, support personnel, other development teams, facilities maintenance…. There are a lot of people with interest in the project or the things that the project team is doing.</p>
<p>The boundary between the core team and the rest of the project community is rarely distinct.  One useful distinction is whether a person is focused principally on the project, or whether the project is just one of many things with which the person is concerned.  This distinction is not without peril, however.</p>
<p>All too often an organization will assign multiple projects to people where it would be much better if they were focused on one.  If you give your Product Owner, your programmers, or your testers multiple simultaneous projects, you’re likely headed for trouble.  You <em>may</em> be headed for trouble if you multi-task in some of the other specialties, but there’s more variation from one context to another.  As a rule of thumb, if there is any way to let someone focus on only one project, then you should do so.</p>
<h2>Common Area</h2>
<p>Building a team, which is different from a mere work group, takes a lot of work.  With skill, you can facilitate that teambuilding to help it happen more reliably and a little faster.  If you don’t have a skilled facilitator, though, you’re still in luck.  People have practiced self-organizing into small groups for their common good for millennia. If they’re working together for a common goal in a common area, distinct from those working on other goals, they’ll likely build a gelled team without an outside facilitator.  There are many reasons for this, from trust building to osmotic communication.</p>
<p>“But we can’t do that,” I hear you cry!  Why not?  Is this project, this Agile transition, so unimportant that you can’t sit together?</p>
<p>“Our Product Owner has an office elsewhere, and needs to attend to other things.” Maybe you’ve chosen the wrong product owner.  Maybe the Product Owner can sit in the team room for part of the day.</p>
<p>“Our project team is scattered around the globe.”  Don’t do that.  While it’s possible for people scattered around the globe to work together, it’s much harder.  The odds of making that work <em>while also making an Agile transition</em> are slim to none.  <a href="http://blog.gdinwiddie.com/2010/03/31/distributed-development/" title="earlier blog post on distributed development">If you must do distributed projects</a>, set up a collocated team at each location and minimize the working dependencies between the teams.</p>
<p>“We don’t have a space that supports that.”  Find or make one.  Move furniture.  Take down cube walls.  Set up temporary or movable partitions.  If the furniture arrangement is more important than the project, consider canceling the project.</p>
<h1>Visible Progress</h1>
<p>In order to see whether or not we’re headed toward our goals, we need visibility into the progress.  Usually, this boils down to the questions “Are we going to get everything done?” and “Are we going to get done in time?”  If the answer to one or more of these questions is “no” then we can make adjustments to how we’re doing things, how much (and which things) we expect to get done, and what time we expect to have them done.  We can subdivide this visibility into two simple practices: taking <strong>baby steps</strong> and getting things <strong>done</strong>.</p>
<h2>Baby Steps</h2>
<p>Everything we do, from releasing interim versions down to validating the code we write, we should do in small steps.  Working in small steps gives us a much finer-grained view of the progress.  It lets us view the initial trends sooner.  It lets us view changes in the trends sooner.  It gives us more opportunities to make corrections or course changes.  It gives us more practice and comparing where we’re going with where we want to go, so we get better at doing that.  It requires less work before we see that we’re doing something wrong, or doing the wrong thing, therefore there is less work to be thrown away and redone.</p>
<h2>Done</h2>
<p>There’s little point in measuring something as progress unless we know that it actually contributes toward reaching our goal.  Measuring amount of work done doesn’t tell us that.  Consider this scene from the movie, <a href="http://www.imdb.com/title/tt0103924/" target="_blank" title="Captain Ron on IMDB">Captain Ron</a>:</p>
<blockquote><p><strong>Captain Ron</strong>: We should be okay. ‘Cause I know we’re near land.<br/>
<strong>Martin Harvey</strong>: Great, Cap. Great. Ya hear that? We’re almost there. Explain to the kids how you know that, Captain Ron. Someone translate for General Armando.<br/>
<strong>Captain Ron</strong>: Alright, now stay with me: When we left, we had just enough fuel to make it to San Juan. And we are out of fuel.</p></blockquote>
<p>The gap in that logic is immediately obvious, but plan-driven projects attempt the equivalent all the time. We must measure relative to the goal, not relative to the path we’ve taken.</p>
<p>It’s important that we measure functional slices. It’s often tempting to measure tasks that have been accomplished. Sometimes, however, these tasks turn out to be unnecessary, and they don’t contribute to accomplishing the goal.  Sometimes, while they look right in isolation, they turn out to have flaws when we look at the bigger picture.  Sometimes they don’t quite meet with other tasks, and there is a gap to be filled between the tasks.  Such a gap in unknown undoneness.</p>
<p>We need ways of seeing progress that won’t like to us about how much progress we’ve made, or how much is left to do.  We want to measure functional slices that go <em>all the way</em> through the system.  It’s easy to neglect some of the things that people think of “someone else’s responsibility” after the system is “complete.”  These things might include an installation procedure, or deployment to a different computing environment.  Sometimes people neglect something so basic as testing that the system works.</p>
<p>We want to see functional progress–something we can demonstrate and test, something we know is desirable.  Expending the amount allotted is not such an indication.  Getting most of the way to the goal is no guarantee that we’ll get the rest of the way there–particularly when the remaining part is fundamentally different than what we’ve been doing.  We want to always, or at least at frequent intervals, be able to stop and have something that can be used, even if incomplete.</p>
<p>Putting these together can be difficult for a team making a transition to Agile.  It’s hard enough to get everything working, but much more so when you’re having to do that all the time.</p>
<p>Fortunately there are a lot of well-known engineering practices to support combining baby steps with getting to done at each step.  I’m starting with the assumption that the team is already capable of creating working software using whatever techniques they already know.  Eventually they’ll need to learn other practices to support this new way of working, and even to get better in general.</p>
<h1>Continuous Improvement</h1>
<p>Being able to work as a team and measure progress in a visible manner is only the start.  At first, we’ll do these things in a rather rough manner.  As the system grows in size and complexity, that rough manner won’t sustain forward progress.  We’ve got to get better in order to keep moving.</p>
<p>And there’s no limit to how good we can get.  No matter how practiced we are, there’s further improvement we can make.  If we conscientiously practice our techniques, we’ll see places where we can improve them.  We can then practice those improvements, so they become a part of our routine, and we do them even when distracted by the latest disaster.  When things go wrong, it’s no time to ease off on the practices that make us more effective.</p>
<p>As a team, we need to take stock from time to time to see the longer term trends, both good and bad, and the issues that only become visible in retrospect.  Holding retrospectives at various tempos–each iteration, each quarter, each release–will give us various views into what we’re doing, and result in different insights.  We must use these insights to plan ways in which to improve in the future.</p>
<p>From these starting points of <strong>teamwork</strong> and <strong>visible progress</strong>, and proceeding with a program of <strong>continuous improvement</strong>, we can learn all of the practices that support Agile development.</p>
         <img alt="" src="http://blog.gdinwiddie.com/?ak_action=api_record_view&amp;id=457&amp;type=feed"/></div>
    </content>
    <updated>2010-05-12T17:29:08Z</updated>
    <published>2010-05-12T17:29:08Z</published>
    <category scheme="http://blog.gdinwiddie.com" term="Individuals and Interactions"/>
    <category scheme="http://blog.gdinwiddie.com" term="Responding to Change"/>
    <category scheme="http://blog.gdinwiddie.com" term="Agile"/>
    <category scheme="http://blog.gdinwiddie.com" term="Change"/>
    <category scheme="http://blog.gdinwiddie.com" term="Coaching"/>
    <category scheme="http://blog.gdinwiddie.com" term="Progress"/>
    <author>
      <name>George Dinwiddie</name>
      <uri>http://blog.gdinwiddie.com/</uri>
    </author>
    <source>
      <id>http://blog.gdinwiddie.com/feed/atom/</id>
      <link href="http://blog.gdinwiddie.com" rel="alternate" type="text/html"/>
      <link href="http://blog.gdinwiddie.com/feed/atom/" rel="self" type="application/atom+xml"/>
      <subtitle xml:lang="en">Effective software development</subtitle>
      <title xml:lang="en">George Dinwiddie's blog</title>
      <updated>2010-07-11T18:09:16Z</updated>
    </source>
  </entry>
</feed>
