Skip to content

CS Outreach Mumblings

February 29, 2016

I think we can all agree that Computer Science has trouble recruiting and retaining people, especially those from less privileged backgrounds. I wonder how much of that is the fact that we put steep learning curves in front of people before you can do anything interesting. Here’s a short story of my experience trying to test out a script a friend of mine sent me. For a little background, I’m running Ubuntu 14.04 and trying to run a Python script.

I get the script in the email and try to execute it. Sadly, my friend is a Windows user which means I have to find a program to remove all the superfluous carriage returns [1]. Once the file is cleaned up, I try again to run the script. Unsurprisingly, I don’t have all of the dependencies installed on my system. No big deal, I’ll just add them. Of course, one of the dependencies isn’t available through Ubuntu’s packaged manager and has to be installed from the Python package index (PyPI). Being the sort who heeds sys-admin warnings to not install PyPI to my system’s root [2]. To avoid doing that, I need to set up a virtualenv, which allows me to install Python packages without installing them on my entire system. Upon trying to install the first package dependency, pip fails, and I’m forced to rely on Google. Apparently, I have to upgrade pip, using pip, just to install something else with pip. Long story short, this kind of mundanity continued for close to an hour.

Trying to put myself in someone who is just learning to program, I’m not sure why I would want to keep banging my head on the wall before I could even starting playing with the code. The Python community is generally good about being welcoming and encouraging to newcomers. That’s certainly part of why I have a career as a programmer at all. However, this is something we need to be better at. When core tools requires non-trivial expertise to use and no one fixes it, that sends the signal that we don’t care if people without that experience can use our tools. We can do better.

1. For whatever reason, Windows uses two characters to represent a new line in a file. It uses both the newline character ‘\n’ and the carriage return character ‘\r’. Unix-based systems (including Mac OS X) only use a single newline character. Unfortunately, the extra carriage return characters Windows adds to files causes Unix-based systems like my Ubuntu OS to choke and be unable to properly read the file.

2. Ubuntu uses Python for a lot of system management tasks. If you install a package to your system’s root, you run the risk of version conflicts that can break your OS. In short, never `sudo pip install` anything.

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: