[论文解读] Reasoning from a schema and from an analog in software code reuse
本文研究了资深程序员在软件代码复用中的认知机制,区分了基于模式(结构化心智模板)的推理与基于类比(对过去解决方案的对比映射)的推理。通过一项实验研究,发现当解决方案采用预结构化方式(基于模式)而非通过类比比较推导时,复用更为有效,强调了基于模式的推理在设计与实现中作为更高效控制机制的作用。
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.
研究动机与目标
- 理解资深程序员在代码复用中的认知机制。
- 区分软件设计中基于模式与类比推理的差异。
- 分析先前知识与心智表征如何影响解决方案的构建。
- 研究真实编程任务中复用过程的控制结构。
- 评估不同推理策略在软件复用场景中的有效性。
提出的方法
- 对资深程序员开展实验研究,任务为设计程序。
- 将复用活动分为两类:在源代码解决方案详细设计之前启动的(基于模式)与在之后启动的(类比)。
- 通过分析口头报告与设计成果,识别推理模式。
- 采用定性分析方法,区分问题解决过程中基于模式与类比的推理。
- 关注心智表征与先前知识在塑造复用策略中的作用。
- 采用受控设计任务,比较复用中认知控制结构的差异。
实验结果
研究问题
- RQ1资深程序员在复用软件代码时如何进行推理?
- RQ2在代码复用中,基于模式与类比推理有何不同?
- RQ3复用过程是在源代码解决方案详细设计之前还是之后开始?
- RQ4心智表征如何影响软件组件的复用?
- RQ5何种控制结构主导了编程任务中有效的代码复用?
主要发现
- 基于模式的推理(即利用预先存在的结构化模板指导复用)比类比推理更为高效。
- 采用基于模式推理的程序员生成了更具连贯性与可复用性的代码结构。
- 类比推理常因结构映射不匹配而导致效果较差的解决方案。
- 复用启动时间(在源代码解决方案详细设计之前或之后)决定了所采用的推理模式。
- 基于模式的推理通过提供即用型框架来适应,降低了认知负荷。
- 本研究证实,资深程序员在复杂设计任务中更依赖内化的模式,而非外部类比。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。