Showing posts with label Scrum. Show all posts
Showing posts with label Scrum. Show all posts

Monday, July 1, 2013

BDD Practices that Maximize Team Collaboration and Reduce Risk


Maximizing team collaboration and reducing risk

Guiding Principles: KISS – Keep it simple silly & Incremental delivery

I’ll think about the future but only implement what I need this sprint, this day, this hour. I do that so I can start my implementation at the simplest level (but not too simple) and grow the feature minute by minute, hour by hour.
Because I work this way, I can check-in often. This enables other team members to have visibility on what I’m doing. This allows for cheaper integration (merges) for the team and myself. It allows me to get the latest changes from the source tree so I can receive new work from the team (and get visibility into what they’re doing). Checking in often reduces risk and increases code reuse. I can’t reuse my team member’s latest new shared libraries if it isn’t checked in. If I get pulled away from the work (personal or fire drill), another team member (who has some insight into my work because they’ve been seeing my many changes coming into their development environment, who has heard about what I’m doing at a high level during standup, who is collocated and has heard me working with my pair, who maybe has paired with me) can finish the task or story so the team is successful.
Because the team is checking in often, we are releasing our best design efforts and reducing latency for others to review and use our work.

Test Strategies

Guiding Principles: Tests run independent of each other, give timely feedback, are maintainable, deterministic, and test a feature once.

It’s best that EACH test run in a clean environment: clean data, clean server state, clean client state. This may not be practical if the tests take too long to give timely feedback.
Common strategies are any combination of:
  • Test login only once, the other tests skip login: share selenium driver across tests, or have a way to generate a session token so your tests don’t need to login.
  • Don’t commit data destructive tests to the DB or find a way to get the data "reset."
  • If you don’t mind your tests running slow in different contexts, then make the above "workarounds" configurable so you get fast feedback in dev branch, but the "slow tests" that login and clean all the state/data in int branch.
Managing Data:
  • Maintain a data dictionary—This is a single point where we declare what data in the DB we are dependent on. Three columns: short hand description that’s used in the code, database id, notes. The data dictionary reserves data and is a signal to the viewer that they shouldn’t write to the data or change it as there are tests relying in the data.

BDD in your Sprint

Behavior Driven Development implies that something is driving development. This something is failing or pending BDD tests. Immediately after Sprint planning, get those failing tests checked in and executing so that failures/pending are visible on your continuous build monitor. Why? So everyone can casually see the status of your project, just as you do when your commute takes you by a construction project.

Three levels of being driven:

1. Immediately get the entire sprint backlog features checked in as pending tests. Then before each feature is finished, implement the Steps to prove the feature works.
Risk: Too much automation work is left for the end of the sprint and we deliver features without automation. We don't discover requirements gaps early in the sprint because automation is postponed.
Value: Make visible what work is accomplished versus pending. Doing automation before implementation tests your understanding before you do it all wrong. :-)

2. Immediately get the entire sprint backlog features checked in as pending tests. Next, implement the Steps to prove each isn’t working (imagining the UI elements are built, coding to IDs or button names that you make up in your head). As each feature is implemented, tests should pass.
Value: if you can automate the tests, you've proven a deep understanding of the requirements or have revealed problems early in the sprint when there is time to fix that problem through collaboration.
Also, you've made visible on your build monitor a lot of status: Pending automation versus automation completed versus features completed.

3. At project start, enter all the pending features in the product backlog, and then sprint by sprint stakeholders see progress toward features as the teams use the above level 2, and as time passes, those features are split or remove or new ones added.
Value: Makes visible how the project is doing at the release level.

What happens if I get stuck automating?

  1. Get help from a team member because pair working results in 80% effort toward correctness and we come up with more ideas to try and solve the problem.
  2. Talk to the whole team about the issue as no single individual owns quality.
  3. Escalate issue to organization
  4. By Sprint end, maybe the team decides it’s not automatable and that they’ll test it manually.

  5. Given When Then Design

    These are BAD smells:
    • Too many GIVEN, GIVEN, AND, AND,WHEN, AND, AND, THEN.
    • Need an engineer or power user to understand the GWT. (An end user or end user’s boss whose never used the product can understand the GWT.)
    • UI language mentioned in the GWT
    • feature file is many pages long
    • GWT language is not reusable. Lack of consistency of language.
    What if my "feature" has no behavior:
    • Go find it!!!
      • Talk to your PO and find out "why" the customer wants this.
    • If you’re delivering a component that is *part* of a feature, then
      • Go look at the feature’s GWT and understand how your component supports that feature.
      • Implement Steps for that feature to test that your component delivers that part of the feature.

    Test Steps

    These are NICE smells:
    • Step methods are about three lines long.
    • No @Alias(es).
    • Steps call into a shared library (rather than call interfaces on other Step classes).

    Use Continuous Integration

    It's hard to get started using CI if you aren't already. Here's how to get started.

    Guiding Principles: you can’t automated what you can’t do manually and you'll always find a better way to do it next week (but don't wait).

    If you tackle all your technical difficulties from head on, it's hard to make progress. So deliver your way to a CI by using evolving coding and learning, and incremental delivery. Because each CI server out there can work with any possible script, script it using methodologies that get the job done (for you). Start getting the value from your integration efforts as soon as possible.
    1. Manual integration: integrate on a separate machine (using scripts that later will be executed continuously.)Scripts should be able to find new tests at run time rather than rely on static lists. A script should be able to build, install/deploy. If you can't yet create scripts, do it manually until you learn how.
    2. Continuous Integration: Select CI software, install it on a server, and then automate the execution of scripts ina CI.

    If you have feedback, agree, disagree, feel free to comment as you'll be adding value!


Tuesday, September 20, 2011

Developing Organizational Standards to Support Agile Teams

Abstract
At the department level, Agile processes are less descriptive on how to increase delivery excellence across all their teams.  One approach is to provide implementation-free constraints/goals that drive teams to better delivery and then encourage a culture of cross team information exchange.  The constraints/goals will create direction and incentive for teams throughout the organization, while information exchange at the team level allows new 'best of class' solutions to these constraints/goals to propagate across the organization.  By inserting a few organizational standard items into  team Working Agreements, using Build Monitors to make quality visible, and learning events such as Book Groups, the organization can create a minimum "bar" across teams that will force some teams to improve their delivery excellence, yet won't get in the way of teams who already have good delivery excellence (yet potentially non-standard though innovative development methods).

Introduction
Most agile methodologies come with a built-in form of information exchange at the team level:
daily standup meeting, retrospectives, sprint demos, pair programing, planning meetings that include the entire team, retrospectives, and code reviews.  eXtreme Programming, for example, contains the most extreme form of team viral information sharing--pair programming, which has developers working with each other and improving all their development craftsmanship on a daily basis (including soft skills), but sometimes people can't get along with each other.  Other forms are lightweight and helpful, but reduced efficiency--code reviews, for example, help people become better OO programmers (a part of craftsmanship), but the practice increases work-in-progress, creates an additional future integration point (integration of design ideas), discourages code experimentation (might not make it past the code review), and doesn't help people learn how to use their software tools such as the IDE more efficiently.

Although most Agile methodologies come with good information exchange at the team level, finding how to direct efforts across the organizational is rarely discussed.  (Scrum has Scrum of Scrum and Meta Scrum.  Others practices?  Please use the blog comments to add more knowledge if you see something missing.)  Here are strategies that I've seen implemented to a good effect across an organization and creates a minimum bar of delivery excellence across all the teams, forcing some teams to discover better ways to deliver code, yet doesn't disrupt teams that already are excellent at delivering code.

Working Agreements
The best working agreements have fewer than eight items and are visible in the team's working area.  Here is Fred.  Off camera is the rest of his team.  Although this working agreement was developed by the team, organizational standards were incorporated without being "too" proscriptive.  This way, the team takes ownership of their "implementation" and use their own tools/processes to accomplish the working agreement.

Team Working Agreement
Teams get a lot of value by having a written agreement on how we work together and handle day to day issues.  This agreement often puts into writing the answers to the "typical" questions that non-self directed teams recieved by asking their project manager, "hey, this happened, what should I do?"  This working agreement is often referred to by the following names: Team Working Agreement, General Working Agreement, or Daily Working Agreement.  The editorial comments in parenthesis aren't explicitly written down on the working agreement, but are understood by the team.

Example:

Team Working Agreement
- Automated tests are added for all discovered production issues before the code is written
- Standups always include a dial-in (for teams that have remote team members/PO)
- solving production fires is top priority
- stop what your doing to address failing automated unit tests
- the state of all automated tests is visible in the team area
- all system tests, unit tests, UI tests are executed by CI
- all unit tests are executed at least daily
- comprehensive test passes are executed before release to live (all automated + manual)
- all code changes are developed using TDD (legacy code and new code)
- QA starts writing system tests on day one of sprint
- everyone is a tester

Organizational Standard
Setting some core standards across all teams about what few items must be in Team Working Agreement works well.  Common subset of the above that I've seen in practice are:
  • all system tests, unit tests, UI tests are executed by CI
  • all unit tests are executed at least daily
  • visible burndown chart
  • Scrum is practiced (this is usually implied)

Story Definition of Done       
This is the team's agreement on what "done" means when they say, "this story is done."  All the steps to the story being done must be met to get "credited" with the story being finished so the team can accumulate the story's estimate in Story Points/Units into the team's Velocity.  When the team starts a new Definition of Done, the SM needs to be vigilant until the team has got it.  If the team can't follow it, then we look for "why not" in the Retrospective and find some way to handle the impediment (fix some problems, adjust definition of done)  This definition of done is important for maintaining the team's standard of potentially shippable at the end of each sprint.  The editorial in the parenthesis isn't typically added to definitions of done but understood by the team.

Example:
Story Definition of Done
- All public methods are unit tested  (except for machine generated code that isn't changed by human hands, or DataValue objects that are "identity--I=I" getter/setters)
- Story functionality is tested with an automated system/UI test (also called acceptance tests, functional tests, ...)
- Manual tests are executed
- Rally is updated (Rally is an electronic story tracking tool)

Organizational Standard
  • all public methods are unit tested
  • stories have automated system tests (also called acceptance tests, ...)
Sprint Definition of Done  
Because a sprint is time boxed, the sprint is finished regardless of the "pass/fail" of the items in the Sprint Definition of Done, but the retrospective should be used to identify the root causes and create actions to solve problems.

Example:

Sprint Definition of Done
- Each sprint, the code coverage increases
- All automated tests are green at the end of the sprint
- All manual tests for the stories are executed

Organizational Core Standard
  • code coverage increases each sprint
  • design issues go down each sprint
  • automated test count (system and unit) goes up each sprint

Other Working Agreements
The following working agreements may also be useful to teams.  The art is to find the fewest agreements so we aren't buried by paperwork and yet have the ones that are necessary because problems happen when we don't have them: Task Definition of Done, Release Definition of Done (contains activities to be done before the software goes live, such as performance testing, security testing, or other things that for some reason, there are impediments to getting them done during typical sprints.)

Build Monitors
These devices show the "headlines" of the projects quality status.  Anyone can "click" for details.  This team modified the continues integration system's CSS to get the clear and simple style they wanted.  (Unfortunately, most CI environments have overly complicated dashboards.)  The monitor the left has the biz tier (unit tests) and web services tier (system tests) for the SAME app.  The build was split into logical levels.  The first level compiles, then runs unit tests for the biz tier, and then runs system tests for the web services tier.  The monitor on the right is the system tests that test the UI.  These three levels are common.  It's not hard to imagine adding a SQL level would be useful for a team doing work with stored procedures.  The success of one level cascades to the next level.  A failure at level one (can't compile) stops it all.

Book Groups
Books a great way to get information across many people in an organization.  Just buying everyone in your department a book is a weak play (I still haven't read "The HP Way" which was given to me by my manager when I started work at HP).  Books are great learning tools if they are actually used.  I don't recommend buying people books unless they ask for them or it comes with a plan reading and using the knowledge.  Book groups are groups that get together and discuss reading and using the knowledge (or actually demonstrating the knowledge).  To encourage the Cross Pollination of Information, find someone to start a cross organizational book group that meets each week over lunch (companies often buy lunch and the books, and if people are meeting about the books).  Encourage the group to develop activities to put the knowledge to work: get members to sign up to teach or demonstrate or lead discussion for each chapter of the book.  DO-CODE-ON-PROJECTOR with a mob watching is my personal favorite tactic.  Books I recommend are: Martin Fowler's Refactoring, Diana Larson's Agile Retrospectives.  Teams I've been a part of have done this with books on Refactoring, GOF Design Patterns, eXreme Programing Explained, and Java Concurrency.

Conclusion
Delivering to all your teams core standards for their working agreements creates quality bars that teams aim for and hurdle over.  If the organization focuses on the desired outcome and allows the teams to develop how to reach those outcomes, the teams will find solutions that work best for their personal and project makeup, and they'll become vested in the implementation.  Adding in collaborative cross-organizational sharing and learning events such as book groups that are driven by employees, will give the employees a process for driving their own development and collaborating/learning with other team members.  

Troubleshooting
Here is a troubleshooting guide that covers some common problems that may occur implementing the above activities.
  • Team finished sprint with zero velocity.
    • Maybe their working agreements were too hard.  Inspect and adapt for next sprint.  Maybe they need to embed a coach for a sprint.
  • Team releases with bugs.  
    • Not enough testing.  Zero bug releases are expected.
  • A team's CI environment isn't visible
    • Are their tests failing?  What are they hiding?
  • Team refuses to try new practices/process for even a sprint.
    • Too much release pressure?  Team embedded in their old ways?  Is the company culture so risk adverse that any failure has political implications?

References:
XP practices http://en.wikipedia.org/wiki/Extreme_programming_practices

Friday, September 2, 2011

The ONE right way to Scrum

What is the right way to Scrum?
This question is brought up a lot in organizations that are transforming to Scrum to improve their ability to deliver products. It's a natural question for smart people to ask when they are receiving Scrum training and then discover other teams adjusting from the "default" or "standard" implementation of their company's Scrum process.

Is there one way to do Scrum?

It's better to ask yourself, "should there be one way?"

When anthropologists talk of societies and biologists talk of evolution and virus colonies, history has shown that the results of monocultures are dangerous. The societies, governments, organisms, or colonies that survive are those that could respond to a change that wiped the others out. Having everyone thinking and agreeing all the time means new ideas aren't getting tried out. On the other hand, having only conflict/chaos means poor productivity/survival.
Computing monoculture
agricultural monocultures

What is Scrum?

Scrum has been around for over 10 years.  (You can read Martin Fowler's 2005 overview of Scrum in
The new methodology called Scrum)

Scrum says once the planning meeting has finished and the sprint starts, the planning conflict (conflict over resources) is over (or at least is moved outside the team) and the execution of the plan begins. For the team, conflict moves to technical implementation as they discover the best designs (test plans, class designs, craftsmanship) to meet the plan's goals. At the end, the team, ScrumMaster, and ProductOwner inspect the results and proposes a "new experiment" to improve software delivery.

What is Scrum (or basic scrum)

Three roles: team that does the project work, a ScrumMaster, and a single person to be ProductOwner.
A fixed backlog of work for a sprint.  A sprint is a fixed length of time.
A quick planning meeting.
Retrospective and sprint demo.
Daily standup meetings that are no longer than 15 minutes.

*Velocity, burndown charts, and task boards are also expected but aren't necessary for the empirical process other than adding more visibility. But since visibility is necessary, like a microscope is necessary to a biologist, I'm including them too.

You may ask six Agile Consultants "What is Scrum" and get six answers but I expect all six will have at least all the above.

Why six different answers?
How I Scrum today is different than how I Scrummed in 2006. How I Scrummed in 2006 is different than 2004 (my first Scrum project). But in all cases, I did Scrum. Before 2004, I did eXtreme Programming, and did not do all the above that is Scrum and instead did other things, XP practices (pairing, TDD, system test) and how my team executed those practices changed every month/year.

Why did my practices change? Because my teams inspected the WAY we did things and ADAPTED. We talked to and learned from others doing agile and tried out ideas for a sprint. Using the rigors of the experimental process (control/fix everything else but what you want to change, and then measure the results at the end) we decided what new adjustment to keep and what not to keep.

Standards

Should there be a standard way across an organization?
Are you saying that you want a monoculture? Is Scrum itself a monoculture? Maybe, but if each Scrum team is a little or a lot different so I think it's not a monoculture. I think that doing "basic" Scrum (just Scrum) as a standard is a good idea because then everyone from development to the CEO understands the culture enough not to:
Ask team members multitask across different projects
Ask POs to change the team's sprint backlog while they are in mid sprint
Discourage highly collaborative practices like Pair Programming
Discourage differences between Scrum teams
Ignore impediments discovered by teams

We want how we work together standard enough to not break each others' Scrum processes and to support teams' inspection and adaption of their own processes.

Directing an organization without standardizing a monoculture


Standardizing on organizational goals that allow teams to self organize is a good idea. Here are some I've seen in the industry:
burndown chart of some kind, definitions of done,
Automated system tests, automated unit tests, a system to show how many tests are passing/failing in the last hour, collocated teams, a highly visible team task board the team can use throughout the day, current code coverage and sprint by sprint history so we can see the trend.

The one TRUE way to Scrum

When an organization leaves Waterfall for Scrum, people need to be well trained on what is Scrum and asked to do things they are uncomfortable with, maybe even things they can't imagine could work. They need this pressure to get started doing Scrum otherwise, before even their first sprint, they decide to inspect and adapt to something they are comfortable with, Waterfall, out of a sense of comfort rather than out of quantifiable measurements that come out of the Scrum process (Velocity is a big one). So to get a team started, they will need to take a starting Scrum model on faith until they get the idea and see results good or bad. After a few Sprints, I expect to see that the cumulative affects of inspect and adapt to show some changes from their starting Scrum model but to still see the basic Scrum model intact.

If someone says that they have one true way to do Scrum, I'd start walking the other way because that person doesn't understand that Scrum requires teams to inspect and adapt their process to become efficient for their specific situation. If a team isn't inspecting AND adapting, then their Scrum process is broke.

Sunday, July 11, 2010

ScrumMasters should believe in UFOs!

I've been working with some new ScrumMasters that used to be project managers and the biggest thing holding them and their teams back is the attitude around resolving impediments:
  1. They rely only on the team *reporting* impediments to them instead of sleuthing for impediments.
  2. They collect information about impediments in a notebook.
  3. No one on the team or management knows the status of the impediments, how many there are, or how bad they are.
  4. The ScrumMasters are writing email reports about the impediments.

Instead of the above behaviours, I'm encouraging them to believe in UFOs. Everyone should believe in them, but it's the ScrumMaster who should give UFOs their professional treatment.

  • U -- Who is responsible for resolving impediments? U!
  • F ast -- U shouldn't wait long before trying to resolve them. Don't schedule a meeting in the future or craft a report for something you can take care of now.
  • O bservable -- Impediments should be easy for anyone to see at any time.
  • S tatus -- The status of the impediments should be clear and known so the team feels something is being done beyond someone nodding their head, writing in their notebook, and crafting CYA emails. It's best to make the status observable.
I've put together a video called Living with Impediments which illustrates the problem and also goes over UFOs. You can also find more Agile videos at my YouTube channel.

Tell your ScrumMasters about UFOs.

Sunday, June 20, 2010

Agile Coach Debriefings: Sprint Planning and Planning Poker

Lancer is going to confess on camera about discussions he's had with clients by going over his coaching notebook. As of now, he discusses how to schedule and organize for Sprint Planning in a day, and how to have a quick session of Planning Poker using the team's group intelligence.

You can subscribe to his YouTube channel to receive new updates.

Thursday, April 29, 2010

Burn, baby, burn (part 2/2 to having great standups)

Something a SM should do every morning right before standup: take a look at the burndown chart and try to find an easy 'win'. A win is a story that is almost done and could make the line on the burndown chart burn (go) down.

Then at the beginning of Standup, 'set the stage'[1]  by telling the team that they almost have a story finished which will show great progress during the sprint. Ask the team to figure out how to get THAT story (creating focus) finished so they can get an early win, burn down the chart, and show their PO that progress is being made.  

This also gives you, the scrum master, focus: solve any difficulties that get in the teams way around finishing that story. If you get a TEAM of people focused on a goal, great things always happen. But it requires finding the right thing to focus on. A story that is near finish is a good thing to focus on, until it meets our definition of done.

And for a bonus, you can run the story by your PO for Story Acceptance before the end of the Sprint. That will really get the PO and the team excited.  

Friday, May 22, 2009

Flow my tears, the Scrum Master said (Part 1 of 2—Having Great Standups)

A Scrum Master has a tough job. He is supposed to help his team perform without actually diving into the work himself, for if he did, then when someone has an impediment, he would be busy and likely not have the broad context needed to solve the problem outside of his immediate work. Preserving a big picture perspective is important. Firemen don't leave the station without their Fire Captain. The Captain isn't allowed to enter the building and must stay in the fire engine (or near it) and coordinate his team via radio. (I've even heard that Fire Captains are literally locked inside the fire engine to prevent them from abandoning their post to rush into a burning building.)

Everyday, the Scrum Master's job is to figure out how to get the team perform better, which is much harder than developing code. The worst situation a Scrum Master can be in is have a team that isn't delivering software in a predictable fashion, and the team always claims that everything is going fine.

Day after day of standups where nothing interesting is spoken of, and sprint after sprint of missed sprint goals is enough to make a Scrum Master cry. If this is the case for you, then you need to fix this!

Here are some methods on "loosening up" a team so they share their problems:
  • Ask questions about tasks which aren't progressing very well (a 1 day task going into its third day)
  • Encourage risk taking and nontraditional ideas, activities and actions
  • Figure out how to make it OK to "call uncle" so you know they need help.
  • Don't immediately judge impediments: "That is too big to tackle, just live with it," or "that is such a small impediment when I know there are some really large ones that are holding us back."[1] The team is supposed to air impediments, not be told to air only the impediments the organization wants to handle.
  • When an impediment is discovered, track them! Put them on a big visible chart of some kind. Don't try and be a "waiter" that takes their teams "orders." Unlike working in a diner, the cycle time of solving impediments takes more than twenty minutes, and usually up to 24 hours. Within thirty minutes after standup, no one remembers what happened though the person who brought it up will remember at standup the next day. The impediments should be visible in the team area so that everyone knows the status of them.
  • Celebrate whenever an impediment is brought up. Usually an "atta-boy" will work.
  • Acknowledge people in a public setting for exposing impediments.
For each day that your team reveals "no impediments" get worried because something is really wrong with the process. If they are consciously avoiding to reveal them to you, there is a trust issue. If they are un-conscious of their impediments and living with a lot of burden, then figure out how to change their perspectives. (I'll blog on this topic next.)

It's a tough life being a Scrum Master. You rely on those doing the work to tell you what ails them, and you can't help them if you don't know what the problems are. You can't be a Scrum Master if they won't tell you of their problems. You can't be a Scrum Master if they don't trust you to take their problems and treat them in a way that works both for the team and for the organization.

You can't solve problems that you don't know about.

If all else fails, embarrass them: Tell them you'll cry if they won't do their jobs and open up about what isn't working.

No one likes to see a Scrum Master cry.

[1] One time during a standup, I brought up two impediments, each of which were quickly judged by an attending manager as one being too hard, and the other too small when there were other bigger problems. These are signs of a reluctance to change. If an organization can't be bothered to fix small problems or is unwilling to do so, then the adapt part of Scrum is broken outside of the team's scope and that is a sad situation.

Friday, January 16, 2009

Good stories have Great titles

When you read a good book, you can quickly refer to it by its title: We, Animal Farm, The Left Hand of Darkness. Having a title saves you the time of recapping the plot in order to establish that you and someone else know what the story is about.

Every day, Scrum teams do a 15 minute standup during which they describe to their team how they've spent their development time. I've noticed that teams which have been coached to use the "as a user" format of stories (credited to Rachel Davies & Tim Mackinnon, promulgated by Mike Cohen and many others including my self), create an impediment by giving their stories ID numbers instead of titles. "I worked on client authentication" turns into "I worked on story 6933," and most of the team doesn't know what this is and often just lets the information fly overhead. Even if they were familiar with 6933, there is less information and more abstraction when assigning numbers, and it's hard to feel an emotional attachment when sharing this number to people ancillary to the team, such as stake holders or perhaps the product owner. These story serial numbers become an impediment to communication.

For a while I coached teams to save that first line for the story title. It's easy to forget though and violates the principle of "once and only once" since the portion of the "as a user" format already contains that information. As a second measure, I coach them to underline the key words on the story card. But teams still end up adding an ID number, and in the heat of giving standup, it's actually hard to parse all the words though easier to rattle off the ID prominently displayed in the upper left-hand side of the task card, so I sometimes end up wasting my breath by saying the number.
Today I was writing some new stories and struck upon something that made felt right:

WHAT I WANT
so ROLE can BUSINESS VALUE

For example:

I've been using this format on my last two projects and have been very happy so far. I like how the story title has the important element coming first: What I Want.

Give it a try, and tell me what you think. I'd love to here your comments. Let's not try to describe Animal Farm by giving it some meaningless number, unless we're talking about 1984.

Monday, December 15, 2008

NO info DUMPING



No Dumping


In the pursuit of good Karma, riches and fame, employees want to provide value to their employers and colleagues. This leads to a compulsion towards DIY (do it yourself), which results in project teams not working in pairs. Working in pairs allows for superior information sharing but due to socialization of DIY, those who avoid pairing are not even conscious of the inefficient mechanisms that they have created to allow them to work alone. One of these mechanisms is the info dump.

What is an info dump?

The other day I was working at home and needed a stapler. I knew it should be in my wife's office so I went there and looked in the drawer where it was supposed to be. It wasn't there so I guessed that my wife, being a busy woman, possibly left it somewhere else. I looked around on the desk and then on some shelves. After five minutes had passed I realized I was going to waste a lot of time unless I got more information. "Honey! . . ."

She was in the living room busy doing work on her laptop. I interrupted her and she knew right where the stapler should be. She said she had left it in a pile of magazines shoved into a different drawer. It took a while to describe the details of the information, which drawer, which desk, what corner to look in, but she eventually dumped the information on me and I went back into her office. I tried to reproduce the steps but after some time I gave up and went back to the living room. "No, not that drawer!" she said and she gave me further instructions. I tried again until I was frustrated and asked her to come take a look.

After a moment she said, "I remember using it when I was cutting out photos." She opened another cabinet and looked. It wasn't in there, but then I remember a pile of photo paper near the printer. I pointed at the purple scissor handles sticking out from beneath the printer stand. It only took a minute to find them!

Why did this work so well?

As soon as she entered the room, the context of her surroundings jogged her memory of where she had last put it. We were working with up to date information about the room. She provided additional information where I could help because I was in the moment. It took very little time when we worked together. While trying to perform DIY, I used up over twenty minutes, randomized my wife's work, and I still didn't get the job done.

Engineering

Coworkers, bosses, and employees asking a small favor, they all want to get things done with minimal disruption to others. People working on the same project often divide the work and then DIY until they are really stuck like I was. This leads to waste and each individual becomes a silo of information of how the work was performed. This also leads to conflict when the team members integrate their work and their designs don't fit together. Instead, if they immediately work together, their collaboration will result in a usable design. When they each DIY, they heavily invest resources in each of their own designs so when they integrate their code, they have to decide who wins. They both lose in the end since the project will finish only as fast as the slowest item of work.

Conclusions

Now that you know what in info dump is, watch for it in your office and you'll see it happen over and over. Two people will get together to discuss adding functionality and invest time in one of the below Info Dump Anti-Patterns. Each requires a significant amount of time and then also requires future iterations of doing it over again once new information is found. From my experience, it always takes more time to use info dumps and try to work in parallel, than to serialize the work and have two parties work side by side at one workstation. At that workstation, they execute a "doing" strategy where, in the moment of "doing", the pair can immediately discuss, make decisions, and execute; discuss, make decisions and execute; . . . Below are some anti-patterns I've observed in the wild.



Info Dump Anti-Patterns

Each pattern has two roles: the "implementer" (the person doing the work), and the expert (the person who has a little more history and more knowledge about how the work could be done).

Mental Gymnastics - This occurs when two (or more) people discuss a coding related problem for 20 minutes or more. It's not possible know the code base well enough to be this detailed. The discussion will contain inaccuracies but the participants continue like it's some kind of limbering of the mind, or mental gymnastics. Even more waste happens when these two gymnasts argue over their recollections on how the code operates. When the gymnastics is over, the implementer goes to her workstation and within minutes, discovers that the code works differently than either of them thought. At that point, she either redesigns a solution by herself (DIY) or goes back to the expert and updates him, and then they have another session of mental gymnastics. I've seen this process repeated up to four times in one day.

Tome of Knowledge - The expert spends half the day (or more) writing a design document. At best, it is written immediately after reviewing the code so the information is accurate on that day. The tome is given to the implementer and hopefully the implementer does the work before the information is out of date. Even with an up to date tome, the implementer's knowledge is incomplete and has to visit the expert for a session of mental gymnastics.

No Do, just Code Review - The expert and the implementer sit together at a workstation to learn how the code works. The benefit is that the information is completely up to date and the session is interactive between the implementer and expert. But since they don't actual "do" any coding, they perform mental gymnastics to predict design changes and guess at how the new functionality will hook in. Ideally, the implementer immediately develops the code after the code review. But before the hour is over, the implementer starts to find challenges in getting the code to work as expected. So the implementer performs DIY or often needs to visit the expert for more mental gymnastics, tome updates, or code reviews.

Thursday, December 4, 2008

Agile's PR problem--people who don't do it right give Agile a bad name

Jim Shore posted an interesting blog, The Decline and Fall of Agile.

It's well thought out and genuine and I agree with him except saying it's the "decline and fall of agile" felt like a fear tactic to get notice. (terror!)

I'll go this far: Agile is going to have a PR problem.

Scrum allows one to teach agile planning without agile engineering.
Sometimes you can't fix everything at once. When you go into an organization that is doing up-front (but not really since the requirements always change) and teach them to do agile, if you can get them to at least execute Scrum and have them doing it all rather than Scrum (but not really) you have improved the situation.

Are they going to struggle if they aren't doing XP practices? Hell yes. Some of them evolve a little to automate their tests and many evolve to Water Scrum (a waterfall life-cycle during the sprint so two weeks development, two weeks of "stabilization for testing", terrible stuff really, but they do a lot of planning just like Jim said. And that's an improvement because they have closer to truth about the state of things).

Also, I have been involved in agile roll outs that teach both Scrum and XP. It's really expensive to the organization to do booth, both in time and money. I'm with Jim in saying that it's going to be cheaper in the long haul, but it does create a high barrier to winning business.

The existence of consulting gigs to make Agile teams better is a better situation for the client because their mistakes are costing them less.