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.

Monday, November 10, 2008

Just another Westside Story (the Wikis versus Sharepoint)

There has been a battle at my company over how to store and disseminate knowledge. We (speaking as a member of development) have used the Confluence wiki for many years and were happy with it. But less technical staff such as managers, marketing, and sales really hated it. So there was a shift at the IT management level to move everyone to Sharepoint. Their main argument was that Sharepoint was free due to our MS licensing agreements.

It turns out that it wasn't really free because it required many resources from IT to actually get the system up and running in an organized and useful fashion, and even then, development hated it because managing content using a word processor was heavy weight compared to editing a wiki page. (Using a wiki page is nearly as simple as writing things down into a text file.) The non-development types will disagree with this saying that Sharepoint is easy because it is like a word processor, a tool they are familiar with. But the type of work they do is more akin to publishing results where development uses a wiki for knowledge dissemination and creation, more akin to jotting down notes. If it isn't quick and easy to do, developers will just live without doing it at all and this will create some efficiency losses. For development tools, throughput is king, not tools for making things look pretty.

Sharepoint supporters will also say that there is a wiki in Sharepoint. But its really an abuse of the term. It comes with a rich-text editor which gets in the way of everything that makes using a wiki nearly as easy as creating plain text files. The Sharepoint wiki is a great way to persuade everyone to retreat back to the word-file/upload/download paradigm that is native to Sharepoint.
This creates problem's in development. The best team collaboration pattern is a community of cross-functional team members that change/maintain the team's knowledge sharing system with little effort. (It's like Web2.0 content communities versus Web1.0 web pages.)
IT's push to sharepoint caused some splinter groups in development: one faction moved to Sharepoint, a faction of development stayed with Confluence (though under threat from IT that they would pull the plug), and a new faction organized around media-wiki.
The later two groups formed out of frustration of using Sharepoint.

Recently, I was coaching one of the team's that kept their documentation in Sharepoint. Only one or two people bothered to put add/maintain information in Sharepoint. Many did use the site as readers. This created a culture of very little documentation which was out of date. When I moved some of their documentation to mediawiki, suddenly more people started updating any problems they saw and added more documentation. It was amazing to see how using the right tool enabled this to happen.

I've been working with wikis since 2001 and one thing that holds true is that there is a small learning curve that some members of the team may not cross, unless they are pairing with someone to get them going. I've found one simple exercise that quickly gets people using wikis is to ask them to add their contact information to the team's wiki. (Put it on the backlog if they aren't taking it seriously.) To perform this milk run, they are exposed to a few tools which gets them immediately productive, and with that critical mass knowledge, they know how to find more advanced features or how to use existing pages as pedagogical devices. Learning from existing pages is a property that Sharepoint lacks. Sharepoint relies on the usual hunting through menus and buttons because there isn't any "markup source" that can be used to learn from other people's postings.

Remember that wiki means quick. If a wiki doesn't fit this term, then find one that does. Otherwise, no one will use it and that free Sharepoint tool is going to cost you.

Tuesday, October 14, 2008

VBA script for cleaning .XLS when Gettings Stories out of Rally

Remember in a previous posting about The Mail Merge method of exporting your stories from Rally where I complained about the work necessary to remove all the markup from the spreadsheet? A listener to this agile confessional took it upon himself to create a VBA script to automate this step. Let's give Pete Turner an Internet thanks for sharing! :-)

Paste the VBA text file into your into your “personal macro workbook." Yyou should be able to open with ALT+F11. If that doesn’t work, try unhiding it using View > Window > Unhide.
You can run the macro with View > Macros

Have fun!

Friday, October 3, 2008

Maven: The coolest build tool ever!

I've been through the grinder on build tools: typing in VIC20 BASIC, building from the command line, building from .sh scripts, building from Make, building from Xmake, building from IDEs, building from nant.

It's been a glorious twenty-eight years of software development (including grade school years of software development). Now I'm hearing good things about maven. A few people love it; many don't like it. I've stayed away from the arguments and kept clinging to my Nant and Eclipse build tools, but now I've landed on a project that's using maven 2.0.9. I have an excuse to dive in!
And I really love it!

It was tough at first, but when I look at the time I dumped into learning Make and its implied rules, it really wasn't so bad. The documentation on "the internets" (thank you Mr. Bush) is pretty minimal, maybe enough if you already understand the big concepts. There is a new book out this month that looks promising: Maven: The Definitive Guide With only the Internet, I probably would have stayed a frustrated Maven user except a smart cookie named Jeff Ramsdale gave a colleague and I a thirty minute intro. To give back to the internets and to put my notes on maven somewhere, here is my high level understanding of organizing a maven project. I'm sure you'll correct me by commenting if I'm out in the weeds.

Lifecylce

Maven drives everything via a lifecycle. This lifecycle is built into maven:
  1. validate - validate the project is "correct" and all necessary information is available.  Said another way, "go get my dependencies."
  2. compile - compile the source code of the project
  3. test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed. Don't mix your system tests here.
  4. package - take the compiled code and package it in its distributable format, such as a JAR.
  5. integration-test - process and deploy the package if necessary into an environment where integration tests can be run. Don't put unit tests here as unit tests != integration tests. These tests should be testing that the system or subsystem works.
  6. verify - run any checks to verify the package is valid and meets quality criteria
  7. install - install the package into the local repository, for use as a dependency in other projects locally
  8. deploy - done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects.
A portion of this lifecycle is called a phase, so the above is a list of phases. Maven has a configuration file called a pom.xml. When you invoke maven: $mvn, it looks at the nearest pom.xml and by default, it uses the "install" lifecycle. Since install is number 7 in the above list, maven goes through phases 1, 2, 3,...,7 and may perform operations based on what is in the pom.xml. You can also do a $mvn deploy and mention the phase right in the command line.

Profiles

Profiles are an abstraction layer on top of the lifecyle. Creating a profile allows you to create configurations which affect how things are done. For example, on our project, we have some integration tests which take two hours to run and we have two integration tests that take ten seconds to run. Before we check in, we want to run those quick integration tests but not the long ones. So we explicitly named the two integration tests in the configuration for the surefire plugin (a junit test runner in maven) which runs the two quick integration tests in the integration_test phase when $mvn is executed.

For the slow integration tests, we created a profile "all_integration_tests" which re-configures the surefire plugin to include running the slower integration tests too (using the naming convention of *IntegrationTest.java) when $mvn -pall_integration_tests is executed.

Goals

Goals are like arguments you use to tell a plug-in what to do. By the way, everything in maven is a plug-in so plug-in's are first class citizens. A goal is an argument that you pass to the plug-in. I don't have more to say about goals because I haven't had to use them much. :-)

After all, gotta save something for later.

Thursday, October 2, 2008

The Mail Merge method of exporting your stories from Rally

Chris Sterling, a great agile coach who I get to work with, showed me how to export stories from Rally in a more sophisticated fashion than the PowerPoint method. These steps build upon what he had shown me. Again, this is all about getting the story information out of Rally and into a physical medium which can be easily interacted with by a large group of people, thus removing impediments to collaboration when we are in the same physical space.

This process will produce stories on "cards", two "cards" per sheet of paper. Before the planning event, I use a cutting board to split the sheets into two. I'd give myself an hour before the planning event to get through this process until you are experienced.

Getting the stories out of Rally and into Excel

Use the same steps mentioned in the PowerPoint method and stop after doing the Processing the CSV with Excel step. If you want a stack of cards at the end of this process that are sorted by rank, then make sure your spreadsheet is sorted by rank (or that Rally is sorted by rank) so you won't have to do this by hand.

Setup the Mail Merge

The following directions describe how to do this in Word 2007. Download the mail merge template and open it into Word. The first time you open the file it will give you an error message saying: "Opening this document will run the following SQL command:" because it is trying to load up the .xls file which I used for mail merge. You should tell it "No," though no harm is done if you say yes other than getting a cranky error message.

In the toolbar, click on "Mailing".
The buttons in the "Mailing" toolbar are arranged in a type of life cycle arrangement. Since I'm providing the template, you won't necessarily use all the buttons to get to the last one, "Finish & Merge." Notice the merge fields, which are the groupings surrounded by "<<" and ">>". These are the same as the column names in the .xls file. The data that is inserted into the merg fields will match the font characteristics of the merge fields.

Loading the Excel file & Preview

Because we are using a mail merge utility, it's wording things in the way of "mailings." For us, our set of stories are mail recipients, so the language of the buttons is going to be weird. Click "Select Recipients"->"Use Existing List" and select the .xls which was produced in the earlier step.
Now you can click on "Preview Results" and see how things look.
Now you can exit the preview and adjust the styles as you want. I made the first line largest and easiest to read and loaded it with what I've found to be the most important info we needed for planning. I also crammed as much info as I could onto the sheet of paper. You may have different needs so you may want to exit preview mode and edit the template. The "«Next Record»" merge field means to populate the 2nd "card" on the sheet of paper with the next record. Without this, you'll end up with two copies of the same "card" on each sheet of paper. The darkened background uses up more printer toner, though the team I was working with was taping the "cards" to a white board so they wanted them to stand out.

Finish & Merge

MSWord's mail merge preview has bugs so don't be surprised to see duplicate story cards show up. A phenomena I've seen is where the last story on the virtual sheet, shows up as the first story on the next sheet. This actually isn't the case. Click "Finish & Merge"->"Edit individual documents" to prove this to yourself before selecting "Finish & Merge"->"Print documents..." and sending the job to the printer.

Split the sheets in half with a cutting board, and find a roll of tape, and now you are ready for you planning event!


Further Improvements

An impediment list can be made stronger by exposing the cost to our processes. In the below list, the bigger the number the bigger the cost. I'm using a geometric series.

16 I'd like to avoid the "cleaning" of the markup from the spreadsheet. Anyone know how to turn those Excel cells into something that accepts the markup? Or perhaps there is a Rally configuration that will scrub that markup out of my .csv?

2 I did this process a few times with Avery card stock but this seemed wasteful since there is a lot of paper boarders that aren't used and the cards, albeit nice and thick, aren't necessary. It would be great to buy reams of paper which are perforated to tear in half.

Update: Thanks to Pete Turner, I've added a later posting about a VBA script which cleans up the .xsl file: VBA script for cleaning .XLS when Gettings Stories out of Rally.