Agile Planet

September 03, 2010

Martin Fowler

Rehabbing my website

I started martinfowler.com back in 2000, now its grown to around 3.5 million words in 500 pages, getting about 200,000 page views a month. One problem with the site is that it looks retro even for 2000 and seriously needs some cosmetic surgery. Another is that it’s not easy to browse to find useful articles.

So now the dsl book (which weighs in at 1.2 million words) is pretty much done with, I need to give martinfowler.com some love in these (and some other) departments. So I’m currently working on a nicer look for the website. I’ve also decided to write a series of “guide pages” - these are pages devoted to a single topic (such as agile software development) that highlight which pages on my website are likely to be useful on that topic.

I have these mocked up now to a point where I’m reasonably happy with them. Now the task is to apply these changes to the current website. My task is eased to some degree by the fact that all the HTML pages are generated from XML sources, but even so it will take some time to ensure everything looks reasonable. I also have a lot of travels coming up in the next few months, so I’m not predicting any delivery dates.

2010-09-03T13:55:00Z

James Shore

Let's Play TDD #4: Gaining on Capital Gains

03 Sep 2010 James Shore/Blog/Lets-Play

Be sure to choose the 720p HD resolution for the most readable text.

Visit the Let's Play archive for more.

Comments

2010-09-03T08:01:00Z

Agile Friday: "Coding Standards" Now Online

03 Sep 2010 James Shore/Blog

Coding Standards, this week's Art of Agile Development release, is now available.

In our discussion of coding standards, Shane and I say that one of the most important things you may learn from coding standards is just how to disagree constructively. I think we were right on target with that one. Coding standards themselves have very little value, I've come to believe. You only really need them if you're having repeated design disagreements--especially if they occur in the guise of repeated refactoring/reversion cycles.

If you're having those sorts of disagreements, coding standards won't resolve the problem. But discussing coding standards might help. It's the discussion that has value, not the standard. The standard merely serves to record the result. If people use the standard as a club, that's your clue that the discussion failed.

Next Week

I'll post a practice from the Releasing chapter next week. There are only two choices left:

Which one should I post? As usual, make your vote in the comments.

Comments

2010-09-03T08:00:00Z

The Art of Agile Development: Coding Standards

03 Sep 2010 James Shore/Agile-Book

in 99 words

In team software development, we create a collective work that is greater than any individual could create on his own. Arguing about style gets in the way.

When creating a coding standard, your most important achievement will be learning how to disagree constructively. To succeed, create the minimal set of standards you can live with. Focus on consistency and consensus over perfection. Remember that few decisions are irrevocable in agile development.

Assume your colleagues are professional and well-meaning. If they deviate from the standard, discuss reasons rather than placing blame. No coding standard can substitute for professional judgement.

as haiku

Fists fly, dust billows--
Tomatoes die, peas cry, as
we choose rose's hue.

Rant

Get a Life!

Full Text

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

Coding Standards

Audience
Programmers

We embrace a joint aesthetic.

Back in the days of the telegraph, as the story goes, telegraph operators could recognize each other on the basis of how they keyed their dots and dashes. Each operator had a unique style, or fist, that experts could recognize easily. Programmers have style, too. We each have our own way of producing code. We refine our style over years until we think it's the most readable, the most compact, or the most informative it can be.

Individual style is great when you're working alone. In team software development, however, the goal is to create a collective work that is greater than any individual could create on his own. Arguing about whose style is best gets in the way; it's easier if we work together in a single style.

XP suggests creating a coding standard: guidelines to which all developers agree to adhere when programming.

Beyond Formatting

I once led a team of four programmers who had widely differing approaches to formatting. When we discussed coding standards, I catalogued three different approaches to braces and tabs. Each approach had its own vigorous defender. I didn't want us to get bogged down in arguments, so I said that people could use whatever brace style they wanted.

The result was predictable: we had three different approaches to formatting in our code. I even saw two different ways of indenting within a single, short method.

You know what surprised me? It wasn't that bad. Sure, the layout was ugly, and I would have preferred consistency, but the code was still readable. In the end, the rest of our coding standard mattered much more than formatting.

We all agreed that clearly named variables and short methods were important. We agreed to use assertions to make our code fail fast, not to optimize without measurements, and never to pass null references between objects. We agreed on how we should and shouldn't handle exceptions, what to do about debugging code, and when and where to log events. These standards helped us far more than a consistent formatting style would have because each one had a concrete benefit. Perhaps that's why we were able to agree on them when we couldn't agree on formatting styles.

Don't get me wrong: a consistent formatting standard is good. If you can agree on one, do! However, when you're putting together your coding standard, don't fall into the trap of arguing about formatting. There are more important issues.

How to Create a Coding Standard

The most important thing you will learn is how to disagree.

Creating a coding standard is an exercise in building consensus. It may be one of the first things that programmers do as a team. Over time, you'll amend and improve the standards. The most important thing you may learn from creating the coding standard is how to disagree constructively.

To that end, I recommend applying two guidelines:

  1. Create the minimal set of standards you can live with.

  2. Focus on consistency and consensus over perfection.

Hold your first discussion of coding standards during the first iteration. The project will typically start out with some discussion of stories and vision, then some release planning and iteration planning (see Go! in Chapter 4). After iteration planning, customers and testers will continue working on the release plan. That's a great time for programmers to talk about coding standards.

The best way to start your coding standard is often to select a industry-standard style guide for your language. This will take care of formatting questions and allow you to focus on design-related questions. If you're not sure what it should encompass, starting points include:

Focus on agreements.

Limit your initial discussion to just one hour. Write down what you agree on. If you disagree about something, move on. You can come back to it later.

I like to write each item that we agree upon on a flip chart so we can tape it to a wall in our open workspace. If you can find a neutral observer to take notes (such as your project manager), so much the better.

If you have trouble, take a step back and talk about your goals for the software and the results you would like to see. Agree about these issues first, even if you disagree about specific approaches. You will have many opportunities to improve your standard. Make the most important decisions now, and move on.

Depending on your team, this may be a contentious discussion. In that case, consider bringing in a professional facilitator to redirect the discussion to your team goals when things gets heated. Your HR department might be able to provide someone, or you can use an outside consultant.

Plan to hold another one-hour coding standard meeting a few days later, and another one a few weeks after that. The long break will allow you to learn to work together and to try out your ideas in practice. If there's still disagreement, experiment with one approach or the other, then revisit the issue.

Ally
Retrospectives

Hold these initial meetings as often as they're useful. After that, change the standard at any time. Just stand up, announce your intention to the team, and, if everybody agrees, change the flip chart. Retrospectives are another good time to discuss changes to the coding standard.

The thumb vote is a quick way to check for consensus. Someone asks a question and everyone holds their thumb up (meaning "I agree"), sideways ("I'll go along with the group"), or down ("I disagree and want to explain why").

Over time, some of the items in the standard will become second nature. Cross them off to make room for more important issues. As you work together, you will recognize ways in which new standards can help. Add these new standards to the list in the same way as before, as long as everybody agrees to try them.

No matter what standards you choose, someone will be probably unhappy with some guideline even with a consensus-based approach. You'll probably find some practices jarring and grating at first. Over time, you'll get used to it. Coding standards are, in many ways, an aesthetic choice: it doesn't really matter what the standard is, as long as it's consistent and thoughtful. One of the marks of a professional is the willingness to put aside personal aesthetics for a team aesthetic.

Dealing with Disagreement

It's possible to pressure a dissenter into accepting a coding standard she doesn't agree with, but it's probably not a good idea. Doing so is a good way to create resentment and discord.

Instead, remember that few decisions are irrevocable in agile development; mistakes are opportunities to learn and improve. Ward Cunningham put it well:1

1http://en.wikiquote.org/wiki/Ward_Cunningham

It was a turning point in my programming career when I realized that I didn't have to win every argument. I'd be talking about code with someone, and I'd say, "I think the best way to do it is A." And they'd say, "I think the best way to do it is B. I'd say, "Well no, it's really A." And they'd say, "Well, we want to do B." It was a turning point for me when I could say, "Fine. Do B. It's not going to hurt us that much if I'm wrong. It's not going to hurt us that much if I'm right and you do B, because, we can correct mistakes. So [let's] find out if it's a mistake."

Go ahead and leave the contested item out of the standard. Maybe lack of standardization in that area will lead to a mess. If it does, the team will learn from the experience and you can change the standard.

Adhering to the Standard

Allies
Pair Programming
Collective Code Ownership

People make mistakes. Pair programming helps developers catch mistakes and maintain self-discipline. It provides a way to discuss formatting and coding questions not addressed by the guidelines. It's also an excellent way to improve the standard; it's much easier to suggest an improvement when you can talk it over with someone first.

Collective code ownership also helps people adhere to the standard, because many different people will edit the same piece of code. Code tends to settle on the standard as a result.

There are less effective approaches. Some teams use automated tools to check their source code for adherence to the coding standard. Others program their version control system to reformat files upon check-in. I don't like either approach: to me, the latter says that you don't trust people to make good decisions on their own, and the former tends to raise false warnings.

Assume your colleagues are professional and well-meaning.

I've also heard of teams who elevate their coding standards to requirements and punish infractions. The idea of enforcing a coding standard leaves a bad taste in my mouth. Your teammates are presumably professionals who pride themselves on doing good work. No coding standard can substitute for professional judgment. Try not to get too upset when you see people deviating from the standard.

Assume your colleagues are professional and well-meaning. If someone is not following the standard, assume that there's a good reason—even if all the evidence is to the contrary. Your challenge is to find that reason and address it. This approach shows respect for others and this will improve others' respect for you.

Before you do anything, ask yourself whether the coding standard was really a team effort. If everybody agreed to every item, they should have no problem following the standard.

Start by talking with your colleague alone to see if there's a disagreement. Take an attitude of collaborative problem solving: instead of saying "Why aren't you propagating exceptions like we agreed?" ask, "What do you think about the 'propagate exceptions' standard we agreed on? Should we keep it?" Give objections full consideration, raise them with the rest of the team, and consider changing the standard.

If the objector agrees with the standard but isn't applying it, it's possible that the standard isn't appropriate in every situation. Ask about specific cases you've noticed. Again, be collaborative, not confrontational. Say something like, "I think we're on the same page regarding the importance of propagating exceptions. In that case, can you explain what's happening in this method? I don't understand why this code doesn't propagate the exception here."

During this discussion, you may learn that the objector doesn't understand the standard. By this time, you should be in a good situation to discuss the standard and what it means. If he's a junior programmer and needs more help, coordinate with the rest of the team to make sure he gets plenty of pairing time with experienced developers.

There is another possibility for teams new to XP. Switching to XP is a big change and can make people feel like they've lost control. Sometimes they react by picking small things that they refuse to change. An obstinate desire to stick with a particular coding standard, regardless of the wishes of the rest of the team, might be a symptom of this reaction.

In this case, your best solution may be to let the infractions slide for several months. Over time, as team members become more comfortable with the changes in their environment, they'll relax and be more willing to compromise.

Questions

We have legacy code that doesn't fit our standard. Should we fix it?

Leave old code alone if it works and you don't need to read or touch it otherwise. It's expensive and risky to spend a lot of time fixing legacy code upfront. Instead, as you modify and refactor those sections of code, bring them up to the new coding standards. When you fix a bug, add a feature, or improve abstraction and factoring, use the new standards on everything you modify.

You can also use an automated tool to perform large-scale formatting changes. Don't spend too much time on this, but if you can do it easily, you might as well. I prefer to integrate immediately before and after such an operation, because reformatting changes tend to disguise other changes. Be aware that making such large-scale changes can render your version control system's change history much more difficult to read.

Results

When you agree on coding standards and conventions, you improve the maintainability and readability of your code. You can take up different tasks in different subsystems with greater ease. Pair programming moves much more smoothly, and you look for ways to improve the expressability and robustness of your code as you write it.

Contraindications

Don't allow coding standards to become a divisive issue for your team.

Alternatives

Some teams work so well together they don't need an written coding standard; their coding standard is implicit.

If you have a new team, create a written coding standard even if everybody gets along well. New teams often go through an initial honeymoon period in which team members are reluctant to disagree with each other. Eventually, disagreements will come out. It's much better to create a standard before problems escalate.

Comments

2010-09-03T08:00:00Z

September 02, 2010

Simon Baker

Old norms from Training Within Industry get a dust-off

When we created our training materials we included a time line stretching back to the 1700s, which identified significant events, revolutionary breakthroughs and key people that have influenced how we work today. This required quite a lot of research, whi...

2010-09-02T11:00:00Z

James Shore

Let's Play TDD #3: Cleaning Up My Mess

02 Sep 2010 James Shore/Blog/Lets-Play

Be sure to choose the 720p HD resolution for the most readable text.

Visit the Let's Play archive for more.

Comments

2010-09-02T08:00:00Z

September 01, 2010

Mark Levison

The Importance of Nurturing Community

Community According to Dictionary.com, a community is:

1. a social group of any size whose members reside in a specific locality, share government, and often have a common cultural and historical heritage.

2. a locality inhabited by such a group.

3. a social, religious, occupational, or other group sharing common characteristics or interests and perceived or perceiving itself as distinct in some respect from the larger society within which it exists (usually prec. by the ): the business community; the community of scholars.

The 3rd definition applies to the Agile Community. From my point of view a community is really the network of relationships between the people who are its members. The more relationships we have and the stronger the individual bonds the stronger the overall community will be.

After Agile2010 I made a suggested over twitter that the Agile Community is Fragile and needs nurturing. Unsurprisingly I got a number of reactions and created some confusion which wasn’t my intent. My key point was that as the community continues to grow and create new conferences: LSSC, XP Universe revived[1], SCNA, XP 2010 (ok this one has been around for a while), we’re at risk of breaking into camps and cliques. Groups of people who spend their time inside one community and who don’t spend enough time listening to each other and the outside world. This trend has been going on for years after all who aside from Ron Jeffries and George Dinwiddie have the time and energy to spend on every mailing list [2].

Towards my goal of strengthening the community I suggest we all commit three actions this year:

  1. Seek people from outside your regular circle i.e. if your non-technical meet some new technical people; Scrummies meet Kanbanners. Whoever you meet, pause, listen (don’t spout) and learn.
  2. Strengthen bonds with people you already know, especially outside of your regular circle
  3. When you introduce someone to Agile, introduce to more than the ideas and approaches you favor today. I.E. Kanban folk mention Scrum or XP; BDDer’s mention TDD – help new people discover the full spectrum of ideas.
  4. Through these connections have your ideas about at least one thing changed (cribbed from Brian Marick).

As our community grows ever bigger lets remember that have much in common even when there are major differences.

Related Ideas: A Community of Thinkers (Jean Tabaka, Liz Keogh and Eric Willeke) and Oath of Non-Allegiance (Alistair Cockburn).

[1] As an aside I still think that Agile Technical Practices would be a better name for this one, emphasizing the practices are important whichever methodology you subscribe to.

[2] see: Agile Mailing Lists for an attempt at listing them all

by Mark Levison at 2010-09-01T20:03:00Z

James Shore

Let's Play TDD #2: Peering Dimly Into the Future

01 Sep 2010 James Shore/Blog/Lets-Play

Be sure to choose the 720p HD resolution for the most readable text.

Visit the Let's Play archive for more.

Comments

2010-09-01T08:00:00Z

August 31, 2010

James Shore

Let's Play: Test-Driven Development

31 Aug 2010 James Shore/Blog/Lets-Play

I'm trying a little experiment: a screencast of me working on a real project, from scratch, using test-driven development. I've called it "Let's Play: Test-Driven Development" in honor of all the Let's Play videos I love watching.

Like a "Let's Play" video, this is a live, stream-of-consciousness recording of my successes and slip-ups as I work. (So far, mostly slip-ups.) I'm hoping this will be an interesting view into how test-driven development works when you take it out of the classroom. As the series continues, I'm sure you'll see quite a bit of incremental design and architecture, too.

As I said, this is an experiment. I'm going to do several episodes and see what the response is like. So if you like it, let me know by leaving a comment on my blog, subscribing to my new Youtube channel, or helping spread the word. Feedback from people like you is how I'm going to judge whether I should keep going.

I hope you enjoy it.

Episode #1: "How Does This Thing Work, Again?"

Be sure to choose the 720p HD resolution for the most readable text.

Visit the Let's Play archive for more. For the first few comments on this entry, see the original announcement.

Comments

2010-08-31T08:01:00Z

James Shore

Let's Play: Test-Driven Development (Placeholder)

31 Aug 2010 James Shore/Blog

I've moved this entry. I'm keeping this placeholder to preserve the comments.

Comments

2010-08-31T08:00:00Z

August 30, 2010

Mark Levison

Just back from Vacation

Waste-paperMy inbox has over 600 threads (not just messages, but threads), I’ve a a couple of writing obligations and I don’t yet have a desk in our new house. Please appreciate it may take the rest of September to catch up.

by Mark Levison at 2010-08-30T12:54:39Z

August 27, 2010

James Shore

Agile Friday: "Is XP Right For Us?" Now Online

27 Aug 2010 James Shore/Blog

One of the things about The Art of Agile Development that I'm most proud of is our continuous acknowledgement that one size doesn't fit all. We were writing a cookbook, after all, with specific instructions and guidance. We could have easily pretended that our advice was The One Right Way to practice Agile.

I'm glad we didn't fall to that temptation. It's not true, of course; there are many good ways to practice Agile. (Sadly, there are an infinite number of bad ways to practice Agile, and they're easier to find than good ways.) So we had to do what authors have always had to do: choose between being narrow and deep, or broad and shallow.

Obviously, we chose "narrow and deep." This week's excerpt, Is XP Right For Us?, was our attempt to have our cake and eat it too. We couldn't go broad, but we could at least be clear about what we were covering and what we weren't. Doing so gave us the opportunity to discuss the tradeoffs involved, too. I'm very happy with the result.

Next Week

The Thinking chapter is completely online, as I've mentioned, so next week's excerpt will be from the Collaborating chapter. We have four practices left to put online from that chapter. Which one would you like next week?

I'll look for your vote in the comments.

Comments

2010-08-27T08:00:00Z

James Shore

The Art of Agile Development: Is XP Right For Us?

27 Aug 2010 James Shore/Agile-Book

in 99 words

You'll need support, from managers and colleagues. Work together, in the same room, and include business experts. Keep the team small--five to twenty people. Don't ignore practices: they're more important than they seem.

A brand-new codebase and a language that's easy to refactor are best for learning. Try to include an experienced coach, and an experienced designer. It's best if everyone gets along.

You don't have to do any of these if you don't want to. (We provide alternatives.) But you'll have more success, and more fun, if you fix your environment rather than compromising your work.

as haiku

slippery, muddy--
where grass died, pepperbushes
provide fragrant blooms

Behind the Scenes

Truth or Clarity?

Poster

'Pre-Flight Checklist' poster

Download this poster!

Full Text

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

Is XP Right For Us?

You can adopt XP in a wide variety of conditions, although the practices you use will vary depending on your situation. The practices in this book were chosen to give you the greatest chance of success. That leads to some prerequisites and recommendations about your team's environment. You don't have to meet these criteria exactly, but it's worth trying to change your environment so that you do. That will give you the best chance of succeeding.

As Martin Fowler said:1

1http://martinfowler.com/bliki/EnterpriseRails.html.

In this sense I see a startling parallel between DHH [David Heinemeier Hansson, creator of Ruby on Rails] and Kent Beck. For either of them, if you present them with a constrained world, they'll look at constraints we take for granted, consider them to be unessential, and create a world without them. I don't have that quality, I tend to try to work within the constraints gradually pushing at them, while they just stick some intellectual dynamite under them and move on. That's why they can create things like Extreme Programming and Rails which really give the industry a jolt.

In other words, if your organization puts a barrier between your work and success, don't just put up with it... find a way to remove it. It's your best path to success.

Similarly, if you want to practice XP, do everything you can to meet the following prerequisites and recommendations. It's a lot more effective than working around limitations.

Prerequisite #1: Management Support

It's very difficult to use XP in the face of opposition from management. Active support is best. To practice XP as described in this book, you will need the following:

  • A common workspace with pairing stations (see Sit Together in Chapter 6)

  • Team members solely allocated to the XP project (see The XP Team in Chapter 3)

  • A product manager, on-site customers, and integrated testers (also discussed in The XP Team in Chapter 3)

You will often need management's help to get the previous three items. In addition, the more management provides the following things, the better:

  • Team authority over the entire development process, including builds, database schema, and version control

  • Compensation and review practices that are compatible with team-based effort

  • Acceptance of new ways of demonstrating progress and showing results (see Reporting in Chapter 6)

  • Patience with lowered productivity while the team learns

If Management Isn't Supportive...

In order for management to support your adoption of XP, they need to believe in its benefits. Think about what the decision-makers care about. What does an organizational success mean to your management? What does a personal success mean? How will adopting XP help them achieve those successes? What are the risks of trying XP, how will you mitigate those risks, and what makes XP worth the risks? Talk in terms of your managers' idea of success, not your own success.

If you have a trusted manager you can turn to, ask for her help and advice. If not, talk to your mentor (see "Find a Mentor" in Chapter 2). Fearless Change: Patterns for Introducing New Ideas [Manns & Rising] is another good resource.

If management refuses your overtures, then XP probably isn't appropriate for your team. You may be able to demonstrate XP's value incrementally by adopting some standalone practices (see "Extremeties: Applying Bits and Pieces of XP," later in this chapter).

Prerequisite #2: Team Agreement

Just as important as management support is the team's agreement to use XP. If team members don't want to use XP, it's not likely to work. XP assumes good faith on the part of team members—there's no way to force the process on somebody who's resisting it.

If People Resist...

It's never a good idea to force someone to practice XP against his will. In the best case, he'll find some way to leave the team, quitting if necessary. In the worst case, he'll remain on the team and silently sabotage your efforts.

Reluctant skeptics are okay. If somebody says, "I don't want to practice XP, but I see that the rest of you do, so I'll give it a fair chance for a few months," that's fine. She may end up liking it. If not, after a few months have gone by, you'll have a better idea of what you can do to meet the whole team's needs.

One way to help people agree to try XP is to promise to revisit the decision on a specific date. (Allow two or three months if you can.) At that point, if the team doesn't want to continue using XP, stop.

If only one or two people refuse to use XP and they're interested in working on another project, let them transfer so the rest of the team can use XP. If no such project is available, or if a significant portion of the team is against using XP, don't use it.

Prerequisite #3: A Colocated Team

XP relies on fast, high-bandwidth communication for many of its practices. In order to achieve that communication, your team needs to sit together in the same room.

If Your Team Isn't Colocated...

Colocation makes a big difference in team effectiveness. Don't assume that your team can't sit together; be sure to include the possibility of bringing the team together is your first option.

With that said, it's okay if one or two noncentral team members are off-site some of the time. You'll be surprised, though, at how much more difficult it is to interact with them. (Actually, they're no more difficult to interact with than before; it's the rest of the team that's improved.) Talk with your mentor about how to best deal with the problem.

If a lot of people are off-site, if a central figure is often absent, or if your team is split across multiple locations, you need help beyond this book. You can use XP or another agile method with a distributed team, but it's a complicated problem that's outside of the scope of our discussion. Ask your mentor for help and see Sit Together in Chapter 6 for more ideas.

Prerequisite #4: On-Site Customers

The on-site customers' decisions determine the value of the software.

On-site customers are critical to the success of an XP team. They, led by the product manager, determine which features the team will develop. In other words, their decisions determine the value of the software.

Of the on-site customers, the product manager is likely the most important. She makes the final determination of value. A good product manager will choose features that provide value to your organization. A poor product manager will dither time away on inconsequential features.

Domain experts, and possibly interaction designers, are also important. They take the place of an upfront requirements phase, sitting with the team to plan upcoming features and answering questions about what the software needs to do.

If Your Product Manager is Too Busy to Be On-Site...

If you have an experienced product manager who makes high-level decisions about features and priorities, but who isn't available to sit with the team full-time, you may be able to ask a business analyst or one of the other on-site customers to act as a proxy. The proxy's job is to act in the product manager's stead to make decisions about details while following the actual product manager's high-level decisions.

This can work well if your proxy has the authority to act in place of the product manager. If the proxy is unable to answer questions on his own and needs to confirm every decision with the real product manager, he will introduce too many delays for this book's approach to XP to work well.

If Your Product Manager is Inexperienced...

This may be okay as long as she has a more experienced colleague she turns to for advice.

If You Can't Get a Product Manager At All...

Although good product managers are in high demand, the absence of a product manager is a big danger sign. The right person for the job may not have the title of "product manager" (see Real Customer Involvement in Chapter 6), but XP requires that somebody with business expertise take responsibility for determining and prioritizing features.

Remind your organization of the cost of development (presumably, hundreds of thousands of dollars) and the value the software will bring to them (hopefully, millions of dollars). That value hinges on the participation of a good product manager. Is that really something they want to scrimp on?

If you can't find a product manager, someone from the development team can play the part. However, this may be a dangerous approach, because this person is unlikely to have the business expertise to deliver an organizational success. If you can't get a product manager, talk with your mentor about how to compensate.

If You Can't Get Other On-Site Customers...

Because XP doesn't have an up-front requirements phase, the work of figuring out requirements happens concurrently with software development. This compresses the overall schedule, but it means that at least one person—and usually several—needs to work on requirements full-time.

Unless you have a small team, this work is probably more than a product manager can handle alone. Typically, the product manager delegates the details to a set of domain experts. In applications that involve a sophisticated user interface, a interaction designer may be involved as well. This allows the product manager to focus on coordinating with stakeholders and resolving questions of value and priorities.

Some business analysts may be domain experts. Be careful of using business analysts that aren't already experts in the domain; although they can relay information from true experts, this process invariably introduces misunderstandings and delays.

As long as somebody is playing the on-site customer role, you can use XP. However, the less expertise your on-site customers have, the more risk there is to the value of your software.

Prerequisite #5: The Right Team Size

I wrote this book for teams as large as 20 people and as small as one person. For teams new to XP, however, I recommend four to six programmers and no more than 12 people on the team (see The XP Team in Chapter 3). I also recommend having an even number of programmers so that everyone can pair program (see Pair Programming in Chapter 5). If you have ongoing support needs, add one more programmer for a total of five or seven so the team can have a batman (see Iteration Planning in Chapter 8).

Teams with fewer than four programmers are less likely to have the intellectual diversity they need. They'll also have trouble using pair programming, an important support mechanism in XP. Large teams introduce coordination challenges. Although experienced teams will handle those challenges smoothly, a new XP team will struggle.

If You Don't Have Even Pairs...

The easiest solution is to add or drop one programmer so you have even pairs. If you can't do that, the XP practices are still appropriate for you, but try to find useful nonproduction code work for the programmer who isn't pairing. This will help the team consistently apply XP's technical practices and will improve code quality.

If Your Team is Larger than Seven Programmers...

The coordination challenges of a large team can make learning XP more difficult. Consider hiring an experienced XP coach to lead the team through the transition. You may also benefit from hiring another experienced XP programmer to assist the coach in mentoring the team.

If your team is larger than ten programmers, you need guidance that's outside of the scope of this book. Hire a coach with experience in scaling XP to large teams.

If Your Team is Smaller Than Four Programmers...

Most of the XP practices are still appropriate for you, but you probably won't be able to pair program much. In this situation, it's best if your team members are conscientious programmers who are passionate about producing high-quality code. That passion will help them apply the technical practices with discipline.

You may have trouble getting on-site customers to sit with you full-time. Instead, sit close to them so that you can get their attention when you need it.

If You Have Many Developers Working Solo...

Some organizations—particularly IT organizations—have a lot of small projects rather than one big project. They structure their work to assign one programmer to each project.

Although this approach has the advantage of connecting programmers directly with projects, it has several disadvantages. It's high risk: every project is the responsibility of one programmer, so that any programmer who leaves orphans a project. Her replacement may have to learn it from first principles.

Code quality can also be a challenge. Projects don't benefit from peer review, so the code is often idiosyncratic. Stovepipe systems, in which each programmer solves the same problem in different ways, appear. Junior programmers, lacking the guidance of their more senior peers, create convoluted, kludgey systems and have few opportunities to learn better approaches. Senior programmers, not realizing the inexperience of their more junior peers, create overly sophisticated code that others have trouble understanding.

You may be able to combine four to seven of these programmers into a single XP team that works on one project at a time, which allows it to complete projects more quickly (see Release Planning in Chapter 8). By working together, senior developers have the opportunity to mentor junior developers, and the team can eliminate stovepipe systems.

Combining your programmers into a single team has some drawbacks. The biggest is likely to be a perceived lack of responsiveness. Although projects will be finished more quickly, customers will no longer have a dedicated programmer to talk to about the status of their projects. The team will only work on one project at a time, so other customers may feel they are being ignored.

To resolve these problems, consider dedicating one programmer to deal with customer requests and minor changes (see Iteration Planning in Chapter 8). You'll also need an influential, unbiased business person to play the product manager role, addressing conflicts between customers and making prioritization decisions.

Prerequisite #6: Use All the Practices

You may be tempted to ignore or remove some practices, particularly the ones that make team members uncomfortable. Be careful of this. XP is designed to have very little waste. Nearly every practice directly contributes to the production of valuable software.

For example, pair programming supports collective code ownership, which is necessary for refactoring. Refactoring allows incremental design and architecture. Incremental design and architecture enables customer-driven planning and frequent releases, which are the key to XP's ability to increase value and deliver successful software.

XP doesn't require perfection—it's okay if you accidentally misapply a practice from time to time—but it rarely works well if you arbitrarily remove pieces.

If Practices Don't Fit...

You may feel that some XP practices aren't appropriate for your organization. That may be true, but it's possible you just feel uncomfortable or unfamiliar with a practice. Are you sure that practice won't work, or do you just not want to do it? XP will work much better for you if you give all of the practices a fair chance rather than picking and choosing the ones you like.

If you're sure a practice won't work, you need to replace it. For example, in order to achieve the benefits of collective code ownership without pair programming, you must provide another way for people to share knowledge about the codebase. (You'll also have to find ways to replace the other benefits of pairing.)

Replacing practices requires continuous refinement and an in-depth understanding of XP. Ask your mentor for help and consider hiring an experienced XP coach.

Recommendation #1: A Brand-New Codebase

Easily-changed code is vital to XP. If your code is cumbersome to change, you'll have difficulty with XP's technical practices, and that difficulty will spill over into XP's planning practices.

XP teams put a lot of effort into keeping their code clean and easy to change. If you have a brand-new codebase, this is easy to do. If you have to work with existing code, you can still practice XP, but it will be more difficult. Even well-maintained code is unlikely to have the simple design and suite of automated unit tests that XP requires (and produces). New XP teams often experience an epiphany between the second and fourth months. "This is the best code I've ever worked with!" they say, and start to see the power of XP.

To understand and appreciate XP's technical practices fully, you need to experience the practices meshing together to give you complete confidence in your code, tests, and build. You need to feel the delight of making big improvements with small changes. You're unlikely to have that experience when working with existing code. If you can, save preexisting code for experienced XP teams.

If You Have Preexisting Code...

You can dig your way out of this hole. See "Applying XP to an Existing Project," later in this chapter.

Recommendation #2: Strong Design Skills

Simple, easily-changed design is XP's core enabler. This means at least one person on the team—preferably a natural leader—needs to have strong design skills.

It's hard to tell if somebody has strong design skills unless you have strong design skills yourself. One clue to look for is an understanding and appreciation of domain-driven design. It requires a crucial shift in thinking—from imperative procedural design to declarative object-oriented design—that programmers with poor design skills can have difficulty grasping.

If No One Has Strong Design Skills...

You'll probably do as well with XP as you would be with any method—perhaps more, because XP includes specific technology practices and advice. However, that doesn't mean you'll be successful. Take it slow and steady, and seek out as much experienced help as you can get.

Meanwhile, start learning! [Evans]' Domain-Driven Design is a good place to start, as is [Fowler 2002a]'s Patterns of Enterprise Application Architecture. Consider taking a course or hiring somebody to join the team as a mentor. Be careful, though—strong design skills, while essential, are surprisingly rare. Ask someone with good design skills to help you vet your choice.

Recommendation #3: A Language That's Easy to Refactor

XP relies on refactoring to continuously improve existing designs, so any language that makes refactoring difficult will make XP difficult. Of the currently popular languages, object-oriented and dynamic languages with garbage collection are the easiest to refactor. C and C++, for example, are more difficult to refactor.

If Your Language Is Hard To Refactor...

You can still use XP, but be sure to include someone on your team who has experience with refactoring in your language, if you can.

Recommendation #4: An Experienced Programmer-Coach

Some people are natural leaders. They're decisive, but appreciate others' views; competent, but respectful of others' abilities. Team members respect and trust them. You can recognize a leader by her influence—regardless of her title, people turn to a leader for advice.

Leadership is independent of title or position. You can identify leaders by their followers, not by their desire to give orders. To identify the real leaders on your team, look for the people that team members want to follow.

XP relies on self-organizing teams. Such a team doesn't have a predefined hierarchy; instead, the team decides for itself who is in charge of what. These roles are usually informal. In fact, in a mature XP team, there is no one leader. Team members seamlessly defer leadership responsibilities from one person to the next, moment to moment, depending on the task at hand and the expertise of those involved.

When your team first forms, though, it won't work together so easily. Somebody will need to help the team remember to follow the XP practices consistently and rigorously. This is particularly important for programmers, who have the most difficult practices to learn.

In other words, your team needs a coach. The best coaches are natural leaders—people who remind others to do the right thing by virtue of who they are rather than the orders they give. Your coach also needs to be an experienced programmer so she can help the team with XP's technical practices.

If You Have No Obvious Coach...

Explain the situation to the team and ask them to choose a coach by consensus. In other words, ask them to pick one person that they can all agree would be a good coach.

In consensus decisions, everyone has a veto. A quick way to perform a consensus vote is to ask everyone to hold their thumbs out. Thumbs up means "I agree". Thumbs sideways means "I'll go with the team's decision." Thumbs down means "I disagree and want to explain why."

If you can't pick a coach by consensus, your team may be too fractured to use XP. If there's someone you can hire that the team would trust, that may help. Be sure to tell whoever you hire that you weren't able to reach consensus on this issue—an experienced XP coach will see it as a danger sign and should speak to team members before accepting.

If Your Leaders are Inexperienced...

Good leaders aren't always experienced developers, but a good coach should look for subtle cues that indicate upcoming problems, which does require experience. An experienced developer is your best coach.

If your leaders are inexperienced, you may want to try pair coaching. Pick one person who's a good leader and one person who has a lot of experience. Make sure they get along well. Ask the two coaches to work together to help the team remember to practice XP consistently and rigorously.

If You're Assigned a Poor Coach...

Your organization may assign somebody to be coach who isn't a good leader. In this case, if the assigned coach recognizes the problem, pair coaching may work for you.

If the assigned coach doesn't recognize the problem and he's damaging the team's ability to function, discuss the situation with your mentor or a manager you trust. This is a delicate situation that requires context-specific advice.

Recommendation #5: A Friendly and Cohesive Team

XP requires that everybody work together to meet team goals. There's no provision for someone to work in isolation, so it's best if team members enjoy working together.

If Your Team Doesn't Get Along...

XP requires people to work together. Combined with the pressure of weekly deliveries, this can help team members learn to trust and respect each other. However, it's possible for a team to implode from the pressure. Try including a team member who is level-headed and has a calming influence.

If team members won't even attempt to work together, don't use XP. If there's just one person whose behavior encourages other people's bad behavior, you might be able to solve the problem by moving him to a different team.

Comments

2010-08-27T08:00:00Z

The Art of Agile Development: Chapter 4: Adopting XP

27 Aug 2010 James Shore/Agile-Book

Full Text

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

Adopting XP

"I can see how XP would work for IT projects, but product development is different." —a product development team

"I can see how XP would work for product development, but IT projects are different." —an in-house IT development team

Before adopting XP, you need to decide whether it's appropriate for your situation. Often, people's default reaction to hearing about XP is to say, "Well, of course that works for other teams, but it couldn't possibly work for us."

XP's applicability is based on organizations and people, not types of projects.

Question that assumption. I've helped a wide variety of teams adopt XP: 20-person teams and one-person teams; huge corporations and small startups; shrinkwrap, in-house, and outsourced software vendors; proprietary and open source developers. Through these experiences, I've learned that software teams are more similar than they are different. XP's applicability has far more to do with your organization and the people involved than the type of project you're working on.

Comments

2010-08-27T08:00:00Z

August 25, 2010

Martin Fowler

InfoQ Interview with Paulo Caroli and me at Agile Brazil

In June I gave a talk at Agile Brazil. During the conference my colleague Paulo Caroli and I were grabbed to give an interview for InfoQ Brazil. We touched on several topics: acceptance testing, polyglot programming, my DSL book, REST, and continuous delivery.

2010-08-25T19:30:00Z

August 20, 2010

Simon Baker

Acceptance tests ain't noise pollution

I had an idea for a splash screen for a future [Energized Work](http://www.energizedwork.com "Energized Work") session about acceptance test-driven development but then a friend suggested t-shirt. Obviously inspired by the greatest band that ever rocke...

2010-08-20T11:00:00Z

James Shore

Agile Friday: "Customer Tests" Now Online

20 Aug 2010 James Shore/Blog

Controversy! After writing the Customer Tests section of The Art of Agile Development, I had a change of heart. I used to be a major advocate for customer testing--what people are now calling "Acceptance Test-Driven Development," or ATDD. In fact, I was the project coordinator for Ward Cunningham's Fit, the first major customer testing tool. But I no longer use or recommend it.

Why not? I explain the details in my Problems With Acceptance Testing blog entry, but the short-short version is that automated customer tests just don't work well over the long term. In the short term they're great. In the long-term, the tests become a major maintenance burden, and the tools tend to get in the way of customer collaboration rather than enhance it.

Luckily, I'm not a complete idiot. (Or Shane isn't. Hmm.) What we wrote in the book is still accurate, even though we wrote it before my change of heart. Shane and I actually highlight the problems in the "Contraindications" subsection. If I could do it over again, though, I'd call this practice "Customer Examples" rather than "Customer Tests." I'd focus on communication even more. I'd come up with some better examples. And I'd leave out the "Automating the Examples" subsection. But what we have in the book, other than the automation subsection, is still good advice.

Next week, I'm planning to post Is XP Right For Us? from Chapter 3. All of the practices we recommend so confidently in the rest of the book rely on an important set of assumptions that are described in that section. I figured it would be useful to put those assumptions online now that so much of the rest of the book is up. If you'd prefer something else, make your case in the comments, as usual.

See you next week!

Comments

2010-08-20T08:00:00Z

The Art of Agile Development: Customer Tests

20 Aug 2010 James Shore/Agile-Book

New Information

Although I still fully embrace using the Describe, Demonstrate, Develop process described for this practice, I've found that using tools such as Fit to automate those examples results in unacceptable maintenance burdens. The value is in the collaborative Describe, Demonstrate, Develop process, not the automated tests. I recommend ignoring the final section of this practice, "Automating the Examples." Everything else is still correct.

I describe the reasons for this change of heart in The Problems With Acceptance Testing. In Alternatives to Acceptance Testing, I explain what to do instead.

Full Text

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

Customer Tests

Audience
Whole Team

We implement tricky domain concepts correctly.

Ally
Ubiquitous Language

Customers have specialized expertise, or domain knowledge, that programmers don't have. Some areas of the application—what programmers call domain rules—require this expertise. You need to make sure that the programmers understand the domain rules well enough to code them properly in the application. Customer tests help customers communicate their expertise.

Ally
Ten-Minute Build

Don't worry; this isn't as complicated as it sounds. Customer tests are really just examples. Your programmers turn them into automated tests, which they then use to check that they've implemented the domain rules correctly. Once the tests are passing, the programmers will include them in their ten-minute build, which will inform the programmers if they ever do anything to break the tests.

To create customer tests, follow the Describe, Demonstrate, Develop process outlined in the next section. Use this process during the iteration in which you develop the corresponding stories.

Describe

Customer tests are for communication.

At the beginning of the iteration, look at your stories and decide whether there are any aspects that programmers might misunderstand. You don't need to provide examples for everything. Customer tests are for communication, not for proving that the software works. (See No Bugs in Chapter 7).

For example, if one of your stories is "Allow invoice deleting", you don't need to explain how invoices are deleted. Programmers understand what it means to delete something. However, you might need examples that show when it's okay to delete an invoice, especially if there are complicated rules to ensure that invoices aren't deleted inappropriately.

If you're not sure what the programmers might misunderstand, ask. Be careful, though; when business experts and programmers first sit down to create customer unit tests, both groups are often surprised by the extent of existing misunderstandings.

Once you've identified potential misunderstandings, gather the team at a whiteboard and summarize the story in question. Briefly describe how the story should work and the rules you're going to provide examples for. It's okay to take questions, but don't get stuck on this step.

For example, if you decided to discuss invoice deletion, you might say:

Customer: One of the stories in this iteration is to add support for deleting invoices. In addition to the screen mockups we've given you, we felt some customer tests would be appropriate. Deleting invoices isn't as simple as it appears because we have to maintain an audit trail.

There are a bunch of rules around this issue. I'll get into the details in a moment, but the basic rule is that it's okay to delete invoices that haven't been sent to customers because presumably that kind of invoice was a mistake. Once an invoice has been sent to a customer, it can only be deleted by a manager. Even then, we have to save a copy for auditing purposes.

Programmer: When an invoice hasn't been sent and gets deleted, is it audited?

Customer: No—in that case, it's just deleted. I'll provide some examples in a moment.

Demonstrate

After a brief discussion of the rules, provide concrete examples that illustrate the scenario. Tables are often the most natural way to describe this information, but you don't need to worry about formatting. Just get the examples on the whiteboard.

Customer (continued): As an example, this invoice hasn't been sent to customers, so an Account Rep can delete it.

Sent User Okay to delete
N Account Rep Y

In fact, anybody can delete it—CSR's, managers, and admins.

Sent User Okay to delete
N CSR Y
N Manager Y
N Admin Y

But once it's sent, only managers and admins can delete it, and even then it's audited.

Sent User Okay to delete
Y Account Rep N
Y CSR N
Y Manager Audited
Y Admin Audited

Also, it's not a simple case of whether something has been "sent" or not. "Sent" actually means one of several conditions. If you've done anything that could have resulted in a customer seeing the invoice, we consider it "sent". Now only a manager or admin can delete it.

Sent User Okay to delete
Printed Account Rep N
Exported Account Rep N
Posted to web Account Rep N
Emailed Account Rep N

As you provide examples, be completely specific. It's tempting to create generic examples, such as "this invoice hasn't been sent to customers, so anybody can delete it", but those get confusing quickly and programmers can't automate them. Provide specifics. "This invoice hasn't been sent to customers, so an account rep can delete it." This will require you to create more examples—that's a good thing.

Your discussion probably won't be as smooth and clean as this example. As you discuss business rules, you'll jump back and forth between describing the rules and demonstrating them with examples. You'll probably discover special cases that you hadn't considered. In some cases, you might even discover whole new categories of rules that you need customer tests for.

One particularly effective way to work is to elaborate on a theme. Start by discussing the most basic case and providing a few examples. Next, describe a special case or additional detail and provide a few more examples. Continue in this way, working from simplest to most complicated, until you have described all aspects of the rule.

You don't need to show all possible examples. Remember, the purpose here is to communicate, not to exhaustively test the application. You only need enough examples to show the differences in the rules. A handful of examples per case is usually enough, and sometimes just one or two is sufficient.

Develop

When you've covered enough ground, document your discussion so the programmers can start working on implementing your rules. This is also a good time to evaluate whether the examples are in a format that works well for automated testing. If not, discuss alternatives with the programmers.

Programmer: Okay, I think we understand what's going on here. We'd like to change your third set of examples, though—the ones where you say "Y" for Sent. Our invoices don't have a "Sent" property. We'll calculate that from the other properties you mentioned. Is it okay if we use "Emailed" instead?

Customer: Yeah, that's fine. Anything that sends it works for that example.

Don't formalize your examples too soon. While you're brainstorming, it's often easiest to work on the whiteboard. Wait until you've worked out all the examples around a particular business rule (or part of a business rule) before formalizing it. This will help you focus on the business rule rather than formatting details.

In some cases, you may discover that you have more examples and rules to discuss than you realized. The act of creating specific examples often reveals scenarios you hadn't considered. Testers are particularly good at finding these. If you have a lot of issues to discuss, consider letting some or all of the programmers get started on the examples you have while you figure out the rest of the details.

Don't use customer tests as a substitute for test-driven development.
Ally
Test-Driven Development

Programmers, once you have some examples, you can start implementing the code using normal test-driven development. Don't use the customers' tests as a substitute for writing your own tests. Although it's possible to drive your development with customer tests—in fact, this can feel quite natural and productive—the tests don't provide the fine-grained support that TDD does. Over time, you'll discover holes in your implementation and regression suite. Instead, pick a business rule, implement it with TDD, then confirm that the associated customer tests pass.

Focus on Business Rules

One of the most common mistakes in creating customer tests is describing what happens in the user interface rather than providing examples of business rules. For example, to show that an account rep must not delete a mailed invoice, you might make the mistake of writing this:

  1. Log in as an account rep

  2. Create new invoice

  3. Enter data

  4. Save invoice

  5. Email invoice to customer

  6. Check if invoice can be deleted (should be "no")

What happened to the core idea? It's too hard to see. Compare that to the previous approach:

When an invoice has been emailed, an account rep may not delete it... or, as you might draw it on the whiteboard:

Sent User Okay to delete
Emailed Account Rep N

Good examples focus on the essence of your rules. Rather than imagining how those rules might work in the application, just think about what the rules are. If you weren't creating an application at all, how would you describe those rules to a colleague? Talk about things rather than actions. Sometimes it helps to think in terms of a template: "When (scenario X), then (scenario Y)."

It takes a bit of practice to think this way, but the results are worth it. The tests become more compact, easier to maintain, and (when implemented correctly) faster to run.

Ask Customers to Lead

Remember the "Customer" in "Customer Tests".

Team members, watch out for a common pitfall in customer testing: no customers! Some teams have programmers and testers do all the work of customer testing, and some teams don't involve their customer at all. In others, a customer is present only as a mute observer. Don't forget the "customer" in "customer tests." The purpose of these activities to bring the customers' knowledge and perspective to the team's work. If programmers or testers take the reins, you've lost that benefit and missed the point.

In some cases, customers may not be willing to take the lead. Programmers and testers may be able to solve this problem by asking the customers for their help. When programmers need domain expertise, they can ask customers to join the team as they discuss examples. One particularly effective technique is to ask for an explanation of a business rule, pretend to be confused, then hand a customer the whiteboard marker and ask him to draw an example on the board.

If customers won't participate in customer testing at all, this may indicate a problem with your relationship with the customers. Ask your mentor (see "Find a Mentor" in Chapter 2) to help you troubleshoot the situation.

Automating the Examples

Programmers may use any tool they like to turn the customers' examples into automated tests. Ward Cunningham's Fit (Framework for Integrated Test)1, is specifically designed for this purpose. It allows you to use HTML to mix descriptions and tables, just as in my invoice auditing example, then runs the tables through programmer-created fixtures to execute the tests.

1Available free at http://fit.c2.com/.

See http://fit.c2.com/ or [Mugridge & Cunningham] for details about using Fit. It's available in several languages, including Java, .NET, Python, Perl, and C++.

You may be interested in FitNesse at http://fitnesse.org/, a variant of Fit. FitNesse is a complete IDE for Fit that uses a Wiki for editing and running tests. (Fit is a command-line tool and works with anything that produces tables in HTML.)

Ally
Exploratory Testing

Fit is a great tool for customer tests because it allows customers to review, run, and even expand on their own tests. Although programmers have to write the fixtures, customers can easily add to or modify existing tables to check an idea. Testers can also modify the tests as an aid to exploratory testing. Because the tests are written in HTML, they can use any HTML editor to modify the tests, including Microsoft Word.

Programmers, don't make Fit too complicated. It's a deceptively simple tool. Your fixtures should work like unit tests, focusing on just a few domain objects. For example, the invoice auditing example would use a custom ColumnFixture. Each column in the table corresponds to a variable or method in the fixture. The code is almost trivial (see Example 9-1).

Example 9-1. Example fixture (C#)

  public class InvoiceAuditingFixture : ColumnFixture
  {
      public InvoiceStatus Sent;
      public UserRole User;
      public Permission OkayToDelete() {
          InvoiceAuditer auditer = new InvoiceAuditer(User, InvoiceStatus)
          return auditer.DeletePermission;
      }
  }
Ally
Ubiquitous Language

Using Fit in this way requires a ubiquitous language and good design. A dedicated domain layer with Whole Value objects2 works best. Without it, you may have to write end-to-end tests, with all the challenges that entails. If you have trouble using Fit, talk to your mentor about whether your design needs work.

2See Domain-Driven Design [Evans] for a discussion of domain layers and http://c2.com/ppr/checks.html#1 [Cunningham] for information about Whole Value.

I often see programmers try to make a complete library of generic fixtures so that no one need write another fixture. That misses the point of Fit, which is to segregate customer tests from programmer implementation. If you make generic fixtures, the implementation details will have to go into the tests, which will make them too complicated and obscure the underlying examples.

Most tests can be expressed with a simple ColumnFixture or RowFixture.

Questions

When do programmers run the customer tests?

Ally
Ten-Minute Build

Once the tests are passing, make them a standard part of your ten-minute build. Like programmers' tests, you should fix them immediately if they ever break.

Should we expand the customer tests when we think of a new scenario?

Ally
Slack

Absolutely! Often, the tests will continue to pass. That's good news; leave the new scenario in place to act as documentation for future readers. If the new test doesn't pass, talk with the programmers about whether they can fix it with iteration slack or whether you need a new story.

What about acceptance testing (also called functional testing)?

Ally
No Bugs

Automated acceptance tests tend to be brittle and slow. I've replaced acceptance tests with customer reviews (see "Customer Reviews" later in this chapter) and a variety of other techniques (see "A Little Lie" in Chapter 3).

Results

Ally
Ubiquitous Language

When you use customer tests well, you reduce the number of mistakes in your domain logic. You discuss domain rules in concrete, unambiguous terms and often discover special cases that you hadn't considered. The examples influence the design of the code and help promote a ubiquitous language. When written well, the customer tests run quickly and require no more maintenance than unit tests do.

Contraindications

Ally
Test-Driven Development

Don't use customer tests as a substitute for test-driven development. Customer tests are a tool to help communicate challenging business rules, not a comprehensive automated testing tool. In particular, Fit doesn't work well as a test scripting tool—it doesn't have variables, loops, or subroutines. (Some people have attempted to add these things to Fit, but it's not pretty.) Real programming tools, such as xUnit or Watir, are better for test scripting.

Allies
Whole Team
Sit Together

In addition, customer tests require domain experts. The real value of the process is the conversation that explores and exposes the customers' business requirements and domain knowledge. If your customers are unavailable, those conversations won't happen.

Finally, because Fit tests are written in HTML, Fit carries more of a maintenance burden than xUnit frameworks do. Automated refactorings won't extend to your Fit tests. To keep your maintenance costs down, avoiding creating customer tests for every business rule. Focus on the tests that will help improve programmer understanding, and avoid further maintenance costs by refactoring your customer tests regularly. Similar stories will have similar tests: consolidate your tests whenever you have the opportunity.

Alternatives

Some teams have testers, not customers, write customer tests. Although this introduces another barrier between the customers' knowledge and the programmers' code, I have seen it succeed. It may be your best choice when customers aren't readily available.

Customer tests don't have to use Fit or FitNesse. Theoretically, you can write them in any testing tool, including xUnit, although I haven't seen anybody do this.

Further Reading

Fit for Developing Software [Mugridge & Cunningham] is the definitive reference for Fit.

"Agile Requirements" [Shore 2005a], online at http://www.jamesshore.com/Blog/Agile-Requirements.html, is a series of essays about agile requirements, customer testing, and Fit.

Comments

2010-08-20T08:00:00Z

August 19, 2010

Simon Baker

Boards for a more user-focused discovery-oriented approach

### Backlog out. Mind-map in showing user activities and high-level tasks We haven’t used a conventional list of stories or stack of cards backlog for over a year. We’re lazy. And creating a big backlog that kept on growing with ever more detail and requ...

2010-08-19T11:00:00Z

Simon Baker

More effective tools for a more user-focused and discovery-oriented approach?

### Backlog abandoned We haven’t used a conventional backlog for over a year. We’re lazy. And creating a big backlog that kept on growing with ever more detail and required regular triage was just wasteful. Instead, we’re currently using a mind-map made ...

2010-08-19T11:00:00Z

August 18, 2010

Simon Baker

Sketchnotes made during one of our training sessions

You might've already seen these sketch notes but I wanted to publish them on this blog because, well, I think they're just wicked. They were drawn by the inimitable [Tim Malbon](http://madebymany.co.uk/author/tim-malbon "Tim Malbon") at [Made By Many](htt...

2010-08-18T11:00:00Z

August 17, 2010

Martin Fowler

DSL copy-edited text in roughcut

Over the last couple of months my DSL book has been through production and will shortly head off to the printers. Part of this process is copy-editing, and I’ve now updated the rough-cut to use the copy-edited text. So now any typos you see in the rough-cut are genuine errors, thus I won’t ignore them any more.

If you’re interested in hearing more about DSLs, Neal Ford and I will be giving our full-day tutorial on DSLs at JAOO again this year. We’re hoping the book will make its conference debut there as well.

2010-08-17T21:56:00Z

August 16, 2010

Martin Fowler

Bliki: Agile2010

Last week I attended the Agile 2010 conference in Orlando. Agile 20xx is the major US agile-oriented conference whose roots go back to XP Universe and the Agile Development Conference. I've not been a regular attender of the main agile conferences, but I did go last year as well. Rather than make an attempt at a consolidated description, here are a few scattered impressions.

Elizabeth Hendrickson (aka testobsessed)

  • Attendance was 1400, more than 2009, but around the same as 2008. So although it has been hit by the Great Recession it's weathered it reasonably well.
  • I was delighted to see Elizabeth Hendrickson and Liz Keogh win the Gordon Pask award.
  • My sense was that most people were relatively new to agile, which is in line with my sense in 2009.
  • There was a much higher proportion of women than I usually see at software conferences.
  • There were lots of talks going on, which felt overwhelming to me: 16 stages (tracks) with 214 talks.
  • I was pleased to see the tutorial on Continuous Delivery that Jez Humble gave with me seemed well-received. (We currently have it booked again for QCon and OOP.)
  • Most of the emphasis was on team collaboration and soft skills. This led to some criticism from people on the programming side.
  • My unscientific sample of talks I attended showed a higher proportion of badly presented talks than I would like.
  • It seems there's a movement to re-create XP Universe for next year.
  • I prefer a conference in a real city to one in a holiday resort.
  • This year marks ten years from the first agile-oriented conference.
  • The conference went smoothly - which is a testament to the hard work of all the organizers. This is particularly so since they had to deal with moving the conference after the flooding in Nashville. Thank You.

Liz Keogh (aka lunivore)

I have mixed feelings about the complaints on the lack of programming topics. Certainly programming plays a central role in software development and attempts to marginalize it correlate well with dead-ends. But programming is part of a very interconnected system which involves lots of pieces - and making these interconnections work requires exactly these kinds of "soft and woolly" skills. There is a real tendency for programmers to look inward and obsess on technical issues rather than engaging with those outside programming. One of the things I like about XP is that it recognizes this: blending technical excellence with collaboration.

I would hate to see programming detached from the agilexx conference with programmers going to different events. There's a need for places where the intermingling can occur. The JAOO and QCon conferences seem to do a very good job of this - as well as having a better quality control over the talks themselves. Their format isn't universal, and there's room for more options. Our crucial task is to engage in excellence in the programming side without cutting off the essential collaboration.

2010-08-16T17:49:00Z

August 15, 2010

Simon Baker

PDCA-powered learning

[Deming](http://en.wikipedia.org/wiki/W._Edwards_Deming "W. Edwards Deming")'s [Plan-Do-Check-Act cycle](http://en.wikipedia.org/wiki/PDCA "Plan-Do-Check-Act cycle") is a scientific method for problem resolution. But it isn't just about resolving problems...

2010-08-15T11:00:00Z

August 09, 2010

Simon Baker

If you're estimating, know why you're estimating

Estimates are lies and estimating is waste. That doesn't necessarily mean it can't sometimes be useful. It's still waste but used at appropriate times, in appropriate ways, and understanding the flaws in the results it can help things along with business ...

2010-08-09T11:00:00Z

August 06, 2010

George Dinwiddie

The Use of Documentation

Documentation! It’s what we do.

People approaching Agile software development for the first time often ask about what documents are required.  When I ask developers what annoys them most about other peoples’ code, I frequently get the answer that it’s not documented well.  And I can’t tell you how many times I’ve heard people express the opinion that Agile software development is undisciplined because you “don’t do any documentation.”

Why is documentation so important to us?

It’s because we’re used to using documents to carry our thoughts and ideas to other people, other places, other times.  Documents are good at the “other places, other times” part.  Documents can be good at transporting ideas to “other people,” but it’s really hard work.

Communicating via a document (Portions of this image courtesy of Briar Press www.briarpress.org)When we use a document for idea transport, we have to convert our thoughts into words in a way that the reader will convert back to thoughts very similar to our own.  Even the best writers are unable to do this reliably for all readers.  Most of us write just clearly enough that we can understand our own writing, and we’ve got the help of knowing what the original thoughts were.

To write for another reader, we need to be aware of alternate ways our words might be interpreted, and edit them to be less ambiguous.  We must also predict the questions that our readers may have, and make sure that we answer those questions in a clear and understandable fashion.  That’s a lot of up-front planning for a simple document.

Professional writers spend a lot of time doing such planning, evaluating, and rewriting.  They also involve editors (the professional testers of the publishing world) to look at the document from other points of view.  They’ll generally send the document to multiple readers for review, and incorporate the feedback into revisions of their document.

Few, if any, of us will go to such lengths for a document intended just to support a software development effort.  That’s why Agile software development processes recommend a conversation, instead.  With a conversation, you get real-time feedback from the recipient of the information.  They can tell us how they’re interpreting our words, and we can revise or elaborate to clear up the misconceptions.  They can ask the questions on their mind directly, instead of depending on us to anticipate them.

Using a document to supplement communications (Portions of this image courtesy of Briar Press www.briarpress.org)“But there’s so much technical detail,” you may say.  “What if we forget some important things?”

Yes, documents are good for helping us to remember things in the future. So write down anything you think will be handy.  Use that document to support your conversation–not replace it. In fact, you may want to create that document together, as part of the conversation. This can be a great technique for aiding clear communication.

Alistair Cockburn has said that “a project’s rate of progress is linked to how long it takes information to get from one person’s mind to another’s.” Don’t delay or derail this process by depending on documents as the vehicle.

by George Dinwiddie at 2010-08-06T13:37:32Z

James Shore

Agile Friday: "Stories" Now Online

06 Aug 2010 James Shore/Blog

I've uploaded Stories, which is this week's excerpt from The Art of Agile Development. Due to time constraints, I haven't incorporated the copyedits yet. If it seems a bit rough, that's why. Thanks once again to Sarah Schneider at O'Reilly for copyediting our book and making a million tiny improvements. You don't notice them until they're gone, which tells you what a good job Sarah did.

I'm going to be at Agile 2010 next week, presenting an awesome session with Arlo Belshee titled "Bloody Stupid Johnson Teaches Agile." It's a parody of all things Agile, and we're having tons of fun with it. If you're going to be at the conference, I hope you'll attend and help heckle. (We'll need hecklers.)

The poll for next week's excerpt will be cut short thanks to my trip, so get your votes in early. Here are your choices, from the Developing chapter:

Comments

2010-08-06T08:00:00Z

The Art of Agile Development: Stories

06 Aug 2010 James Shore/Agile-Book

Stories

Audience
Whole Team

We plan our work in small, customer-centric pieces.

Stories are not requirements.

Stories may be the most misunderstood entity in all of XP. They're not requirements. They're not use cases. They're not even narratives. They're much simpler than that.

Ally
Release Planning

Stories are for planning. They're simple, one-or-two line descriptions of work the team should produce. Alistair Cockburn calls them "promissory notes for future conversation"1. Everything that stakeholders want the team to produce should have a story:

1http://c2.com/cgi/wiki?UserStory, accessed 30 May 2007.

Some people find that using a template helps them write good stories. For example, [Cohn] recommends using the template "As a (role) I want to (goal) so that (reason)".

Ally
Incremental Requirements

This isn't enough detail for the team to implement and release working software, nor is that the intent of stories. A story is a placeholder for a detailed discussion about requirements. Customers are responsible for having the requirements details available when the rest of the team needs them.

Although stories are short, they still have two important characteristics.

  1. Stories represent customer value and are written in the customers' terminology. (The best stories are actually written by customers.) They describe an end-result that the customer values, not implementation details.

  2. Stories have clear completion criteria. Customers can describe an objective test that would allow programmers to tell when they've successfully implemented the story.

The following examples are not stories:

Story Cards

Write stories on index cards.

I prefer 3x5-inch cards because they fit into my pocket.

This isn't the result of some strange Ludditian urge on the part of XP's creators; it's a deliberate choice based on the strengths of the medium. You see, physical cards have one feature that no conglomeration of pixels has: they're tactile. You can pick them up and move them around. This gives them power.

Ally
Release Planning

During release planning, customers and stakeholders gather around a big table to select stories for the next release. It's a difficult process of balancing competing desires. Index cards help prevent these disputes by visually showing priorities, making the scope of the work more clear, and directing conflicts towards the plan rather than personalities.

Ally
Informative Workspace

Story cards also form an essential part of an informative workspace. After the planning meeting, move the cards to the release planning board—a big, six-foot whiteboard, placed prominently in the team's open workspace (see Figure). You can post hundreds of cards and still see them all clearly. For each iteration, place the story cards to finish during the iteration on the iteration planning board—another big whiteboard; see Figure—and move them around to indicate your status and progress. Both of these boards are clearly visible throughout the team room and constantly broadcast information to the team.

Use index cards to be more responsive to stakeholder suggestions.

Index cards also help you be responsive to stakeholders. When you talk with a stakeholder and she has a suggestion, invite her to write it down on a blank index card. I always carry cards with me for precisely this purpose. Afterwards, take the stakeholder and her card to the product manager. They can walk over to the release planning board and discuss the story's place in the overall vision. Again, physical cards focus the discussion on relative priorities rather than contentious "approved / disapproved" decisions.

Ally
Estimating

If the product manager and stakeholder decide to add the story to the release plan, they can take it to the programmers right away. A brief discussion allows the programmers to estimate the story. Developers write their estimate—and possibly a few notes—on the card, and then the stakeholder and product manager place the card into the release plan.

Index cards are simpler and more effective than computerized tools.

Physical index cards enable these ways of working in a very easy and natural way that's surprisingly difficult to replicate with computerized tools. Although you can use software, index cards just work better: they're easier to set up and manipulate, make it easier to see trends and the big picture, and allow you to change your process with no configuration or programming.

Most people are skeptical about the value of index cards at first, so if you feel that way, you're not alone. The best way to evaluate the value of physical story cards is to try them for a few months, then decide whether to keep them.

Customer-Centricity

Ally
The Planning Game

Stories need to be customer-centric. Write them from the on-site customers' point of view and make sure that they provide something that customers care about. On-site customers are in charge of priorities in the planning game, so if a story has no customer value, your customers won't—and shouldn't—include it in the plan.

A good way to ensure that your stories are customer-centric is to ask your customers to write the stories themselves.

One practical result of customer-centric stories is that you won't have stories for technical issues. There should be no "Create a build script" story, for example—customers wouldn't know how to prioritize it. Although programmers can tell customers where the technical stories belong in the plan, that disrupts the balance of power over the scope of the project and can leave customers feeling disenfranchised.

Instead, include any technical considerations in the estimate for each story. If a story requires that the programmers create or update a build script, for example, include that cost when estimating for that story.

Ally
Incremental Design And Architecture

Including technical costs in stories, rather than having dedicated technical stories, requires incremental design and architecture.

Customer-centric stories aren't necessarily always valuable to the end-user, but they should always be valuable to the on-site customers. For example, a story to produce a trade-show demo doesn't help end-users, but it helps the customers sell the product.

Splitting and Combining Stories

Stories can start at any size, but it is difficult to estimate stories that are too large or too small. Split large stories; combine small ones.

Select story sizes such that you complete four to ten each iteration.

The right size for a story depends on your velocity. You should be able to complete four to ten stories in each iteration. Split and combine stories to reach this goal. For example, a team with a velocity of ten days per iteration might split stories with estimates of more than two days, and combine stories that are less than half a day.

Combining stories is easy. Take several similar stories, staple their cards together, and write your new estimate on the front.

Splitting stories is more difficult, because it tempts you away from vertical stripes and releasable stories. It's easiest to just create a new story for each step in the previous story. Unfortunately, this approach leads to story clumps. Instead, consider the essence of the story. Peel away all of the other issues and write them as new stories. [Cohn] has an excellent chapter on how to do this in his book Agile Estimating and Planning. He summarizes various options for splitting stories:

  • Split large stories along the boundaries of the data supported by the story.

  • Split large stories based on the operations that are performed within the story.

  • Split large stories into separate CRUD [Create, Read, Update, Delete] operations.

  • Consider removing cross-cutting concerns (such as security, logging, error handling, and so on) and creating two versions of the story: one with and one without support for the cross-cutting concern.

  • Consider splitting a large story by separating the functional and nonfunctional [performance, stability, scalability, and so forth] aspects into separate stories.

  • Separate a large story into smaller stories if the smaller stories have different priorities.

Special Stories

Most stories will add new capabilities to your software, but any action that requires the team's time but is not a part of normal work needs a story.

Documentation Stories

Ally
Documentation

XP teams need very little documentation to do their work (see Documentation), but you may need the team to produce documentation for other reasons. Create documentation stories just like any other: make them customer-centric and make sure you can identify specific completion criteria. An example of a documentation story is "Produce user manual".

"Non-Functional" Stories

Ally
Performance Optimization

Performance, scalability, and stability—so-called non-functional requirements—should be scheduled with stories too. Be sure that these stories have precise completion criteria. See Performance Optimization for more.

Bug Stories

Allies
No Bugs
"Done Done"

Ideally, your team will fix bugs as soon as they find them, before declaring a story as "done done". Nobody's perfect, though, and you will miss some bugs. Schedule these bugs with story cards: "Fix multiple-user editing bug". Schedule them as soon as possible to keep your code clean and reduce your need for bug-tracking software.

Bug stories can be difficult to estimate. Often, the biggest timesink in debugging is figuring out what's wrong, and you usually can't estimate how long that will take. Instead, provide a time-boxed estimate. "We'll spend up to a day investigating this bug. If we haven't fixed it by then, we'll schedule another story."

Spike Stories

Ally
Spike Solutions

Sometimes programmers won't be able to estimate a story because they don't know enough about the technology required to implement the story. In this case, create a story to research that technology. An example of a research story is "Figure out how to estimate 'Send HTML' story". Programmers will often use a spike solution (see Spike Solutions) to research the technology, so these sorts of stories are often called spike stories.

Word these stories in terms of the goal, not the research that needs to be done. When programmers work on a research story, they only need to do enough work to make their estimate for the real story. They shouldn't try to figure out all of the details or solve the entire problem.

Programmers can usually estimate how long it will take to research a technology even if they don't know the technology in question. If they can't even estimate how long the research will take, timebox the story as you do with bug stories. I find that a day is plenty of time for most spike stories, and half a day is sufficient for most.

Estimating

Other than spike stories, you normally don't need to schedule time for the programmers to estimate stories—you can just ask them for an estimate at any time. It's part of the overhead of the iteration, as are support requests and other unscheduled interruptions. If your programmers feel that estimating is too much of an interruption, try putting new story cards in a pile for the programmers to estimate when it's convenient.

Sometimes you'll have a large number of new stories to estimate. In this case, it might be worth creating a story card for estimating those stories.

Meetings

Like estimating, most meetings are part of the normal overhead of the iteration. If you have an unusual time commitment, such as training or an day-long off-site, you can reserve time for it with a story.

Architecture, Design, Refactoring, and Technical Infrastructure

Ally
Incremental Design And Architecture

Don't create stories for technical details. Technical tasks are part of the cost of implementing stories and should be part of the estimates. Use incremental design and architecture to break large technical requirements into small pieces that you can implement incrementally.

Questions

Are index cards really more effective than computerized tools? What about reporting?

See our discussion of reporting (Reporting) for more information.

What about backups? Won't the cards get lost?

If you exercise reasonable care, you're unlikely to lose cards. The only time I've seen a team lose their cards was when they created them and then left them in an ignored pile somewhere on their boss's desk for six months.

That said, there's always the possibility of fire or other disaster. If the risk of losing cards is too great for you, consider taking a digital photo of the release planning board every week or so. An eight megapixel camera has sufficient resolution to capture a six-foot whiteboard and all of the detail on the cards.

Why do you recommend sizing stories so that we can complete four to ten stories per iteration?

If you only have a few stories in an iteration, it's harder to see that you're making progress, which increases the risk that you won't see problems in time to correct them. In addition, if something goes wrong and you can't finish a story, it will represent a large percentage of your work. Too many stories, on the other hand, increases your planning and estimating burden. Each story becomes smaller, making it harder to see the big picture.

An average of six stories per iteration leads to a three-month release plan (the maximum I recommend) consisting of 78 stories. That's a nice number. It gives you flexibility in planning without overwhelming you with details.

Our customers understand programming. Can we create programmer-centric technical stories?

It's much more difficult to create customer-centric stories than programmer-centric stories, so it's tempting to find excuses for avoiding them. "Our customers don't mind if we have programmer-centric stories" is one such excuse. Try to avoid it.

Even if your customers really do have the ability to prioritize programmer-centric stories, customer-centric stories lead to better plans. Remember, your goal is to create stories that allow you to release the software at any time. Programmer-centric stories usually don't have that property.

If your customers are programmers—if you're writing software for programmers, such as a library or framework—then your stories should use a programmer-centric language (see Ubiquitous Language). Even so, they should reflect your customers' perspective. Create stories about your customers' needs, not your plans to fulfill their needs.

How can we encourage stakeholders to use stories for requesting features?

When a stakeholder asks you for a feature, take out an index card and invite him to write it down so it can be scheduled. For electronic requests, a customer should follow up, either by speaking to the requester in person or creating the story card himself.

If stakeholders refuse to use stories, the product manager can manage this relationship by providing stakeholders with what they want to see and translating stakeholders wishes into stories for the team.

Results

When you use stories well, the on-site customers understand all of the work that they approve and schedule. You work on small, manageable, and independent pieces and can deliver complete features frequently. The project always represents the best possible value to the customer at any point in time.

Contraindications

Stories are no replacement for requirements. You need another way of getting details, whether through expert customers on-site (the XP way) or a requirements document (the traditional way).

Ally
Incremental Design And Architecture

Be very cautious of using customer-centric stories without also using most of the XP development practices. Customer-centric stories depend on the ability to implement infrastructure incrementally with incremental design and architecture. Without this ability, you're likely to incur greater technical debt.

Ally
Sit Together

Physical index cards are only appropriate if the team sits together, or at least has a common area in which they congregate. Experienced distributed teams often keep physical index cards at the main site and copy the cards into the electronic system. This is an administrative headache, but for these teams, the benefits of physical cards make the added work worthwhile.

Some organizations are skittish about using informal planning tools. If important members of your organization require a formal Gantt chart, you may need to provide it. Your project manager can help you make this decision. As with a distributed team, you may find it valuable to use physical cards as well, then duplicate the information into the tool.

Alternatives

For teams that don't use stories, the main distinction between stories and the line items in most plans is that stories are customer-centric. If you can't use customer-centric stories for some reason, customers cannot participate effectively in the planning game. This will eliminate one of its primary benefits: the ability to create better plans by blending information from both customers and programmers. Unfortunately, no alternative practice will help.

Another distinctive feature of stories is the use of index cards. Physical cards offer many benefits over electronic tools, but you can still use an electronic tool if necessary. Some teams track their stories using spreadsheets and others use dedicated agile planning tools. None of these approaches, however, provide the benefits of physical index cards.

Further Reading

Agile Estimating and Planning, by [Cohn], discusses options for splitting stories in Chapter 12.

Comments

2010-08-06T08:00:00Z

August 05, 2010

Martin Fowler

Australia in September

Next month, I’ll be making the long journey down to Australia to spend ten days or so in Melbourne. Thus far I have a couple of talks booked. The main reason is to give a keynote at Agile Australia. I’ll also be speaking at Agile Melbourne. In both cases I’ll be doing a Suite of Talks, but I expect to pick mostly different topics for the two of them.

2010-08-05T13:19:00Z

August 03, 2010

Sammy Larbi

How I accidentally generated all the apps that run all the databases in the universe

Rails Rumble has nothing on this. Of course, you could just click the edit button in your database management studio of choice and achieve the same functionality. SELECT DISTINCT 'script/generate scaffold ' + t . name + ' ' + column_names FROM sys . tables t CROSS APPLY ( SELECT c . name + case when max_length > 255 then ':text' else ':string' end + ' ' FROM sys . columns c ...

by Sammy Larbi at 2010-08-03T17:46:22Z

July 30, 2010

Martin Fowler

Continuous Delivery is Now Out

Today I got my copy of Continuous Delivery, a book that I think is going to be probably the most important technical book of 2010. It talks about the build and deployment process: how to make it faster and less stressful. Almost every client ThoughtWorks has had in the last decade would have benefitted enormously from the techniques in this book, so I'm sure it has a huge potential to improve software development.

This week I've been working on the tutorial that Jez and I are doing at Agile 2010, and using my draft copy reinforced to me how useful a book this is. Jez and I hope to be doing a number of talks on this material over the next year or so - so keep an eye out for us. In particular we will be doing a full day tutorial at QCon San Francisco.

2010-07-30T22:01:00Z

James Shore

Agile Friday: "Ten-Minute Build" Now Online

30 Jul 2010 James Shore/Blog

This week's excerpt from The Art of Agile Development is Ten-Minute Build.

These days, my favorite build tool is Rake. I like to create multiple batch files or shell scripts for running Rake: dev, for building and testing on the local machine; repo, for manipulating the version control repository; and deploy, 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.

Next week's excerpt: something from the Planning chapter. Voting is back to normal this week, so please speak up for your choice in the comments. Here are your choices:

Comments

2010-07-30T08:00:00Z

The Art of Agile Development: Ten-Minute Build

30 Jul 2010 James Shore/Agile-Book

in 99 words

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

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.

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.

Commentary

Living in the Punch Card Era

Full Text

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

Ten-Minute Build

Audience
Programmers

We eliminate build and configuration hassles.

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.

"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."

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."

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 build."

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.

"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.

"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."

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

"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.

"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."

Automate Your Build

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?

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."

Automating your build is one of the easiest ways to improve morale and increase productivity.

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.

How to Automate

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.

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.

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

You should be able to build even when disconnected from the network.

A key component of a successful automated build is the local build. 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.

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.

The details are up to you. In my build scripts, I prefer to have all auto-generated content go into a single directory called build/. 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 build/. This structure allows me to inspect the results of the build process and—if anything goes wrong—wipe the slate clean and start over.

When to Automate

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.

Use the build script to configure the integration machine. Don't configure it manually.

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 .zip file.

Ally
Continuous Integration

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.

Automating Legacy Projects

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.

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.

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.

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.

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.

Now it's time to make a great 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.

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.

Ten Minutes or Less

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.

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.

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.

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.

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.

Slow tests are the most common cause of slow builds.

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?

Ally
Test-Driven Development

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 Test-Driven Development in Chapter 9 for more information.

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.

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 Continuous Integration 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.

Questions

Who's responsible for maintaining the build script?

Ally
Collective Code Ownership

All of the programmers are responsible for maintaining the script. As the codebase evolves, the build script should evolve with it.

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.

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.

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?

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.

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.

How do we find time to improve our build?

Ally
Slack

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.

Should we really keep all of our tools and libraries in version control?

Yes, as much as possible. See Version Control earlier in this chapter for details.

Does the build have to be under ten minutes? We're at eleven.

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.

We use an IDE with an integrated build system. How can we automate our build process?

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.

We have different target and development environments. How do we make this build work?

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.

How can we build our entire product when we rely on third-party software and hardware?

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.

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.

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

How often should we build from scratch?

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.

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.

Results

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.

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.

Contraindications

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.

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.

Alternatives

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.

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.

Comments

2010-07-30T08:00:00Z

July 29, 2010

Martin Fowler

Bliki: UtilityVsStrategicDichotomy

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 IT Doesn't Matter. 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?

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'.

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 puts it "This is not a separation of IT by the nature of the technology, but into what technology does for the host business".

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.

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.

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.

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.)

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.

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.

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.

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.

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.

To explore more...

2010-07-29T13:58:00Z

July 23, 2010

Steve Freeman

Bad code isn’t Technical Debt, it’s an unhedged Call Option

I’d been meaning to write this up for a while, and now Nat Pryce has written up the 140 character version.

Payoff from writing a call.

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 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 Call Option.

I “write” a Call Option 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 santas1 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.

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. Or, I can take a chance and just collect the premium. This is called an unhedged, or “Naked”, Call. In the financial world this is risky because it has unlimited downside, I have to supply the santas whatever they cost me to provide.

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.

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.

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.

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.

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.



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.

by steve.freeman at 2010-07-23T14:15:15Z

James Shore

Agile Friday: "The XP Team" Now Online

23 Jul 2010 James Shore/Blog

For this week's excerpt of The Art of Agile Development, we had a surprise write-in campaign for The XP Team rather than one of the scheduled Collaborating practices. It won the day, so The XP Team is now online to read and link.

Next week's excerpt will come from the Releasing chapter. We have three practices left in that chapter:

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.

Comments

2010-07-23T08:00:00Z

The Art of Agile Development: The XP Team

23 Jul 2010 James Shore/Agile-Book

in 99 words

XP teams are self-organizing and cross-functional. 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.

Second, XP teams include all the expertise necessary to do so.

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.

as haiku

The soil is dry--
the irrigator has gone
I start to water

Commentary

TANSTAAFL

Full Text

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

The XP Team

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.

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

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

The Whole Team

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.

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 self-organization is a hallmark of agile teams.

On-Site Customers

On-site customers—often just called customers—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.

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.

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.

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.

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.

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.

[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:

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.

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:

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.

One of the primary reasons for this success was customer involvement.

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.

...

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.

If the customers won't move to the team, move the team to the customers.

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.

The Product Manager (aka Product Owner)

The product manager only has one job on an XP project, but it's a doozy. That job is to maintain and promote 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.

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.

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 the most important thing their project teams can do with their time.

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.

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.

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:

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.

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.

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.

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 de facto 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.

Domain Experts (aka Subject Matter Experts)

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 domain rules and knowledge of these rules is domain knowledge.

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.

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

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.

On small teams, product managers often double as domain experts.

Interaction Designers

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

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.

Don't confuse graphic design with interaction design. Graphic designers convey ideas and moods via images and layout. Interaction designers focus on the types of people using the product, their needs, and how the product can most seamlessly meet those needs.

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.

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.

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.

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.

Business Analysts

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.

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.

Programmers

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 programmers.

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.

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.

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 XP Concepts later in this chapter) and its impact on development time and future maintenance costs.

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.

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.

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.

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

Designers and Architects

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

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.

Technical Specialists

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 Collective Code Ownership in Chapter 7 for more.)

Testers

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.1

1This 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.

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.

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.

However, testers don't 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.

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.

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

Coaches

XP teams self-organize, 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.

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 coaches. 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.

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.

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.

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.

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.

The Programmer-Coach

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.

Programmer-coaches also act as normal programmers and participate fully in software development.

The Project Manager

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.

Project managers may also double as customers.

Include a programmer-coach and consider including a project manager.

Other Team Members

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.

The Project Community

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

2Thanks to David Schmaltz and Amy Schwartz of True North pgs, Inc., for this term.

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 Trust in Chapter 6). Similarly, in order to use XP, you'll need the help of Facilities to create an open workspace (see Sit Together in Chapter 6).

Stakeholders

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.

The Executive Sponsor

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.

Filling Roles

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.

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.

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).

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.

Team Size

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.

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.

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.

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.

Prefer better to bigger.

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.

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.

Full-Time Team Members

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.

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

Fractional assignment is dreadfully counterproductive.

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)

If your team deals with a lot of ad hoc requests, you may benefit from using a batman, discussed in Iteration Planning in Chapter 8.

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.

Comments

2010-07-23T08:00:00Z

July 21, 2010

Mark Levison

Speaking at Agile 2010

image Several people have asked if I’ve fallen off the face of the earth recently, well not quite. However along with being busy with client work I’ve been preparing my two Agile 2010 sessions with Roger Brown:

Wednesday, August 11, 1:30 – 3:00pm

Learning Best Approaches for your Brain

Do you mentor, coach, teach or just help other people? Do you wonder why, after what feels like your greatest teaching moments, some people still don’t get it? Neuroscience has started to provide us with insights into what happens in the learner’s brain when we’re teaching. Learning is really about building and reinforcing existing neural networks. Instead of providing a lot of new ideas out of the blue, we need to understand the learners existing context and work with that. Instead of focusing on mistakes and errors, we need to focus on what good solutions look, sound and feel like.

See the recent article on InfoQ: The Science of Learning: Best Approaches for Your Brain, for a taste of the session.  Since its after lunch again, please consider avoiding High Fructose Corn Syrup (i.e. most desserts in North America). See: Diet-induced insulin resistance impairs hippocampal synaptic plasticity and cognition in middle-aged rats.

    Thursday, August 12, 9:00 – 10:30am

    Continuous Creativity for Agile Teams

    Creativity can manifest in several ways including creation of something new, refinement of something that exists and problem solving. How do we support, enable and enhance the creative abilities of Agile teams? There are many ways to shape the work environment for greater creativity. We will present a summary of the literature that describes how creativity can be enhanced by providing a safe, nurturing environment, enhancing group interactions, pacing activities that utilize different sensory modes and trusting in the power of subconscious integration.

    I know this will be a tough morning after the Wednesday night parties (i.e. Rally, VersionOne and Cyrus Innovations), I promise this will be worth waking up for.

by Mark Levison at 2010-07-21T02:22:52Z

July 19, 2010

Mark Levison

Agile Quick Links #16

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 what to do instead.

Derek Huether found an awesome Scrum Intro Video (by Hamid Shojaee, Founder and CEO of Axosoft) – its only 8 minutes long.

Odopod is an online sketch pad, 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 “Unfolding the Napkin” and Dave Gray’s  “Gamestorming: A Playbook for Innovators, Rulebreakers, and Changemakers” (Caveat Emptor I only just discovered Dave’s book today and so haven’t read it yet).

Hiring for a Collaborative Team from Esther Derby has a great set of ideas. I would only add one I recently hear from Pascal Van Cauwenberghe 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.

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.

by Mark Levison at 2010-07-19T23:22:21Z

July 16, 2010

James Shore

Agile Friday: "Informative Workspace" Now Online

16 Jul 2010 James Shore/Blog

I'm proud to announce the release of this week's Art of Agile Development excerpt, Informative Workspace. This week's release is particularly notable because it's the last practice from the Thinking chapter, which means that you can now read the whole chapter online.

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.

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.

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.

(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 Clue-By-Four when wielded with proper angular momentum.)

Technically, prepping the book for HTML hasn't been too bad. Shane and I authored the book in a markup language called PseudoPOD, and I wrote a little recursive descent parser1 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.

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

At any rate, that's the Thinking chapter. Thanks for reading! Next week's excerpt comes from the Collaborating chapter. Our choices are:

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

Comments

2010-07-16T08:00:00Z

James Shore

The Art of Agile Development: Informative Workspace

16 Jul 2010 James Shore/Agile-Book

in 99 words

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.

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.

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.

as haiku

Little plastic nubs...
tiny green leaves; together,
meaning in the dirt

Commentary

We ♥ Tools

Full Text

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

Informative Workspace

Audience
Whole Team

We are tuned in to the status of our project.

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.

An informative workspace 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.

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.

Subtle Cues

Simply poking your head into a project room should give you information about the project.

The essence of an informative workspace is information. 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.

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.

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.

You can never have too many whiteboards.

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.

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.

Big Visible Charts

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

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.

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.

Hand-Drawn Charts

Don't rush to computerize.

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.

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.

Process Improvement Charts

Ally
Retrospectives

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.

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.

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.

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.

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:

  • Amount of pairing, by tracking the percentage of time spent pairing versus the percentage of time spent flying solo

  • Pair switching, by tracking how many of the possible pairing combinations actually paired during each iteration (see Figure)

  • Build performance, by tracking the number of tests executed per second (see Figure)

  • Support responsiveness, by tracking the age of the oldest support request (an early chart, which tracked the number of outstanding requests, resulted in hard requests being ignored)

  • Needless interruptions, by tracking the number of hours spent on non-story work each iteration

figure (informative_workspace__sample_charts.gif)

Figure. Sample Charts

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.

Gaming

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

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.

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.

Never use workspace charts in a performance evaluation.

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 Reporting in Chapter 6 for ideas about what to report instead.

Questions

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?

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.

Ally
Reporting

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.

Our charts are constantly out of date. How can I get team members to keep them up-to-date?

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.

If people won't take responsibility, perhaps you're being too controlling.

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.

Allies
Retrospectives
Stand-Up Meetings

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.

Results

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.

Contraindications

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

Alternatives

Ally
Stand-Up Meetings

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.

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

Further Reading

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

Comments

2010-07-16T08:00:00Z

July 15, 2010

Martin Fowler

Pourquoi, pas comment

A couple of weeks ago I was in Paris with Neal Ford to speak at USI 2010. Our talk looked at some aspects of why 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 video is now available. (The introduction is in French but the talk is in English. Sadly my French is barely sufficient to order at a restaurant.)

2010-07-15T22:24:00Z

July 14, 2010

Mark Levison

Learning Article Finally Finished

image 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

by Mark Levison at 2010-07-14T12:02:03Z

July 11, 2010

George Dinwiddie

Je suis fatigué.

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 Paris Coding Dojo, 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.)

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.

And many thanks to the participants of the Paris Coding Dojo for conducting the meeting principally in English for my benefit.

by George Dinwiddie at 2010-07-11T18:09:16Z

July 09, 2010

James Shore

Agile Friday: "Incremental Requirements" Now Online

09 Jul 2010 James Shore/Blog

Incremental Requirements, this week's excerpt from The Art of Agile Development, 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!

There's no poll this week--next week's excerpt will be from the Thinking chapter, and there's only one practice left to release from that chapter (it's Informative Workspace). But you're welcome to say stuff in the comments anyway.

Comments

2010-07-09T08:00:00Z

James Shore

The Art of Agile Development: Incremental Requirements

09 Jul 2010 James Shore/Agile-Book

Full Text

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

Incremental Requirements

Audience
Customers

We define requirements in parallel with other work.

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?

The Living Requirements Document

Ally
Sit Together

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.

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.

Ally
Real Customer Involvement

The key to successful requirements analysis in XP is expert customers. Involve real customers, an experienced product manager, and experts in your problem domain (see The XP Team in Chapter 3 and Real Customer Involvement in Chapter 6). Many of the requirements for your software will be intuitively obvious to the right customers.

If you have trouble with requirements, your team may not include the right customers.

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.

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.

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.

Work Incrementally

Work on requirements incrementally, 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 Release Planning in Chapter 8.

Vision, Features, and Stories

Allies
Vision
Release Planning

Start by clarifying your project vision, then identify features and stories as described in Release Planning in Chapter 8. These initial ideas will guide the rest of your requirements work.

Rough Expectations

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.

Mock-Ups, Customer Tests, and Completion Criteria

Allies
Customer Tests
"Done Done"

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.

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.

Customer Review

Only working applications show customers what they're really going to get.

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.

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.

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.

Ally
Slack

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.

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

Ally
Exploratory Testing

1See Exploratory Testing later in this chapter.

Questions

Our customers don't know what the team should build. What should we do?

Ally
Vision

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 The XP Team in Chapter 3 and Real Customer Involvement in Chapter 6).

What if the customer review finds too many problems for us to deal with?

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.

As a programmer, I'm offended by some of the things customers find in their reviews. They're too nitpicky.

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.

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.

Results

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.

Contraindications

Ally
Sit Together

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.

Ally
No Bugs

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 No Bugs in Chapter 7); the purpose of the review is to bring customers' expectations and programmers' work into alignment.

Alternatives

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.

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

Further Reading

Software Requirements [Wiegers 1999] is a good resource for classic approaches to requirements gathering.

Comments

2010-07-09T08:00:00Z

July 02, 2010

Mark Levison

Agile Metrics

Business Graph 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 is what I would consider.

Running Tested Purchased Features – Ron Jeffries is famous the metric Running Tested Features (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.

Questions to ask:

  • What would you like to change?
  • 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?
  • Your key measure (i.e. RTF), should measure your widest span of control – Sold Features > Deployed > Automated Acceptance Tests > …
  • Measure Cycle Time – i.e. how long it takes to get something done and not people.
  • Other measures can be used: i.e. test coverage from Unit Tests, but be careful they might measure what you think they mean.
  • 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.
  • Metrics have best before dates. Eventually you will stop getting real value from them. At that stage throw them away.
  • Ask can I get this information by walking around, observing and asking questions.

Alright you made it this far you deserve some options:

Martin Fowler says: CannotMeasureProductivity. Dave Nicolette presented on this at Agile 2009 (this article links to heaps of others). I wrote this for InfoQ last year:  What is a Good Agile Metric?. InfoQ also has: Metrics in an Agile World.

The following tools will help you measure, but please remember they often have many bad measures (comments?) turned with the good ones. Think carefully when choosing your rulesets:

  • Sonar – has a bunch of interesting measures: Cyclomatic Complexity, Duplicated code, … . While there are other plugins, its of most use in the Java world.
  • JDepend – helps you spot good vs. bad dependencies.
  • PMD, FindBugs, JLint – see a comparison of all three (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 (> 30-40 lines) and classes (>300-400 lines) that are too long.
  • NDepend like JDepend and heaps more measures. Again please be careful configure only with an adults help :-) Caveat Emptor I’ve been given a free copy of NDepend (that I’ve never had a chance to use).
  • Sonar for C# – yes according to StackOverflow.

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.

Updated to make clear the point that you shouldn’t measure people and the limitations of tools.

by Mark Levison at 2010-07-02T23:20:20Z

James Shore

Agile Friday: "The Planning Game" Now Online

02 Jul 2010 James Shore/Blog

I've released the full text of The Planning Game from The Art of Agile Development.

Next week, I'll post a practice from the Developing chapter. Which would you like to see online next? Make your vote known in the comments.

Comments

2010-07-02T08:00:00Z

The Art of Agile Development: The Planning Game

02 Jul 2010 James Shore/Agile-Book

in 99 words

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

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.

The end result is a single prioritized list.

Commentary

Coulda, Shoulda, Woulda

Full Text

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

The Planning Game

Audience
Whole Team

Our plans take advantage of both business and technology expertise.

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

In economics, a game is something in which "players select actions and the payoffs depend on the actions of all players."1 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."2

1Deardorff's Glossary of International Economics, http://www-personal.umich.edu/~alandear/glossary/g.html

2Dictionary definition of "game theory", http://dictionary.reference.com/search?q=game theory&x=0&y=0

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

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.

How to Play

XP assumes that customers have the most information about value: what best serves the organization. Programmers have the most information about costs: 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 do something is also a decision not to do something else.

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 cooperative game; the team as a whole wins or loses, not individual players.

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

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

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

Allies
Stories
Estimating
  1. Anyone creates a story or selects an unplanned story.

  2. Programmers estimate the story.

  3. Customers place the story into the plan in order of its relative priority.

  4. Repeat until all stories have been estimated and placed into the plan.

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.

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.

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.

Overcoming Disagreements

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 any project, XP or not, that tries to prioritize conflicting needs.

Ally
Stories

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.

Use index cards to focus disagreements away from individuals.

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.

How to Win

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

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?"

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

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.

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."

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?"

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

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."

"Oh, okay. Well, that won't be expensive at all."

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.

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.

Questions

Won't programmers pad their estimates or slack off if they have this much control over the plan?

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."

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.

Won't customers neglect important technical issues if they have this much control over the plan?

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.

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, interpret the technology and describe the options in terms of business impact.

That is, rather than describing the options like:

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?

... try instead:

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?

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:

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.

Our product manager doesn't want to prioritize. He says everything is important. What can we do?

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.

Results

Ally
Vision

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.

Contraindications

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

Allies
Stories
The XP Team
Estimating
  1. Customer-centric stories

  2. Story dependencies that customers can manage effectively (in practice, this means no technical dependencies and simple business dependencies)

  3. Customers capable of making wise prioritization decisions

  4. Programmers capable of making self-consistent estimates

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

Ally
Incremental Design And Architecture

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.

Finally, the planning game assumes that the team has a single dominant constraint. (For more information about the Theory of Constraints, see XP Concepts 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.

Alternatives

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.

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

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.

Comments

2010-07-02T08:00:00Z

June 30, 2010

Mark Levison

Agile Quick Links #15

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 I was recently happily surprised to discover Edistorm via @GerryKirk and Hillary Johnson.

In “Mechanical Agile” 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.

With “Agile: Not Just for Software Development Anymore” April B. (no last name) described the transition of the DAXKO Association marketing team to Agile.

James Carr describes his experience “Using Innovation Games as Retrospective Activities”. Interesting, I’m currently exploring Innovation Games so this comes at a timely juncture.

Roger Brown has two items this week: “Adventures in Accelerated Learning” which provides a couple of interesting and timely challenges. “Multitasking Gets You There Later”.

by Mark Levison at 2010-06-30T03:42:25Z

June 25, 2010

James Shore

Agile Friday: "Documentation" Now Online

25 Jun 2010 James Shore/Blog

This week's practice from The Art of Agile Development is Documentation. 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. See for yourself how it works.

Last week's experiment 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.

Next week's practice will come out of the Planning chapter. The choices are:

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

Comments

2010-06-25T08:00:00Z

James Shore

The Art of Agile Development: Documentation

25 Jun 2010 James Shore/Agile-Book

in 99 words

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

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.

Product documents have business value--schedule them with stories.

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.

Commentary

The Documentation Myth

Full Text

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

Documentation

Audience
Whole Team

We communicate necessary information effectively.

The word documentation 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 communication—that's the commonality.

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 work-in-progress documentation, such as requirements documents and design documents.

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

Work-In-Progress Documentation

Allies
Sit Together
Ubiquitous Language

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.

Allies
Test-Driven Development
Customer Tests
Ubiquitous Language

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.

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.

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.

Product Documentation

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.

Allies
Stories
The Planning Game

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.

Handoff Documentation

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.

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?

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.

Allies
Pair Programming
Collective Code Ownership

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.

Questions

Isn't it a risk to reduce the amount of documentation?

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

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?

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.

Results

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.

Contraindications

Alistair Cockburn describes a variant of Extreme Programming called "Pretty Adventuresome Programming":1

1http://c2.com/cgi/wiki?PrettyAdventuresomeProgramming, accessed 24 May 2007

A PrettyAdventuresomeProgrammer says:

"Wow! That ExtremeProgramming stuff is neat! We almost do it, too! Let's see...

"Extreme Programming requires:

  • You do pair programming.

  • You deliver an increment every three2 weeks.

  • You have a user on the team full time.

  • You have regression unit tests that pass 100% of the time.

  • You have automated acceptance tests which define the behavior of the system.

"As a reward for doing those,

  • You don't put comments in the code.

  • You don't write any requirements or design documentation.

"Now on this project, we're pretty close...

  • 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,

  • and actually, we deliver our increments every 4-6 months,

  • we don't have users anywhere in sight,

  • and we don't have any unit tests,

"but at least we don't have any design documentation3, and we don't comment our code much! So in a sense, you're right, we're almost doing ExtremeProgramming!"

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. etc4.

2Most teams now use one or two-week iterations. I recommend one-week iterations for new teams; see Iteration Planning in Chapter 8.

3Emphasis in original.

4Alistair 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."

Ally
Sit Together

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 The XP Team in Chapter 3) that sits together.

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.

Alternatives

If you think of documents as communication mechanisms 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.

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.

Comments

2010-06-25T08:00:00Z

June 18, 2010

James Shore

Agile Friday: "Real Customer Involvement" Now Online

18 Jun 2010 James Shore/Blog

I've released the full text of Real Customer Involvement from The Art of Agile Development. I particularly like our discussion of the different types of software development in this one.

The provider I was using for doing polls (Micropoll, 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.

Next week's practice comes from the Releasing chapter. The choices are:

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

Comments

2010-06-18T08:00:00Z

James Shore

The Art of Agile Development: Real Customer Involvement

18 Jun 2010 James Shore/Agile-Book

in 99 words

To widen your perspective, involve real customers. The best approach depends on your market.

Personal development: you are the real customer. Congratulations. Go forth and write algorithms.

In-house custom development: turn your real customers into on-site customers.

Outsourced custom development: get real customers to be on-site customers. If you can't, stay in touch and meet face-to-face frequently.

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.

as haiku

roses, cucumbers--
I chose beauty, but Sensei
desires to eat

Commentary

The Importance of Personal Success

Poster

'Project Community' poster

Download this poster!

Full Text

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

Real Customer Involvement

Audience
Coaches
Customers

We understand the goals and frustrations of our customers and end-users.

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.

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?

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 tunnel vision—you could get so caught up in the daily details of the project that you lose track of your real customers' interests.

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.

Personal Development

In personal development, 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 is the real customer.

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.

In-House Custom Development

In-house custom development 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.

In this environment, the team has multiple customers to serve: the executive sponsor who pays for the software and the end-users who use 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.

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 real customers into on-site customers.

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.

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.

If your software has multiple sponsors or user groups, use the ideas in "Vertical Market Software," later in this chapter.

Ally
Iteration Demo

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.

Outsourced Custom Development

Outsourced custom development 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.

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.

Allies
Vision
Release Planning

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.

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.

Vertical-Market Software

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

Be careful about giving real customers too much control over vertical-market software.

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.

Ally
Vision

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.

Ally
Iteration Demo

Rather than involving real customers as members of the team, create opportunities to solicit their feedback. Some companies create a customer review board 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.

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.

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

Horizontal-Market Software

Horizontal-market software 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.

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.

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.

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.

Questions

Who should we use as on-site customers be when we can't include real customers on the team?

You organization should supply a product manager and domain experts. See The XP Team in Chapter 3.

We're creating a web site for our marketing department. What kind of development is that?

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.

Results

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.

Contraindications

Ally
Vision

One danger of involving real customers is that they won't necessarily reflect the needs of all 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.

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 involved but not in control. 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.

Alternatives

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.

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.

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.

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

Comments

2010-06-18T08:00:00Z

June 16, 2010

Sammy Larbi

Transformation Over Conditional Execution

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 ...

by Sammy Larbi at 2010-06-16T16:07:40Z

June 14, 2010

Martin Fowler

Bliki: TeamRoom

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.

Why

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.

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.

Tips for a good Team Room

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.

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.

Provide enough space: about 50 square feet per person (4.5 square meters for those on metric).

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.

The purpose-built tables in our Beijing office have handy baskets for power and other cables.

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.

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.

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.

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.

You'll need lots of wall space, as agilists love their information radiators. 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.

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 UPod.

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.

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.

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.

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.

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.

Useful Links

My thanks to my ThoughtWorks colleagues for helping compile this information.

2010-06-14T13:31:00Z

June 11, 2010

James Shore

Agile Friday: "Energized Work" Now Online

11 Jun 2010 James Shore/Blog

Energized Work is this week's release from The Art of Agile Development.

We're getting close to the end of the Thinking chapter; Informative Workspace is the only one remaining. It will be posted in five weeks, on July 16th. Next week will bring a practice from the Collaborating chapter. The poll is still open for that one.

The following week, June 25th, will feature a practice from the Releasing chapter. Which one would be most useful to have online first?

Poll closed.

Here are the full results of the poll for this week's excerpt:

Comments

2010-06-11T08:00:00Z

James Shore

The Art of Agile Development: Energized Work

11 Jun 2010 James Shore/Agile-Book

in 99 words

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.

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 at work, give it your full attention. Silence your phone and turn off interruptions like email and instant messaging.

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

as haiku

the cicadas sing--
tired, sore, I'm ready for
a perfect evening

Commentary

How to Turn Smart People into Ordinary People

Full Text

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

Energized Work

Audience
Coaches
Whole Team

We work at a pace that allows us to do our best, most productive work indefinitely.

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.

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.

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?

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

How to Be Energized

Go home on time.

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.

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.

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.

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.

Supporting Energized Work

Stay home when you're sick. You risk getting other people sick, too.

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.

Ally
Pair Programming

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.

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.

Ally
Vision

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.

Ally
The Planning Game

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.

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.

Allies
Informative Workspace
Reporting

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.

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 & Lister 1999]'s Peopleware, is well worth reading.

Taking Breaks

Stop when you're making more mistakes than progress.

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.

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.

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, going dark—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.

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.

Questions

What if I'm not ready to check in my code and it's time to go home?

Allies
Test-Driven Development
Continuous Integration

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.

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.

I work in a startup and 40 hours just isn't enough. Can I work longer hours?

If you dread going to work in the morning, you aren't energized.

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.

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?

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...

Extended overtime will not solve your schedule problems.

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).

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.

Results

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.

Contraindications

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

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.

Alternatives

Allies
Pair Programming
Release Planning

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.

The extreme form of this sort of organization is the death march 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).

To add insult to injury, [DeMarco & 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?"

Further Reading

Peopleware [DeMarco & 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.

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

Slack [DeMarco 2002] looks at the effects of extended overtime and overscheduling.

Death March [Yourdon] describes how to survive a "death march" project.

Comments

2010-06-11T08:00:00Z

June 08, 2010

Martin Fowler

Craigslist Scam

Over the weekend I’ve had a few emails from people in response to scams on craigslist. 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.

2010-06-08T14:41:00Z

June 06, 2010

James Shore

Does the Pask Award Have a Future? You Tell Us.

06 Jun 2010 James Shore/Blog

There's a debate occurring on the Pask Award selection committee list. Should the Pask Award continue? We'd like to hear your thoughts.

The Gordon Pask Award was instigated by Brian Marick 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.

The award is not without controversy. Some people believe that the award is divisive. Others believe that it acts as an extrinsic motivator, 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 old boy network, they charge.

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 David Anderson's comments at the 2010 Lean Software and Systems Conference are gold indeed:

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.

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? Your comments will tip the balance.

Comments

2010-06-06T08:00:00Z