Your Brain on Agile
February 5, 2008
Material deleted from The Art of Agile Development's XP Concepts sub-chapter.
In The Art of Agile Development, Shane and I originally planned to introduce agile development with a section called "Your Brain on Agile." We wanted to introduce the ideas of agile and XP with a story, so Shane wrote a nice little story to set the tone. (You can tell it's his because there's a monkey in it.) Over time, we realized that the idea of simultaneous phases--originally a practice in Part II--was so foundational that it needed to be introduced at the beginning of the book. "Simultaneous Phases" already opened with a story that fit the material, so Shane's story got cut.
I really liked the original story, though, and was sorry to see it go. Although it doesn't provide as much of an overview as the story we shipped, it does a much better job of giving the feel of being a programmer on an XP team. For the first time, here it is:
Your Brain on Agile
Ben was early; traffic had gone his way and the office was silent with a morning calm. He always enjoyed the peace before his co-workers filled the room. What would he work on today?
It was Tuesday: delivery day again. Ben walked over to the big whiteboard with the iteration plan on it. It was covered with task cards, most marked green. Five of the six stories were done. There was a new card on the board--looked like Fiona, one of the testers, had found something after he left last night. "UI stops responding temporarily if search button is clicked ten times in one second," Ben read. He smiled, shaking his head. How did they find these things?
It wouldn't do to leave a defect in the application, and besides, Ben was curious. Carlann and Jerry were also in the office, checking their mail quietly in the private cubbies. "Hey, guys," Ben called. "I'm going to take a look at this search thing Fiona found. Either of you want to work on it with me?" Carlann nodded and waved. "Yeah, we found that while pairing last night. Crazy, huh? Just give me five minutes to wrap up here."
Ben sat at one of the dozen pairing stations clustered in the middle of the room. He logged in, then updated to the latest version of the project's source code. By habit, his first action was to run the unit tests to make sure everything was still working. He didn't expect any failures, but he always felt a little surge of energy when everything passed happily. Today was no different. He smiled; no matter what he changed, he would start from a fresh, working baseline.
Carlann still wasn't ready, so Ben kicked off the customer tests, too. They would take a little longer to run, but he was sure they would all pass, too. [Ed: actually, customer tests should be part of the main build, and run as fast as unit tests. We hadn't yet finalized our approach to customer testing when this was written.] He got up and wandered over to the board again, enjoying the calm progress they had made this iteration. It looked like they would be right on time again.
"I'm ready now, Ben," Carlann called. He nodded. Time to get to work.
Soon it was nearly 9:15 am. Time for the stand-up meeting. Everybody had arrived by now and there was a busy hum of work in the air. Ben got up, stretched, and refilled his monkey-shaped coffee mug. Others were stopping to take a break, too, and Ben joined them in standing around the coffee table. Each person gave a brief status update, then it was Ben's turn.
"Eric and I worked on the database connection logic yesterday and we think we've fixed the problem of leaking connections once and for all. Bottom line is that you no longer open, close, or handle exceptions... you pass a code block to the database and it does it for you. It's a pretty cool solution; take a look.
"Today, Carlann and I are working on Fiona's search bug. We should have it solved in an hour or so."
The meeting wrapped up quickly and a few minutes later Ben was back at work with Carlann.
"Okay, Carlann," Ben said, "We've found the problem, here, in the interaction with the network code. It should be easy to fix. But you had some concerns...?"
"Yes," Carlann replied. "Sure, we can fix this easily. But what's to stop something like this from happening again? I hate it when a bug slips past our tests. I see two problems: first, our networking code shouldn't freeze like that. But the deeper problem is that our UI allowed the button to be pressed again while it was in the middle of an operation. And it's not just this button--all of our buttons are like that. We need to improve our UI abstraction."
"Okay, I see what you mean." Ben nodded. "Okay, how about we fix the problem in the networking code and check in. That's pretty easy and that way the code will be ready to ship even if we don't finish refactoring the UI. Then we can dive in and see what we can do about that UI design."
Carlann smiled. "Sounds like a plan!" She started typing. "Now, here's the test I think we missed in our networking code..."