End-Users Reuse Code by Cloning Instead of Starting from Scratch

When programming, end users typically create programs that are specialized to the specific task at hand. When later faced with a similar (but not identical) task, people can sometimes reuse an existing program as a starting point, though doing so will typically require making some edits. For example, one study of CoScripter macro use found that "in many cases, a user initially created a script with a hard-coded value and then went back and generalized the script to reference the Personal Database [a parameter]" (Bogart et al., 2008). In another study of end users who created kiosk software for museum displays, every single interviewee reported sometimes making a copy of an existing program that he or she wanted to reuse, then editing the program to make it match new requirements (Brandt et al., 2008). Hoadley et al. (1996) refer to this form of reuse as "code cloning" because it so often involves making a copy of an existing program. However, as mentioned in the CoScripter macro study, end user programmers sometimes edit the original program directly in order to make it general enough to support more than one situation. Therefore, this general category of reuse might be better identified with the more widely accepted phrase "white box reuse."

— Reuse in the world of end user programmers - Christopher Scaffidi, Mary Shaw

  • Subtext 1 was about this - copying and modifying while propagating changes from the original (prototypes)
    • also, Apparatus of course
      • would be interesting to imagine Apparatus-like system but for "UI" - how would a "button" look like in an environment like this?
  • this is related to change-tracking -> if "branching" was "easy" it would be possible to branch of from the old program into the new one, without having to copy-paste
    • it seems necessary to still be able to access both versions somehow
    • and to have the branch follow changes to the "trunk" sometimes, like when fixing a bug that's in some core function in both applications
    • importantly, starting from scratch is not a desirable thing for end-users! - it's nicer to start from working foundation and adapt to new requirements
  • white-box vs black-box reuse:

    Class inheritance, or subclassing, allows a subclass' implementation to be defined in terms of the parent class' implementation. This type of reuse is often called white-box reuse. This term refers to the fact that with inheritance, the parent class implementation is often visible to the subclasses.

    Object composition is a different method of reusing functionality. Objects are composed to achieve more complex functionality. This approach requires that the objects have well-defined interfaces since the internals of the objects are unknown. Because objects are treated only as "black boxes," this type of reuse is often called black-box reuse.

    Object Composition vs. Inheritance