Saturday, June 19, 2010

Lean, Scrum, XP, Agile: What's what and how does it fit together?

A member of the Agile-Swiss  Linked in Group recently asked, "I've read about Scrum, XP, and Lean. What are the current Agile frameworks available for software development? What are the advantages and drawbacks of each of them?" Since the discussion is not world readable, I decided to republish my answer here.

A quick overview of top agile processes

The Lean and Agile approaches are far more complementary than they might seem at first glance. All of these approaches are built on principles and values which emphasize people, communications, quality and continuous improvement.

If we think of Lean as first and foremost a set of principles for thinking about producing value for customers, then these principles can be applied to many (all?) situations and are very helpful for understanding why Scrum and XP work.

If we think of Lean as a set of 'best practices,' then Lean can be quite counterproductive. Why? Best practices are only 'best' in a particular context. Lean evolved originally in a Manufacturing context and many of its practitioners are not aware of how Software Development and Manufacturing are different from each other.

XP and Scrum emphasize empowered, self-organizing teams (think special forces, not infantry) and are especially suitable for creative environments, like new product development.

Scrum is a simple framework for organizing teams to solve complex problems (e.g. creating software, changing organizations). Scrum places a strong focus on systematically identifying and eliminating impediments. Therefore Scrum is primarily a mechanism for introducing change into an organization.

XP stands for eXtreme Programming. The name comes from taking good values and practices to the extreme, to make them even better. XP is primarily known as a set of engineering practices for producing high quality software. Despite being the foundation for fast time to market with quality product, engineers have had difficulties gaining acceptance for their preferred practices, because management has difficulties understanding them.

Scrum is Lean...

with a Turbo Charger! Scrum perfectly complements a Lean strategy, provided that management 1) understands the nature of Scrum, 2) understands the context of their environment and how it is different from other environments, and 3) is truly committed to improving their organization.

Scrum enables XP Engineering Practices

Scrum delineates responsibilities clearly and enables (without explicitly requiring) XP and other practices. "If you are not doing pair programming, you're not doing XP. If your team is not allowed to do pair programming, you are not doing Scrum."-- Andreas Schliep.

My experience with Scrum is that it encourages management to do the lean thing without explicitly invoking lean principles, and Scrum enables development teams to use the best practices for their situation. Because of the rhythm of iterations, improvements in performance come quite rapidly.

Are there alternatives?

Kanban Software Development is derived from lean principles in general, and Value Stream Mapping and the Pull Principle in particular. It focuses on visualizing flow and reacting to blockages in the flow. Although some people believe Kanban is less intrusive than Scrum, it is actually a change management process. Like Scrum, it assumes that if intelligent people recognize they have problems, they will take appropriate action.

Kanban is controversial because it rejects a number of established agile practices. Kanban does not specify iterations. It does not talk about engineering practices. It it not 'in-your-face' about change nor does it explicitly delineate responsibilities. It is however compatible with frameworks that apply these practices. For instance, there is also Scrum-Ban, a fusion of Scrum and Kanban.

Despite the concerns, Kanban is the first new approach since Scrum and XP to get much mind-share in the community.

As a coach, I like to start by helping management to see the various inconvenient truths about their organization. Lean gives them the tools to understand the impact of those truths. Scrum gives them and their staff the ability to do something about it. And for teams developing software, XP is a collection of the best engineering practices available, and these are probably appropriate for your software development (and your developers should make that call!).

[Update 21-Jun-2010: thanks to Jens Meydam for his insights into XP and Kanban - I've updated the article based on his feedback on the LinkedIn discussion.]