Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage Articles An Introduction to Lean Thinking for Software

An Introduction to Lean Thinking for Software

Leia em Português

This item in japanese

For developers and leaders coming to Agile via Scrum or XP, all this talk about Lean may be a bit of a mystery. Here's an introduction to Lean Thinking and how it applies to software development, from the Agile Editor of InfoQ China, Jacky Li. Ning Lu of ThoughtWorks China, whose talk is summarized here, emphasised the biggest obstacle to Lean or Agile as: the mind-set which came into being during the period of large-scale production.

Earlier this year, InfoQ China held an Open Party together with Matrix, ThoughtWorks China, Beijing Java User Group, AgileChina Google Group and Beijing Python User Group, etc. The Open Party, running along the lines of an OpenSpace  unconference, took place at the ThoughtWorks China office, and there were about 30 people attended. Ning Lu, a consultant from ThoughtWorks, gave a nice speech: Lean Thinking With Examples. He analyzed the biggest obstacle in the way of adopting Lean or Agile, and described how to recognize and reduce waste. This article will summarize the talk from an agile developer's perspective.

The activity started with a simple stand-up meeting, followed by voting on all the topics - we had a lot of wonderful topics that day, including "The growing of open-source community", "GPE", "Mingle", "Erlang", etc. The topics were separated into 3 tracks, and Ning Lu gave his talk on one track. He started with the history of the Toyota Production System and Lean Manufacturing, then tackled the biggest obstacle on the way adopting Lean or Agile: the mind-set which came into being during the period of large-scale production. Ning Lu also talked about how Toyota explored its own production system. He said:

Lean is the technology that can recognize and eliminate waste - activities which don't produce additional value.
He explained how to recognize and eliminate waste with The 5 Lean Principles* with examples, and listed out several typical phenomena which always accompany waste:
  • Inventory - while inventory can avoid inefficient provision, it also creases cost, and makes the company become insensitive to the market. The company might face overstocking as the market requirement changes. Inventory is everywhere. Think about your bookshelf, refrigerator, and work that terminates without any result.
  • Batch processes and waiting in queues - such as the intersections that are always crowded, most of the drivers have to experience "waiting" there.
  • Unbalance - e.g. seasonal sales and periods of slack sales.
  • Complication - if things are much more complicated than you expected, then there must be some waste. For example: a complicated document or process.
  • Focus on "following the regulations" - not all rules and regulations are reasonable, and even so, they might not be valuable to the clients.
Ning Lu emphasized that:
Any work that's not finished is a kind of waste. Lean or Agile can minimize unfinished work.
Heck, it sounds like all the code being written is also waste. That's crazy! If we follow the words above and try to minimize waste, then it seems that we should stop coding! How can we deliver something to the customer, then? And where does the value come from?

OK, let's try to look at it another way. Maybe you recognize these words from "Prefactoring":
Can you foresee everything? No. Are the decisions you make today final? No. It's practically impossible to think everything or know everything in the beginning of a project.
Actually, even the customer won't be sure that the function is exactly what they wanted, before it can be proved valuable to them. If we take unfinished work as a form of waste, then we will be dedicated to turning the code into running software, and deploy it into a production environment a.s.a.p. Later we will get feedback and more detailed requirements from the customer, and we can find out whether the committed functionality is finished (or not). The more unfinished work we have, the bigger the risk will be.

If we can buy this idea, then we will need to find a solution to eliminate waste, i.e. unfinished work. So what shall we do?

The 5 Lean Principles give us a clear, step-by-step direction, and when it comes to software development, there's a very useful toolkit composed of many agile practices which can help us resolve every concrete problem. To reduce the time between code completion and its being tested and integrated, we need to take small steps forward, doing frequent check-ins and continuous integration. To reduce the time between feature completion and and the time it starts creating value for customer, we need to do frequent delivery. As we can see, Lean and Agile development are integrated perfectly at this point!

Four months ago, Amr Elssamadisy suggested on the news, "Opinion: Refactoring is a Necessary Waste”:

...there are two types of waste in Lean: pure waste, and necessary waste. Pure waste is one that has no value to either the team building the software or the customer using the software.  Necessary waste, on the other hand, is the best way we currently know how to do a job even if it does not have customer value.

Ning Lu also talked about the kinds of waste defined in Lean, especially the second type, called "necessary waste". In his opinion, test, integration, refactoring and management all belong to this kind of waste. He summarized several interesting patterns that are commonly used to reduce those forms of waste:

  • Treat it positively: reduce the number of team members and beef up recruitment requirements
  • Change personal tasks to "team tasks": the whole team together takes on the work of design, test, and part of integration. The team is self-organized. Code ownership is shared within the team.
  • Separate responsibilities between people and machines: make every possible kind of work automated.
  • Do work ahead of time, and frequently: introduce test driven development, do frequent unit tests, refactoring and integration in early stages. Make sure that everyone can have a clear understanding of project goals early on, and ensure that project status is always visible.
For those interested in reading more on this topic, Mary and Tom Poppendieck's website offers articles. Also, Jeff Xiong and Ye Zheng, consultants from ThoughtWorks China, have written useful articles about the relationship between Lean, Agile and waste: Agile - Eliminating Waste (in Chinese). The slides from this talk, also in Chinese, can be downloaded.

View the original Chinese InfoQ item here: 路宁谈精益思想——2008北京Open Party摘录, and the story of this event, with some videos.

The 5 Lean Manufacturing Principles

1. Specify what creates value from the customer's perspective.

2. Identify all the steps along the process chain (the whole "value stream").

3. Make those processes flow.
4. Make only what is "pulled" by the customer.
5. Strive for perfection by continually removing waste.

About the author

Jacky Li is the Lead Editor of InfoQ China/Agile Community, specializing in Java and Agile software development, and has been devoted to popularizing Agile in China. He is now working in Ethos Technologies as Tech Leader, and has translated the Chinese editions of the InfoQ minibooks: Starting Struts2 and Scrum and XP from the Trenches from English.

Rate this Article