From Code to Contentment: How Domain Libraries Pivot Software Quality
Analysis of the effects of software reuse on customer satisfaction in an RPG environment
This paper presents an empirical study investigating the impact of structured software reuse on customer satisfaction within an industrial RPG environment. By comparing two mid-sized projects—one using ad-hoc reuse and the other utilizing a domain-specific library—the authors demonstrate that systematic reuse significantly reduces Customer Complaint Density (CCD).
TL;DR
Does reusing code actually make your customers happier? While we often assume "reusability" equals "efficiency," this study provides the empirical proof that systematic reuse—specifically through domain-specific libraries—directly slashes customer complaints. By analyzing two real-world RPG projects, the researchers found that structured reuse transforms the relationship between code volume and defects, leading to a statistically significant boost in perceived product quality.
Contextual Positioning
In the landscape of Software Engineering (SE), reuse is often discussed in the context of "Productivity" (how fast can we build?). This paper shifts the coordinate system toward "Quality" and "Customer Satisfaction." It moves beyond the student-project experiments typical of the 90s into a rigorous industrial analysis of mid-sized business systems.
The Problem: The "Ad-Hoc" Reuse Trap
Prior to this study, managers faced a dilemma: investing in a Domain-Specific Library requires upfront time and effort. Without objective data, it’s hard to justify this costs. Furthermore, "Ad-Hoc" reuse (copy-pasting or haphazardly calling utility functions) often leads to a "spaghetti" effect where defects actually increase with reuse because the reused components aren't hardened for the specific domain.
The authors observed that in Project 1 (No Library), higher reuse actually correlated with more complaints. This is the "Ad-Hoc Trap" where undisciplined reuse introduces hidden complexities.
Methodology: Measuring the Impact
The researchers tracked two projects over 12 months.
- Project 1: Standard development, only general-purpose libraries, ad-hoc reuse.
- Project 2: Built a domain-specific library first, then implemented the product.
They utilized three core reuse metrics adapted for the RPG language structures (exsr, call, and copy):
- External Reuse Level (ERL): The ratio of external items to total items.
- External Reuse Frequency (ERF): How often those items are called.
- External Reuse Density (ERD): The frequency of external calls normalized by Lines of Code (LOC).
The "Ground Truth" for satisfaction was Customer Complaint Density (CCD), defined as the number of validated customer complaints per file size.
Figure 1: The transition from ad-hoc development to a library-centric systematic reuse process.
The "Pivot" in Results
The most striking finding is the reversal of the correlation slope.
- In the project without a domain library, reuse was positively correlated with complaints (more reuse = more bugs).
- In the project with a domain library, the correlation flipped (more reuse = significantly fewer bugs).
Figure 2: The comparison of linear regressions showing CCD vs. Reuse Density. Note how Project 2 (Library) shows a downward trend in complaints as reuse increases.
Key Statistical Wins:
- CCD Reduction: Significant at the p < 0.025 level.
- Independence from Complexity: The study used Cyclomatic Complexity (CC) and Halstead Volume (V) to ensure that the quality gain wasn't just because the code was "simpler"—it was specifically due to the reuse strategy.
- Reuse Density Enhancement: The structured library led to a higher overall density of reused code (p < 0.048).
Critical Insights: Why Does it Work?
The authors suggest that a domain library induces "More Disciplined Reuse." When developers have a vetted, domain-specific toolkit:
- They make fewer logic errors by calling "hardened" functions.
- The "Interface" becomes a contract that reduces integration bugs.
- Maintenance is centralized; a fix in the library resolves complaints across multiple programs.
Summary & Limitations
This work provides a foundational argument for Domain-Driven Design (DDD) and systematic library management. However, it is important to note its boundaries:
- Environment: The results are highly specific to RPG/Business environments.
- Metric Breadth: "Customer Satisfaction" is a multidimensional construct; the paper focuses primarily on complaints (defects), ignoring other factors like user experience or performance.
- Productivity: Interestingly, the study noted no major gain in development time for Project 2, likely due to the "learning curve" and the time taken to build the library itself. The payoff is in long-term quality, not immediate speed.
Future Outlook
As we transition into an era where AI (LLMs) performs the "reuse" by generating code from existing patterns, the lesson of this paper remains vital: Systematic, library-based structures are superior to ad-hoc generation. Future research should explore if LLMs are better at generating code when "constrained" by a domain-specific library API versus writing raw logic from scratch.
