Introduction to Agile
In Chapter 3 we took a look at different development processes and frameworks. Our experience is that we have seen a great deal of improvement in projects over the last few years. To be more specific, we have seen that the agile influence is making an impact in how our projects are delivering business value.
The focus of this book, when it comes to processes and frameworks, is on Scrum and XP. Partly because we like these ourselves, and partly because Microsoft focuses hard on implementing support in Visual Studio and TFS for these practices. Microsoft for example, includes a great template for running Scrum projects straight out of the box. We will take a close look at this later in this section.
This chapter looks at how we can use Scrum as an agile project management model to deliver software using TFS. We cover the scrum process a little deeper than in Chapter 3, adding how we in practice could use scrum and agile practices such as agile estimation and planning in combination with TFS.
This chapter does not cover eXtreme Programming (XP)—not because it is not useful, but because XP practices are covered in the more technical chapters later in this book. This chapter focuses purely on the project management features for scrum included in TFS 2012.
The Scrum Process
Figure 6-1 shows the Scrum process. The requirements from the business side of an organization are put on a backlog as Product Backlog Items (PBIs). The backlog itself is an ordered list with the (currently) most important requirements at the top. When the first sprint starts, the development team, together with the PO, selects a number of PBIs for the sprint backlog (SP) in the sprint planning meeting. The team commits to delivering these Sprint Backlog Items (SBIs) and starts working on them.
Figure 6-1. The scrum process
A sprint is usually lasts between 2–4 weeks and is divided into 24-hour increments (working days). Every day the development team and the scrum master (SM) meet in a daily scrum meeting going over the three magic questions:
The end result of a sprint should be a potentially shippable increment of the software. At the end of each sprint there are also two meetings:
That’s it. No more than that. Seriously. The process is extremely easy to use and learn, but is hard to master. But as we said we have seen great improvements in our companies and at with our customers’ projects taking an agile approach compared to a traditional project approach using waterfall or RUP.
Let’s take a look at the roles in scrum and what their responsibilities are. Many of the following sections of this chapter are short and concise. Keep in mind that there are books and trainings covering these topics, so this book does not give you everything. What we aim to do in this part of the book is to exemplify how TFS can support agile project management, and to do that we need to know a little bit more about some important concepts.
Roles in Scrum
As you will remember from Chapter 2 there are only three roles in scrum:
Together these three roles create the scrum team. In the next section of this chapter, we examine in more detail what responsibilities lie within these roles when actually planning and running a scrum project.
We will take a closer look at these starting with the Product Owner, PO.
Product Owner
The product owner is the role that most equals traditional project managers (PM). The full truth is that the responsibilities of the PM have been divided between all three roles in scrum, but a good part has landed on the PO role. The focus right now in this chapter is on the PO role because the scrum master’s and development team’s responsibilities are covered all through the book. Much of what the PO is responsible for ends up in TFS—especially in the beginning of the project. Here are a few things the PO is responsible for:
These are some of the PO responsibilities. We will soon see how much of these are mapped into TFS. First, let’s look at the other two roles.
Scrum Master
The responsibilities of the scrum master (SM) include:
So now we have come to the team, the ones producing the actual code. Here are some responsibilities of the development team:
Definition of Done (DoD) is something really important, but also something we often tend to forget. (Do not confuse Definition of Done with Department of Defense! That is something entirely different and way out of the scope for this book.) In many projects we have seen arguments between the delivering development organization and the person ordering the project about whether a task has been done at the end of (and also during) a sprint or project. It could be that testing has not been done the way that the client assumed it would have been done or that the software does not comply with certain regulations. The following conversation is typical:
For the most part this argument could have been avoided if they had sat down together in the beginning and written and signed a DoD.
There are other reasons for having a DoD as well. In order for the team to estimate a user story they need to know when they are done with it. Otherwise, it is very hard to complete the estimate. For a specific user story we know it is done when we have fulfilled the acceptance criteria for it. But where do all those general things like style guides, code analysis, build automation, test automation, regulatory compliance, governance, non-functional requirements, and so on, fit in? They affect the estimate of a user story as well.
Here is where the DoD comes into place yet again. The DoD tells us what other requirements besides the acceptance criteria of the user story itself that we need to fulfill in order to be done with the story. We include the general requirements into the DoD because they affect all user stories in the end.
We can say that Definition of Done is our primary quality document. If we do not fulfill what is in it, we do not deliver quality. It is essential that the PO and the team agree on the DoD. The DoD is part of the agreement between the team and the PO.
There should not be an argument over this concept during the project. If the PO thinks it is too costly to use pair programming or Test Driven Development, have him or her sign the DoD where you specify that these things have been removed. If at the end of a sprint the PO complains about the number of bugs, just present the document and say that the PO has removed essential parts of the testing and hence bugs will be present.
Agile Requirements and Estimation
This topic is huge, but important. We will cover some of the most important topics here and later show you how they are implemented in TFS. But if you want to master this, there are several trainings you can take and books to read.
Most of the agile planning and estimation tips and tricks of this chapter come from the agile community but are not specific to Scrum. Scrum really does not tell us how to do specific things like planning, estimation, and so on. Scrum is the process framework or process method we use for running our agile projects. However, Scrum works excellent together with these concepts we look at now.
In agile projects we usually represent our requirements in something called user stories. These can be looked upon as fluffy requirements—a little bit like use cases actually. We write user stories like this:
One example could be:
Figure 6-2 shows how Microsoft has implemented the user story into the work item type Product Backlog Item. The terminology is a little different from my previous description, but it works.
Figure 6-2. The user story implementation in the scrum template Microsoft provides with TFS
User stories capture requirements at a high level and will not be tangled up with detailed functions or implementation details. The details and nonfunctional requirements are instead captured as acceptance criteria for the user story. Based on these acceptance criteria, we can also develop acceptance tests at the same time we write the requirements.
The DoD is also important here because it describes other important requirements all user stories need to fulfill before they are done.
So, how can we go ahead with gathering requirements before we start a project? The PO should use any method he or she thinks is suitable. We often use story-writing workshops where important stakeholders, end users, business analysts, experienced developers, and others may participate to brainstorm the user stories they can think of. During such a workshop we focus on the big picture and do not dive down into details. These big user stories are often called epics because they are big and not broken down into details yet.
But don’t we need to find all requirements at the beginning? No. And that is what makes agile so great. The agile concept builds on the fact that we acknowledge that we don’t know and cannot know all the requirements early in the project. New requirements and changes to early requirements will pop up all through the process, and that is okay The agile approach takes care of this for us. We start with what we have initially and continue handling requirements all through the project. So the short version is to get started right a way and be aware that changes and new requirements will come.
When the initial requirements are done, we have the embryo for the product backlog. However, before we can prioritize and estimate these user stories we need to perform a risk assessment of them so that we can get a grip on any risk associated with each and every one of them. A user story with a great risk associated with it usually takes more effort to finish and should probably be done early in development.
To know the effort involved with a user story we need to estimate it. The sum of all initial estimates gives us a (very) rough estimate of how much time the whole project might take. But because we know things usually change over time we do not take this estimate as if it was written in stone.
So, how do we do estimation? We have what we need to do this, we know the requirements, we have a DoD, and we have acceptance criteria.
In the agile world it is recommended to estimate time in something called story points. Story points are not an exact size—instead they are relative.
Here is an easy example we use when running agile training. Take four animals, for instance. Let’s say a cat, a pig, a zebra, and an elephant. Without being a zoologist, most persons can say that the pig is three times the size of the cat, the zebra is twice the size of a pig, and the elephant is maybe four times the size of the zebra. If we sit down a couple of people and discuss these animal sizes, we pretty soon can come up with an agreement on their relative sizes.
The same goes for user stories. Most developers will come up with an agreement pretty quickly about the relative size of user stories. User story A is twice as big as user story B, and so on. We do not need to be very experienced in the details of each user story to come up with this agreement. Novice developers usually end up with the same estimates as experienced. Keep in mind that we are not talking exact time yet, only relative size.
The most common scale for expressing story points is a modified Fibonacci scale. This scale follows the following sequence: 1, 2, 3, 5, 8, 13, 20, 40, and 100.
Very often teams use a technique called planning poker when doing estimates. The deck of cards each player has contains the numbers from the modified Fibonacci scale. Here is how it goes:
But what about time then, someone asks. How can we get down to time? There are several things that we need to know to estimate time. The first is the team capacity. Consider the following when calculating the team capacity.
We now should connect points and time. We need to know the team velocity, which is the number of story points the team can handle in a sprint. Initially this is impossible to know. The easiest way to figure it out is to perform a sprint planning meeting. This is the meeting where the team breaks down a user story into manageable tasks. And this is where time becomes interesting. During this meeting the team estimates the tasks in hours so that they can plan the sprint and decide on how many user stories they can take on in their sprint. This is usually the way team performs this:
Now that we know the velocity of the team we can make a rough time plan for the entire (at that point known) project. This is good input for the PO in his or her discussions with stakeholders, and also input for ROI calculations.
The sprint planning process then continues all through the project and the theoretical velocity can soon be replaced with one based on experience instead. We will come back to this several times later in the book, starting in Chapter 8.
When the initial user stories are in place and estimated with story points, the PO can start prioritizing the backlog. In scrum this is called ordering the backlog. Based on the business needs, the PO makes sure that the order of the backlog reflects what the business wants. In Figure 6-3 we can see the initial backlog we used for writing this book. We did a rough estimate on each backlog item and then a velocity planning. After that we could see what backlog items should be completed during which sprint (two-week sprints were used).
Figure 6-3. The backlog we used for writing this book
The PO needs to keep the backlog in good shape all through the project. This means that it needs to be ordered. It also needs to have fine granularity at the top (maybe 3–4 sprints down the list) and rougher granularity further down.
The PO can also start to look at release planning at this point. It is important to get an overview of coming releases in the project especially if you have a larger project. Release planning can be done on the epics, the larger user stories. A good way is to look for themes among the user stories. What could be useful to release at the same time? If we find such features, we could make a theme of it and plan the theme for a certain release.
When this is done we could also do a very rough time estimate on the releases and suddenly we also have a rough time plan for the project.
Scaling Scrum The PO is responsible for staffing the project. He or she should select an initial team that will help the PO during user story gathering and estimation. The team should consist of experienced persons (developers, business analysts, and so on) that ultimately should participate in the entire project.
Two to four persons in the team might be good at the initial phase, but when the project starts this should expand to the number needed (seven plus or minus two persons).
If need arises for more than one team, one or two from the initial team should participate in the new team. So, start small and expand as needed. We have seen projects starting too big and fail, so do not fall for that.
It is also good if the scrum master can join the team early.
Now we have as much information as we could possibly ask for this early in a project. The next step will be the sprint planning meeting when the team (as we showed earlier) has a planning meeting and selects the backlog items they feel they can commit to during the sprint.
Summary
We can now start setting up the project in TFS. Once we have a backlog, we can start adding the stories into TFS. We can also start adding the team members to the TFS project. We will have a closer look at this in Chapter 8.
Chapter 8 we also looks at how we can support the agile process during the sprint(s). We will see how not only the PO benefits from the agile project management features of TFS, but how the SM and the team also can use these features to enhance the work.
3.17.157.6