It’s no secret that I like Python. A lot. It is a powerful object-oriented language that can handle linear algebra, graphics, complex statistics, and basically anything else you might want to throw at it. As far as programming languages go, it’s one of the easiest to learn.
The popular webcomic xkcd.com illustrates (with some hyperbole) how easy it is to use Python.
These two features (power and ease) are what make it a great social justice language. Allow me to elaborate.
A little backstory
You probably know that women and under-represented minorities (URMs) are, well, under-represented in science. They are especially under-represented in computer science.
Where other STEM fields have seen a lot of success in gender equity, computer science has seen a DECREASE. Source: NPR.org
Barriers into computer science
Okay, so. This is a problem. Why?
Maria Klawe looked at introductory computer science courses in college campuses, and identified several barriers to women’s access to computer science:
- Lack of formal education early on
- Feeling overwhelmed in introductory courses
- Feeling disconnected from the content
- The image of geeky, unpopular boys dominates
- Bored during class
Let’s look at each of these issues and see why Python is a good fit to counter them.
Lack of formal education early on
The problem: Women and URMs often don’t take computer science courses in high school. Oftentimes this is because they’re unavailable: only 49% of African Americans and 53% of Latinxs attend schools with computer science classes.
The Python solution: We need to increase the availability of free coding resources. Not only that, but those resources need to be friendly to use. Python is perfect for someone who has never coded before: it uses English words to convey its meaning. No archaic and indecipherable curly braces here. The whitespace layout is visually appealing and easy to picture. For these reasons, Python and Lua are probably the most user-friendly languages.
Why am I not recommending Lua, then? Because it’s not as powerful, and that means it is not used in most professional settings. Python is powerful. If you learn Python, you have learned a programming language that you can take with you through the rest of your career. If URMs start learning Python, they will have a much more solid coding foundation moving onward.
Feeling overwhelmed in introductory courses
I think everyone knows the feeling of taking a class that’s maybe a bit… over your head? And on top of that, you have the stinky know-it-all in the corner whose hand constantly shoots up and has all of the answers. Why is it SO EASY for that one person? Maybe you’re not cut out for this, and should just quit… I’ve been there. It’s a very human experience.
The truth about that know-it-all, though, is that they probably have been coding at home for a long time. Klawe’s solution was to separate those who have had previous coding experience from those who do not. That’s, unfortunately, a bit beyond even Python’s capabilities.
What is the Pythonic solution to this problem? Teach Python in introductory courses. At the risk of sounding like a broken record, Python is very easy to learn compared to, say, Java or C. When learning code from scratch, the most important thing is that you understand the structure and logic of algorithms. Once you understand the underlying structure, then picking up another language is much easier. Most languages have a fairly complicated syntax, but the syntax isn’t the interesting part about learning to code– writing code is! When a new coder sees words that they can read the concepts they’re working with, they are much more likely to continue coding.
Feeling disconnected from the content
Again, from Klawe: there’s a stereotype of a “computer scientist” being a socially inept white male. Indeed, one study by Cheryan et. al. showed that hanging pictures of Star Trek can turn women off of science. If coding turns you into a social reject, or worse– was never “meant” for someone of your skin tone or gender identity (SHUDDER), wouldn’t you feel pressure away from the field?
The Python solution: Make it easy to adapt your code for real-life applications. Python uses package imports in a very intuitive fashion (see the xkcd comic above). As you’d expect, there are python packages for science, linear algebra, and plotting. There are also packages that new programmers would find incredibly appealing: game libraries, medical image processing, interactive notebooks, web scraping capabilities, and much much more.
Python is engaging in ways that other languages are not, and it is perfect for jump-starting the new computer scientist into the world of powerful, object-oriented programming.
In Summary- Python is a social justice programming language
Python’s clear English-based syntax is easy to learn and intuitive compared to other programming languages. This makes it more accessible to those who don’t have a formal computer science background or who find themselves in a position requiring self-learning.
The sheer variety of packages that Python supports keep the language dynamic and interesting– there’s something for everyone. This helps to keep the new computer scientist engaged so they continue to learn more. They can pick up coding projects that matter to them and to their communities.
Python’s vast package library and object-oriented base keep it in the running for powerful coding languages. It is used in industries (especially, and I can attest to this, in academia within the physical sciences) worldwide. Learning Python is a useful skill that the new computer scientist will use throughout their career.
Am I saying Python is always the correct choice for programming? No, of course not. Nothing beats FORTRAN’s matrix algebra. The stability, portability, and efficiency of C cannot be denied. There will always be an optimal language for your current project. For me, my desire to educate others about the wonders of computer science means that Python will be my go-to language, because as far as initiating badass new scientists is concerned, nothing is better.