Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

One Piece at a Time


One Piece at a Time

Agile adherents claim that they can deliver working software at the end of a project's first week! They also claim that their software will always fulfill the highest-priority needs as defined by their stakeholders. Better yet, they do so even when they let stakeholders change their minds, add new requirements, rework them, or reprioritize them throughout the project. Agile practitioners work this way because they want regular feedback from their stakeholders and want to deliver the highest value possible. But how do they actually accomplish these worthy goals?


[click for larger image]

Iterations and Releases
Agile adherents deliver development releases into some form of demo environment at the end of each iteration and only occasionally release their system into production.

Traditionalists often scoff at these claims, pointing out that you can't deploy software into production every week. They're right; it would be impossible in most organizations. Not only is it technically difficult, many users don't want constantly evolving software. Agile adherents, in fact, deliver development releases into some form of demo environment at the end of each iteration and only occasionally release their system into production (see "Iterations and Releases). An application's development release is something that could potentially be released into production if it were to be put through your pre-production quality assurance (QA), testing and deployment processes. Granted, this won't be true of the earliest development releases, because you won't have delivered sufficient functionality to make deployment worth your while. Furthermore, at a project's start, you often stub out interfaces to shared services—such as security, persistence or even reusable legacy functionality—so technically, you still have some cleanup to do before you're ready to release to production. This is why the first production release often takes longer to deliver than subsequent releases (see "Iterations and Releases); in the system's first release, you likely need to get a lot of the "plumbing in place, and your team probably hasn't yet gelled enough to efficiently collaborate. The first production release may take you 12 months, the second release nine months, and then other releases are delivered every six months.

In my experience, an iteration should be no more than four weeks in length; otherwise you run the risk of working in a "mini waterfall manner. Although mini waterfalls are far less risky than traditional "big waterfalls, iterative approaches are even less dangerous. (See Chapter 6 of Craig Larman's Agile and Iterative Development: A Manager's Guide [Addison-Wesley, 2003] for a detailed discussion.)

It's easy to say that iterations should be short, but it's hard to do in organizations transitioning from traditional to evolutionary development. To overcome this challenge, I usually work with a group to determine an iteration length that they'll be just barely comfortable with, and then reduce iterations as they gain experience. Last year, I worked with a company that had 12-week iterations. To reduce them to eight weeks, we changed the review process from formal to informal, cut some paperwork, and co-located the entire team. During the next iteration, I convinced them to model iteratively, combining their requirements, architecture and design reviews into a single model review, which enabled them to reduce the third through fifth iterations to six weeks each. Once they saw that the world didn't end and recognized that the mid-iteration review served no purpose other than making the stakeholders happy, they chose to review the models at each iteration's end with the working software. The iterations were cut to five weeks and then four. By reducing the paperwork and bureaucracy typical of serial development, the team delivered roughly the same amount of functionality in four weeks as they did previously in 12.

Playing in the Sand

To incrementally release an application, you need a supportive development environment. The usual approach is to set up a collection of sandboxes—technical environments whose scope is well defined and respected by the people working in them. "Supportive Environment depicts each sandbox, the deployment effort between them, and the flow of defect reports. There are five types of sandboxes:

  1. Development is the working environment for individual developers or programming pairs. In this sandbox, the developer/pair works in technical seclusion from the rest of the project team, enabling them to make and validate changes without having to worry about adversely affecting their teammates. This sandbox includes the tools required to develop and integrate the team's code, including a version of the database in which the developers can test their work.
  2. The Project Integration sandbox is shared by members of a single project team. This environment is often referred to as a build environment or a build box. Developers promote their changed code to this environment, integrate it with the code written by the rest of the team, test it, and commit it into their configuration management system.
  3. You deploy working systems into the Demo sandbox, the environment where your project stakeholders perform acceptance testing on the system. Minimally, your system should be deployed into this environment at each iteration's end, although interim releases are also possible.
  4. The Test/QA sandbox is shared by several project teams and is often controlled by your testing/QA group. This environment is often referred to as a pre-production sandbox, a system testing area or simply a staging area. This environment simulates your actual production environment, so you can test your application in conjunction with other applications.
  5. The Production sandbox is the actual environment in which your system will run after deployment.


[click for larger image]

Supportive Environment
Here is a depiction of each sandbox, the deployment effort between them, and the flow of defect reports.

The effort within development sandboxes is highly iterative, and you'll frequently deploy your work into your project integration sandbox, often several times a day. Deployment into the Test/QA and Demo sandboxes is less frequent—typically at an iteration's end and often only at the end of several iterations. There's greater control over whether you deploy into the Test/QA sandbox, because it's typically a shared resource that other teams deploy into as well. Therefore, someone needs to verify that your system has been sufficiently tested in isolation and is ready for system integration testing. Similarly, it should be harder to deploy the system into production, an activity that's even less frequent for your application, because you need to show that it has been thoroughly tested and appears to integrate into your organizational infrastructure.

Note that your organization may take a slightly different approach. Smaller organizations may choose to combine the Demo and Test/QA sandboxes. Larger organizations may choose to have various levels of Test/QA sandboxes; for example, one at the division level and one at the enterprise level. The important thing is that you separate the various environments and have an accepted way to promote applications among them.

Agile Deployment

Given the opportunity, I prefer to create builds in my own workspace several times a day, within my team workspace at least daily, into the pre-production test environment at each iteration's end, and into production anywhere between quarterly and yearly. Unfortunately, it's of little value to deliver working software on a weekly basis if it must go through a three-month pre-production testing process each time. With agility, you can reduce the time invested in pre-production testing efforts and thereby speed deployment. How is this done? Agile adherents produce high-quality artifacts and have the regression test suite to prove that their system actually works. This higher level of quality indicates that you'll be able to do less testing during system deployment. And once you get really good, you may find that you can deploy working software into production on a weekly basis—I've seen it done at a large financial institution and a dot-com. Yes, it's possible—regardless of what traditionalists may tell you.

Getting the Terminology Right

Iteration. A length of time, often ranging from one to several weeks, during which a portion of your project work is done. Many refer to an iteration as a timebox, although this term is correct only if you're willing to not deliver some functionality after you've run out of time. The terms cycle and development cycle are also commonly used.

Iterative development. A nonserial approach to software development; you're likely to do some requirements definition, some modeling, some programming or some testing on any given day.

Incremental development. A software development approach that organizes a project into several releases instead of one "big bang.

Evolutionary development. An approach to software development that is both iterative and incremental.

—SA


Senior Contributing Editor Scott Ambler is author of the Productivity Award--winning Agile Database Techniques (Wiley, 2003)


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.