[Paper Review] Reasoning from a schema and from an analog in software code reuse
This paper investigates cognitive mechanisms in software code reuse among experienced programmers, distinguishing between reasoning from a schema (structured mental template) and reasoning from an analog (comparative mapping to past solutions). Through an experimental study, it identifies that reuse is more effective when solutions are pre-structured (schema-based) rather than derived through analogical comparison, highlighting schema-based reasoning as a more efficient control mechanism in design and implementation.
The activity of design involves the decomposition of problems into subproblems and the development and evaluation of solutions. In many cases, solution development is not done from scratch. Designers often evoke and adapt solutions developed in the past. These solutions may come from an internal source, i.e. the memory of the designers, and/or from an external source. The goal of this paper is to analyse the characteristics of the cognitive mechanisms, the knowledge and the representations involved in the code reuse activity performed by experienced programmers. More generally, the focus is the control structure of the reuse activity. Data collected in an experiment in which programmers had to design programs are analyzed. Two code reuse situations are distinguished depending on whether or not the processes involved in reuse start before the elaboration of what acts as a source-solution. Our analysis highlights the use of reasoning from a schema and from an analog in the code reuse activity.
Motivation & Objective
- To understand the cognitive mechanisms underlying code reuse in experienced programmers.
- To differentiate between schema-based and analogical reasoning in software design.
- To analyze how prior knowledge and mental representations influence solution development.
- To investigate the control structure of the reuse process in real programming tasks.
- To evaluate the effectiveness of different reasoning strategies in software reuse scenarios.
Proposed method
- Conducted an experimental study with experienced programmers tasked with designing programs.
- Classified reuse activities into two types: those starting before source-solution elaboration (schema-based) and those starting after (analogical).
- Analyzed verbal protocols and design artifacts to identify reasoning patterns.
- Used qualitative analysis to distinguish between schema and analog reasoning in problem-solving processes.
- Focused on the role of mental representations and prior knowledge in shaping reuse strategies.
- Employed a controlled design task to compare cognitive control structures in reuse.
Experimental results
Research questions
- RQ1How do experienced programmers reason when reusing software code?
- RQ2What are the differences between schema-based and analogical reasoning in code reuse?
- RQ3When does the reuse process begin relative to the elaboration of a source solution?
- RQ4How do mental representations influence the reuse of software components?
- RQ5What control structures govern effective code reuse in programming tasks?
Key findings
- Schema-based reasoning, where a pre-existing structural template guides reuse, was found to be more efficient than analogical reasoning.
- Programmers who used schema-based reasoning produced more coherent and reusable code structures.
- Analogical reasoning often led to less effective solutions due to mismatches in structural mapping.
- The timing of reuse initiation—before or after source-solution elaboration—determined the reasoning mode used.
- Schema-based reasoning reduced cognitive load by providing a ready-made framework for adaptation.
- The study confirmed that experienced programmers rely more on internalized schemas than on external analogs in complex design tasks.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.