开发者如何评价源代码可读性规则的眼动追踪视角

Cole S. Peterson, Kang-il Park, Isaac Baysinger, Bonita Sharif
{"title":"开发者如何评价源代码可读性规则的眼动追踪视角","authors":"Cole S. Peterson, Kang-il Park, Isaac Baysinger, Bonita Sharif","doi":"10.1109/ASEW52652.2021.00037","DOIUrl":null,"url":null,"abstract":"Writing readable source code is generally considered good practice because it reduces comprehension time for both the original developer and others that have to read and maintain it. We conducted a code readability rating study using eye tracking equipment as part of a larger project where we compared pairs of Java methods side by side. The methods were written such that one followed a readability rule and the other did not. The participants were tasked with rating which method they considered to be more readable. An explanation of the rating was also optionally provided. Eye tracking data was collected and analyzed during the rating process. We found that developers rated the snippet in the pair of methods that avoided nested if statements as more readable on average. There was no clear preference in the use of do-while statements. In addition, more developer fixation attention was on the snippet that avoided do while loops and the snippet pairs relating to nested if statements had more equal fixation attention across the snippets.","PeriodicalId":349977,"journal":{"name":"2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-11-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"An Eye Tracking Perspective on How Developers Rate Source Code Readability Rules\",\"authors\":\"Cole S. Peterson, Kang-il Park, Isaac Baysinger, Bonita Sharif\",\"doi\":\"10.1109/ASEW52652.2021.00037\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Writing readable source code is generally considered good practice because it reduces comprehension time for both the original developer and others that have to read and maintain it. We conducted a code readability rating study using eye tracking equipment as part of a larger project where we compared pairs of Java methods side by side. The methods were written such that one followed a readability rule and the other did not. The participants were tasked with rating which method they considered to be more readable. An explanation of the rating was also optionally provided. Eye tracking data was collected and analyzed during the rating process. We found that developers rated the snippet in the pair of methods that avoided nested if statements as more readable on average. There was no clear preference in the use of do-while statements. In addition, more developer fixation attention was on the snippet that avoided do while loops and the snippet pairs relating to nested if statements had more equal fixation attention across the snippets.\",\"PeriodicalId\":349977,\"journal\":{\"name\":\"2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW)\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2021-11-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ASEW52652.2021.00037\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 36th IEEE/ACM International Conference on Automated Software Engineering Workshops (ASEW)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ASEW52652.2021.00037","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

编写可读的源代码通常被认为是一种良好的实践,因为它减少了原始开发人员和其他必须阅读和维护它的人的理解时间。作为一个大型项目的一部分,我们使用眼动追踪设备进行了一个代码可读性评级研究,在这个项目中,我们并排比较了成对的Java方法。编写方法时,一个遵循可读性规则,另一个不遵循可读性规则。参与者被要求评价他们认为哪种方法更具可读性。还可选地提供了对评级的解释。在评分过程中收集和分析眼动追踪数据。我们发现,开发人员平均认为避免嵌套if语句的方法对中的代码片段更具可读性。在使用do-while语句方面没有明显的偏好。此外,更多的开发人员关注的是避免do while循环的代码片段,而与嵌套if语句相关的代码片段对在代码片段中有更多的关注。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
An Eye Tracking Perspective on How Developers Rate Source Code Readability Rules
Writing readable source code is generally considered good practice because it reduces comprehension time for both the original developer and others that have to read and maintain it. We conducted a code readability rating study using eye tracking equipment as part of a larger project where we compared pairs of Java methods side by side. The methods were written such that one followed a readability rule and the other did not. The participants were tasked with rating which method they considered to be more readable. An explanation of the rating was also optionally provided. Eye tracking data was collected and analyzed during the rating process. We found that developers rated the snippet in the pair of methods that avoided nested if statements as more readable on average. There was no clear preference in the use of do-while statements. In addition, more developer fixation attention was on the snippet that avoided do while loops and the snippet pairs relating to nested if statements had more equal fixation attention across the snippets.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术官方微信