What’s in a Name? A Study of Identifiers

Dawn J Lawrie, Christopher Morrell, H. Feild, D. Binkley
{"title":"What’s in a Name? A Study of Identifiers","authors":"Dawn J Lawrie, Christopher Morrell, H. Feild, D. Binkley","doi":"10.1109/ICPC.2006.51","DOIUrl":null,"url":null,"abstract":"Readers of programs have two main sources of domain information: identifier names and comments. When functions are uncommented, as many are, comprehension is almost exclusively dependent on the identifier names. Assuming that writers of programs want to create quality identifiers (e.g., include relevant domain knowledge) how should they go about it? For example, do the initials of a concept name provide enough information to represent the concept? If not, and a longer identifier is needed, is an abbreviation satisfactory or does the concept need to be captured in an identifier that includes full words? Results from a study designed to investigate these questions are reported. The study involved over 100 programmers who were asked to describe twelve different functions. The functions used three different \"levels\" of identifiers: single letters, abbreviations, and full words. Responses allow the level of comprehension associated with the different levels to be studied. The functions include standard algorithms studied in computer science courses as well as functions extracted from production code. The results show that full word identifiers lead to the best comprehension; however, in many cases, there is no statistical difference between full words and abbreviations","PeriodicalId":377450,"journal":{"name":"14th IEEE International Conference on Program Comprehension (ICPC'06)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2006-06-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"167","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"14th IEEE International Conference on Program Comprehension (ICPC'06)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICPC.2006.51","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 167

Abstract

Readers of programs have two main sources of domain information: identifier names and comments. When functions are uncommented, as many are, comprehension is almost exclusively dependent on the identifier names. Assuming that writers of programs want to create quality identifiers (e.g., include relevant domain knowledge) how should they go about it? For example, do the initials of a concept name provide enough information to represent the concept? If not, and a longer identifier is needed, is an abbreviation satisfactory or does the concept need to be captured in an identifier that includes full words? Results from a study designed to investigate these questions are reported. The study involved over 100 programmers who were asked to describe twelve different functions. The functions used three different "levels" of identifiers: single letters, abbreviations, and full words. Responses allow the level of comprehension associated with the different levels to be studied. The functions include standard algorithms studied in computer science courses as well as functions extracted from production code. The results show that full word identifiers lead to the best comprehension; however, in many cases, there is no statistical difference between full words and abbreviations
名字里有什么?标识符研究
程序的读者有两个主要的域信息来源:标识符名称和注释。当函数不加注释时(许多函数都是这样),理解几乎完全依赖于标识符名称。假设程序的编写者想要创建质量标识符(例如,包括相关的领域知识),他们应该如何做呢?例如,概念名称的首字母是否提供了足够的信息来表示该概念?如果不是,并且需要一个更长的标识符,那么缩写是令人满意的还是需要在包含完整单词的标识符中捕获概念?本文报道了一项旨在调查这些问题的研究结果。这项研究涉及100多名程序员,他们被要求描述12种不同的功能。这些函数使用了三个不同级别的标识符:单个字母、缩写和完整的单词。反应允许与不同层次相关的理解水平被研究。这些函数包括计算机科学课程中学习的标准算法,以及从生产代码中提取的函数。结果表明,全词标识符的理解效果最好;然而,在很多情况下,全称词和缩写词之间并没有统计学上的区别
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信