Friday, June 3, 2016

Lean manufacturing vs Scrum - transport waste (part 2)

This is a continuation of the previous post in this series.

In short, the number one goal in lean manufacturing is eliminating waste. In this series I'm looking at the seven categories of waste identified in lean manufacturing, how these translate to software development, and how scrum can help eliminate that waste, or not. This is the second post in the series.

In this post I want to focus on transport waste, one of the seven categories of waste targeted by lean manufacturing.

Transport doesn't sound like something that's really relevant in software development, but there are some typical wastes that happen in software development projects that are analogous for various reasons.

Transport waste in software development doesn't happen when physical material is transported between locations, but rather when focus is shifted and tasks are transported. I like to split this into two categories:
  • Task switching
  • Task reassignment
Task switching is similar to transport waste in manufacturing because you're really moving your thought process around when you switch tasks. This doesn't require physical movement, but the mere act of moving between different streams of thought wastes a lot of time.

Software development can be very complex and, especially when done well, requires deep levels of concentration. To exit that state of focused concentration and switch to something else, which in turn most likely requires a similar level of deep concentration, is not trivial. If you don't take the time to focus properly you're likely to make lots of errors and what you produce is likely to cause more problems than it fixes, in other words it will create more waste.

Modern culture has created the false impression that humans can "multi-task", but this is a myth. There are lots of studies in psychology on this topic and it falls somewhat beyond the scope of this post, but the findings show that people do not multi-task, they just task-switch. I'm not going to go into more detail here, but this is nicely summarized in this blog post by Aza Raskin.

The bottom line is, switching between tasks costs time. The time spent switching between tasks will make everything go slower and is waste.

Another form of waste in software development is task reassignment. This is similar to transport waste in that you're essentially transporting work from one person to another, either internally in the team or to new team members that are joining the team. It's almost intuitive (especially for most project managers) when a project is in trouble to throw extra resources at it. But this is fundamentally flawed. Software development complexities mean that ramp-up time for new people joining a project will be big and often prevent the existing team members from effectively continuing with their work. Adding and removing people from a project, or moving tasks between people on the team, creates a special type of waste because of handovers. The goal with these changes is usually to make things go faster, but the result is usually that things actually go slower, at least in the short term.

How does scrum address this?

Let's start with task switching. There is a lot of emphasis in scrum on getting things done and especially on not starting anything if you still have partially completed tasks. Implemented properly by a team, this eliminates task switching waste very effectively. It's therefore important to make sure team members are doing one thing at a time. Daily scrums are especially useful for this purpose to keep this focus.

Ideally, the team should also focus on completing one thing at a time, i.e. nobody should start working on feature two if there are tasks waiting on feature one. Two partially completed features at the end of a sprint will do no good. This may seem counterintuitive, but when a team gets it right it does wonders to bring focus and increase flow.

On to task reassignment. Teams change over time, especially if you're busy with long term projects, and in most cases it would be naive to assume that a team can remain completely static for the duration of a project. Also, if something isn't working on a team you have to try and fix it. In extreme cases that may involve changes to the team structure. But this should be a last resort and should come from within. Scrum puts a lot of emphasis on team autonomy and generally a change shouldn't be made to a team unless the team demands it, however scrum doesn't really dictate when our how this should happen, so the onus is on the team to handle this responsibly.

The iterative nature of scrum does provide an advantage though, in that when task reassignments happen the impact is smaller. Since the project team will always be working on a relatively small subset of overall requirements, the potential damage in task reassignment is somewhat limited. To be clear, it still causes a lot of waste, but the potential size of that waste is much bigger if you're using a waterfall-type approach.

In summary, scrum directly addresses transport waste by encouraging task completion before moving on.

More indirectly and incidental scrum also reduces the potential risk in task reassignment due to its iterative nature.
Where scrum doesn't have a direct impact and the team needs to make sure they apply good common sense and engineering practices is in watching for individual task switching at a micro level (e.g. individual team members should apply discipline and not be distracted too often by things like e-mail) and by making sure task reassignments are only done when absolutely necessary.

Friday, May 20, 2016

Lean manufacturing vs Scrum - intro (part 1)

This is the first post in a blog series in which I intend to explore the relationship between lean manufacturing and software development, and how scrum can, or can not, help eliminate the seven wastes of lean.

We use scrum for software development at Xpedia. If you don't know what that is, check our methodology write-up on the subject or if your attention span is shorter try our slide deck.

Before starting, it is important to note that scrum has a strong aspect of continuous improvement, especially through retrospectives at the end of each sprint. While the retrospectives are an integral part of scrum, the improvement could be totally unrelated to scrum and more often have to do with the team's environment and specific challenges. These continuous improvements should therefore help eliminate waste of all flavours, so in an indirect way one could argue that scrum addresses all categories of waste. Similarly the important role of a scrum master can be argued to have a role to play in eliminating any sort of waste, but again this is rather indirect and probably depends heavily on how good the scrum master is.

For purposes of this series though, I'm going to ignore indirect benefit though these mechanisms and rather focus on the direct waste-elimination benefits of core scrum components as I see it.

You may also be familiar with the happily acronymed lean software development (LSD). There is a relation with scrum, but it's not quite the same thing. The terminology for LSD (yes, I have to call it that now), originated (according to Wikipedia at least) with a 2003 book, Lean Software Development: An Agile Toolkit, by Mary and Tom Poppendieck, who specifically took the principles of lean manufacturing and applied these to software development to come up with LSD. However, scrum predates this by several years and by 2003 was already fairly well established. Of course, the Poppendiecks knew scrum well when they wrote their book and it contains lots of nods to scrum, but it seems their background in various manufacturing environments led them to more directly apply the principles of lean manufacturing to software development in general and not just specifically through scrum. I'm going to probably lean rather heavily on the Poppendiecks' work throughout this series and will definitely also make use of various other sources, but will rather list these in the final post to make sure I include them all. I do recommend this book though, definitely a worthwhile investment of your time if this stuff interests you.

Before LSD, the overlap between scrum and lean manufacturing principles seems to be a bit more coincidental. Various authors did pick up on this, but to my knowledge the Poppendieck's seem to have been the first ones to actually take lean manufacturing principles and apply them directly to software development.

Let's get to the seven wastes now.

Lean manufacturing focuses primarily on eliminating waste and specifically identifies the following 7 types of waste:
  • Transport
  • Inventory
  • Motion
  • Waiting
  • Overproduction
  • Over processing
  • Defects
Others have attempted to add to this list over time, but mostly lean manufacturing focuses on these seven. Proponents of scrum may think this was stolen from scrum, but I assure you lean manufacturing is somewhat older than that! 

In the following posts I'm going to explore the extent to which there is an analogous waste in software development  and how this is minimised by following a good scrum process and also in what areas you'll need to think for yourself and cannot rely on scrum alone.


Wednesday, May 18, 2016

I'm back!

I've been lazy with this blog for too long. Going to start posting like crazy soon. Watch this space!