Showing posts with label Agile. Show all posts
Showing posts with label Agile. Show all posts

Monday, October 9, 2017

Writing Better User Stories - Part 3 (The right amount of detail)

Ideally a user story should be more than a quarter of a sprints velocity. If this is the case then user stories should be able to be finished during a sprint in most cases. If the team is having trouble completing user stories it may be that they have too much or too little detail. Below are some techniques for determining what the right level of detail is for a story.

Too Little Detail

If a story does not have enough detail you may find that there are too many unknowns and result in there being a lot of questions to product owner during the sprint. The delay here is during the sprint and development and is very visible. The answers can delay the development or increase the complexity of the story as well.

Too Much Detail

If a story has too much detail you may find that the team has tried to remove all uncertainty from the user story and that new functionality is taking longer to deliver from the point the request for new functionality was made. The delay in deliver here is hidden by spending lots of time refining the story BEFORE it is brought into the sprint. This shows in areas like acceptance criteria with too much detail, or all screen designed completed, or not allowing a story into a sprint if it has an uncertainty. If all creativity has been removed from the developer there is probably too much detail.

The Sweet Spot

Ask the team "Did you get just enough detail to complete this iteration's user stories and was that information provided just in time?" in the retrospective. This will help in future stories. Strive to get the right level of detail "on average", not every story.

Detail should be provided "Just enough and Just in time" because too early and the information will be out of date by the time the team works on the user story. The will likely cause delays in the sprint or waste time reworking a story.

Analysts job with Agile is to provide the information Just in Time since there is not large chunk of analysis done at the start of the project. This is in contrast to traditional waterfall methods where there is an initial stage where the analyst figures out all the details upfront. This means that the chances that the analyst will get the level of details or get something wrong increases. This means some (a small number) stories will be affected, but not likely all of them. However, this is better than building in delays, padding, etc into every story.

The idea is striving for perfection when moving this fast will not be effective. Consider something like Fedex that has 2 day delivery. They expect that a low percentage of packages will not be delivered as expected. The alternative is to not have 2 day delivery and guarantee 5 day delivery instead, or increase the number of staff, planes, vehicles, etc. These would affect the price of the product as well as reduce the overall benefit that most people experience just so we get 100%. The same can be said for Agile projects.






Friday, October 6, 2017

Writing Better User Stories - Part 2 (Splitting Stories using SPIDR)

Benefits of taking time to split stories


  • Deeper understanding of the feature
  • Can be delivered in a sprint which keeps velocity more consistent which makes it easier to pull in the right amount of work into a sprint
  • Shows progress
  • Smaller chunks are easier to understand
  • teams are motivated to finish a small story and feel a sense of accomplishment when they do.

Bad Ideas


  • Doing development in one sprint and testing in another sprint.
  • Having the entire team present when splitting every story.

Using SPIDR to Split Any Story (5 ways)

The goal is not to split stories into the smallest story possible and produce lots of small stories. Instead the goal is to split the story as few times as possible such that it can comfortably be completed in a sprint.

Spike (S) 

a research activity intended to build knowledge (not deliver functionality). Use cases are times when a team cannot decide between different ways of implementing something, or a new technology is being used. Use it only as a last resort (after the other 4 approaches have been tried).

Paths (P)

A path becomes a story
Consider the paths through a story and split each path into its own story. Draw a simple flow chart and look for the conditional or places user has to decide a path to go down (Credit Card or paypal for example). Looking for the word OR may also aid in identifying different paths. Look for paths that will deliver value for the users.

A complex step becomes a story
Sometimes the complexity is not in the different paths, it is actually in just one step in the feature. In this case it may make sense to combine several paths into one path if such that they comfortably fit into a sprint. Then take the one step that is complex make it a separate story. For example, maybe the step that is complex in a shopping cart checkout is Confirming the order in which this case maybe a story for just confirming the order makes sense or even may need to be broken down into multiple stories if it doesn't fit into a sprint.

Interfaces

Split a story across multiple user interfaces (mobile OS, browser) or data interfaces. The could mean separate stories to support iOS, Android, Windows phone, etc. Or it could mean separate stories for each type of browser such as a story for Edge, another for Chrome, and another for Firefox, etc. The reality of browser differences is that usually one browser will have an issue. So, the user stories can be split into Troublesome browser and non-troublesome browser stories.

Complex User Interface
If the user interface is complex is complex it can be broken down into two stories. In the first story the goal would be to just get the data on the screen and not worry about design. The focus is to make sure it is wired up to the backend. The second story would be going back and refining the user interface to be fancy and work in a certain way.

File Formats
If you have a service that needs to import data in XML, JSON, and CSV then you can break out each format into a story. The first one would have the largest estimate because the extra work needs to be done for the importing, while the other stories would just really be about parsing different formats.

Data (D)

Develop an initial story that supports only a subset of the data. Consider how different aspects of data can be used for a particular story. Think of this is how to make AI smarter by adding in more scenarios or data sources. If making recommendations, one user story could be I want the feature to make recommendations that consider x. Another story could be I want the feature to make  recommendations that consider y. Each user story may not be enough to release or be really useful to user, but it is a step towards the releasable product that has lots of value.

Rules (R)

Relax business rules or technology standards or industry standards in an initial user story. Subsequent stories can tight up the rules.Other functional stories can be added and completed before the rules are tightened to allow more feedback on the larger solution. Sometimes rules show up as non-functional requirements such as performance.

Context

You don't need to try all 5 ways to split stories. Just start with the way that you think will likely work and if that works then you are done. If it doesn't then try another way and if that works then you are done. Continue until you have successfully split a story into smaller stories that fit comfortably in a sprint.

Caveat

Some stories cannot be split, but they are fundamentally large and rare. Using SPIDR will make it possible to split nearly all stories

Monday, October 2, 2017

Writing Better User Stories - Part 1 (Using Story Mapping)


Stories are not simply a replacement for a requirements specification. It is meant to be an interactive, regular, shorter process.

Focus on One significant thing


Focus the meeting on a single significant objective (that will take a few months to do). This allows us to plan at a quarterly focus which also typically works well for management.

Don't do story writing workshop every sprint. It is a bad idea to do so.

Minimum Viable Product (MVP) is a good thing to focus on because it promotes feedback early.

Minimum Marketable Feature (MMF) is a subset of functionality that users need, but it is enough to be valuable to users when released.

Who should be in story writing workshops

Product Owner presents the significant objective
Scrum Master or Coach to facilitate the meeting and keep it run smoothly and effectively
Any other person that will be involved in the development such as Developers, Tests, Technical Writers, DBAs, Designer, Architects. Don't leave people out this is the time where everyone learns about the story. This will allow questions to be answered, new perspective brought in, and more new and innovative solutions will likely be produced.

An exception to this is when multiple teams are involved. In this case a subset of each team may be useful to keep the size of the meeting smaller and more manageable. An alternative would be to break the story down further so that each team can have their own sub-objective and meeting and the full team would be included in these smaller story writing workshops.

Users and Stakeholders can be invited and probably should be. However if it becomes too distracting or side-tracks the workshop because they are arguing over priority of stories then it may be better to leave them out. Alternatively, reassure them that the workshop is about understanding the user story workshop, and discussing it does not prioritize it over another story.

Visualize relationship between stories

A story map is quite useful for visualizing how stories relate. This is typically describing a sequence of stories connected with THEN.

For example:



Then add Alternatives below sequence at the position where it is in the sequence. Or keyword is used to connect it in the sequence. The higher priority items should be at the top, and low at the bottom.



This is helpful for identifying missing stories. To do so, ask the following questions while reviewing the story map. Ask these questions for each type of user in the user story.

  1. What will a user most likely want to do next?
  2. What mistakes could a user make here?
  3. What could confuse a user at this point?
  4. What additional information could a user need.
Subsequently you can then break story map into releases such that each horizontal line is a new version. It can be useful to label each version as well.


Reference:

Better User Stories - an excellent series on writing better user stories.

Friday, September 23, 2016

Take aways from Agile on the Beach 2016

I attended Agile on the Beach in Falmouth (England). It was really great to hear so many people with different experiences. The videos and slides can be found here. Below are some of the highlights of what I found particularly interesting.

Keynote by Dr. Linda Rising
  • Surprisingly, people are moved to action by stories NOT facts (or evidence). In fact when someone is shown evidence as to why they are wrong they only stand firmer in their belief (as a defense mechanism).
  • A placebo can be just as useful as the "real thing" because what we BELIEVE can make us fail or succeed. The placebo allows us to believe in something.
Book: Thinking Fast. Slow...The Progress Principle (I think this is the book :)

Continuous Delivery
  • Tools: NCrunch, CruiseControl.Net, R#, NANT
  • Policy: Develop to one trunk (no long standing branches). Because of this, GIT may not be the best choice.
  • Goal: Want SMALL commits frequently. For example, about once an hour and ideally 2 files.
  • Break refactoring out in a separate commit.
  • Policy: Can't commit when build is broken
  • Policy: Run all tests before commit (on local machine)
  • Policy: Don't go home until a broken build is fixed. This doesn't mean late hours necessarily. It could just mean backing out the offending commit, and addressing it the next day, then recommit.
  • Goal: a pipeline should be about 4 minutes for quick feedback.
  • Goal: it is ideal for it to be faster to redeploy a change using the pipeline than manually backing out a release.
  • Goal: 75% code coverage. Most will be between 50% and 80%
  • Use Feature Toggles when required, but avoid if can.
  • Warm up an app after deploy
  • Measure commit to live time.
Quality Control
  • Broken Windows Effect - one broken window (bug, issue, technical debt, not tested unit, etc) begets more broken windows.
  • As developers we spend 70% of our time reading code (ours or someone else's) and the rest of the time copy and pasting. Consider poorly written code to be a broken window and copy and pasting that implementation pattern the creation of more broken windows.
  • Anti-patterns: Fat controllers, large models, functionality grouped into services or managers (not sure I understand the last one...).
  • Enforce standards on each commit and fail the build. Could be formatting rules, naming conventions, etc. This will make code diffs be much easier because we only have to read meaningful changes, not changes to code formats.
  • Code that is easy to change (opposite of code smell) has: High Cohesion, Loosely coupled, little duplication, low cyclomatic complexity.
  • Tools: ESLint (for JavaScript checking), Resharper, Visual Studio, NDepend, NCover
Problem Solving
  • Shorten Feedback loop: Idea -> Test -> Measure -> Learn -> (loop back)
  • Gall's Law: Solving complex problems (or systems) from scratch in one go does NOT work, but starting with simple case that works and iterating works (summarized from quote from John Gall).
Testing with Continuous Delivery
  • Testing Pyramid (GUI testing, Acceptance testing, unit testing)
  • Interestingly, only 20%-25% of the audience in the Testing in CD talk at AOTB used TDD. Maybe it isn't so surprising because people that already know it and use it may not attend a talk on it when there are new topics to be heard.
  • Interestingly, only 10%-15% of same group used BDD. 
  • Hypothesis Driven Development - Can be written as statements in the following format: We believe <this capability>, Will result in <this outcome>, We will have confidence to proceed when <we see measurable signal>.
Pen Testing (Penetration Testing) 
  • Expect 20-30 minutes scan time depending on application size
  • Run on UI and API.
  • Use BDD to describe security tests (see BDD Security) to have human readable tests for security.
  • Tools can find 70-80% of vulnerabilities, but the rest needs to be manually done.
Pen Testing Tools
  • Static code review using tools like Veracode.
  • BDD_Security - Define security tests using BDD style scenarios.
  • Mittn - define a hardening target using human-readable language
  • Arachni-Scanner - free with source and runs on Windows, Mac, and Linux
  • Gauntlt - may be useful as well to coordinate security tools.
  • ZAP - free security tools / scanner.
  • SSLyze - checks for mis-configurations affecting SSL Servers.
  • Nessus - a paid PCI vulnerability scanner.
Business Agility
  • Process: Test Hypothesis -> Quick delivery and release -> measurement -> repeat
  • Big Bang never works or at least very scary.
  • Use The Strangler Pattern to avoid big bang.
  • Postel's Law - Architect for testability, develop for evolve-ability.
  • Last Response Moment - wait as long as you can (so you have more information), but no longer.
  • Beware of the silver bullet
  • Continuous Delivery - automate as much as you can. Note, you can still have approvals in your process, but the action once approved is still automatic.
  • Conway's Law - organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations
  • Keep systems poised for change.
  • Don't think yes, no to ideas, but instead think what are the risks and benefits. Then the other person get's to decide if it is worth it.
  • Do the simplest possible thing that might work because the complexity may never be needed.
Understanding the problem
Keeping up

Friday, February 20, 2015

Scrum Activities Overview

Sprint Planning Meeting

First Half

Duration: 2 hours (for a 2 weeks spring), but should be scaled to the length of the sprint. For example, 4 hours for a 4 week sprint.
Frequency: Before starting a sprint
Participants:
  • Scrum Master
  • Development Team
  • Product Owner
  • Steakholders

Deliverables:

  • Product Backlog (user stories) that is prioritized and estimated in terms of hours or difficulty.
Description: Agree on what should be in the sprint

Second Half

Duration: 2 hours (for a 2 weeks spring), but should be scaled to the length of the sprint. For example, 4 hours for a 4 week sprint.
Frequency: Before starting a sprint
Participants:

  • Scrum Master
  • Development Team
  • Product Owner
  • Steakholders

Deliverables:
  • Sprint Backlog that contains development tasks that will fit that the development team thinks can be completed during the sprint
  • Plot ideal burn-down chart
Description: Hashout plan for sprint

Daily Scrum Meeting (aka Stand-up meeting)

Duration: 15 minutes
Frequency: Daily
Participants:


  • Scrum Master
  • Development Team
  • Product Owner
  • Steakholders
Deliverables
  • Impediments (recorded by Scrum Master).
    NOTE: Not resolved during this meeting.
Description:
The scrum master asks each person on the team three questions:
  • What did you accomplish yesterday?
  • What are you working on today?
  • What impediments are in your way?

Daily Updates

Update Sprint Burndown Chart: At the end of each day each developer updates the number of hours remaining for the task s/he is working on.


Sprint Review Meeting

Duration: Max of four hours
Frequency: At the end of the sprint
Participants:
  • Scrum Master
  • Development Team
  • Product Owner
  • Steakholders
Deliverables
  • Feedback from product owner, steakholders
Description:
Demonstration of what was implemented in the spring


Sprint Retrospective Meeting

Duration: Max of 3 hours
Frequency: At the end of the sprint
Participants:
  • Scrum Master
  • Development Team
  • Product Owner
  • Steakholders
Deliverables
  • Document:
    • What went well during the sprint?
    • What could be improved in the next sprint
  • Improve process as needed
Description:
Reflect on the sprint.


References: