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)
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
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 ↗
446 words last tended to on 2022-12-09 — let me know what you think