drafting "Sexual Dimorphism" to closing line (with many gaps)
[Ultimately_Untrue_Thought.git] / content / 2020 / survey-data-on-cis-and-trans-women-among-haskell-programmers.md
1 Title: Survey Data on Cis and Trans Women Among Haskell Programmers
2 Date: 2020-11-24 22:12
3 Category: other
4 Tags: Haskell, sex differences, Python, empirical
5
6 Stereotypically, computer programming is both a predominantly male profession and the quintessential profession of non-exclusively-androphilic trans women. Stereotypically, these demographic trends are even more pronounced in communities around "niche" or academic technologies (_e.g._, Haskell), rather than those with more established mainstream use (_e.g._, JavaScript).
7
8 But stereotypes can be _wrong_! The heuristic process by which people's brains form stereotypes from experience are riddled with cognitive biases that prevent our mental model of what people are like from matching what people are _actually_ like. Unless you believe [a woman is more likely to be a feminist bank teller than a bank teller (which is _mathematically impossible_)](https://en.wikipedia.org/wiki/Conjunction_fallacy#Definition_and_basic_example), you're best off seeking _hard numbers_ about what people are like rather than relying on mere stereotypes.
9
10 Fortunately, sometimes hard numbers are available! Taylor Fausak has been administering an annual State of Haskell survey [since 2017](https://taylor.fausak.me/2017/11/15/2017-state-of-haskell-survey-results/), and the [2018](https://taylor.fausak.me/2018/11/18/2018-state-of-haskell-survey-results/), [2019](https://taylor.fausak.me/2019/11/16/haskell-survey-results/), and [2020](https://taylor.fausak.me/2020/11/22/haskell-survey-results/) surveys included optional "What is your gender?" and "Do you identify as transgender?" questions. I wrote a script to use these answers from the published [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) response data for the 2018–2020 surveys to tally the number of cis and trans women among survey respondents. (In Python. Sorry.)
11
12 ```
13 import csv
14
15 survey_results_filenames = [
16     "2018-11-18-2018-state-of-haskell-survey-results.csv",
17     "2019-11-16-state-of-haskell-survey-results.csv",
18     "2020-11-22-haskell-survey-results.csv",
19 ]
20
21 if __name__ == "__main__":
22     for results_filename in survey_results_filenames:
23         year, _ = results_filename.split("-", 1)
24         with open(results_filename) as results_file:
25             reader = csv.DictReader(results_file)
26             total = 0
27             cis_f = 0
28             trans_f = 0
29             for row in reader:
30                 total += 1
31                 # 2018 and 2019 CSV header has the full question, but
32                 # 2020 uses sXqY format
33                 gender_answer = (
34                     row.get("What is your gender?") or row.get("s7q2")
35                 )
36                 if gender_answer == "Female":
37                     transwer = (
38                         row.get("Do you identify as transgender?") or
39                         row.get("s7q3")
40                     )
41                     if transwer == "No":
42                         cis_f += 1
43                     elif transwer == "Yes":
44                         trans_f += 1
45             print(
46                 "{}: total: {}, "
47                 "cis-♀: {} ({:.2f}%), trans-♀: {} ({:.2f}%)".format(
48                     year, total,
49                     cis_f, 100*cis_f/total,
50                     trans_f, 100*trans_f/total,
51                 )
52             )
53
54 ```
55
56 It prints this tally:
57
58 ```
59 2018: total: 1361, cis-♀: 26 (1.91%), trans-♀: 19 (1.40%)
60 2019: total: 1211, cis-♀: 16 (1.32%), trans-♀: 16 (1.32%)
61 2020: total: 1348, cis-♀: 12 (0.89%), trans-♀: 21 (1.56%)
62 ```
63
64 In this particular case, it looks like the stereotypes are true: only about 3% of Haskell programmers (who took the survey) are women, and they're about equally likely to be cis or trans. (There were more cis women in 2018, and more trans women in 2020, but the sample size is too small to infer a trend.) In contrast, the ratio of cis women to trans women in the general population is probably more like 85:1.[ref]A [2016 report](https://williamsinstitute.law.ucla.edu/publications/trans-adults-united-states/) by the Williams Institute at the University of California at Los Angeles estimated the trans share of the United States population at 0.58%, and (0.5−0.0058)/0.0058 ≈ 85.21.[/ref]