The Fundamentals: Learning Programming at DHSI 2015

When discussing digital humanities with colleagues, the same objection comes up time and again: “I can’t learn programming.” I always emphasize that digital humanities encompasses a wide range of activities and that programming knowledge is not a prerequisite. I say, “You don’t have to know programming. Once you get involved, you’ll discover the types of projects that interest you and what you need to know.” However, a time may come when they need to know some programming, and many of my peers believe that learning programming is an insurmountable obstacle. Fortunately, they could put their fears to rest with a class like “Fundamentals of Programming/Coding for Human(s|ists),” a DHSI course taught by John Simpson of Compute Canada and Dennis Tenen of Columbia University.

I took the class this year at DHSI 2015, and I could not have asked for a better introduction to programming. From the start, John and Dennis stressed that we were learning how to think like programmers. We were working in Python, but the point of the class was not to master a set of commands in a particular language.  Rather, we were learning how to think through problems and work step-by-step towards objectives. It reminded me of my historical research methods class in college.

On the first day, we became familiar with the command line and the Bash shell. Python would be of little use if we could not even navigate directories. On the second and third days, we worked in the Python interpreter. Yet, even as we learned new Python commands, John and Dennis never let us forget best practices. We outlined in pseudocode before writing any code. When something worked, we saved a copy as a checkpoint. When we were finished, we made sure to leave good comments for the benefit of future users.

For the last day and a half of class, we split into groups and designed our own projects. I was part of a group that created a tool to check metadata for digital collections. It required a lot of trial and error (and some valuable guidance from John and Dennis), but we persevered and were successful. Our program takes data from a CSV file, checks it against standards we defined, and writes it into a new file. Any errors are flagged with three asterisks, making it easy for someone to find and correct them.

More important than any of our programs, however, was the confidence we gained in the process. Our DHSI crash course delivered exactly what it promised. We learned the fundamentals and laid a foundation on which we can continue to build. As John exhorted us, “You know enough to be dangerous. Be dangerous for good, not evil.”

Please visit our class GitHub page for course materials and the code for our group projects.

By Chris Fite

One comment on “The Fundamentals: Learning Programming at DHSI 2015