Consider cultural bias in code examples

Monica Tie
3 min readNov 14, 2018

--

This morning I was watching a SQLite tutorial to see if it would fit a project I’m working on. The video gets to the part where the author is inserting names into the DB. https://youtu.be/QjICgmk31js?t=488

And he starts typing…

insert into employees(name) values(‘Max Eisenhardt’);
insert into employees(name) values(‘Pietro Maximoff’);
insert into employees(name) values(‘Wanda Maximoff’);
insert into employees(name) values(‘Mortimer Toynbee’);
insert into employees(name) values(‘Jason Wyngarde’);

At this point I’m getting distracted because I’m thinking, “Those are very specific names. Why is there only one female name? Why does the one female name share a last name with that second guy, Pietro? Is the one female employee married or related to that one male employee? That’s an interesting choice to make for an imaginary company. ”

Then I realized they are Marvel characters.

Then for fun I looked up how many female Marvel characters there are to see how many options he had to choose from.

A quick Google search comes up with: “only 26.7 percent of all DC and Marvel characters are female, and only 12 percent of mainstream superhero comics have female protagonists.”

Wow Marvel, that’s not a lot.

If you believe comic books have been historically made for men…

Source: https://fivethirtyeight.com/features/women-in-comic-books/

and considering Computer Science lost a lot of women in the 80’s…

% of women pursuing CS degrees started dropping dramatically in the 1980's.
Source: https://hackernoon.com/a-brief-history-of-women-in-computing-e7253ac24306

and this video is made from 2013 by a man who probably grew up absorbing gender imbalanced comic books…

then there’s a decent probability that I’m going to sit here distracted, not automatically understanding the innocent examples and the culture embedded within it.

What if I changed all the code examples everywhere to use

insert into employees(name) values(‘Rachel Chu’);
insert into employees(name) values(‘Eleanor Young’);
insert into employees(name) values(‘Nick Young’);
insert into employees(name) values(‘Goh Peik Lin’);
insert into employees(name) values(‘Astrid Leong-Teo’);

(Names of the main characters in Crazy Rich Asians)

Would other people stop and get confused? Or waste a few brain cycles trying to understand how the names connect each other? Or wonder what the relationship between Nick and Eleanor was? Or how one would even pronounce “Goh Peik Lin”? Or know that Peik Lin is female? Or that Rachel and Nick are love interests?! oh my!

At this point, I’ve rewatched that section of the video 3 times and made a medium post because I keep getting distracted by the names in the example.

I just wanted to learn SQLite!

— — —

As for you? I ask you to consider who your audience is when you’re writing a coding example.

What knowledge are you assuming readers would know?
Which demographic are your jokes and references intended for?
Who has a chance of being left out?
What do you want to do about it?

If you’re not sure, there’s always Crazy Rich Asians!

--

--