Why Digital Humanities?

Digital humanities is a term that has been thrown around quite a bit lately. Even hard-core humanists are asking questions about technology and data science these days. I am by no means an expert in the fields pertinent to this discussion. However, I hope that sharing some of my experiences teaching a high school coding class will shed some light on this topic.

And this ongoing division is becoming an increasing problem as the intersection of humanity and science has reached a deadly apex. COVID-19 and Climate Change are just two examples drawn from a long list where we need multiple perspectives and a synthesis of those perspectives to persevere. For example, science developed a miraculous vaccine for COVID-19 in record time. Yet many populations globally lack the trust in governments to take advantage of it. On a different note, many proponents of making changes to energy use, food production, and overall consumption can be seen driving a gas-guzzling SUV. We not only face serious contradictions today, but we are also in a crisis of truth.

So maybe digital humanities have something to offer. I included a text analysis unit in my high school Python coding class to explore the meaning of digital humanities myself. By engaging in this exploration alongside students, I hope to understand better what is possible.

To kick the unit off I directed the students to find a text file containing the U.S. Constitution. Then we started whiteboarding ideas of what we wanted to find out. Not surprisingly, the students were able to come up with quite a bit. One recurring strategy on their whiteboards was the separation of the text into distinct words. That might seem pretty obvious. Breaking text into words is a simple and efficient task for our brains. And it is not such a complex task for a computer either, but finding the specific algorithm that will accomplish the task is definitely the work of computer science. So as a class, we wrote the following Python code.

At the risk of alienating the non-Python reader, I want to walk through this code. The code defines a function called split(), which can take a string of text and turn it into a list of words. When you define a function, you are creating a tool. This tool can be used and built upon throughout your code. The beauty of coding is that you are creating an infrastructure of thinking. If you do it precisely, you can accomplish unfathomable things.

In the function definition, the computer loops through each character in the text one at a time. If the character is not “a space,” then it adds it to the end of the variable current_word. Otherwise, it adds the value of current_word to the list of words and then resets current_word to be empty. In the end, it returns this newly created list of words. You can see how it operates in the sentence “The chicken crossed the road.” This algorithm is not particularly complex, but that does not diminish its power. The process of writing an algorithm is central to what I teach students in my course. You have to think carefully about each step. One small error will multiply and make the function useless. Ultimately programming a computer is about communicating effectively with the computer so that it does precisely what you want it to do. Sometimes that means adjusting your code because there is an unexpected problem. Sometimes that means reflecting on the meaning of the algorithm you are trying to write. The Python programmers out there might argue that this exercise is unnecessary because Python already has the split() function built into the language. In fact, the built-in function does a better job of splitting up the words because it handles situations where there are two consecutive spaces or even other characters between the words. My students also wondered what to do with punctuation and capitalized words. As a class, we tackled these scenarios by incrementally improving the algorithm of the split() function.

Of course, you should utilize tools that already exist in a language. But it is so powerful to realize that you can build your own tools. Whatever you need to accomplish, you just need to define the steps necessary, and then it can be done. What makes the invention of the computer so powerful is that it is a framework for building any tool. Then more complex tools are built out of simpler ones. I like to use the terms from computational thinking of abstraction and decomposition. Decomposition is looking at the details of the split() function to understand how to build it and how it works. Abstraction is zooming out and seeing the split() function as a tool that can be leveraged in creating a program that analyses the text of the US constitution. Being able to zoom in and out in this way enables the transformative power of computers. I shared this piece of the story to convey the kind of thinking and process that occurs when you leverage technology in accomplishing a task.

So my class proceeded to build upon the functionality of split() by counting the frequency of the words in the text and then removing less interesting words referred to as stop words. Here are the top 5 “interesting” words from the US Constitution.

We started thinking about the meaning of this list. What can we do with it? Where do we want to go next? Some students struggled to develop their investigations. I then realized that through this simple project, we were gaining firsthand experience of the two cultures.

One culture is the culture of computer programming. It is a culture that speaks the language of algorithms. Words like efficiency, elegance, and complexity are often discussed in this culture. In fact, helping students acclimate to this culture is my primary job as a CS teacher. And make no mistake, this culture is changing the very world we live in. Gain mastery in abstraction and decomposition, gain fluency in the capabilities of a CPU, and you can move veritable mountains. And by mountains, I am referring to mountains of data that have accumulated. The US constitution is just one piece of that data.

The other culture to consider is the context that frames the document being explored. Strong text analysis, in this case, requires you to know the history of the United States, the anthropology of human societies, the structure of human relationships, the psychology of the human mind, and the linguistic elements of written communication. This culture is what defines what is worth pursuing and of consequence in relation to the chosen document. Luckily my students all had some experience with the US constitution from their history class, but imagine how much further a historian would be able to take this analysis.

To perform text analysis, we need to bridge these two cultures. So maybe that is the hope of digital humanities. It starts with bringing people together in analyzing text. It continues with seeing that all human collected data needs computational thinking to analyze it and the humanities in order to understand how to interpret the analysis and what to do with it. It finishes with multidisciplinary perspectives on a wide range of issues allowing students to see that what is needed for learning and understanding is bringing ideas together rather than keeping them separate.

So I asked my students to pick a set of texts to analyze on their own. They started by thinking about what interested them and what kinds of connections could be drawn using computational text analysis. They continued by reaching out to an expert to gain more insight into the texts they selected, possibly a teacher or another adult who could help them bridge the two cultures. What resulted was something much deeper than could be done by a CS student alone. So perhaps the real innovation here is learning how to collaborate in meaningful ways through bringing people from different disciplines and ways of approaching knowledge together. If we teach students in this way, then we have the power to make the two cultures discussed by Snow to finally vanish.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Greg Benedis-Grab

exploring the intersection of coding, education and disciplinary knowledge