TrainingConferencesAbout UsContact UsAdvertiseSQE.comRSS Feed

StickyMinds.com: brain food for building better software

Log In
 Clarify Your Search Criteria

Tips on Using Our Search Feature(s)
 
StickyMinds.com Home
ResourcesTopicsCommunityPowerPassBlogs
Home  >  Detail: What’s Wrong with Software Reuse?



A StickyMinds.com Original
Article Picture
What’s Wrong with Software Reuse?

By Robert L. Glass

Send This Content to a FriendGet a Short Link to This ContentPrint This ContentSee User Comments About This Content

Summary: In this column, Bob Glass skewers one of the "old wives' tales" of the software field, the theory-based prediction that software reuse will lead to unbounded improvements in both development productivity and software quality. "It ain’t so," he says here. But he certainly wishes that it were.


MKS
Here’s the conventional wisdom: Reuse is about building software from components. The bigger and more generalized the components, the better. At best, software products could be built entirely from such reused components. 
 
The virtues of that kind of thinking are obvious. In addition to dramatically improving software development productivity (since a lot of software no longer would need to be written from scratch), software quality would also be improved, equally dramatically (since software that has been used before has probably already passed numerous reliability and quality hurdles). 
 
That kind of thinking is all well and good, I want to tell you. But it’s also wrong-headed! What I want to do here is give you the rationale for my very contrarian position on reuse. 
 
Recently, I received a copy of the proceedings of a software engineering conference whose subject was reuse. Reuse has always intrigued me, starting with my software development days in the late 1950s when the only way to get famous in the software field was to contribute software components to the reuse libraries of that time. Back then, software had no monetary value—everybody was in the Open Source field, whether they wanted to be or not—and so getting famous by selling a lot of software didn’t work. And in those days there was no software development literature, so you couldn’t even become famous by writing articles like these to share what you knew with others who might (or might not!) care. In an ironic way, it was a purist kind of fame. You became famous by building software, not by selling it or writing about it. So back in those early days I leaped enthusiastically into the field of building reusable software. 
 
But back to the conference proceedings. The more I read, the more depressed I got. The proceedings reeked of the conventional wisdom I mentioned above. There was a lot of advice on how to do a better job of (a) doing, (b) motivating, and (c) managing reuse. There was even the usual collection on how to build better search engines to locate and extract the perfect reusable component for the problem you are working on. 
 
What are the problems with reuse, the ones that make me such a naysayer? 
 
1. Reuse “in the small” was a problem solved in the 1950s. We built huge, useful collections of mathematical and data-processing library routines, routines that are commonly used to this day. 
 
2. Reuse “in the large” is and always has been an unsolved problem. In spite of the enthusiasm of the components crowd, finding in a library of components the precise one that will solve your problem at hand is nearly an impossible task. 
 
3. The problem is not that we can’t find the perfect component in that library of reusable parts. (That’s what those “search engine” folks are trying to solve.) The problem is that the perfect component is simply not there. (And no amount of clever search engines will fix that!) 
 
4. It is tempting but largely unworkable to try to bend imperfect components into perfect ones. Research studies at my favorite home of software engineering research, the NASA-Goddard Software Engineering Laboratory (SEL), have shown that if you have to change more than 15 to 20 percent of a component to make it work in your program, it is more economical to build the component from scratch. And few components meet that 15-to-20 percent threshold. 
 
5. And why is that perfect component never in the component library when you need it? That’s where the insight from those conference proceedings comes into play. Paul Bassett of Netron, Canada, said, “Unpredictable variability across systems and over time is why reuse in software engineering is nontrivial.” The key word here is “variability.” Problems and their solutions in the software world vary all over the map, and having a “close” solution just isn’t good enough. There is so much variability across and within domains that the likelihood of someone having previously faced the identical problem you are currently facing is nearly nil. 
 
One person who read my writings on the subject said that I had “set software reuse back by twenty years,” to which I replied (in one of those rare, “clever-comeback” moments), “You simply don’t realize that it is twenty years behind where you think it is!” 
 
Now that I’ve thrown cold water on the subject of reuse, let me share one piece of positive reuse data that may astound you (and will certainly make you wonder about which side of this fence I am really on). At the NASA-Goddard SEL, they have found that they can build software consisting of roughly 70 percent reused components. How does the SEL do it? They have a narrow application domain—flight dynamics software—consisting of problems whose solutions over the years are very similar to one another. So if you narrow that variability down sufficiently—by working in a focused problem domain whose fundamental-solution approaches rarely change—you can achieve some pretty potent reuse benefits. But variability is still the key factor. 
 
Let’s end this column with a little pop quiz. What’s the problem with reuse? (100 points if you answered, “It’s the variability in the problems we solve, and in the solutions we create.”) Is that problem likely to go away soon? (I hope you’ll agree with me when I say, “Only if we can find ways to diminish the problem of variability.”)  
 
I am reminded of an old saying: “There is no scientific reason why the bumblebee should be able to fly” (because of its “impossible” weight-to-wingspan ratio). When we confront that conundrum, the sensible among us don’t question the practice of bumblebee flying, we question the theory that says it is impossible. It’s high time for theory to incorporate studies of practice into its way of moving the field forward. Until we do that, we will be stuck either trying to discourage bumblebees from flying, or criticizing them for ignoring theory.


About the Author
Robert L. Glass is president of Computing Trends (publishers of the "Software Practitioner" newsletter). He has been active in the software field for 45+ years. He is the author of more than 20 computing books and 60 papers and is a columnist for several computing periodicals.

Back to Top
 

StickyMinds.com Weekly Column From 8/13/01 

Member Comments
Add Your CommentExpand Comments
 
Comment:    
by Nandoo Neerukonda 4/21/2004

The article was a little confusing because it wasn't clear whether the author is criticizing the reuse or encouraging it. He appears to support "re-use in the small" while stating that "re-use in the large" is impossible. He says it's impossible becuase you can't find that "perfect component" but who cares about the perfect component? When the components are small enough, it's easy to stay within the 15-20% threshold and fine tune the smaller component to fit the needs. Also, when it comes to larger components, if they are in the same "domain", it's often easy to reuse with only a few modifications. Of course, it doesn't make sense when...Read On

 
 
Comment:    
by Robert Lee 10/11/2001

You've hit the nail on the head with variability, but the cost comes in maintenance AFTER successful reuse: negotiating a CHANGE to what worked for everone else for new feature requirements! The time lost in request processing, impact to other production users, etc. is a killer. Do you as a production application want to hear, "Trust me, it's trivial and won't affect you?" As a test suite manager, how can you be skewered by extraneous systems changing the "off the shelf components" that SAVED so much in the first iteration?

 
 
Comment:    
by Joseph Dubowski 9/10/2001

I agree with the author completely. I think that he has hit the nail on the head here. Based on my experience with trying to build reuseable components, the most significant constraint I ran into, repeatedly, was variability. And that variability did not have to be gargantuan to defeat my efforts; it just had to be great enough to require me to rework just 20-30% of a component in order to get it to work in another application. This does not mean that I am discouraged from aiming for reuse; it only means that I appreciate the forethought required that must go into component's design in order to facilitate its future reuse before a single...Read On

 
 
Comment:    
by Vincent Curtin 8/17/2001

I think that software reuse is dependant on the type of applications that are being written. For example, if you are writing code that is specific to State, such as State Medical Claims filings, it is very easy to reuse other state specific code with minor modifications. I understand that this is a very high level example of an institution that is geared for these situations. I would like to point out that the Reuse factor is very specific to the type of organization that one works in and whether that organization is involved in a Dynamic or Static problem solving field. Additionally, I think that while reading the article it becomes...Read On

 
 
Comment:    
by D Dhar 8/17/2001

Yes. My personal opinion is that the author has overly-generalized the problem with software reuse. Its like saying the world is full of divergent species and there is no commonalties. What he misses is that within this diversity there exists a common pattern i.e. a dog looks and behaves like any other dog. True, one might have a long tail and wags it a bit more than the other but still both wag the tail. Software is no different from real world and we have commonalties based on application domain, functionality, usage and user group. Whats more we can flip the "Tail" here. In Software parlance we may call it as following some "Design...Read On

 
 
Comment:    
by Geert Pinxten 8/17/2001

Based on my own experiences and feedback from some collegues I fully support the meaning of the author. For some very specific functionalities/features it is possible to build components which can be offered to the software engineering market. An example of such a component could be a search engine using a special technology... There are lots of applications where such a component could be used. On the other hand each company will have its own specific processes which are supported by software. Within a company components can be developed which most probably can be re-used throughout a subset of the required systems. I know of some companies...Read On

 
 
Comment:    
by ajith kumar 8/15/2001

I partially agree with the Authors comments. I disagree with the relationship between reusability and just searching the net and hoping to find a snippet of code that resolves the problem. As the author pointed out bigger and more generalized the components, the better. I would rather see this, as smaller & most generalized components will be much better. This will resolve the variance threshold of 15-20% to mere (2-3%). This sort of implementation will give us the, fine-tuned components to solve a commonly repeating problem across the application development or product development. From the application testing point of view also, this will...Read On

 
 
Comment:    
by James Park 8/14/2001

I disagree with the spirit of your 'lead story' which is, I think, too strongly positioned and not sufficiently supported or qualified. I agree, however, that many of the components that a developer might stumble across fall outside of your "15-20%" as they are poorly designed and do not adhere to good object-oriented design best practices -- this will certainly strike a chord with frustrated developers. But I would maintain that the problem is not reuse, just the poor ad hoc implementation of it. The problem that these components face is that they are not fine-grained enough to solve a commonly repeating problem. Additionally, you make no...Read On

 
 
Comment:    
by Brian Brumfield 8/14/2001

In software test automation reuse of code is critical, which means that planning, design and a good understanding of where reuse will and will not work are the keys to making reuse work. Likewise in application development you may see little or no reuse potential between dissimilar applications, but within a product family you should be able to see tremendous reuse potential. A key point that the article focuses on is scope; if you were to look at application development with realistic expectations regarding reuse, you will undoubtedly find that there are areas that are clearly unique to given parts of the App. (very narrow scope), but there...Read On

 
 
Comment:    
by Jerry Kosowski 8/14/2001

Balderdash - I guess you never create anything in Visual B or Visual C and if you do, then must never use text boxes, command buttons, check boxes, radio buttons, etc. It must really be tough creating all those input interfaces evey time you write code!

 
 
Comment:    
by scott preece 8/14/2001

I think the article throws the baby out with the bath water. Reuse clearly *does* work (as in the NASA example he cited) when you design components for a specific domain. It also clearly does work in the in-the-small libraries he mentions, and in thousands of applications written around COTS software, frameworks, and engines (databases, browsers, etc.). What many of us are trying to do, when we preach reuse, is to get our companies to use those proven approaches to reuse. Did anyone ever expect ad hoc reuse to provide a useful payback?

Author's Response:
8/20/2001    
Yes, reuse does work under the circumstances you name. And, yes to the others who said that reuse is highly desirable, and we shouldn't quit striving for it. My argument is largely with the people who see massive breakthroughs in the use of components-in-the-large. Reuse in the small won't be a breakthrough because we've already been doing it for 45 years! And domain-specific reuse will be a breakthrough in the fields for which it works, but those are - so far - fairly narrow domains. And one more point. Computer scientists love to use the term "ad hoc" to imply a disorganized and poorly-thought-through approach. But every dictionary I've looked at defines "ad hoc" as "addressed to the problem at hand." And that's exactly what domain-specific reuse is about! So my only partly tongue in cheek answer to the final question of this comment is "Yes - ad hoc reuse-in-the-large may very well be the ONLY kind of reuse in the large that works!!!!"

 
 
Comment:    
by cathy gault 8/14/2001

Great comments. For the last 15 years I, too, have listened to and read about the promise of reusable software. It just sounds so practical to be able to check out chunks of code from a library of reliable code to build software components. Mr. Glass is right, though, the companies we all work for have different business rules for conducting business, and our IT departments are presented with unique problems and enhancement requests. Given all the variability in the workplace, do ERP systems (e.g., SAP), which promote standard business process across enterprises, solve the reusability puzzle? SAP, for example, offers pre-configured...Read On

 
 
Comment:    
by David Berman 8/14/2001

The fundamental problem with the author's reasoning is that reuse "in the large" is desirable. Component-based software should not contain big, generalized components, but small, specific ones that are easily sub-classed into variations of the original. This allows reusable code to stay within the 15-20% threshold.

 
 
Comment:    
by Jan Erik van der Laan 8/14/2001

After reading this article, I completely agree with the author. The variability in the required functionality is also exactly the reason why it is virtually impossible to build Functional (user) Requirements from textual components; they also will never fit completely. Consequently it is impossible to completely cover your testing needs with prebuild (i.e. default) testing scripts. With the exception of negative testing of date fields or numerical fields by enetering alphabetical characters, etc. testing will always need functional requirements and a lot of creativity as a basis. My personal experience in testing OO programs is that it...Read On

 
 
Comment:    
by Peter Nairn 8/14/2001

I guess I am little confused as to what is being suggested here. Is the suggestion that we should avoid designing software for re-use, because it is a waste of time? I think I would disagree with that as a suggestion. If the suggestion is think before you design for re-use, then I am in total agreement, especially as re-usable software can be a nightmare to test and can have performance implications.

 
 
Comment:    
by Maura Shortridge 8/13/2001

You're absolutely right. The company I work for has seen great improvements by reusing our own code from previous programs if we go to build something similar. But the one time we tried to pull code from "out there" on a unique project, it was a disaster. The programmer spent more time trying to bend the generic code to his specific purpose than he would have spent just building his own solution from scratch. The key is knowing when to choose reusable code, and then pulling it from something you know will require only small changes. Thanks for a great article.

 
Back to Top



 
Ads By Google
What's This?
 
 



Home   |   Resources   |   Topics   |   Community   |   PowerPass



© 2010 StickyMinds.com. All rights reserved.
StickyMinds.com is a division of Software Quality Engineering.
Privacy Policy    Terms & Conditions    Link to StickyMinds.com    Feedback


TechExcel, Inc.




STAREAST 


Better Software Conference