Assessing the Effect of Programming Language and Task Type On Eye Movements of Computer Science Students

IF 3.2 3区 工程技术 Q1 EDUCATION, SCIENTIFIC DISCIPLINES ACM Transactions on Computing Education Pub Date : 2023-11-14 DOI:10.1145/3632530
Niloofar Mansoor, Cole S. Peterson, Michael D. Dodd, Bonita Sharif
{"title":"Assessing the Effect of Programming Language and Task Type On Eye Movements of Computer Science Students","authors":"Niloofar Mansoor, Cole S. Peterson, Michael D. Dodd, Bonita Sharif","doi":"10.1145/3632530","DOIUrl":null,"url":null,"abstract":"Background and Context: Understanding how a student programmer solves different task types in different programming languages is essential to understanding how we can further improve teaching tools to support students to be industry-ready when they graduate. It also provides insight into students’ thought processes in different task types and languages. Few (if any) studies investigate whether any differences exist between the reading and navigation behavior while completing different types of tasks in different programming languages. Objectives: We investigate whether the use of a certain programming language (C++ vs. Python) and type of task (new feature vs. bug fixing) has an impact on performance and eye movement behavior in students exposed to both languages and task types. Participants: Fourteen students were recruited from a Python course that taught Python as an introductory programming language. Study Method: An eye tracker was used to track how student programmers navigate and view source code in different programming languages for different types of tasks. The students worked in the Geany IDE (used also in their course) while eye tracking data was collected behind the scenes making their working environment realistic compared to prior studies. Each task type had a Python and C++ version, albeit on different problems to avoid learning effects. Standard eye tracking metrics of fixation count and fixation durations were calculated on various areas of the screen and on source code lines. Normalized versions of these metrics were used to compare across languages and tasks. Findings: We found that the participants had significantly longer average fixation duration and total fixation duration adjusted for source code length during bug fixing tasks than the feature addition tasks, indicating bug fixing is harder. Furthermore, participants looked at lines adjacent to the line containing the bug more often before looking at the buggy line itself. Participants who added a new feature correctly made their first edit earlier compared to those who failed to add the feature. Tasks in Python and C++ have similar overall fixation duration and counts when adjusted for character count. The participants spent more time fixating on the console output while doing Python tasks. Overall, task type has a bigger effect on the overall fixation duration and count compared to the programming language. Conclusions: CS educators can better support students in debugging their code if they know what they typically look at while bug fixing. For new feature tasks, training students not to fear edits to learn about the code could also be actively taught and encouraged in the classroom. CS education researchers can benefit by building better IDE plugins and tools based on eye movements that guide novices in recognizing bugs and aid in adding features. These results will lead to updating prior theories on mental models in program comprehension of how developers read and understand source code. They will eventually help in designing better programming languages and better methods of teaching programming based on evidence on how developers use them.","PeriodicalId":48764,"journal":{"name":"ACM Transactions on Computing Education","volume":"10 9","pages":"0"},"PeriodicalIF":3.2000,"publicationDate":"2023-11-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM Transactions on Computing Education","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3632530","RegionNum":3,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"EDUCATION, SCIENTIFIC DISCIPLINES","Score":null,"Total":0}
引用次数: 0

Abstract

Background and Context: Understanding how a student programmer solves different task types in different programming languages is essential to understanding how we can further improve teaching tools to support students to be industry-ready when they graduate. It also provides insight into students’ thought processes in different task types and languages. Few (if any) studies investigate whether any differences exist between the reading and navigation behavior while completing different types of tasks in different programming languages. Objectives: We investigate whether the use of a certain programming language (C++ vs. Python) and type of task (new feature vs. bug fixing) has an impact on performance and eye movement behavior in students exposed to both languages and task types. Participants: Fourteen students were recruited from a Python course that taught Python as an introductory programming language. Study Method: An eye tracker was used to track how student programmers navigate and view source code in different programming languages for different types of tasks. The students worked in the Geany IDE (used also in their course) while eye tracking data was collected behind the scenes making their working environment realistic compared to prior studies. Each task type had a Python and C++ version, albeit on different problems to avoid learning effects. Standard eye tracking metrics of fixation count and fixation durations were calculated on various areas of the screen and on source code lines. Normalized versions of these metrics were used to compare across languages and tasks. Findings: We found that the participants had significantly longer average fixation duration and total fixation duration adjusted for source code length during bug fixing tasks than the feature addition tasks, indicating bug fixing is harder. Furthermore, participants looked at lines adjacent to the line containing the bug more often before looking at the buggy line itself. Participants who added a new feature correctly made their first edit earlier compared to those who failed to add the feature. Tasks in Python and C++ have similar overall fixation duration and counts when adjusted for character count. The participants spent more time fixating on the console output while doing Python tasks. Overall, task type has a bigger effect on the overall fixation duration and count compared to the programming language. Conclusions: CS educators can better support students in debugging their code if they know what they typically look at while bug fixing. For new feature tasks, training students not to fear edits to learn about the code could also be actively taught and encouraged in the classroom. CS education researchers can benefit by building better IDE plugins and tools based on eye movements that guide novices in recognizing bugs and aid in adding features. These results will lead to updating prior theories on mental models in program comprehension of how developers read and understand source code. They will eventually help in designing better programming languages and better methods of teaching programming based on evidence on how developers use them.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
程序语言和任务类型对计算机专业学生眼动的影响
背景和背景:了解学生程序员如何用不同的编程语言解决不同类型的任务,对于理解我们如何进一步改进教学工具以支持学生在毕业时为行业做好准备至关重要。它还提供了洞察学生在不同任务类型和语言中的思维过程。很少有(如果有的话)研究调查在用不同的编程语言完成不同类型的任务时,阅读和导航行为之间是否存在任何差异。目的:我们调查使用某种编程语言(c++ vs. Python)和任务类型(新功能vs. bug修复)是否会对暴露于语言和任务类型的学生的表现和眼动行为产生影响。参与者:从Python课程中招募了14名学生,该课程将Python作为入门编程语言进行教授。研究方法:使用眼动仪跟踪学生程序员如何浏览和查看不同类型任务的不同编程语言的源代码。学生们在Geany IDE中工作(也在他们的课程中使用),同时在幕后收集眼动追踪数据,使他们的工作环境与之前的研究相比更加真实。每种任务类型都有一个Python和c++版本,尽管是针对不同的问题,以避免学习效果。在屏幕的不同区域和源代码行上计算注视计数和注视持续时间的标准眼动跟踪度量。这些指标的标准化版本用于跨语言和任务进行比较。结果发现:在bug修复任务中,参与者的平均注视时间和经过源代码长度调整的总注视时间明显长于特征添加任务,表明bug修复难度较大。此外,在查看有bug的行本身之前,参与者更频繁地查看包含有bug的行相邻的行。与那些没有添加新功能的参与者相比,正确添加新功能的参与者更早地进行了第一次编辑。Python和c++中的任务在根据字符数进行调整时具有相似的总固定时间和计数。参与者在执行Python任务时花更多的时间关注控制台输出。总体而言,与编程语言相比,任务类型对整体注视时间和计数的影响更大。结论:如果CS教育者知道他们在修复bug时通常会看到什么,他们可以更好地支持学生调试他们的代码。对于新的功能任务,训练学生不要害怕编辑来学习代码也可以在课堂上积极地教授和鼓励。计算机科学教育研究人员可以通过基于眼球运动构建更好的IDE插件和工具来受益,这些插件和工具可以指导新手识别漏洞并帮助添加功能。这些结果将导致更新先前关于开发人员如何阅读和理解源代码的程序理解中的心智模型的理论。它们最终将有助于设计更好的编程语言,以及基于开发人员如何使用它们的证据的更好的编程教学方法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
ACM Transactions on Computing Education
ACM Transactions on Computing Education EDUCATION, SCIENTIFIC DISCIPLINES-
CiteScore
6.50
自引率
16.70%
发文量
66
期刊介绍: ACM Transactions on Computing Education (TOCE) (formerly named JERIC, Journal on Educational Resources in Computing) covers diverse aspects of computing education: traditional computer science, computer engineering, information technology, and informatics; emerging aspects of computing; and applications of computing to other disciplines. The common characteristics shared by these papers are a scholarly approach to teaching and learning, a broad appeal to educational practitioners, and a clear connection to student learning.
期刊最新文献
Evaluating ChatGPT-4 Vision on Brazil’s National Undergraduate Computer Science Exam Understanding Informatics in Continuing Vocational Education and Training Data in Germany Intent and Extent: Computer Science Concepts and Practices in Integrated Computing Creating Apps for Community and Social Good: Preliminary Learning Outcomes from a Middle School Computer Science Curriculum Doing and Defining Interdisciplinarity in Undergraduate Computing
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1