一句话:首个受控观察研究发现,大麻在生态有效剂量下显著损害编程表现:程序缺陷更多、耗时更长。
该论文针对程序员使用大麻对编程能力影响缺乏证据、说法相互矛盾的问题,开展了首个受控观察性研究。研究采用被试内设计,招募 70 余名参与者,在生态有效剂量下对比其中毒与清醒状态下的编程表现。结果显示,大麻显著损害编程表现:中毒时编写的程序含有更多缺陷且耗时更长(p < 0.05,效应量为小到中等,0.22 ≤ d ≤ 0.44);同时未发现中毒状态下会生成更多发散性(多样性)解决方案的证据。不过,程序员即使在中毒时也能较准确地评估自身编程表现的差异(r = 0.59)。作者希望该研究能为循证政策制定提供依据,并帮助开发者就编程时使用大麻做出知情决策。
Anecdotal evidence of cannabis use by professional programmers abounds. Recent studies have found that some professionals regularly use cannabis while programming, even for work-related tasks. However, accounts of the impacts of cannabis on programming vary widely and are often contradictory. For example, some programmers claim that it impairs their ability to generate correct solutions, while others claim it enhances creativity and focus. There remains a need for an empirical understanding of the true impacts of cannabis on programming. This paper presents the first controlled observational study of cannabis's effects on programming ability. Based on a within-subjects design with over 70 participants, we find that, at ecologically valid dosages, cannabis significantly impairs programming performance. Programs implemented while high contain more bugs and take longer to write (p < 0.05) --- a small to medium effect (0.22 ≤ d ≤ 0.44). We also did not find any evidence that high programmers generate more divergent solutions. However, programmers can accurately assess differences in their programming performance (r = 0.59), even when under the influence of cannabis. We hope that this research will facilitate evidence-based policies and help developers make informed decisions regarding cannabis use while programming.
@inproceedings{paperbot11440,
title = {High Expectations: An Observational Study of Programming and Cannabis Intoxication},
author = {Wenxin He and Manasvi Parikh and Westley Weimer and Madeline Endres},
booktitle = {ICSE},
year = {2024},
doi = {10.1145/3597503.3639145}
}