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 for this study. Study Methods: This study uses an Within-Subjects Experimental Design to assess how people with diverse programming backgrounds understand and use bitwise operators. Participants complete tasks in JavaScript program, and their task completion time and accuracy of the tasks are recorded for analysis. Findings: The results indicate that operators can be one of the factors predicting response time, with a small but significant effect, with R-squared 0.032, (1, 494) = 16.5, p < .001. Additionally, some operators like 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<0.001)。此外,OR、NOT与左移位等运算符在任务完成时间上相较于其他运算符呈现统计学显著性。结论:尽管位运算符的复杂性通常未导致更长的任务完成时间,但某些运算符的直观性较低,这表明需要进一步研究并可能需重新设计以提升其可理解性。