Objectives: This study aims to investigate the readability and understandability of bitwise operators in programming, with the main hypothesis that there will be a difference in the performance metrics (response time and error rate) between participants exposed to various bitwise operators related questions and those who are not. Participants: Participants in this human research study include people without programming background, novice programmers, and university students with varying programming experience (from freshmen to PhD level). There were 23 participants in this study. Study Methods: This study uses a within-subjects experimental design to assess how people with diverse programming backgrounds understand and use bitwise operators. Participants complete tasks in a JavaScript program, and their task completion times and task accuracy are recorded for analysis. Findings: The results indicate that operators can be one of the factors predicting response time, showing a small but significant effect (R-squared = 0.032, F(1, 494) = 16.5, p < .001). Additionally, operators such as OR, NOT, and Left Shift showed statistical significance in task completion times compared to other operators. Conclusions: While the complexity of bitwise operators did not generally result in longer task completion times, certain operators were found to be less intuitive, suggesting the need for further investigation and potential redesign for improved understandability.
翻译:研究目的:本研究旨在探究编程中位运算符的可读性与可理解性,核心假设为:接触不同位运算符相关问题的参与者与未接触者在性能指标(响应时间与错误率)上存在差异。研究对象:本次人类研究对象包括无编程背景者、编程新手以及具备不同编程经验的大学生(从本科新生至博士研究生)。本研究共纳入23名参与者。研究方法:采用被试内实验设计,评估具有不同编程背景的个体对位运算符的理解与使用情况。参与者在JavaScript程序中完成任务,其任务完成时间与任务准确率均被记录用于分析。研究结果:结果表明运算符可作为预测响应时间的因素之一,呈现虽小但显著的影响效应(R² = 0.032,F(1, 494) = 16.5,p < .001)。此外,OR、NOT及左移运算符在任务完成时间上相较于其他运算符显示出统计学显著性。研究结论:尽管位运算符的复杂性通常不会导致更长的任务完成时间,但某些运算符的直观性较弱,这表明需要进一步研究并可能需重新设计以提升其可理解性。