paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Linking Code Readability, Structure, and Comprehension Among Novices: It's Complicated

关联新手代码可读性、结构与理解:情况很复杂
ICSE 2019 IEEE/ACM 41st International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET)2019匹配度 1/10 · 该论文属于编程教育与人因研究,关注新手对代码可读性、结构与理解的关系,不涉及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心方向。仅在“开发者工具/编程环境”标签上有一点点泛化关联,因此匹配度很低。引用 39 inbox
Eliane S. Wiese, Anna N. Rafferty, Armando Fox
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:研究 231 名新手对代码风格与可读性的判断,发现可读性偏好与代码理解相分离,并能预测其编码选择。

新手写出的功能正确代码常冗余、啰嗦或不地道,但原因不明:是语言理解肤浅,还是不熟悉专家风格?论文让 231 名新手对覆盖七个主题的代码片段进行风格与可读性评判;每组片段功能相同,分别采用常见新手写法或更优雅的专家写法。结果显示,76% 的新手认为专家片段风格最好,仅 64% 认为其最可读;但无论可读性偏好如何,两组片段的理解表现相近。在一个主题的代码编写任务中,可读性偏好还能预测学生的编写模式。作者认为,偏好新手写法未必意味着深刻误解,而更多反映写作选择;轻量工具可提示常见模式与专家解法,并帮助学生认识专家解法更可读。

问题
探究新手为何写出冗余或不地道代码:这反映对语言理解不深,还是不熟悉专家代码结构与风格。
方法
231 名新手对七个主题的代码片段进行风格和可读性评判;片段功能相同,分常见新手模式与专家模式,并含一个代码编写任务。
评估
比较风格偏好、可读性判断与理解表现,并检验偏好对编写模式的预测力;发现偏好与理解分离。
原文摘要(Abstract)

Novices' functionally-correct code is often redundant, verbose, or un-idiomatic. Such code could indicate shallow understanding of the programming language, or unfamiliarity with experts' preferences for code structure. Understanding why novices write poorly is important for designing instruction and tools to help novices write elegantly. 231 novices judged style and readability for sets of code snippets targeting seven topics. Within each set, functionality was the same, but the writing followed either common novice patterns or a more elegant, "expert" pattern. Overall, 76% of novices thought the "expert" snippets had the best style, but only 64% said those snippets were most readable. However, comprehension was similar for both "expert" and novice patterns, regardless of readability preferences. This suggests that students who prefer novice patterns do not necessarily have deep misunderstandings about the programming language. One topic included a code-writing task, and students' readability preferences were predictive of their code-writing patterns, suggesting that readability preferences reflect writing choices rather than comprehension. Thus, novices may benefit from lightweight tools that identify common patterns and suggest an "expert" solution, while helping them see that the "expert" solution is more readable than they think.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{WieseRF19,
  title = {Linking Code Readability, Structure, and Comprehension Among Novices: It's Complicated},
  author = {Eliane S. Wiese and Anna N. Rafferty and Armando Fox},
  booktitle = {ICSE},
  year = {2019},
  doi = {10.1109/icse-seet.2019.00017}
}