Python for Humanists 1: Why Learn Python?

At the Digital Scholarship Commons (DiSC), I’ve made one of my goals learning some basic programming. While I don’t think that every humanist needs to be a hardcore computer developer, I argue that humanists should at least have a basic knowledge of coding. In this new series, I will chronicle my own process of learning how to code with Python.

Why? In the post that follows, I will sketch out a case for 1) why humanists should learn to code; 2) why Python is a great language for beginning humanists; and 3) what are some great resources for learning Python.

Why should humanists code?
I get this question all of the time from my colleagues who are busy teaching and reserching and don’t really understand why they should devote the time to learning how to code. Let’s set aside the great arguments by Stephen Ramsay and others about the centrality to coding for the digital humanities. What can humanities scholars who do not actively practice digital scholarship learn from coding?

  1. Scholarship: As practitioners of Critical Code Studies show, code itself is something that can be read. Code makes an argument and can be analyzed. If humanists are studying, say, a digital scholarly edition, knowing how that edition is put together and what rhetorical interests are served by particular lines of code can be very useful.
  2. Student Needs: Learning how to code can make you a better teacher. Scholars like Katherine Harris and Brian Croxall are tireless advocates for digital pedagogy. Knowing how digital tools like Zotero and Omeka are put together can help you and your students understand the innerworkings of tools that are becoming increasingly important in teaching. As Julie Meloni argues “it becomes necessary [for students and teachers] to interrogate and investigate how these networks and methods of information organization, storage, and retrieval permeate their lives.”
  3. University Infrastructure: If digital information permeates our students lives, it also permeates the infrastructure of the University system. Learning how coding influences payroll and admissions, for example, can give scholars better evidence for making arguments about the success of their faculty and students.

Learn to Talk to Programmers: As digital scholarship becomes more prominent on University campuses, it will become more important for scholars to be able to discuss their work with programmers and developers. Knowing the basics of a computer language can help you communicate your ideas.

So, why should humanists learn to code? To better understand a world that is mediated by digital technology.

Why should humanist scholars learn Python? Many different programming languages exist out there. C++ has been a mainstay for computer programming for years. Javascript and Ruby are both useful in specific circumstances. Christine Cheung lists a number of reasons why Python is particularly useful as a beginning coding language.  

  1. It’s simple to get started: Python is a much more simple and elegant language than C# or even Javascript. You can learn the basics of Python pretty quickly and apply those basics to more complicated code.
  2. There is a huge online community to help you: Python maintains a great website with tons of documentation and a vigorous online community to help beginners.
  3. Many modules and libraries exist to import from: Not only does online support exist from but the site maintains a list of modules and libraries that can help you start on specific programming tasks. For example, if you are looking to use Python in conjunction with GIS (Geographical Information System) enabled map, you can find a module that will show you the basic outline of a program that is designed for that.
  4. It’s a cross-platform programming langauge: This means that you can be sure that Python will work whether you are using a Mac, a PC, or a Linux-based computer.
  5. It’s modular and abstracted: Modular programming allows you to abstract specific parts of a larger program and work on them separately before integrating them. This means that you don’t have to always think about how separate portions of your program are connected.

Python has a learning curve. You can’t learn Python instantaneously. Be patient, work incrementally, and realize that it takes time to read and write Python.

Important Resources for Python: Okay. Let’s say, I’ve convinced you to start learning Python. What are some resources to get started? I’ll cover how to read, install, and begin programming with Python in a later blog post, but I want to go over some great resources for you to look over in the meantime.

  1. Griffiths, David, and Paul Berry. Head First Programming: A Learners Guide to Programming Using the Python Language. Sebastopol, CA: O’Reilly Media, 2009.
  2. Turnbull, Scott. “Resources from Introduction to Python.” THATCamp SE: The Humanities and Technology Camp.
  3. —, Sari Connard, and Tim Bryson. Python Programming Group Documentation. Emory University Library.
  4. Google’s Python Class

That’s it! I hope you enjoyed my first post on Python. For my next post, we’ll be looking at some projects that used Python and learning the basics of Python syntax in order to read their code.


  1. I agree whole-heartedly with the general proposition that learning a bit of programming is a valuable skill for humanists (indeed, I’d broaden the claim and argue that “Intro Programming” of some kind should be required of all undergraduates as an experience to better understand the world; programming, that is, as liberal art). I likewise think Python makes sense.

    In addition I might add another answer to the Why Python? for humanists (rather than, say, ruby) and that is the wonderful Natural Language Toolkit, a Python library which makes a whole range of text analysis techniques (the sort of thing humanists might be particularly interested in) much easier. There is not, last time I checked, a tool of comparable scope and value in other languages. The NLTK page has great documentation and even a free book. Likewise, Python is used in the excellent (and decidedly humanist friendly) The Programming Historian.

    (A similar discussion took place on DH Answers a while back under the auspices of “What’s wrong with Python?”)

    Looking forward to future posts.

    1. Thanks Chris! I hadn’t heard of any of these tools before. I might use these for the second post, since I want to do something on Python projects and beginning to read Python code (basic syntax…)

    2. I agree with all of Roger’s premises here. Coding is a vital skill. Python is extremely easy and fun.

      NLTK is a plus, too! But about the NLTK, one warning: I started with Python 3.2, on the theory that it was better to be up-to-date. Unless I’m wrong, NLTK is only available for Python 2.7.

      So, something to be aware of as you choose a version. Personally, I haven’t yet needed the NLTK, but …


  2. Thanks Roger! This was the reminder I needed to add spending time on Python to my winter break to do list. Can’t wait to see the next posts.

Leave a Reply