27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

An Exploratory Study of One-Use and Reusable<br />

Software Components<br />

Reghu Anguswamy<br />

Software Reuse Lab<br />

Computer Science, Virginia Tech.<br />

Falls Church, Virginia, USA<br />

reghu@vt.edu<br />

William B. Frakes<br />

Software Reuse Lab<br />

Computer Science, Virginia Tech.<br />

Falls Church, Virginia, USA<br />

frakes@cs.vt.edu<br />

Abstract— One hundred and seven implementations of a one-use<br />

stemmer component and the equivalent reusable programs were<br />

analyzed in this exploratory study. Subjects were given a list of<br />

19 reuse design principles and asked to indicate which ones they<br />

used. A ranking of the design principles by frequency of use is<br />

reported. One-use and the equivalent reusable components were<br />

analyzed using measures of the pairs in terms of size in SLOC<br />

(source lines of code), effort in hours, number of parameters, and<br />

productivity as measured by SLOC/hours to develop. Reusable<br />

components were significantly larger than their equivalent oneuse<br />

components and had significantly more parameters. The<br />

effort required for the reusable components was higher than for<br />

one-use components. The productivity of the developers was<br />

significantly lower for the reusable components compared to the<br />

one-use components.<br />

Keywords: Software reuse, software engineering, empirical<br />

study, reusable component, reuse design principles<br />

I. INTRODUCTION<br />

Many reuse design principles have been proposed [1-4] but<br />

there has been little empirical analysis of their use. The<br />

software reuse literature often refers to a one-use component<br />

and its reusable equivalent, but there has been little study of<br />

this concept. In this study, we examined the reuse design<br />

principles used by one-hundred and one subjects in converting<br />

a one-use s-stemmer component to mak e it reusable. Our<br />

purpose was to conduct an exploratory analysis to identify the<br />

most commonly chosen reuse design principles used to develop<br />

the components and to quantify the differences in size, number<br />

of parameters used and effort between one-use and reusable<br />

components.<br />

Software reuse, the use of existing software artifacts or<br />

knowledge to build new systems, is pursued to realize benefits<br />

such as improved software quality, productivity, or<br />

reliability[5]. Approaches to measuring reuse and reusability<br />

can be found in [6]. Software reuse in industry has been studied<br />

and its benefits analyzed [7-12]. These papers document an<br />

improvement in softw are quality and productivity due to<br />

software reuse. There are also many types of software reuse<br />

[6]. In the paper by Mohagheghi and Conradi [8], it has been<br />

pointed out that althoug h there is positive and significant<br />

evidence for improved productivity, further study is required to<br />

measure the actual gains in productivity. Our paper measures<br />

the effect on productivity of a software developer making a<br />

one-use component reusable.<br />

Component based development in softw are reuse was<br />

presented as early as 1968 by McIlroy [13] suggesting that<br />

interchangeable pieces called software components should<br />

form the basis for software systems. Our study is based on the<br />

component based approach and the reuse design principles<br />

presented in this paper aim at the design and implementation of<br />

simple reusable software components. A software system<br />

developed with reusable components follows a ‘with’ reuse<br />

process while a component designed to be reused in other<br />

systems follows a ‘for’ reuse process.<br />

A. One-use component vs. Reusable component<br />

The distinction between a reusable and its equivalent oneuse<br />

component is an intuitive concept that is not precisely<br />

defined. One-use components are generally written for specific<br />

applications and are not meant to be used again. Reusable<br />

components on the other hand are developed to be used more<br />

than once w ithin a domain or across domains for various<br />

applications in various environments. Reusable components are<br />

generally developed by taking a one-use component and<br />

modifying it either to add more functionality or changing it to<br />

work in other envi ronments following a re-engineering<br />

approach. They can also be developed from scratch. Our study<br />

involves reusable components built by re-engineering one-use<br />

components. It foll ows that compared to equivalent one-use<br />

components; reusable components tend to be larger, more<br />

complex and slower. They also should have more potent ial<br />

input/output types and more parameters.<br />

As a simple example of a one-use versus a reusa ble<br />

component, consider the “hello world” program, hello.c, as<br />

a one-use component and the anymessage.c program as its<br />

reusable equivalent. Here is the code for each:<br />

//hello.c (one-use component)<br />

main(){printf("hello world\n");}<br />

//anymessage.c (reusable component)<br />

main(argc, argv) /* print any message to output */<br />

int argc; char *argv[];<br />

{<br />

int i;<br />

for (i=1; i< argc; i++)<br />

printf("%s ",argv[i]);<br />

printf("\n");<br />

}<br />

194

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!