home *** CD-ROM | disk | FTP | other *** search
/ ftp.umcs.maine.edu / 2015-02-07.ftp.umcs.maine.edu.tar / ftp.umcs.maine.edu / pub / WISR / wisr4 / proceedings / detex / nishimoto.detex < prev    next >
Text File  |  1992-04-05  |  20KB  |  535 lines

  1.  [12pt] article 
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.      6pt 
  9.  
  10.   Program of Reuse at Manufacturing Productivity Operation 
  11.  
  12.   Alvina Nishimoto   
  13.      
  14.         Hewlett-Packard Company  
  15.         Manufacturing Productivity Operation  
  16.         5301 Stevens Creek Blvd.  M/S 51U/92  
  17.         Santa Clara, CA  95051  
  18.         408-553-3682, alvina nishimoto@hpc700.desk.hp.com 
  19.    
  20.  
  21.  
  22.  
  23.   
  24.  
  25. This paper describes a program of reuse that began in January 1984 with a
  26. new MPO product and has evolved to include three other existing products and
  27. all new enhancements to these products over the last seven years.  The
  28. topics covered include:
  29.  
  30.   
  31.     How the program was initiated and how our definition of reuse has
  32.   changed over time
  33.        How the program evolved to include other already existing products
  34.        Development of the fix process for reuse components
  35.        Coordination issues between products and the formation of the Shared
  36.   Components Council
  37.        Results of reuse metrics
  38.        What lessons we learned and suggested areas for improvement
  39.  
  40.  
  41. Major emphasis is on what we learned along the way and how our reuse program
  42. has evolved to include other products.
  43.  
  44.   0.3in 
  45.  
  46.    Keywords:  re-engineering for reuse, reuse maintenance process, reuse
  47. councils, reuse metrics
  48.  
  49.  
  50.  
  51.  * Getting Started 
  52.  
  53. In January 1984, Manufacturing Productivity Operation (MPO) launched a fast
  54. track new product for just-in-time manufacturing, HPJIT, to be completed in
  55. nine months. From the start, the R   D team drew up several objectives for
  56. the project:
  57.  
  58.   
  59.  
  60.        To invent a high-quality software product where there was none
  61.   before, either internally or externally.
  62.  
  63.        To meet all scheduled milestones, the most important being the
  64.   manufacturing release date, which was stated at the beginning of the
  65.   project.
  66.  
  67.        To increase the productivity of engineers in designing this type of
  68.   software product.
  69.  
  70.  
  71.  
  72. Several members of the project team had worked on the division's flagship
  73. product, Materials Management (MM/3000). Written several years ago, these
  74. engineers had encountered the difficulty in supporting this product.  We had
  75. ``cloned'' so much of the product, meaning that a similar routine could
  76. exist in as many as 100 different transactions or batch programs.
  77.  
  78. We had many service requests that we classified as ``generic'', indicating
  79. that this problem existed in many transactions or batch programs and would
  80. involve a large effort to repair. Our dilemma was that although the code was
  81. almost the same, we still had to touch all the pieces of code that had been
  82. cloned to fix a defect. Therefore, at the beginning of the project, we
  83. decided to spend some of the project's development time creating some
  84. reusable code.
  85.  
  86. We placed many of the common calls to our tools layer inside of utility
  87. subroutines that could be called from any of the product modules (see Figure
  88. 1). We wrote this reused code for data base searches, screen handling, and
  89. transaction logging, as well as other more specific HPJIT functions.  By
  90. analyzing cloned code, we produced reuse code and essentially did domain
  91. analysis at an ad hoc level.
  92.  
  93.   
  94.  
  95.  
  96.  
  97.    
  98.    
  99.  
  100.  
  101. The initial impetus behind the development of this reuse code was to avoid
  102. duplication of Pascal source code, but we also designed each routine for 
  103. maximum flexibility so as to be usable by transactions and modules yet to be
  104. developed. Through the use of flexible common utilities, we newrly
  105. eliminated the duplication of Pascal source code throughout the HP JIT
  106. software.
  107.  
  108.  
  109.  * Expansion to Other Products 
  110.  
  111. After the manufacturing release of the product, a couple of the team's
  112. members moved on to work on the rewrite of MM for a new operating system.
  113. This product was called MM-JIT/XL.  Much of the reused code written for the
  114. HPJIT product became the basis of the rewrite.  We felt that this reuse code
  115. could do a lot to increase the productivity and quality of the project.
  116.  
  117. Interestingly enough, we found out that using reused code for another
  118. product involved a certain amount of initial investment to begin with.  Some
  119. of the areas involved:
  120.  
  121.   
  122.        Training to help people understand when and how to use the reused
  123.   code.  Unless people knew what reuse code was available and how to use it,
  124.   it was impossible to expect engineers to write reusable code.
  125.  
  126.        Code templates to provide engineers with a framework for which to
  127.   write a transaction. This also turned out to be a form of reuse code
  128.   showing how the reuse code should be put together to create a standard
  129.   transaction. We found code templates essential in the beginning, but once
  130.   we had a working transaction, engineers used these transactions as their
  131.   code templates.
  132.  
  133.        Reuse code changes to support the new and larger scope of
  134.   functionality and user interface. The rewritten product was a much larger
  135.   product than HPJIT and had a different user interface. With such a large
  136.   product, it became very difficult to anticipate all changes to reuse code
  137.   ahead of time. We found the utilities changing a lot during the initial
  138.   few months of the project or anytime a new type of transaction was
  139.   developed.
  140.  
  141.        An initial investment of six engineering months with ongoing
  142.   additional effort of six engineering     months over a year and a half.  In
  143.   contrast, initial investment of HPJIT was one engineering month with
  144.   ongoing additional investment of six engineering months over a five month
  145.   period.  
  146.   
  147.        A new set of responsibilities that required engineers to make
  148.   ongoing modifications to reuse code as well as their code deliverables.
  149.   In addition, senior engineers served as what was called module
  150.   coordinators. Their responsibilities included facilitating communication,
  151.   promoting design consistency across the product, and optimizing
  152.   engineering productivity.  Module coordinators raised engineers' awareness
  153.   of reuse opportunities through the inspection process and could prevent an
  154.   engineer from proceeding to the next stage of development.
  155.   
  156.        Making reuse a part of the development process. We set up metrics to
  157.   help measure our progress. Our design and code inspection defect
  158.   categories involved the following:
  159.  
  160.     
  161.       Improper utility (reuse) usage
  162.       Redundant code
  163.       Creation of new utilities (reuse code)
  164.       Not using an already established utility (reuse code)
  165.    
  166.  
  167.  
  168.  
  169.  
  170. We also measured the NCSS (non-commented source statements) for the reuse
  171. code versus unique code. Figure 2 shows the breakdown of the code for each
  172. of the mini-releases (MRs, releases to our development partners).
  173. Architecture and application utilities categories represented the reused
  174. code and generated code was code created through a code generator.
  175.  
  176. Despite the fact that MPO cancelled this project to rewrite MM/3000, we took
  177. this reused code and some of the transactions from the rewrite as the basis
  178. for a new enhancement to MM/3000. This new enhancement added functionality
  179. needed by process industry manufacturers and MPO released this product in
  180. October of 1988.
  181.  
  182.   
  183.  
  184.  
  185.  
  186.    
  187.    
  188.  
  189.  
  190. Figure 3 shows distribution of the code for this enhancement to Materials
  191. Management called Process Repetitive Option (PRO).  The architecture
  192. category represents the reused code; the shared code represents reuse code
  193. that are not callable routines but is shared via include files; and
  194. generated code is code created through a code generator.  With shared and
  195. utilities this enhancement had a reuse percentage of 41.4 .
  196.  
  197.  
  198.  
  199.   
  200.  
  201.  
  202.  
  203.    
  204.    
  205.  
  206.  * Fix Process for Reuse 
  207.  
  208. The fix process for supporting a reuse product could be characterized by the
  209. following:
  210.  
  211.   
  212.  
  213.        Although reuse code tends to create smaller code units allowing for
  214.   smaller deliverables, there are more opportunities for coordination and
  215.   dependency issues. This situation requires a greater amount of teamwork
  216.   and egoless contribution since engineers become more dependent on each
  217.   other.  It also requires a commitment to reuse and flexibility to take
  218.   schedule slips and unanticipated changes.
  219.  
  220.        With more code components, it was sometimes difficult to identify a
  221.   component that caused the defect. Luckily, we had a trace facility built
  222.   in our tools layer that gave us the ability to trace our reuse code
  223.   without code changes.  With very minimal code changes, this trace facility
  224.   also gave us the ability to name the reuse code in the trace. We gradually
  225.   added these code changes to the reuse code when we repaired the code.
  226.  
  227.        Initially, when new products added the reuse code, there were many
  228.   changes in the reuse code required to accommodate various differences in
  229.   the transaction processing in these new products.
  230.  
  231.   Because of the testing effort involved with these utilities, we often got
  232.   to a point where we did a ``reset'' and fixed all backlogged change
  233.   requests and tested all at once. Since the volume of code changes was
  234.   large, a formal check out and check in of the code was not done.
  235.  
  236.   In some cases where the rework effort was too large, we replaced a piece
  237.   of reuse code with a new routine, essentially obsoleting the old code.
  238.   Whenever we scheduled changes in code that used the old routine, we would
  239.   evaluate whether the rework to call the new routine could be done at the
  240.   same time.
  241.  
  242.        As more products began to use the reuse code, we found that it
  243.   became necessary to isolate the product dependent parts of the code to
  244.   separate include files so that the same utility could be used by a new
  245.   product without much disruption to the products already using the utility.
  246.   These include files usually contained product specific information in a
  247.   table.  
  248.  
  249.   An example of this was a utility that displayed information on whether a
  250.   dataset record had been retrieved or not. We made the utility generic
  251.   across all products, but the details as to the user interface for the
  252.   error handling of each product sometimes varied, and we placed this in a
  253.   product-specific table.
  254.  
  255.        As the number of transactions and programs using reuse code grew,
  256.   the testing effort became an issue. We often could change the code rather
  257.   easily but had difficulty assessing the impact to other products, and as a
  258.   consequence, we spent a lot of time on the testing effort.
  259.  
  260.   We, in the beginning, felt that we needed to test each affected
  261.   transaction or program. As it became more and more obvious on the
  262.   impracticality of this approach, we found we needed to better assess the
  263.   impact to other products and only test the high risk components and/or
  264.   those components that gave us the most variation in pathflow in the reuse
  265.   code.
  266.  
  267.  
  268.  
  269.  
  270.  * Reuse Inspection and Metrics Analysis 
  271.  
  272. Encouraging the use of reuse code was included as an important part of our
  273. inspection process. Our design and test plan inspection included the
  274. following cause codes related to reuse:
  275.  
  276.   
  277.        Design Change
  278.       
  279.         Work-in-process utilities that should be considered
  280.      
  281.  
  282.        Enhancement
  283.       
  284.         Logic that should be made into a NEW application or
  285.       architecture utility
  286.      
  287.  
  288.        Utility Usage
  289.       
  290.         Defects in the parameter list
  291.         Defects in initialization of the parameter list
  292.         Incorrect usage of a utility
  293.         Not using an established utility
  294.      
  295.  
  296.  
  297.  
  298. Figures 4 and 5 show examples of the utility usage category for
  299. mini-releases releases to our development partners. The design change and
  300. enhancement categories also show up, but include areas other than reuse and
  301. unfortunately was not broken out. As we became more comfortable with our
  302. utility usage that category decreased, so much that we do not even track the
  303. category today.
  304.  
  305. We also track service requests from our customers that occur in reuse code
  306. and have found that the majority of the known problems tend to occur in the
  307. unique code and not in the reused code. For the process industry enhancement
  308. to Materials Management, customers reported 27 defects in 69,300 NCSS of
  309. reused and generated code versus the 56 defects reported against the 13,500
  310. NCSS of unique code. This results in approximately .4 defects/KNCSS in reuse
  311. code versus 4 defects/KNCSS in unique or a ten times improvement.
  312.  
  313.  
  314.  
  315.  
  316.   
  317.  
  318.  
  319.  
  320.    
  321.    
  322.  
  323.   
  324.  
  325.  
  326.  
  327.    
  328.    
  329.  
  330.  
  331.  * Current Situation  
  332.  
  333. MPO today has the following number of shared components:
  334.  
  335.   
  336. xxx   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     
  337. -   Shared (include files rather than callable routines)   9  
  338. -   Utilities (callable routines)                          200  
  339. -   Internal documentation for shared code and utilities   209  
  340. -   Data dictionary elements (approximation only)          40  
  341. -   Shared messages                                        210  
  342. -   Testing tools (created by MPO)                         16
  343.  
  344.  
  345. We have shared and reuse code broken down as follows:
  346.  
  347.   
  348. xxx   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx     
  349. -   Shared (include files rather than callable routines)   16,100 NCSS   
  350. -   Utilities (callable routines)                          24,900 NCSS  
  351. -   Generated                                              28,300 NCSS
  352.  
  353.  
  354. In addition to the above code, we have a tools layer of reuse code (not
  355. included in the above numbers) that provides the interface between our data
  356. customization and the application programs.
  357.  
  358. As more and more products began to use the reuse code, coordination issues
  359. began to cause unanticipated repair due to poor impact assessment of a
  360. change.  It was fairly easy for an engineer to assess the impact of their
  361. change in the product they were working on, but very difficult to assess the
  362. impact to other products. As a result, we found problems late in the process
  363. when the other product picked up the change and schedule delays resulted.
  364.  
  365. As this situation became more critical, we organized a group called the
  366. ``Shared Components Council''. We expanded the definition of reuse to be
  367. called shared components, since we found that reuse did not involve just
  368. code. We set up the following objectives for this group:
  369.  
  370.   
  371.  
  372.        Continue to evolve a process that allows for different groups to
  373.   work on shared components for different application release cycles with a
  374.   minimum of impact and rework to each application.  
  375.  
  376.        Communicate changes for shared components and proactively assess the
  377.   impact to each application.
  378.  
  379.        Foster a process that allows us to continually add to our library of
  380.   shared components and leverage from new utility development done by each
  381.   application with a minimum of duplicate code.
  382.  
  383.  
  384.  
  385.  
  386. Some of the strategies to address these objectives include:
  387.  
  388.   
  389.     Definition of the shared component process that include:
  390.  
  391.     
  392.       Update process: 
  393.           Process for informing people impacted by the change and how to
  394.           go about the impact assessment, and what steps should be
  395.           followed to make the change.
  396.       Checkout/checkin procedures: 
  397.           How to checkout and checkin components, what tags should be
  398.           used, and how the tags will be managed.
  399.       Synchronization process: 
  400.           Process for the creation of multiple versions of a shared
  401.           component and how these multiple versions will be merged back
  402.           to one version.
  403.       Release account management: 
  404.           How the latest version of shared components are distributed to
  405.               various products.
  406.       Testing strategy: 
  407.               What type of testing should be done and what should be
  408.           considered when testing a modification to a shared component.
  409.    
  410.  
  411.     Regular update to discuss future additions and changes to shared
  412.   components to assess their impact to other projects in the lab.
  413.  
  414.        Regular communication of changes to shared components during
  415.   critical periods, especially during different application releases to
  416.   determine priorities and schedule for incorporation.
  417.  
  418.        Regular communication of distribution processes to ensure that each
  419.   application is getting the version desired.
  420.  
  421.     Regular communication of new components to ensure that there is a
  422.   minimum of duplication or overlap.
  423.  
  424.  
  425.  
  426.  
  427.  * Benefits of the Reuse Program  
  428.  
  429.   
  430.  
  431.        Quality
  432.  
  433.   Reused code has much better quality than unique code. We have found that
  434.   reused code is much more thoroughly tested since it is used in so many
  435.   situations.  Although it is often difficult to make a good impact
  436.   assessment of changes, problems in code changes are revealed earlier.  The
  437.   large path flow coverage usually reveals problems before the release of
  438.   the product, due to the heavy usage of our reused code.  For this reason,
  439.   we place a high priority on stabilizing the utilities early in the
  440.   implementation phase.
  441.  
  442.   Relying on many shared utility procedures eliminates the risk of errors
  443.   caused by oversight and accident when replicating source code changes
  444.   throughout individual modules.
  445.  
  446.        Consistency and Standardization
  447.  
  448.   Perhaps the best benefit results from the consistency and standardization
  449.   that reuse code enforces.  We can now count on, for example, the
  450.   lineprinter to be opened the same way in the transactions and    programs
  451.   that use the utility.  Before, that same lineprinter routine existed in
  452.   dozens of places, each individually perhaps performing slightly, or in
  453.   some cases, drastically differently from the other.
  454.  
  455.   Eliminating code duplication not only reduces overall code length, but
  456.   also reduces source code clutter in individual modules, thereby helping to
  457.   preserve transaction clarity.
  458.  
  459.        Productivity
  460.     
  461.   Code maintenance and product enhancement are made simpler since a
  462.   correction or enhancement can often be made in a reuse module and effected
  463.   immediately throughout the entire application by replacement of the reuse
  464.   module alone.  
  465.  
  466.   Some reuse code can be used by similar software systems, saving time and
  467.   effort when developing and testing other products.
  468.  
  469.  
  470.  
  471.  
  472.  * Conclusions  
  473.  
  474.   
  475.  
  476.        Initial Investment
  477.     
  478.   There is some initial investment that must be done with any reuse program.
  479.   At MPO we started with a new product and then expanded it to other
  480.   existing products. Both the initial startup and the expansion does require
  481.   some effort in the development of the reuse code to begin with and the
  482.   enhancement and maintenance of the reuse code as new products use the
  483.   code. 
  484.  
  485.        Coordination Effort
  486.     
  487.   As more and more products use the reuse code, the coordination effort
  488.   between the products must be carefully managed. Impact assessment must be
  489.   accurately done to ensure that we do not introduce defects to other
  490.   products and rework is kept to a minimum.
  491.  
  492.        Long term versus short term productivity
  493.  
  494.   A reuse program requires both an initial investment and an ongoing
  495.   investment as new products and enhancement use the reuse code. In
  496.   addition, the coordination effort must be carefully managed. In the
  497.   beginning the investment may be high, but it is paid back in the long term
  498.   by better quality, more code consistency, and better supportability.
  499.  
  500.  
  501.  
  502.  
  503. The following summarizes the key benefits and the prerequisites to success:
  504.  
  505.      l  l     
  506. Benefits  & Prerequisites to Success     
  507. High quality &                        High initial investment  
  508. Consistency and standardization &     Detailed planning  
  509. Productivity                     &    High coordination between
  510.                                          engineering teams  
  511. Reduced support costs             &   Source code management system  
  512.                                  &    Testing strategy  
  513.                                   &   Documentation of reuse routines  
  514.                                  &    Defined maintenance process  
  515.                                  &    Measurement system that supports
  516.                        reuse     
  517.  
  518.  
  519.  
  520.  * Acknowledgments  
  521.  
  522. Thanks to Nancy Federman and Raj Bhargava for their support of the initial
  523. reuse program at MPO. Thanks also to Neal Clapper, Barb Williams, and Mike
  524. Levy for their continued support on this paper.
  525.  
  526.    bhar86 
  527.  
  528. Bhargava, Raj K., Lombardi, Teri L., Nishimoto, Alvina Y., and Passell,
  529. Robert A., `` New Methods for Software Development: System for
  530. Just-in-Time Manufacturing.''    HP Journal  37 (June 1986): 11-18.
  531.  
  532.  
  533.  
  534.  
  535.