Research Regarding Reusability
Chris Drexelius, Scott Stauffer, Jodie Boyer, Nick John
Overview: The current trend in computer science is object-oriented programming. Object-oriented methods became extremely popular in the late 1970’s. Since then, computer scientists have relaxed their criticisms of this programming method, although its advantages have never been clearly defined. Herein, our purpose with this experiment is to examine the advantages of object-oriented programming over procedural programming. Programming languages can be compared based on six key points: maintainability, reusability, speed of execution, speed of programming, accuracy, and code readability. We decided to focus on reusability because we felt that, given timing and other constraints, this area would be the most rewarding.
Problem Statement: Does object-oriented programming significantly increase code reusability over procedural programming?
Hypothesis: Object-oriented programming significantly increases code reusability.
Null Hypothesis: Object-oriented programming does not provide a significant increase over procedural programming with regard to code reuse.
Experiment: The experiment we conducted first involved subjects selecting a language in which to conduct the experiment: Java or C. They were then given a program implementing Blackjack in their selected language which they were allowed to review. Subjects were next provided with a short tutorial with regard to the rules of the card game Turbo 21. Finally, they were asked to implement a Turbo 21 card game after being told that they were allowed to reuse as little or as much of the Blackjack code as they desired.
Analysis: We decided to measure reusability based on the MOSS score generated between the original Blackjack program and the Turbo 21 programs written by the subjects. MOSS is an accepted program which is used to determine commonality between written code.
Results: Based on the results of the MOSS scores, it appears that the null hypothesis would be supported; however, as we looked more into MOSS results, we were not convinced that this was the best way to measure reusability. We questioned the applicability of MOSS after running baseline experiments and seeing that different languages are scored differently. Also the limited number of participates does not allow us to make an official conclusion.
Project Continuation: Ideally this experiment would be done through two different courses that cover the same information, but in different languages. This would allow for a larger data set and help to eliminate the differences in subjects’ knowledge of the languages. In addition, with regard to our specific experiment, it would be ideal if the original code and baselines were written by 3rd parties to help reduce bias.