  Cannabis is one of the most common mind-altering substances. It is used both
medicinally and recreationally and is enmeshed in a complex and changing legal
landscape. Anecdotal evidence suggests that some software developers may use
cannabis to aid some programming tasks. At the same time, anti-drug policies
and tests remain common in many software engineering environments, sometimes
leading to hiring shortages for certain jobs. Despite these connections, little
is actually known about the prevalence of, and motivation for, cannabis use
while programming. In this paper, we report the results of the first
large-scale survey of cannabis use by programmers. We report findings about 803
developers' (including 450 full-time programmers') cannabis usage prevalence,
perceptions, and motivations. For example, we find that some programmers do
regularly use cannabis while programming: 35% of our sample has tried
programming while using cannabis, and 18% currently do so at least once a
month. Furthermore, this cannabis usage is primarily motivated by a perceived
enhancement to certain software development skills (such as brainstorming or
getting into a programming zone) rather than medicinal reasons (such as pain
relief). Finally, we find that cannabis use while programming occurs at similar
rates for programming employees, managers, and students despite differences in
cannabis perceptions and visibility. Our results have implications for
programming job drug policies and motivate future research into cannabis use
while programming.
