Three Steps to Scaled Agile

Scaling Agile requires the coordination and collaboration of hundreds, thousands or tens of thousands of smart independently minded individuals. To scale Agile, a small set of simple goals are needed that individuals and teams in the organisation can focus on, aware that if they achieve the goal, they are part of something much bigger. They can then use the most appropriate practice to achieve that goal.

letters-3195083_1920

One of the key learnings from our experience at Skype was that we had to keep the process so simple that people did not have an excuse for not following it. If people did not follow the process, it was because they did not want to follow it rather than the process was too complicated and they made a mistake.

To get your head around scaled agile, we need to consider the different “levels” or “concerns” in the organisation:

screen-shot-2016-12-03-at-06-48-13

So what are those things? What are the goals are each level?

Executives

There is one goal at the executive level:

  1. Ensure that the executives have transparency into the system to ensure that the goals are being met.

Portfolio

There are two goals at the portfolio level:

  1. Ensure that the backlog of Epics (single team and cross team) is strictly ordered (i.e. no joint 3rd priority) based on the constraints in the organisation. One of the key constraints at the organisation level is the capacity of individual teams.
  2. Manage capacity by moving capacity to the constraints, and planning capacity for the future. This involves ensuring that there is capacity in the system to meet any commitments that have been made to external parties.

Team of Teams

The goals at the team of team level:

  1. Deliver Value.
  2. Reduce Lead time for the delivery of value.
  3. Reduce Lead time for fixing production incidents.
  4. Reduce the number of production incidents.

The team of teams level is fundamentally about delivering value.

Team

The goal at the team level:

  1. Ensure that delivery is value focused. That means that each Epics (single team and cross team) should deliver value rather than be bucket for stories.
  2. Ensure that team level delivery is predictable and consistent. Consistent in terms of quality. Consistent in terms of size. Predictable in terms of quantity.

The three steps to Scaled Agile

Here are the three steps to scaled agile:

  1. Get teams to deliver value in a predictable, and focus team of teams on reducing lead time.
  2. Create a system of transparency so that you can see how everyone is progressing to achieve their goals.
  3. Bring business decision makers to come together to prioritise the backlog of Epics (single team and team of team).

These simple rules allow the organisation to coordinate and collaborate without having to understand the entire system. From these simple rules, the organisation can generate complex and speedy responses.

The following practices, tools and thinking tools will help you achieve the goals:

AgileOrgStructurev2

So what have I missed? Which goals do the organisation need to achieve in order to scale agile? Comments please.

 


#NoEstimates and SWAG Estimates

Just over a week ago, Vasco Duarte, my good friend and leader in the #NoEstimates tribe posted this tweet during a mammoth twitter conversation about #NoEstimates and SWAG Estimates:

IMG_3908

I realised that there may be some misunderstanding the purpose of SWAGS, and in particular the relationship with the #NoEstimates movement.

lego-3135581_1920

Lets start with story points.

Story Points Versus Story Count

Story Points are crack cocaine for managers who want to believe in a world where they have more accuracy than they really do. Story points, if used at all, should only be used by the development team and the product owner to communicate relative effort. In order to create a story point estimate, the product owner must present a story to the development team that meets the definition of ready for the team. Typically this occurs one or two sprints before the team work on the story. Often the definition of ready includes the product owner taking the story through a “Three Amigoes” session with a developer and tester. This is after the product owner has detailed the story including acceptance criteria, often in the Given-When-Then format. In other words, a large amount of effort is normally required before a story is ready for the team to give a story point estimate.

Mature development teams only work on stories within a defined size range and drop the need for story points altogether. Given the number of stories to be developed, an estimate of the elapsed time to deliver an Epic can be just as easily be determined from the story count as it can using story points. The advantage of using the story count instead of story points is that an estimate of the duration can be made before any work has been done on the story at all.

So within the sprint, some teams choose to use story points and often more mature teams will simply rely on the story count. Outside the sprint, story count is the only sensible option for estimating the lead time for an Epic that spans more than one sprint.

Whence SWAGs

Story counts are useful for Epics when you know how many stories need to be developed. However, there are times when we do not know how many stories are needed, and often when we do not even know what Epics are involved.

This is where SWAGs or Sweet Wild Assed Guesses are useful. (At Skype, that is the name that we put on the field label in Jira).

Capacity Planning

At Skype, a number of us including Tony Grout and Lisa Long developed Capacity Planning, a mechanism to coordinate all of the development of Skype and Lync (now Skype for Business). The Product Executives and Managers would prioritise the backlog for the next quarter based on the capacity of individual teams. A large number of the initiatives that went into capacity planning did not make the cut because they relied on work by a team whose capacity was being used on higher priority initiatives. As a result, we needed a cheap and simple way to estimate the effort required from a team. We used a SWAG, an estimate of how many weeks it would take a team to develop a piece of work. The SWAG was good enough to help us understand how much work a team could do in the quarter. It was understood that SWAGs were not accurate and we frequently referenced the work of Todd Little and Troy Magennis that stated the actual versus estimate followed a log-normal (Weibel) distribution with a most likely actual being double the estimate.

The SWAG estimate was used in the Capacity Planning Process that occurred weeks and months before the stories in the epic were broken down into stories. Once the stories were available, they were used on some initiatives to track progress using just the count of stories.

Subsequently Dan North introduced me to his client, a large American bank, were I introduced them to the same process. Since then the approach has been used in further organisations, large and smaller.

The key issue that Vasco’s tweet asked if we had compared estimates with story counts… The problem is that the story count does not become available until weeks and months after the capacity planning session where we needed them. Not only that, but we did not want to put the effort into breaking down Epics into stories when we might not even build the Epics if they were blocked by other work.

As a result, I suspect that SWAGs and #NoEstimates are complimentary rather than in conflict with each other.

 


I was wrong about Culture – “Pasted Values”

I’d rather be wrong than right. For some time it appears that my thinking about culture has been wrong. It probably explains why I have had little success trying to change it. I still think that seeing culture is an important first step. However, the model about the underlying principles that drive culture is obviously wrong. (The model is presented here and here).

The model is based on the work of Edgar Schein (My mentor Marc Burgauer introduced me to his work). Edgar Schein’s model talks about espoused values and assumptions. I had interpreted this to mean that behaviour in an organisation (in a Karl Weick sense) is driven by the underlying value function of the organisation. To represent the value function, I use the financial definition as it is the most useful and general model that I’m aware of and can be used to model learning. The hypothesis was that if we can change an organisation’s values, the behaviour would change.

FeatureInjectionValueFunction

Today whilst listening to Charles Duhig’s “The Power of Habit” I realised that my hypothesis was wrong and I had been ignoring the obvious. Culture is not just an expression of an organisation’s values, it is also based on a set of organisational habits.

Imagine an excel spreadsheet where we write some function:

=if(X = Y,”do A”, “do B”).

If X = 10 and Y = 10, we would get the result “do A”. If X = 10 and Y = 11, we would get the result “do B”. Currently X = 10 and Y = 10 which means the function returns “do A”.

Now if we change the excel function to be:

=if(X = 2Y,”do A”, “do B”).

If X = 9 and Y = 9, we would now get the result “do B”.

That was my naive interpretation of culture. All I needed to do was help people see a new way of looking at the world (the phenomenology), a new value function and the behaviour would change.

What I had failed to understand was that most people do not re-evaluate their value function every time they do something. Instead, its as if they copy the Excel Cell and “Paste Value” so that the sell always contains the value “do A”. Either that, or they have turned off automatic calculations and need to press <F9> to update the value in the cell to “do B”.

In “Thinking Fast & Slow”, Daniel Kahneman talks about System One and System Two. System One is automatic whereas System Two is the one that does critical thinking and evaluation. We need system one which is fast and unthinking because system two is slow and takes more effort. In effect, when we encounter a culture, most of it operates in System One and my solution was to engage System Two.

So I’ve broken my model of understanding for culture. I was wrong. My prize is that to understand culture change, I need to know about “habit change”, addiction, CBT, and a bunch of other stuff . If you know of any good resources or other things I need to know, please leave them in a comment.

Today I realised I was wrong. Now I have better chance of a better tomorrow.


BDD Done Easy – The three types of data

There are three types of data that can appear on the output of a system. The three types of data are determined by the mechanism that is used to provide the data item.

The three types of data are:

  1. Data entered into the system from outside the system
  2. Data calculated in the system with data in the system
  3. Data created by processes in the system

machine-3039352_1920

To describe the three different data types, consider the following example report. Students are allowed to withdraw money from an account. A limit is applied to how much a student can withdraw each month. A student can choose to override the limit but any override needs to be approved by a responsible adult. This report shows those transactions that override the limit.

  • In order to identify whether appropriate limit breaches are being approved
  • As a Parent
  • I want to see transactions that breach the limit, along with the reason and the approver.

Screen Shot 2018-03-25 at 18.39.27

Data entered into the system from outside the system

Screen Shot 2018-03-25 at 18.39.51

In this example, the Student Name, Monthly Limit, Withdrawal Amount and reason to override the limit. All of these data items need to be enter either via a user interface or a system interface.

Values are either entered free format, or selected from a list of permitted values (The items in the list of permitted values are originally entered free format.

Data calculated in the system with data in the system

Screen Shot 2018-03-25 at 18.40.06

These are the values that are calculated within the system. In this example the balance and the % above limit. To indicate that these are calculated value, I prefix the name with “get”. Account.getBalance and Transaction.get%AboveLimit.

Account.getBalance(QueryDate) = Sum(Transaction.Amount) where transaction.date before QueryDate and after 1st Day of monthMonth

Transaction.Transaction.get%AboveLimit = ( Account.getBalance(Transaction.Date) – Account.Limit ) / Account.Limit )

Data created by processes in the system

Screen Shot 2018-03-25 at 18.40.23

These values are created by processes in the system. In this example, Date, Approved by and Approval Date. These values are all populated in a THEN in a GIVEN-WHEN-THEN statement. We start at the last step in the process which in this case is the approval.

  • THEN Approved by is set to the logged in user.
  • AND the Approval Date is set to the current Date & Time.
  • WHEN the withdrawal is approved
  • GIVEN the approval screen is displayed
  • AND a withdrawal above the limit is on the screen
  • AND the user is logged on
  • AND the user is an approver for the Account

Similarly (and ignoring the approval e:mail steps in between)

  • THEN the Date is set to the current Date & Time
  • AND an approval is sent to list of users who are approvers for the account.
  • WHEN the student overrides the limit
  • GIVEN the student is on the limit override screen

Understanding the three types of data means you ensure the correct approach for populating them is adopted.

This blog post was inpired by a conversation with Rekha Kusumanchi about the Cotswold Way. My thanks to Rekha.


BDD done easy – The Cotswold Way

The Cotswold Way is an Agile approach to business analysis, developed by Kent McDonald and myself.

IMG_2048

Before you start, you need to identify whether you should be doing Business Analysis, Product Management or JFDI. Cynefin is a particularly useful tool to determine which approach.

The problem with BAs and Story writing in general is that most people think of it as an art form or a brainstorming activity. In fact there is a very simple directed process that Jenny Martin elegantly summarise as OOPSI (Outcome, Output, Process, Scenario, Input), and if you do it backwards, it ISPOO…

The process that I now refer to as the Cotswold Way is a further elaboration of the approach that Kent and I created called Feature Injection.

There are seven simple steps in the Cotswold Way:

  1. Hunt the value. Start where ever people describe the problem/solution. Then work to the output and get them to sketch the reports that they need. They should be able to explain how and why they need the  output (report). This is the customer value which is not the same as the business value.
  2. Once you have the output, work backwards using the information smells process to identify the data and calculations you need to produce the report. This makes creating examples super easy. (For those who prefer videos to articles).
  3. Now build the output in a spreadsheet using the model developed in step 2.
  4. You can then work backwards to describe the behaviour of the system using the Given-When-Then format to define the process that populates the required data. (See here and then here )
  5. Depending on the size and complexity of your organisation, you need to meet with either some lead developers/QAs or Architects/Lead Devs/Lead QAs to agree the architecture for the solution. Once you have done that, you can break down the solution into Epics and assign stories to the various components etc.
  6. To break the solution into Epics, you now work backwards for each system to define the Given-When-Then. (Obviously if you are doing everything in a single component, you can ignore steps 5 & 6.)
  7. Once you have your examples and Given-When-Then at the system levels, its a simple matter to slice them up into stories. David Evan’s article, and book are great for those who want to improve the stories they write.

This process takes HOURS rather than days.

Want to get started? Its simple, ask your user or business stakeholder to sketch the output they want rather than describe what they want to you.

Blog posts providing detailed examples of the steps above to follow.


BDD done easy – The level interactions

There are three levels of scenarios in BDD. In this post I will describe the interactions between the levels to show how the scenarios can be more easily created.

firefighter-1851945_1920

In the last post, we created a scenario at the User Level…

  • GIVEN I have an account
  • AND I’ve set up automatic payments
  • AND I have selected a product
  • WHEN I place an order
  • THEN the item is delivered to my doorstep
  • AND the payment amount is debited from my credit card

…and identified the internal systems that will form the value stream.

Screen Shot 2018-01-27 at 15.08.20

We will now use this example to illustrate the relationship between GIVEN-WHEN-THEN scenarios. These are easy to identify when you work backwards. The relationships we will discuss are:

  1. The “THEN” at the user level is the same “THEN” at the system level and is the starting point for creating the scenarios at the system level.
  2. For every GIVEN, there is a THEN in another preceding scenario in that system. In fact, the GIVEN in one Scenario, IS the THEN in the preceding scenario.
  3. For every WHEN as a result of a message from another system, there is a THEN in the other system.
  4. System Level interactions with the user need to be reflected in the User Level Scenario.
  5. Each “GIVEN”, “WHEN” and  “THEN” at the user view level has to exist in a system at the system level.
  6. The start scenario has no context (i.e. No Given).

These rules give clear direction for tooling, especially when combined with the “Business Model” and examples already created prior to the GIVEN-WHEN-THEN scenarios.

I am going to write TODO next to those paths that I am not going to expand in this blog. These paths won’t add any clarity to the point being made and make a handy piece of homework for anyone who would care to follow them through.

We start with rule 1…

The “THEN” at the user level is the same “THEN” at the system level and is the starting point for creating the scenarios at the system level.

The value stream ends with the fulfillment system:

  • THEN the item is delivered to my doorstep
  • WHEN the driver hands me the package
  • GIVEN the driver has the package
  • AND the driver has my address (TODO)

For every GIVEN, there is a THEN in another preceding scenario in that system.

Working backwards, each GIVEN becomes a THEN, namely THEN the driver has the package & THEN the driver has my address

  • THEN the driver has the package
  • WHEN the warehouse worker gives the driver the package
  • GIVEN the account system has marked the items as “Paid For”
  • AND the item has been packed. (TODO)

Working backwards again, GIVEN the account system has marked the items as “Paid For” and AND the item has been packed.

  • THEN the account system has marked the items as “Paid For”
  • WHEN the account system notifies the fulfillment system that the item is “Paid For”
  • GIVEN the fulfillment system has the order (TODO)

For every WHEN as a result of a message from another system, there is a THEN in the other system.

The WHEN from the accounts system results in a THEN in the accounts system.

  • THEN the account system notifies the fulfillment system that the item is “Paid For”
  • WHEN the account system receives a confirmation from the external payment service
  • GIVEN the account system requested a confirmation from the Bank’s external payment system.

Obviously, we choose not to describe the Bank’s payment system. However we know that this step maps to the AND the payment amount is debited from my credit card in the User Level Scenario.

  • THEN the account system requested a confirmation from the Bank’s external payment system.
  • WHEN the account system receives an item purchase request from the order system
  • GIVEN the user has valid credit card details stored (TODO)

The WHEN from the order system system results in a THEN in the order system.

  • THEN the order system publishes an item purchase request
  • AND provides an acknowledgement to the mobile app
  • AND e:mails a confirmation to the user
  • WHEN the mobile app creates an order in the order system

System Level interactions with the user need to be reflected in the User Level Scenario.

The red output indicates something that iteracts with the user that is not on the user level scenario which means that the user level scenario needs updating.

  • GIVEN I have an account
  • AND I’ve set up automatic payments
  • AND I have selected a product
  • WHEN I place an order
  • THEN I receive an e:mail confirmation
  • AND the item is delivered to my doorstep
  • AND the payment amount is debited from my credit card

The WHEN from the mobile app system results in a THEN in the mobile app.

  • THEN the mobile app creates an order in the order system
  • WHEN I place an order
  • GIVEN I am logged in
  • AND I’ve set up automatic payments (TODO)
  • AND I have selected a product (TODO)

Each “GIVEN”, “WHEN” and  “THEN” at the user view level has to exist in a system at the system level.

So far every “GIVEN”, “WHEN” and “THEN” has been accounted for except for “GIVEN I have an account”. We know we are not finished.

GIVEN I am logged in results in a THEN

  • THEN I am logged in
  • WHEN I supply the correct username and password
  • GIVEN I have an account

A finally we have accounted for all of the “GIVEN”, “WHEN” and “THEN”s.

We may decide to replace GIVEN I have an account with GIVEN I am logged in in the User Level Scenarios for clarity.

The start scenario has no context (i.e. No Given).

Eventually we get to scenario that requires no context in the system.

GIVEN I have an account results in a THEN

  • THEN I have an account
  • WHEN I create an account

No context is necessary. The account could be created through an API or a Screen or….

We have now reached the Start scenarios. Time to go back and handle all the TODOs, especially the quality paths that I did not even mention.

Although I said there are three levels, I was lying. There are more. However the rules to describe the relationship between scenario in different levels and different systems/components are universal. ( I think ).

In the next post I will discuss some theoretical implications of this on tooling and managing test suites.

If I did not have the flu I would have created more images to illustrate the points. 🙂

My thanks to Mihai Tudor for co-creating this clarity of understanding.


BDD Done easy – The three levels of BDD

The easy way to do BDD is “Working Backwards“(1). Sadly “Working Backwards” is a principle that few people are aware of and even fewer practice.

hammock-2239788_1280

The other poorly understood aspect of BDD is that there are three different levels of scenarios(2). The three levels are:

  1. The user based view where we ignore which systems perform the function.
  2. The system level view where we describe the behaviour of a system as it interacts with its users, and with other systems.
  3. The user interaction level where we zoom into a specific micro-interaction between a user and the system.

The User Based View

We work backwards from customer based value to create the user based view:

  1. Identify the value. To do this, we find the value to the customer by creating a mock up of the output and asking them how they will use it.
  2. We design the output and validate it with the user.
  3. We use “Information Smells” (i.e. Work Backwards) to identify the data (examples) and calculations needed to create the output. I normally document the examples in an excel spreadsheet as there tend to be a lot of them.
  4. We then work backwards to describe the behaviour of the system using BDD.

At this stage, we should be describing the system from the users perspectives regardless of the different IT systems and organisations. This is the first level of BDD. Describing the system from the users perspective and these BDD scenarios become the User Acceptance Tests. The examples are likely to be more complicated in their description.

For example:

  • GIVEN I have an account
  • AND I’ve set up automatic payments
  • AND I have selected a product
  • WHEN I place an order
  • THEN the item is delivered to my doorstep
  • AND the payment amount is debited from my credit card

We can express this visually…

Screen Shot 2018-01-27 at 14.59.36

  • The WHEN describes the user input.
  • The GIVEN describes the necessary internal state of the system.
  • The THEN describes the outputs from the users perspective.

The System Level View

A number of systems may be involved in the scenario described above. At the system level, the BDD scenarios describe the behaviour of each system as experienced by the users and other systems.

Consider a company that has a number of systems that form its value stream:

  1. Mobile App
  2. Order System
  3. Fulfillment System
  4. Account System

We start our description of the behaviour of the systems by mapping them to the user view. Every interaction at the user level needs to be replicated at the system level. The “Givens” will be mapped to the systems when we work backwards. Each “Given” will need to replicated at the system level.

Screen Shot 2018-01-27 at 15.08.20

The creation of the GIVEN-WHEN-THEN at the system level will be described in the next post that examines the interaction between the levels.

The User Interaction Level

The User Interaction Level scenarios describe the detail of how the user interacts with the system. This is best illustrated with a couple of examples.

  • GIVEN the user has selected a product
  • AND the user is logged in
  • WHEN the user hits the “Buy” product
  • THEN the system generates a “Buy” order
  • AND it displays the “Buy Order” confirmation screen.

which describes the behaviour when logged in, compared to the behaviour when the user is not logged in:

  • GIVEN the user has selected a product
  • AND the user is not logged in
  • WHEN the user hits the “Buy” product
  • THEN the system displays the “login” screen

Unlike the User and System Level Scenarios, the User Interaction Scenarios are often stand alone rather than part of an overall system description. Organisations try unsuccessfully to assemble a coherent comprehensive test suite out of these fragments of testing.

The next blog will describe the interaction between the levels by describing how to create the Given-When-Then scenarios at the system level.

(1) Working Backwards is a key principle of BDD. Originally known as feature injection, Jenny Martin came up with the excellent OOPSI acronym, and Kamil Nicieja mentions it in his book “Writing Great Specifications”.

(2) Actually there are more than three levels (Thank you to Joe Schmetzer for pointing this out). However from the perspective of BDD, the describing the behaviour of a system and a component are fundamentally the same.