Sunday, March 9, 2008

Tearing Down the Software Factory

Tom DeMarco said it well:
The idea of a software factory is a joke -- that we can build software by rote -- that's ridiculous. If the work is deterministic, we will do with it what we do with any other big piece of deterministic work. We'll let the computer do the deterministic portion, leaving the person who interacts with the computer -- the other half of the system -- to do the work whose roteness has decreased, not increased. Every time you automate something, what's left of the person's work is less deterministic, until eventually, when you automate enough, there's no deterministic element left for the person's work--no rote. ... Our work is not deterministic. It's far too inventive. We're knowledge workers, not factory workers.
Of course, similar thoughts have been articulated many times before, and was a theme of the previous post on this blog. The idea of a software factory contradicts our best understanding of the essence of software, yet industrial style command-and-control management of software continues. Why is this? One problem is we developers haven't effectively presented a convincing alternative. Remove command and control, and to some extent developers must manage themselves. From Watts Humphrey:
Since your manager’s performance depends on your performance, and since the performance of software groups has historically been so poor, managers do not trust software professionals to manage themselves. To overcome this problem, all we have to do is to convince management that we can manage ourselves and then perform that self management so well that management will continue to trust us.
The theme of trust and credibility runs throughout Humphrey's extensive writing on this topic. This is not new, but progress has been slow. The major obstacle is that managers rightly want concrete, objective data on which to base their decisions. This conflicts with the black box that software development so often becomes. We need better transparency. It is time to open up the black box of software engineering.

The black box of software
Opening the black box means programmers and managers must meet each other halfway. Managers must create and adapt to a new post-industrial management science, and programmers must produce data useful to that management science. This does not mean attempting to make programmers into assembly line workers. To the contrary, it means embracing the creative nature of software, and managing the output as a side effect of development.

How do we do this? Empirically manage everything that can be empirically managed, and complement it with the judgment of your best engineers. Many pieces of the puzzle already exist. Unit testing, code coverage reports, bug tracking, static code analysis, dependency management and others provide transparency into the state of a project. Such data is purely informational, but technically inclined managers can and should use it to ensure a project is on track. With context, problems like bloated dependencies, poor test coverage, or fixing related bugs many times are all signs of a project going astray. Modern software organizations must be able to detect and correct problems before they grow.

Unfortunately many managers today are not equipped to work with such data. This must change. Managers must build their skill sets for the post-industrial world.

Trust through transparency
Of course tools like code coverage and defect tracking only tell part of the story. Code is design, and no set of tools can define the quality or progress of design. Therefore we must complement these tools with the best judgment of our best engineers. But if managers don't trust the best engineers, this judgment is wasted.

So how do we solve this? Use transparency into software as a tool for building trust. Concrete data on the progress and quality of software gives managers greater confidence in engineers, even if the picture is incomplete. Trust begins to grow. Engineers should qualify empirical data and use it appropriately as a basis for design decisions. If we can provide managers a glimpse into software and prove we are making progress, they will be more willing to accept our opinions.

Some tension between managers and developers may be inevitable, but we can meet each other halfway. Our development practices should yield hard data for everything appropriate. In exchange managers must accept that code is design and trust the judgment of developers.

2 comments:

Mitch Barnett said...

Interesting article. If you give the book, “Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools a peruse, you will find the meaning of software factories quite different than what Tom DeMarco says. Even the title of the book gives it away.

I agree that there must be a better way, but we still can’t get past whether our industry practitioners think software engineering is an art or discipline or both.

I am a fan of Jack Reeves and believe what he says is true. However, raising the level of abstraction is the way to move from code as design to code is model: http://blogs.msdn.com/devhawk/archive/2005/10/05/477529.aspx

Just like any other industrialized engineering disincline (e.g. mechanical, electrical, civil engineering) our day will come – it is just a matter of time – however, may not be in our life times ;-)

http://softwareindustrialization.com

Brian Di Croce said...

IMHO, the essence of building and delivering higher quality software doesn't involve tools, technologies, processes, patterns, etc.

I honestly believe that it all depends on how healthy is the communication link between managers, developers and stakeholders. We are way, way far from setting up an ideal 'software factory' for most industrial, complex projects out there today.

Nevertheless, there are some effective and lightweight techniques we can implement inside an organization today. At the top of the list, I'm thinking about an automated continuous integration environment. A CI environment is a great way to encourage communication inside an organization because at any point in time, anybody who has an interest in the project will know whether or not the project is staying on course. Metrics can be derived from various tools (unit tests passing/failing, test coverage, code complexity, classes/methods that need to be refactored, static code analysis, bug reporting, etc.) by simply pushing a button, or automating the whole build process.

The hardware we have today is powerful and cheap enough to set up such a practice. The tools we have are also powerful and cheap enough to describe what needs to be communicated to the project's stakeholders.

Software factories or not, as long as the communication link between involved parties isn't as healthy as it should be, we can continue hoping for better ways to develop software. Maybe that should be a request for our next Christmas' wishlist...

--
Brian Di Croce
www.BrianDiCroce.com