StrangeLoopConference A St. Louis software developer conference



Speaker Focus: Mario Aquino on Agile, Zen, and the Warrior Spirit

14 Aug 2009
Posted by stloopadm

Mario Aquino (@MarioAquino) is a Principal Software Engineer at Object Computing (OCI) and is doing a talk at Strange Loop with the intriguing title "Zen Mind, Warrior Spirit: Antithetical Mindsets with Lessons for Agile Developers". I talked to Mario about what we might learn.

Alex: What's your experience with agile development? What agile methodologies have you been using and for how long?

Mario: My first Extreme Programming project was in 2003 with a team in Dallas. That team worked together in a project room, they were test-driven and highly disciplined, did daily stand-up meetings, continuous integration, and used a story planning tool called XPlanner that they had developed on their own time. This team, and particularly the practice coach Steve Bate, taught me an approach to software development that utterly changed my programming style. Until this project, I had been writing automated tests for my code but was generally creating the implementation first and testing second. My time on the project introduced me to interface-based design, which led to a greater appreciation of mocks and stubs, separation of concerns, dependency injection and a whole slew of concepts that made me rethink how I wrote software.

In 2004, I joined a project that was a couple of years old and had no testing suite to speak of. The developers on that team were open to ideas about automation and designing for testability because the work they had done up to that point was feature heavy but was also riddled with many quality issues. Aside from the code, the team had organizational problems, following a top-down leadership model that didn't promote the level of collaboration among the developers or with the user community that could foster a feedback-driven culture. We regularly missed delivery dates, accumulated technical debt, and were constantly fighting fires that our product caused. The management team eventually realized that a change in the way that the project operated was necessary to avoid the effort being killed.

I proposed the team adopt XP practices and reorganize our development process. We settled on a quarterly release cycle, two-week iterations, continuous integration, automated testing as regular component of feature development, we enlisted a team of customers to set priorities and guide the team, moved the developers into an open team area, held iteration demos and retrospectives at the end of every development cycle and over time adjusted how we did business. The results of this transformation were dramatic. After going Agile, the team regularly hit our delivery dates, our defect rates slowed as our test coverage grew, we even won awards inside the organization, but most importantly we helped our customers save time and money with the features we were regularly adding to our product.

At the moment, I am a Scrum Master on a team that mixes onshore and offshore development in support of adding new features to my customer's commercial web portal. Practice-wise, I make it my responsibility to help the team with all of the good habits Agile encourages like daily communication within the team, following the priorities of the product owner, trying to shield the team from distractions, politics, or any other wolves in the wild.

Alex: Where did you get the inspiration for this talk? I can't say I've ever seen a talk like this at any other conference. Do you see aspects of these dual mindsets in your daily work?

Mario: The first Agile team I led was a several-year-long project that went through many release cycles. There were several difficult releases that really stretched the team to the edge of our capabilities. With each grueling release, we pitched in and helped each other so the whole team could deliver on time. We had a culture of teamwork that under tough conditions meant that we could lean on each other for help and rely on the help always being available. The camaraderie and experience of achieving difficult goals as a team always reminded me of the tight bond between soldiers that have been in combat together.

A common theme from Agile practices such as Scrum and XP is collaboration on shared goals. Where in the U.S. Army, soldiers in a squad do many activities together whether during training or in theater of operations, likewise with Agile teams collaboration happens with pair programming, group estimation of stories or tasks (during planning), keeping the build green, everyone in the same room, etc. Teamwork and collaboration are cornerstones of Agile practices and the effect is that a strong connection can form between the members on the team.

The interconnectedness of things is a concept in Zen thought. The idea is that despite people's inclination to think about the world in terms of me and then everything else, that all of us are actually connected by experiences we share as well as our ability to empathize with the experiences of those around us. The pain or challenges of those around us affects everyone. On an Agile project, the whole team delivers on time or fails to do so. If the build breaks, the pain is shared by everyone. When looking at ugly code that is ripe for refactoring, Agile developers are empowered to improve it. When someone on the team asks for help, whoever is able pitches in and helps. In this way, the interconnectedness of things is realized among the team members as well as with the code.

Alex: What is the most startling thing you've learned while doing research for this talk? Are Zen practitioners practicing YAGNI and KISS?

Mario: The most surprising thing so far has been the origin of stand-up meetings. These meetings facilitate communication among team members as everyone stands up and reports what they worked on the previous day, what they plan to work on the current day and whether they have anything blocking their progress. Everyone stands to keep the meetings from going too long (by preventing anyone from "getting comfortable"). This format of meeting has been used by the military, from the Gulf War and long before. Generals, their subordinate officers, and any other soldiers present would stand up during the morning meeting and have a time-boxed status & open discussion about the days mission. This simple approach to communication (limiting the time for a meeting and keeping everyone out of a comfort zone) is an effective tool for sharing information and breaking down barriers to progress.

The simple approach to things is everywhere in Zen. One example is the practice of zazen (sitting meditation). In this practice, you find a quiet place and sit on the floor with your legs crossed over each other. While you are sitting, you try to clear your mind of all thoughts and just sit. This sounds like a simple activity, but in fact it requires a great deal of effort. The mind prefers to be at work and while you sit you should release any thoughts that float through. Keeping the mind clear means not thinking about the past or the future, instead focusing on the moment. This practice teaches you control but it also provides insight into how your conscious mind works.

Many Zen practices apply to focusing on one thing at at time. Agile developers follow a simple set of practices for software development. The red-green-refactor mantra is a perfect example. First, write a failing test for a feature you need or to prove a bug exists. Then, write *ONLY* enough code to make the test pass. Then, look for opportunities to refactor the code you have written to improve readability, avoid duplication, etc. As long as all the tests pass, the task is complete. Then, start over again. It is a simple set of steps but, like zazen, requires discipline; developers may be inclined to write more code than they need once they get to the implementation, adding conditions for cases not tested yet. The discipline of the practice of red-green-refactor calls for "living in the moment", only adding the code needed right now to satisfy a failing test.

As for YAGNI (You Ain't Gonna Need It), there is a great Zen koan I read once that I think applies. Koans are short stories that have a message about Zen and on which practitioners often meditate to discover greater personal understanding.

Ryokan, a Zen master, lived the simplest kind of life in a little hut at the foot of a mountain. One evening a thief visited the hut only to discover there was nothing to steal.

Ryokan returned and caught him. "You have come a long way to visit me," he told the prowler, "and you should not return empty-handed. Please take my clothes as a gift."

The thief was bewildered. He took the clothes and slunk away.

Ryoken sat naked, watching the moon. "Poor fellow," he mused, "I wish I could have given him this beautiful moon."

Alex: Will there be any kung fu during the talk? If not, how can we correct that?

Mario: Will there be Kung Fu? Only as a last resort. :)

Alex: Thanks Mario, it sounds like a fascinating talk and I'm looking forward to it.



Recent comments


Tweets (#strangeloop)