Chapter 2
IN THIS CHAPTER
Becoming familiar with different agile practices
Getting up to speed on agile team frameworks, including Scrum and XP
Improving workflow transparency and management with Kanban
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.
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.
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.
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.
A couple terms related to user stories are epics and themes:
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:
Agile teams use a variety of estimation techniques, including the following:
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.
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.
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.)
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.
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.
Continuous integration (CI) is the practice of merging code changes into a share repository several times each day to achieve the following two objectives:
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.
This iterative approach offers many advantages, including the following:
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:
As an empirical process framework, Scrum is built on the three pillars of transparency, inspection, and adaptation, as explained next.
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.
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.
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:
See the section “Stepping through Scrum events” later in this chapter for details.
Scrum stipulates five values every Scrum team should embrace:
Every Scrum team has a product owner, a Scrum Master, and a development team, and every team is self-organizing and cross-functional:
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:
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:
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.
Scrum has five events that provide some regularity throughout the product development process while minimizing time spent in meetings:
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.
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:
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.
Prior to each sprint, the Scrum team engages in sprint planning, which is a two-part meeting:
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:
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:
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.
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.
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:
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.
Scrum specifies that teams produce the following four artifacts to provide transparency and to support inspection and adaptation:
In the following sections, I describe each of these artifacts in greater detail.
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.
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:
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.
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.
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.
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).
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:
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.
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.
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.
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.
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:
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:
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.
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.”
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:
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.
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.
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:
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:
Lean Software Development translates these sources of wastes in manufacturing to the software development process:
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.
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.
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.
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:
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):
Product: You create a minimum viable product (MVP) — a product with just enough features to appeal to early adopters.
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.
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.
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.