2017년 1월 28일 토요일

Software Reuse

1. Software reuse
 : when it works, save effort, cost and time
 - "Ploys: to encourage reuse
  * Make reusable code accessible
  * Encourage a sense of collective ownership of the code available for reuse
  * Have an easy to use, well-documented re-use database
  * Financial rewards for creating reusable code and making it available and/or financial reward when it is used

http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/guidelines/software_reuse_B6B04C26.html

2. A model of reuse
 - grounded in the assumption that a proportion of shortcomings (bugs) is found each time (new) tests are run on some segment of code
 - suppose the code is used in again another project
 - It will be subjected to a new round of tests in the new project
  => if the proportion of bugs typically found in a series of tests is p, the proportion left is (1 - p)
  => the second round of testing reduces the proportion of residual (unfound) bugs to (1 - p)^2

 - Bugs in product (before testing) = Bug Content of new code * (1 - R) + Original Bug Content of reused code * R * (1 - p)^(n - 1)
  Where, R = the proportion of code reused in this project,
            p = the proportion of bugs removed in a cycle of testing,
            1 - p = the proportion of bugs not removed in testing,
            n = the number of times reused code has been reused

 - How do we know the original bug count?: we have to estimate it
  => use "artificial bug insemination" ( http://melancholy8914.blogspot.co.uk/2017/01/finding-bugs.html )
  => suppose you insert n bugs deliberately, and testing uncovered a total of t bugs, m of which were inserted deliberately
  => An estimate of the total number of bugs in the original code (T) = The number of bugs actually found ( t ) / the proportion of bugs being found in the tests ( m/n )
   ( Assuming the tests are equally able to find real and artificial bugs )
  => T = t/(m/n) = tn/m - n

 - What about p?
  => The only way is to look at other projects

댓글 없음:

댓글 쓰기