Chapter 2

Reviewing Agile Team Practices and Frameworks

IN THIS CHAPTER

check Becoming familiar with different agile practices

check Getting up to speed on agile team frameworks, including Scrum and XP

check Improving workflow transparency and management with Kanban

check Launching new products with Lean Startup

Before you can begin to scale agile practices and frameworks to the development of enterprise software, you need to understand what agile is all about on a smaller scale — the agile team. All enterprise agile frameworks, including the five covered in Part 2, are built on the foundation of agile teams, the principles that guide them, and the practices they engage in.

In this chapter, I bring you up to speed on agile team practices and frameworks, including Scrum, Extreme Programming, Lean Software Development, and Kanban. By developing an understanding of agile at the team level, you’ll be better prepared to understand the scaled-up frameworks presented in Part 2.

Exploring Common Agile Practices

Most of this chapter introduces you to the common agile frameworks, the most popular of which are Scrum, Extreme Programming (XP), Lean Software Development, Kanban, and Lean Startup. An agile framework is a method for working collaboratively and creatively in small teams to develop products incrementally as opposed to doing a lot of up-front planning. Although each of these frameworks is different, they all share common practices, such as writing user stories and epics, estimating size through the use of planning poker or affinity estimation, managing workflow to eliminate bottlenecks, and eliminating waste (such as unproductive meetings and having to wait for management approval).

By understanding these practices, you’ll be better prepared to approach the discussions of the various agile frameworks presented in the later sections.

remember These practices may or may not be a part of any given agile framework, but are common practices among agile teams regardless of which framework they follow. For example, Scrum doesn’t require or recommend user stories, but most Scrum teams start their product development by writing user stories.

Starting with user stories, epics, and themes

As I explain in Chapter 1, a user story is a description of a product feature from the user’s perspective; for example, “As a mobile phone user, I need to know whether the cell signal is strong enough so that I’m sure to have a clear conversation when I place the call.” The most common format for user stories is this:

As a <user type>, I want <some goal> so that <some reason>.

The last part of the user story is actually the most important, because it describes the pain point the product needs to address and indicates the value that the feature must deliver to the customer. In the example of the mobile phone user, what’s most important to the user is that the cell signal is strong enough to support a clear conversation. The user story is general enough to give the developers room to come up with various ways to deliver this value to the user. For example, the developers may decide to display bars or dots on the screen to indicate signal strength, they may tweak the software to improve the audio compression, or they may even develop a better way for the phone to lock in a signal.

remember The purpose of a user story is to spark a conversation about how to meet that need and deliver value to the customer. Prior to user stories, developers were given well-defined software requirements that ended conversations and stifled innovation. Management told the developers what to do and how to do it. With user stories, customers tell developers what they want, and the developers determine how to deliver it. The developers may deliver what the customer wants in ways that the customer and management never would have imagined.

In addition, user stories get customers more involved in the product development process, because they enable customers to describe what they want without having to know anything about the technology.

warning Don’t confuse a user story with a use case, which is a much more detailed description of how the user interacts with the software and how the software behaves and interacts with other systems. While user stories are often one or two sentences written on an index card, a use case is typically a page or more of functional requirements. Perhaps more important, user stories are intended to start conversations, whereas use cases tend to shut them down.

A couple terms related to user stories are epics and themes:

  • Epic: A big user story; for example, “As the owner of an appliance repair shop, I need to automate my inventory system so that I always have the parts available to complete a repair.”
  • Theme: A collection of related user stories, such as all user stories related to inventory management or all user stories related to producing monthly reports.

Estimating with story points

Instead of following a detailed plan and schedule to deliver product, agile teams work to continually create product iterations that gradually integrate more and more value into the product. For example, a team may start with a list of user stories, prioritize that list, and then work in two- to three-week time blocks to complete each story. Instead of a detailed plan, agile teams work off of something that looks more like a to-do list. Instead of using milestones or deadlines that are often subject to change (because nobody knows exactly how long certain work items will take to complete), agile teams use various collaborative estimation techniques to give ballpark estimates that reflect the relative sizes of work items, such as the following:

  • Animal sizing: I often recommend agile teams go to a toy store and purchase a deck of cards with animal pictures on them, such as horses and ducks, so that they focus less on trying to score jobs and more on using the cards to open up a discussion of what each job entails. Animal sizing is similar to using a Fibonacci sequence; using animal pictures instead prevents the team from focusing on numbers. Some teams are tempted use Fibonacci numbers as days or hours. The animals keep your team focused on sizing.
  • Big, uncertain, and small: For super-fast estimation, consider using three categories of work — big jobs, small jobs, and uncertain jobs that are tough to estimate because they may have uncertainties that can result in delays.
  • Fibonacci sequence: A Fibonacci sequence is a series of numbers in which each number is the sum of the preceding two numbers (for example, 1, 2, 3, 5, 8, 13, and 21). These numbers represent level of effort, not hours or days. A two is roughly twice as difficult as a one. And eight is roughly four times as difficult as a two.
  • T-shirt sizing: Agile teams may use T-shirt sizes, such as XS (extra-small), S (small), M (medium), L (large), XL (extra-large), and XXL (extra-extra-large).

remember However you choose to rank items, keep in mind that ranking reflects more than just the estimated amount of time required to complete a job. Rankings should consider the amount of work, complexity of work, coordination of any external dependencies, the risk or uncertainty involved (which may result in delays), and the time/duration.

Agile teams use a variety of estimation techniques, including the following:

  • Affinity mapping: The team groups items that are similar in whatever dimension they choose, such as degree of difficulty, duration, or uncertainty. After grouping the items, the team can then assign a number or other size designation to each group.
  • Bucket system: The team creates a number of “buckets” to represent difficulty levels. Then the team assigns relative estimates to these buckets. You could use 0, 1, 2, 3, 4, 5, 8, 13, 20, 30, 50. Someone selects a work item randomly from the stack of work items that need to be completed, reads it to the group, and sticks it in the middle bucket. In this case, the bucket with the number 5. The team estimates the remaining items relative to the middle bucket while discussing the placement with other team members. The team then does a “sanity check,” where team members can discuss any disagreements they have over placements and reach consensus on the placement of all items. The bucket system is fast, and it’s a great technique to use when you have a considerable number of work items.
  • Planning poker: Everyone on the team has a stack of playing cards with numbers on them that indicate the relative difficulty of a work item. Each person chooses a card, and then everyone flips his card over when the facilitator gives the signal. If all “scores” match, that becomes the estimate for the work item. If the cards have different scores, team members explain the reasons for their scores, and voting repeats until the team reaches consensus or has bid three rounds without converging (in which case the work item is set aside for further refinement). The most important factor is the rapid learning (from each other) that takes place during these discussions.

    Most agile teams use a deck with a modified Fibonacci sequence. This typically has a number sequence, such as 0, ½, 1, 2, 3, 5, 8, 13, 20, 40, 100. (The sequence is close to being exponential in order to reduce disagreement; getting a group to decide between a 5 and an 8 is easier than getting them to agree between 7 and 8.) Each person usually has a card with a question mark and another with a coffee cup that are to be used sparingly to indicate uncertainty or to ask for a break.

tip Whatever technique you use, approach it more as a group discussion technique. Don’t push for consensus on a number at the expense of having a good discussion. And don’t promote an average of the scores. Teams create bad estimates when they don’t have a shared understanding of what it takes to deliver the story. It’s that shared understanding that’s the most important part of any estimation technique.

remember The purpose of planning poker and other agile estimation techniques is to limit any bias that may influence the estimates. Group decision-making often suffers from the following sources of bias:

  • Anchoring: The group supports the first opinion expressed by someone in the group who has a strong personality. That first opinion serves as an anchor that makes it difficult for anyone else to change direction, because in order to do so, members must first prove that the opinion expressed is wrong.
  • Dunning-Kruger effect: The loudest person in the group — who’s usually wrong — drives the group’s decision. David Dunning and Justin Kruger, two social scientists, found that the people who are wrong typically have the strongest opinions and are most vocal in expressing them. The people who are quieter and less confident are more likely to be correct.
  • Groupthink: To avoid the messiness of confrontation, people refrain from expressing their honest opinion, because they think it will lead to conflict.

Estimation techniques, including planning poker and the bucket system, require that all members give an opinion without knowing what their other team members think. Team members with strong opinions or those who are more vocal than the others can still drive the team in a certain direction, but at least the discussion begins with less biased views.

Queuing up work

Every agile framework employs queueing theory to manage workflow. (Queueing theory is the mathematical study of how items move through a sequential system.) The idea is to reduce bottlenecks that often result when you try to push large batches of items through production. To improve workflow and reduce cycle times (the time to complete work items), agile teams try to create batches of work that are uniform in size and can be completed over the course of a single production cycle (which is why they employ estimation techniques, such as those described in the previous section).

Although different agile frameworks approach queuing in different ways, they typically start with a product backlog (a prioritized list of items that must be completed to deliver the product). They draw items from the top of the product backlog to create a list of items that the team is reasonably sure it can complete within the given time frame, and then the team uses a system, such as a Kanban board, to track work in progress. As I explain in Chapter 1, a Kanban board has several columns that represent stages in the development process, such as “To Do,” “In Progress,” and “Done.” A description of each item is written on a sticky note or index card and placed in the first column, and then as the team works on and completes the item, it moves the note or card to the next column. (For more about Kanban, see Chapter 8.)

Conducting stand-up meetings

To reduce the time wasted in unproductive meetings, agile teams usually conduct daily 15-minute meetings in which all team members stand around in a circle to sync up with each other and coordinate their game plan for the next 24 hours. They stand to reinforce the notion that these meetings must remain brief and crisp, just enough to make sure everyone is “on the same page” together. Traditionally, team members may use a round-robin approach and take turns addressing questions. (See “Standing up for the Daily Scrum” later in this chapter for more details.)

The daily stand-up meeting is typically conducted in the morning to help transition into the day’s work and to avoid interrupting work later in the day. However, it is up to each self-organizing development team to optimize its daily routine by choosing the time slot that works best for it.

Shifting to test-driven development

Agile teams often take a test-driven development (TDD) approach to creating new software — writing a test case, designed to fail, that defines an improvement or new function and then writing just enough code to enable the software to pass the tests. The team then refactors the code to clarify and simplify the design. TDD encourages developers to think about what the software will accomplish before they begin coding. It also encourages writing lots of tests to improve the quality of the software. A typical test-driven developer will add a test, run the test, write the code, rerun the test, refactor the code, and repeat if necessary.

TDD enables teams to focus solely on developing a product that passes a specific test rather than on the product as a whole, thus increasing productivity and delivering cleaner code that’s less buggy. TDD also supports the practice of continuous integration, discussed next.

Developing product iterations through continuous integration

Continuous integration (CI) is the practice of merging code changes into a share repository several times each day to achieve the following two objectives:

  • Minimize the duration and effort required to integrate new code into existing software.
  • Develop a version of a product (a product iteration) that’s suitable for release at any time during the development process.

To understand the concepts of continuous integration and product iterations, compare traditional product development with agile development as they may be applied to building a car. With a traditional approach, developers might start with a wheel and then create a chassis, add a body, and then add seats, a steering wheel, and an engine, as shown in the top of Figure 2-1. In contrast, an agile team may start with a user story that is something like, “As an employee, I need a vehicle, so that I can get to work faster.” The team would then set out to create various iterations of a vehicle that would get the employee to work faster than if the employee had to walk, as shown in the bottom of Figure 2-1. The first vehicle may be a skateboard, the next is a scooter, and then a bicycle, a motorcycle, and finally a car. Each iteration would be a fully functioning vehicle.

image

FIGURE 2-1: Delivering in product iterations.

This iterative approach offers many advantages, including the following:

  • Every iteration results in a potentially deliverable product.
  • The team has many opportunities to inspect and adapt the product over the course of development. Team members could even decide at some point to create a flying vehicle to help the employee avoid traffic.
  • The team learns along the way and develops knowledge and skills to improve the quality and value of the product. In this example, by the time the team is working on the motorcycle, it has probably learned a great deal about wheels, structural design, and transportation.
  • The customer has the opportunity to opt out at any time; for example, if the customer falls in love with the motorcycle, he may decide that the expense to engineer a car isn’t worth it.

remember Transitioning from a traditional approach to product iterations is often challenging, because it requires transforming the company from one that’s organized around functional areas to a team-based, cross-functional model. For example, in a typical organization, marketing may have an idea for a product; developers build the product, and then quality assurance tests it. Many companies have trouble imagining an approach for delivering a smaller version of a completed product with marketing, design, development, and quality assurance all baked in at the team level.

Delivering Products with Scrum

Scrum is a simple, lightweight agile framework for addressing complex evolving problems while delivering innovative high-value products. Although it was originally created for software development, it’s a great approach for any complex project or product development effort. Here’s how Scrum works:

  1. A product owner creates a product backlog — a prioritized list of user stories or work items that must be completed to create a potentially deliverable product increment.
  2. The Scrum team gathers for a sprint planning meeting, during which it pulls a small batch of items from the top of the product backlog to create a sprint backlog and determine how to complete the items it selected. (A sprint backlog is a prioritized list of items to be completed in a given time frame — a sprint — which is typically two to four weeks.)
  3. Team members collaborate to complete the work in the team’s sprint backlog with the goal of creating a potentially deliverable product increment at the end of the sprint.
  4. The team members meet with the product owner and other stakeholders for a sprint review to discuss the product increment they created and adjust the product backlog, if necessary. The purpose of the sprint review is to discuss what should be done next to optimize value for the customer.
  5. The team members gather for a sprint retrospective, during which they discuss possible improvements to the way they work together on future sprints. While the sprint review focuses on improving the product, the sprint retrospective is more about improving the process.

Wrapping your brain around Scrum theory

remember Scrum is an empirical process framework, as opposed to a model framework. “Empirical” means data-driven — gaining knowledge from direct observation and experience and basing decisions on what is known. Instead of engaging in a lot of up-front planning that’s often based on conjecture, Scrum teams experiment, inspect, and adapt, relying on empirical data to drive their decisions.

As an empirical process framework, Scrum is built on the three pillars of transparency, inspection, and adaptation, as explained next.

Transparency

One of Scrum’s key benefits is that it exposes flaws in your current processes so that you have an opportunity to improve. According to Ken Schwaber, one of Scrum’s creators, “Scrum is like your mother-in-law; it points out ALL your faults.”

In practice, Scrum encourages team members to be transparent about their work — to freely admit mistakes and point out limitations in products and processes. Scrum teams know they will fail. Instead of trying to avoid failure, they place more value on learning from it.

To promote transparency, Scrum encourages team members to develop a common language when discussing their process and to agree on a definition of “done” (DoD) — a set of criteria that must be met for a product to be considered satisfactorily completed. For example, a DoD may state that “done” means a feature has been tested and successfully integrated into a working version of the product.

Inspection

Scrum calls for frequent inspections by skilled inspectors at the point of work (while work is in progress). Inspection focuses on scrum artifacts (items created and used during development, such as the product backlog and sprint backlog) and progress toward the sprint goal to detect undesirable variances that need to be addressed.

Scrum teams deliver products incrementally, working iteratively in short cycles to create plenty of checkpoints throughout the development process, thus maximizing opportunities for gathering feedback and adapting processes along the way.

Adaptation

If inspection reveals a deviation in the process that’s outside of acceptable limits or that will result in an unacceptable product, the Scrum team makes adjustments as soon as possible to minimize further deviation. Scrum uses four formal inspection and adaptation events to minimize deviation:

  • Sprint planning
  • Daily Scrum
  • Sprint review
  • Sprint retrospective

See the section “Stepping through Scrum events” later in this chapter for details.

Getting up to speed on Scrum values

Scrum stipulates five values every Scrum team should embrace:

  • Commitment: Every team member must be personally committed to achieving the team’s goals.
  • Courage: Team members must have the courage to do the right thing and tackle difficult problems.
  • Focus: Everyone on the team must focus on the work and on achieving the sprint goal.
  • Openness: All team members and other stakeholders agree to be open about their work, mistakes, limitations, expectations, and obstacles. Think of openness as transparency at the team level.
  • Respect: Scrum team members respect and trust one another as capable members of a community.

Working in a Scrum team

Every Scrum team has a product owner, a Scrum Master, and a development team, and every team is self-organizing and cross-functional:

  • Self-organizing: Instead of being managed by someone outside the team, the team members decide the best way to accomplish their work.
  • Cross-functional: The members of each team have all the knowledge and skills to accomplish their work without having to rely on others.

Setting direction with the product owner

In traditional software development, the product owner, typically a business analyst, creates a list of software requirements and then “throws it over the wall” for the development team to deliver. In Scrum, the product owner is an integral member of the team, collaborating with the customer, the Scrum Master, and the development team to optimize value for the customer. The product owner has the following responsibilities:

  • Maximize the value of the product and the work of the development team. This responsibility is intentionally vague, because how the product manager meets this responsibility varies across organizations.
  • Maintain the product backlog (a prioritized list of work items). Although the product owner may share product backlog maintenance with the rest of the team, the product owner is ultimately responsible for ensuring the following:
    • Product backlog items are clearly described.
    • Items in the product backlog are arranged to best achieve goals and missions.
    • The product backlog is visible, transparent, and clear to everyone on the team.
    • The development team fully understands each item in the product backlog.
  • Serving as the sole point of contact for the team. In other words, the product owner prevents anyone else in the organization from assigning work to the team or changing the software requirements. All work items funnel through the product owner to the team.

remember The product owner must be one person, not a committee. She may represent a committee’s interest in the product, but she ultimately decides what gets passed along to the team. By acting as the single source of authority on the product, the product owner enables the team to make real-time product decisions instead of having to seek management approval, which often introduces delays.

Mastering Scrum with the Scrum Master

The Scrum Master is the team’s servant-leader and coach. The term “master” doesn’t imply that the Scrum Master is in charge of the team. The Scrum Master is actually in charge of making sure everyone in the organization is aligned with Scrum theory, practices, and rules. Think of her more like a Jedi Master who gets her power from an understanding of the Force. The Scrum Master serves three groups:

  • Development team: The Scrum Master helps the development team by coaching it in self-organization and cross-functionality, assisting the team in creating high-value products, removing obstacles, facilitating scrum events, and providing additional coaching and training.
  • Organization: The Scrum Master serves the overall organization by leading, planning, and facilitating Scrum adoption and implementations; suggesting changes within the organization to increase Scrum team productivity; educating leadership and employees on Scrum theory, practices, and rules; and collaborating with other Scrum Masters to make Scrum more effective.
  • Product owner: The Scrum Master helps the product owner acquire the knowledge, skills, techniques, and tools for more effectively managing the product backlog and clarifying product backlog items to the development team. The Scrum master may also facilitate Scrum events and educate or train the product owner on Scrum theory and practices, including how to plan products in an empirical environment.

remember A good Scrum Master spends most of her time training others on the team and across the organization. For example, when a team is just getting started, the Scrum Master may provide training on how to write user stories. The Scrum Master may also attend a stand-up meeting or a session of planning poker to provide feedback on how the team can engage in these agile practices more effectively.

warning Be careful when training project managers to become Scrum Masters, because they often have a traditional management mindset that’s counterproductive to the servant-leader role of a Scrum Master.

Getting it done with the development team

The development team consists of three to nine developers (excluding the product owner and Scrum Master) who are in charge of creating a potentially deliverable product increment at the end of each sprint. (The trend is toward smaller development teams, typically four or five.) As mentioned earlier in this chapter, each Scrum team is self-organizing and cross-functional. Nobody, not even the product owner or Scrum Master, tells the development team how to do its job.

Although team members may have specialized skills and areas of focus, all team members are referred to as “developers.” Teams do not have specialized roles or titles, such as database engineer, user interface developer, back-end developer, or tester. In fact, team members are encouraged broaden their knowledge and skill sets through cross-training. This doesn’t mean that every tester will become a skilled developer. What it means is that all people on the team should constantly be developing new skills and increasing their breadth of knowledge. You don’t want the work to come to a halt because the only person who knows how to complete a certain task calls in sick.

tip Generally, the product owner focuses on what gets done, and the development team focuses on how it gets done, but the dividing line can get fuzzy. For example, the product owner may have a strong opinion about a certain tool or technology used during the previous sprint and insist that the team use something else. Likewise, the development team may want to work on lower-priority items in the product backlog first, for whatever reason. In such cases, the Scrum Master may step in to help the team reach consensus.

Stepping through Scrum events

Scrum has five events that provide some regularity throughout the product development process while minimizing time spent in meetings:

  • Sprint planning: A two-part meeting devoted to what must get done during the sprint (the first part) and how to get it done (the second part).
  • Sprint: A two- to four-week time frame in which the development team completes its list of work items.
  • Daily Scrum: Brief daily team meetings to report progress and discuss impediments.
  • Sprint review: A post-sprint meeting to discuss the current state of the product and what needs to be done in future sprints.
  • Sprint retrospective: A post-sprint meeting in which the team discusses ways to improve the way the team functions.

All events are time-boxed, meaning each event has a maximum duration. For example, the Daily Scrum has a maximum duration of 15 minutes.

I describe these events in greater detail in the following sections.

tip Prioritization is one of the keys to successful use of time boxes. The team focuses on the most important items first. That way, if the team should run out of time, it can be confident that it made the best use of the time box.

Delivering in sprints

Product development occurs over a series of sprints. Each sprint is a two- to four-week time box in which a team creates a useable and potentially deliverable product increment. The sprints are all the same length. Within each sprint is a period of sprint planning, Daily Scrums, the development work, the sprint review, and the sprint retrospective. Scrum has several rules that govern a sprint:

  • No changes can be made that would compromise the team’s ability to meet the sprint goal.
  • You can’t skimp on quality by easing up on the quality goals.
  • The product owner and development team may renegotiate and clarify the scope of the sprint as they learn during the development process.

A product owner may cancel a sprint at any time when pursuing the sprint’s goal no longer makes sense (for example, if a change in the market makes a particular feature obsolete). However, sprint cancellations are rare.

Planning a sprint

Prior to each sprint, the Scrum team engages in sprint planning, which is a two-part meeting:

  • Part 1: The product owner, Scrum Master, development team, and other stakeholders meet to decide which items in the product backlog the team will complete during the sprint. On many Scrum teams, the product owner writes user stories for the work that needs to be completed. The team may perform a quick round of planning poker to get a general idea of how much work it can complete within the sprint. At the end of the first part of the meeting, the development team has a sprint backlog — a list of work items it has planned to complete by the end of the sprint.
  • Part 2 : The development team meets to figure out how it will complete its sprint backlog and to determine its higher-level sprint goal. The team will usually identify “tasks” (to-do’s) for each story, possibly including estimated hours for each task. The team may use that for an initial “sanity check” on its planned capacity for the sprint. Many teams write their work items on sticky notes or index cards and affix them to a task board that they clear off at the end of each sprint. They may also use a Kanban board (see Chapter 8) to track work in progress.

Standing up for the Daily Scrum

The Daily Scrum is a daily planning meeting for the development team that’s time-boxed to 15 minutes. Traditionally, teams stand during the meeting to reinforce the need to keep the meetings short (see the earlier section “Conducting stand-up meetings”). The purpose of this meeting is to enable team members to coordinate their work and to plan for the next 24 hours. During the meeting, members of the development team might take turns answering the following three questions outlined in the official Scrum Guide:

  • What did I do yesterday that helped the development team meet the sprint goal?
  • What will I do today to help the development team meet the sprint goal?
  • Do I see any impediment that prevents me or the development team from meeting the sprint goal?

It is up to each development team to optimize its performance by reflecting and adjusting its practices accordingly. If you were to visit some of the highest performing teams today, you might discover that they have transformed their Daily Scrum agenda. For example, instead of an individualized round-robin check-in, they may “walk the wall” (or Kanban board) together, focusing discussion on their sprint backlog and its stories, rather than team members and their tasks. They’ll likely concentrate on work in progress (WIP) first, then touch on the remaining sprint backlog if needed, addressing stories in their prioritized order. For such teams, they’ll more likely be thinking and speaking in team- and story-centric terms:

  • What did WE do yesterday, to move this STORY forward?
  • What are WE going to do today, to get this STORY done?
  • What do WE need, versus impediments to OUR progress today?
  • What have WE learned that changes how WE move forward?

A fairly common practice for teams is to reserve 25 to 30 minutes for the Daily Scrum, building in a “parking lot” buffer for immediate follow-up. In the first 5 to 10 minutes, they’ll walk the wall or board (sprint backlog), “parking” any issues or discussions until they’ve addressed the stories. Then they’ll take up any issues, parking-lot items, or general announcements in the remaining time, adjourning the meeting before their time box expires. After the Daily Scrum, the team or certain team members may have additional meetings to have more detailed discussions on issues raised during the Daily Scrum.

remember The Daily Scrum is for development team members. They should be talking to each other as peers, not “reporting status” to the product owner or Scrum Master. The Scrum Master’s role is only to ensure that the daily meetings are being held and to coach the team on how to have an effective meeting within the 15-minute time box.

Reviewing the sprint

At the end of each sprint is a sprint review, during which the Scrum team, customer, and other stakeholders meet to review the product increment delivered at the end of the sprint and determine what must be done to improve the product in future sprints. The time box for a sprint review is generally one hour per week of sprint, so a three-week sprint should have a sprint review that lasts no longer than three hours.

Some organizations refer to the sprint review as a sprint demonstration (or “sprint demo” for short), but this term has fallen out of favor, because it implies that the Scrum team is staging a performance to show off the work it has done. However, the purpose of the meeting is to support the three pillars of Scrum: transparency, inspection, and adaptation. Ideally, the Scrum team, customer, and other stakeholders discuss what they like and dislike about the product and what they would like to see improved in future program increments.

Improving the process with a sprint retrospective

After the sprint review and before the next sprint planning meeting, the team members perform a sprint retrospective to discuss ways to improve their process and work together more effectively as a team. The time box for the sprint retrospective is three hours for a four-week sprint and less for shorter sprints. During the retrospective, the team should:

  • Discuss how the sprint went in relation to people, relationships, process, and tools.
  • Identify areas that went well and areas for potential improvement, and prioritize the list of improvements to be made.
  • Create a plan or list of action items to make improvements; for example, if the team decides it could improve its user stories, members may ask the Scrum Master to schedule a training session.
  • Consider ways to improve product quality by adapting the team’s definition of “done.”

remember While the sprint review focuses on how to improve the product, the sprint retrospective is more about improving the team and the relationships, processes, and tools used to create the product. The Scrum retrospective is a time for team members to be transparent about their work and to inspect and adapt to improve the way they work together, looking for ways to “raise the bar” — even in the smallest details — again and again.

If a Scrum team works together for several years, members may decide to limit the amount of time they spend on process improvement, but most teams can always find ways to improve. The key is to not just use the meeting as a way to identify challenges, but also use it as a way to make concrete improvements.

Producing Scrum artifacts

Scrum specifies that teams produce the following four artifacts to provide transparency and to support inspection and adaptation:

  • Product backlog: A prioritized list of work items to be completed to create the product.
  • Sprint backlog: A prioritized list of work items to be completed over the course of a single sprint to deliver a potentially shippable product increment.
  • Product increment: A fully functioning rendition of the product.
  • Definition of “done”: A set of requirements that indicate when a product increment is considered finished.

In the following sections, I describe each of these artifacts in greater detail.

Prioritizing the work with a product backlog

The product backlog is an evolving prioritized list of everything that must be done to create a given product, including all features, functions, requirements, enhancements, and fixes in future releases. Changes in customer needs, business requirements, market conditions, technologies, and other factors that impact the product often initiate changes in the product backlog.

remember As long as the product exists, its product backlog should continue to evolve and grow to represent an exhaustive list that identifies everything the product needs to be appropriate, competitive, and useful.

Allocate about ten percent of each sprint to refining the product backlog. For a two-week sprint (ten business days), the Scrum Master, product owner, and development team should spend about one day with the customer and other stakeholders to do the following:

  • Consider what to add to or remove from the product backlog.
  • Clarify items in the product backlog.
  • Break down user stories into more manageable work items.
  • Reprioritize items in the product backlog.

Although the product owner is ultimately responsible for managing the product backlog, the development team and Scrum Master should be involved along with customers and other stakeholders. The development team may want to do a quick round of planning poker to estimate work items. Refining the product backlog makes the next sprint planning meeting go much more smoothly, because everyone involved will have a clearer idea of the work to be done.

Moving items into a sprint backlog

The sprint backlog is the subset of work items from the product backlog that the team commits (in the first half of the sprint planning meeting) to completing over the course of a single sprint. Typically, all the development team does during the first half of the sprint planning meeting is move items from the top of the product backlog to its sprint backlog. However, team members often must engage in some sort of estimation exercise, such as planning poker, to ensure that they don’t commit to completing more work than they can handle over the course of the sprint. The team then uses the sprint backlog to formulate a sprint goal — a high-level commitment to the product owner and the rest the organization.

tip Consider using a Scrum board, task board, or Kanban board (see Chapter 8) to visualize workflow and provide transparency into work status. These boards are usually columnar, with each column representing a workflow state for work items. A simple board might have three columns, typically labeled “To Do,” “Work in Progress,” and “Done.” Team members write a description of each work item (such as a user story or task) from their sprint backlog on a separate index card or sticky note and arrange them in order of priority in the To Do column. When they begin working on an item, they move the item’s card or note to the Work in Progress column, and when they complete their work on the item, they move the card or note to the Done column.

More advanced boards may add cross-cutting rows known as “swim lanes.” Each swim lane could represent a level of service such as an expedited lane and a normal lane. Swim lanes can be used to group collections of related work items, like those belonging to a certain feature or product increment.

The team usually updates the board and the sprint backlog in real time, as work flows throughout the day. Some teams do board updates during the Daily Scrum meeting. Either way, the team can literally see, in a glance, how close it is to finishing all the work in the sprint backlog. And that’s not just for the team members. Everyone with an interest can look and see a near get a real-time update of the team’s progress toward reaching its sprint goal. You’ll have 24/7 access to unfiltered “status” without having to ask.

tip As far as Scrum and Kanban boards go, think big, visible, and always on. You’ll want your boards to serve as “information radiators” rather than “information refrigerators.” If your teams are tracking work items on the wall, consider hanging a high-res camera over each board and broadcasting live — like traffic cams — on an easily accessible website. On the other hand, if your teams are using an electronic system for tracking, you could increase visibility by putting up a few big-screen displays or lighting up the hallways with live projection displays.

Pumping out product increments

At the end of the sprint, your Scrum team needs to deliver a useable product increment that includes all product backlog items that the team integrated into the product during the sprint. The new increment must conform to the team’s definition of “done” (explained next).

remember Only the product owner can decide when a product is ready for release. The development team may conduct several sprints and produce a series of product increments before the product owner decides that the product is ready to be released to the customer. However, because each sprint delivers a useable product, the customer can decide at the end of any sprint that the product is good enough to meet its needs, in which case the product owner can decide to release it.

Defining “done”

The definition of “done” is a set of requirements that the product must meet in order for it to be considered potentially shippable. For example, a team’s definition of “done” may stipulate the following criteria:

  • The code has been fully tested.
  • The code has been checked back into the continuous integration server.
  • More than one person has inspected the code.
  • There’s no immediate need to make improvements or changes.
  • The product increment has cleared an internal review.
  • The product has met all regulatory criteria.
  • There’s no need for further documentation.

tip Your team should agree on its DoD before starting any work, so everyone on the team can easily tell when the product has achieved shippable status.

During a sprint, a product owner or Scrum Master or one of the members of the development team may express a need to “stop starting and start finishing,” which means the team needs to focus more on completing its work in progress than on starting new items. The team can then look to the definition of “done” to figure out what it needs to do next with work in progress (WIP) items to move them to the Done column.

Growing Scrum

Because of Scrum’s popularity, Scrum teams are included in nearly all enterprise agile frameworks, which puts the developers of enterprise agile frameworks in a bind. On the one hand, they celebrate the simplicity of Scrum, which is what made it appealing to so many organizations. On the other hand, they must argue that Scrum is not enough so that they can justify the need for a larger framework.

tip When you see Scrum included in an enterprise agile framework, ask yourself whether it’s really Scrum. Some enterprise agile framers create their own version of Scrum, while others scale up Scrum by adding extra roles and processes. Still others create a new network of different practices as a way to connect several Scrum teams.

Each of these approaches adds a lot of external baggage to a simple framework. Remember that the three pillars of the Scrum framework are inspection, adaptation, and transparency, which means that any good Scrum team must use any expanded practices as a way to inspect and adapt. You don’t want to add anything that weakens the three pillars. You don’t want to grow Scrum to the point where you’re losing the advantages of working as a small, self-directed Scrum team.

Developing Better Software with Extreme Programming

Extreme Programming (XP) is an agile framework that emphasizes collaboration to achieve customer satisfaction. Kent Beck, one of XP’s co-creators, describes it as “a style of software development focusing on excellent application of programming techniques, clear communication, and teamwork.” Like Scrum, XP builds features into a product through iterations to address the customer’s current needs, enabling developers to respond to changes in customer requirements during the development cycle. Like all agile frameworks, XP is built on a team concept with managers, customers, and developers collaborating as equal partners.

In this section, I describe XP’s values and practices and explain how many companies combine XP with Scrum to form a hybrid approach to agile.

Checking out XP’s values

Like most agile frameworks, XP is driven by a set of values that its practitioners embrace to work in harmony with one another and in alignment with personal and corporate values. Its creators suggest starting with the following five values and adding values to reflect your organization’s implementation of XP:

  • Communication: Developers, customers, and other stakeholders are all part of a team that communicates face-to-face daily and collaborates on everything — from writing user stories to writing code. Communication is a key factor in developing the right solution to any problem.
  • Courage: XP operates in a culture of transparency, with team members telling the truth about estimates, status, obstacles, and mistakes. Team members don’t make excuses or blame others, but instead focus on solving problems. The team fears nothing, because nobody ever works alone.
  • Feedback: XP calls for short development cycles that produce frequent program iterations, so the team can demonstrate the software early and often and obtain regular feedback.
  • Respect: Everyone involved in product development does her job in a culture of mutual respect. Developers and customers respect one another, while management respects the team’s authority over its own work.
  • Simplicity: XP is a minimalist approach to programming. Developers are encouraged to “do what is needed and asked for, but no more” to optimize return on investment (ROI). XP programmers should always ask themselves, “What’s the simplest thing that could possibly work?” They take small steps and address challenges as they arise.

Following XP’s software engineering practices

XP’s creators combined XP’s values with a dozen practices that the team commits to over the life of the project. Some of these practices are just for the development team, while others include the customer and other stakeholders. Here’s a list of XP’s software engineering practices:

  • The planning game: A quick, high-level activity that determines the scope of the next release by discussing business priorities along with technical estimates. The plan is not designed to be written in stone. If something changes, the team should update the plan.
  • Small releases: Start with a simple system and then build up new versions in smaller future releases. Don’t go for a Big Bang product delivery. Instead put something small into production and then look for ways to improve.
  • Metaphor: Help the development team understand the whole system by creating a shared story of how everything should work together. Use metaphors such as shopping carts, checkout lines, and parking lots to describe complex technical concepts.
  • Simple design: Don’t set out to develop something complex. Instead focus on creating the simplest system and then build in complexity only when absolutely necessary. Always look for ways to remove extra complexity from the system.
  • Testing: A big part of the programmer’s job is to write his own tests, which the product must pass with every update to the system. Customers should also write tests to verify that the features meet their expectations.
  • Refactoring: Programmers should expect to restructure the program to remove duplication or to simplify or add flexibility to the whole system.
  • Pair programming: Programmers develop software in pairs, with two programmers in front of a single workstation. One programmer “drives” (writes the code) while the other observes, navigates, makes suggestions, and checks the work. The two switch roles frequently.
  • Collective ownership: Anyone on the team can change code for the whole system at any one time. Parts of the product shouldn’t be hidden or inaccessible to the programming team.
  • Continuous integration: The team should use a server to automatically integrate new code and build the program several times throughout the day, each time a major task is completed.

    technicalstuff Partly because of the influence of XP, most agile teams now use something called a continuous integration server. This server allows the entire team to check in and check out all or parts of a software product in a centralized code repository. The server automates the process of testing the software when you check in any new code. This improves quality by ensuring that changes don’t “break the build.”

  • 40-hour week: Programming is a creative problem-solving skill. You can’t increase productivity by having your team work overtime. No one on the team should work more than 40 hours per week. Never have the team work overtime two weeks in a row.
  • Onsite customer: The team requires that customers participate with the developers and are available full time to answer questions. They should be part of the team and share some responsibility for delivering the product.
  • Coding standards: All of the code should be written to help emphasize communication and collaboration. Individuals shouldn’t write code that only they can recognize.

Noting the similarities between XP and Scrum

After publication of the Agile Manifesto, XP and Scrum started to become more similar as teams adopted whichever practices worked best for them from the two frameworks and from others. Similarities between XP and Scrum include the following:

  • Continuous integration: Continuous integration got its start long before XP, but it quickly became an integral part of XP, due to XP’s focus on making continuous, incremental improvements to products. Now, continuous integration servers are widely used in nearly every agile framework.
  • Planning poker: Both XP and Scrum adopted planning poker as a way to estimate job sizes early in their development.
  • Product owner versus customer representative: While Scrum has a product owner who represents the customer and maintains the product backlog, XP has a customer representative who is much more directive, telling the team what it should work on during the next iteration. Both of these roles own the “what next” prioritization for the team’s work.
  • Scrum Master versus XP Coach: Both XP and Scrum require that every team have a servant-leader coach. Scrum refers to this role as Scrum Master, whereas XP uses the term “XP Coach.”
  • Sprints versus iterations: Both XP and Scrum develop software through a series of short development cycles. Scrum focuses on the cycles themselves (the sprints), whereas XP focuses on the product delivered at the end of each cycle — the program iteration.
  • Test-driven development: Test-driven development (TDD) has been around since the 1960s, but was given a rebirth in XP, where the manual approach became automated. Now, TDD is common practice among all agile frameworks.
  • User stories: While XP introduced the user story as part of its planning game, almost all agile teams rely on user stories instead of detailed requirements documents.

The most important distinction between XP and Scrum is that Scrum is a product delivery framework, which means you can use Scrum to deliver products that aren’t software. XP is explicitly for software development; it prescribes specific software development practices, such as continuous integration, simple design, and pair programming. Scrum can include these practices but doesn’t explicitly require them.

Mixing and matching agile frameworks

Some of the enterprise agile frameworks mix elements from both Scrum and XP. The Scaled Agile Framework® (SAFe®), discussed in Chapter 4, goes one step further and creates its own agile team referred to as ScrumXP — similar to a Scrum team but incorporating many of XP’s software engineering practices.

Since the Agile Manifesto, proponents of XP have done a great deal to increase its footprint. In Extreme Programming Explained: Embrace Change, Second Edition, Kent Beck includes new sections on the philosophy behind XP and some techniques for scaling. He also ties XP together with the Toyota Production System and Lean Software Development — some of the earlier ideas that led to Kanban and Lean Startup, discussed later in this chapter.

Most of XP’s contribution to enterprise agile has been at the team level, because its focus on software development has prevented it from becoming an attractive option for overall organizational change.

Learning from Manufacturing with Lean Software Development

Lean Software Development applies Lean Manufacturing principles and practices, specifically from the Toyota Production System (TPS), to software development, summarizing Lean thinking into four basic values:

  • Add nothing but value: Always look for ways to eliminate waste (“muda” in Japanese).
  • Center on the people who add value: Respect everyone and encourage mutual trust.
  • Flow value from demand: Delay commitment to deliver until you have enough demand.
  • Optimize across organizations: Always look for ways to improve the entire system. A Lean organization engages in continuous improvement (“kaizen” in Japanese) of processes, practices, personal efficiency, and so on.

In Lean Manufacturing, value is what your customers are interested in buying. Everything else is waste, and all waste needs to be eliminated. In TPS, the seven sources of waste are:

  • Defects: The need to conduct inspections and address problems or defects
  • Extra processing steps: System inefficiencies
  • Inventory: Storing unfinished products
  • Motion: Unnecessary or inefficient physical movement
  • Overproduction: Producing more than is needed to serve demand
  • Transportation: Moving product from one place to another
  • Waiting: Lack of productive activity primarily due to bottlenecks or interruptions in production

Lean Software Development translates these sources of wastes in manufacturing to the software development process:

  • Defects: Software defects often introduce inefficiencies, because they require that developers stop what they’re doing to address the defects. The problem is worse when defects aren’t detected until the very end, because the developer may then need to do a great deal of rework, and problems may be compounded due to dependencies.
  • Extra processing steps: In software development, extra processing steps are mostly those related to having to relearn a solution to a problem, which can happen when a solution isn’t logged or when work is handed off from one developer to another and the learning must also be passed along.
  • Inventory: Partially done work that just gets in the way or is discarded later because it’s no longer needed.
  • Motion: Inefficiencies in motion are often introduced through hand-offs, where both the work and the training or knowledge needed to complete it must be transferred and through task-switching, where a developer must invest extra time and effort to switch from one task to another.
  • Overproduction: Unnecessary features.
  • Transportation: Handoffs between different functional areas in the organization, such as between development and testing, can cause additional delays.
  • Waiting: Waiting at any stage in the development process; for example, waiting to receive requirements, waiting for approval, waiting for testing to be completed, waiting due to dependency on work done externally.

To help streamline processes and eliminate waste, Lean Software Development uses value stream mapping (see Chapter 8) that involves tracing all steps required to deliver value to the customer. Some enterprise agile frameworks refer to value stream mapping as “taking a product from concept to cash.” After tracing all steps required to deliver value to the customer, you eliminate any steps that don’t bring value, such as unproductive meetings.

tip Even though a lot of enterprise agile frameworks emphasize optimizing customer value and eliminating waste, newer Lean thinking places much more emphasis on continuous improvement and respect for people. Lean Software Development focuses a great deal on empowering the team and amplifying learning.

Managing Workflow with Kanban

Kanban is a method for continually delivering products without overburdening the development team. Team members use a “Kanban board” and cards to track and manage workflow. A very basic Kanban board may have three columns labeled “To Do,” Work In Progress,” and “Done.” Each Kanban card contains a description of a work item. As work is done, team members move the Kanban card for the work item to the column that represents its flow state in the process. (See Chapter 8 for details about creating and using Kanban boards and cards.)

The Kanban method enables team members to pull work through the process as their capacity to complete the work allows instead of having work pushed into the process — an approach that often leads to bottlenecks and increases stress among team members. The Kanban board increases visibility, making it easier for everyone to see the status of work items and to identify backups and delays. Kanban enables teams to break down jobs into smaller work items and smaller batches of items to keep work items moving through the system, rather than trying to tackle big jobs, which often leads to delays.

At the team level, Kanban is an effective way to increase transparency and improve processes. It doesn’t require explicit practices, such as iterations, TDD, or user stories. It also doesn’t require the creation of additional roles, such as a product owner or Scrum Master. You can use Kanban in any situation in which you need to track work items or tasks, whether you’re developing products, managing a help desk, maintaining an editorial schedule, or streamlining hiring practices. Many of the top enterprise agile frameworks covered in Part 2 include a Kanban component for tracking and managing workflow.

tip Think of Kanban less as an agile framework and more as a tool that’s used within various agile and enterprise agile frameworks to facilitate workflow management and to help coordinate everyone’s efforts.

Innovating Quickly with Lean Startup

Lean Startup is about using the Lean mindset to quickly deliver innovative products. The idea behind it is that companies that are just starting out don’t have the money to invest in market research and product development. So instead, these companies should focus on quickly getting their product into the customer’s hands, gathering and analyzing customer feedback, and adjusting accordingly. Otherwise, the startup is likely to invest a great deal of time and effort to launch a product that customers really don’t care about, and the startup fails.

tip Although Lean Startup has been developed for small startup companies, many large firms, including General Electric and Intuit, use it to launch new products.

Using a build-measure-learn feedback loop

Lean Startup uses a build-measure-learn feedback loop based broadly on the plan-do-study-act (PDSA) cycle that was originated by Walter A. Shewhart and championed by W. Edwards Deming and influenced Lean Manufacturing, Scrum, and XP:

  • Plan: Specify objectives
  • Do: Implement the plan
  • Study: Gather and analyze data
  • Act: Adapt your process based on what you learned

The PDSA loop is an empirical process that emphasizes experimentation and evaluation, and you can see its influence on many agile frameworks, including Scrum, Lean Software Development, and XP.

Lean Startup modifies the loop slightly to emphasize learning (see Figure 2-2):

  • Idea: Your customer has a need and you have an idea to meet that need.
  • Build: You build a specific solution that has an impact on meeting that need.
  • Product: You create a minimum viable product (MVP) — a product with just enough features to appeal to early adopters.

    technicalstuff Many agile software teams use the MVP model, although they may refer to it as something else, such as a “product increment.” In Lean Startup, the MVP offers the most opportunity for validated learning with the least amount of effort. For example, if you were considering opening up a restaurant, you may start with a sandwich stand to test the demand for your sandwiches and to fine-tune your recipe to the consumer’s tastes.

  • Measure: You measure the impact that your product had on your customer.
  • Data: You create a list, based on your measurements, of actionable data points.
  • Learn: You compare your data points to the original plan and figure out what you need to change to improve value to the customer.
image

FIGURE 2-2: Lean Startup’s build-measure-learn cycle.

Focusing on the one metric that matters

Lean Startup relies heavily on metrics as a way to learn, which doesn’t mean you should bury yourself in data or fall victim to analysis paralysis. Instead you should focus on the one metric that matters (OMTM). Remember that you’re trying to work with an MVP, which should provide you with a minimum number of data points to analyze. For example, if you have a sandwich stand, you don’t necessarily need to examine the various condiments people order; you may need to know only which sandwich seems most popular.

You pick a single OMTM at a time, measure the results, learn from the data, and make improvements. Then, repeat the process in the spirit of continuous improvement.

Mixing Lean Startup with enterprise agile frameworks

Although Lean Startup is a separate and distinct agile framework, you can see elements of it in many agile frameworks and in the enterprise agile frameworks covered in Part 2. All agile teams engage in experimentation and deliver software iteratively in small product increments that result in short feedback loops that drive continuous improvement. In many ways, agile teams function as small startups. Their objective is to get working products in the hands of customers and then learn and adapt along the way.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset