Refactoring browser implementation for Ruby over at Murphee’s, Lean Manufacturing grabbed my attention. Besides Just-in-Time production, there is another big aspect of it that I hadn’t paid much attention to before: Muda, or the reduction of waste.
Waste, in the Toyota Production System, can come from seven different sources: overproduction, waiting, transporting, inappropriate processing, unnecessary inventory or motion, and defects. They can all be mapped to the software development domain quite easily, and most have a direct link to agile methodology practices, even if in some cases you have to stretch your imagination a bit. Not to wonder, as most of software development processes were directly inspired by production line practices - not necessarily in the conveyor belt sense, but more as in “I have (resources, ideas) and would like to make (manufactured products, software) out of them. What is the most efficient, effective and sustainable way to do so?”
There are two things we can waste while developing software: time (and its little brother, money) and brainpower (and its big brother, talent). Interestingly, flushing one down the toilet also brings the other with it: a project stuck in endless meetings or in fixing production issues is wasting both its people’s time and brainpower, and I find it fascinating and saddening at the same time how often I see projects that are up to here in both problems: a production issue is found, meetings are held for days or weeks, but nothing gets actually done to fix the problem and avoid it happening again. During those meetings, there’s lots of talk about changing the architecture, platform, getting more programmers and tools, or my favourite, “just rewriting the whole damn thing.” And rewriting a significant part of your system, as anyone who watched Netscape die can tell, doesn’t work.
Still, why is this behaviour so common, and why aren’t we working on bringing refactoring support for purportedly extremely productive languages like Ruby like there is no tomorrow, as to avoid repeating the mistake of rebuilding things instead of beating them into shape?