Programming: A Common Language

Within the Digital Humanities circles, whether a digital humanist should learn how to code is one of the most hotly debated topics. For my part, I believe that we should learn at least the fundamentals of programming to better understand the discipline and how to incorporate it into humanistic works. After all, programming is also one of the fields pursued by humanity. A supporter of digital humanities students learning programming once said:

Programming is about choices and constraints, and about how you choose to model some select slice of the world around you in the formal environment of a computer.

Matthew G. Kirschenbaum, Hello Worlds: Why Humanities Students Should Learn to Program

The quote reflects how Kirschenbaum believes that programming is just another medium for communication. Similarly, a contrarian to the idea once stated:

 Learning to program should be no more and no less enabling than reading Derrida. 

Evan Donahue, A “Hello World” Apart (why humanities students should NOT learn to program)

Indeed, the idea is that humanities students should learn to program, since at minimum it would better enable communication with their digital counterparts in “digital humanities,” who use programming as their tool to advance humanistic ideas. In reality, Donahue was underestimating the importance of the digital element, since for Digital Humanities, coding does “enable” more than reading Derrida‘s mentally taxing philosophy. Knowing what can and can’t be done with programming means that a solution can be devised more quickly than if either or both sides need frequent clarifications and explanations about why this or that idea won’t work.

Personally, I have some experience in programming with Python, Java, HTML and CSS and recently, through Python, created a very simple piece of code for text processing:

name="PDFLines2Line.txt"
result=""
end=False

file = open(name,"a")
file.write("\n")
file.write("end ")
file.close()

file = open(name,"r")
while not end:
    line=file.readline()[:-1]
    if line != "end": result+=(line+" ")
    else: end=True
file.close()

file = open(name,"w")
file.write(result)
file.close()

What it does is simple: formatting texts scanned from a PDF document with random line breaks back into a normal paragraph. From a Digital Humanities view, this can allow other programs to analyze text by complete sentences instead of line-by-line.

In the end, my opinion is that learning programming is good for DH students, since either understanding and communicating with a specialized programmer or knowing how to program it yourself would allow for much more effectiveness in performing one’s role as a Digital Humanist.

4 thoughts on “Programming: A Common Language

  1. I think your notion that programming enables us to know “what can and can’t be done” is a great backing for this argument, as it eliminates any trial and error approaches that might be applied to the presentation of one’s research. I like your inclusion of a quote from both texts, because it shows your understanding of each and your ability to support one author and provide evidence from both ends of the spectrum to round-out your argument more wholly. I’m picking up on a pattern emerging that those students with prior coding experience seem more likely to support Kirschenbaum’s argument than Donahue’s, and while I definitely think that’s expected, it’s still a cool phenomenon to pick up on. I’m also interested in your personal experience with coding; I learned basic HTML (maybe also CSS and Java…but I don’t remember) back in like 10th grade and have retained next to none of those skills, but I’m interested in continuing to learn and become more comfortable with coding. I don’t expect anyone to respond to these comments, but I’d be interested in your opinions on each of the 4 languages you listed since you have much more experience than myself and probably others in the class. My friends and teammates who take CS classes tell me they prefer Python, but I’d be interested to hear you summarize how Python differs from the other 3 primary languages, and some reasons why you and others prefer Python overall.

    1. Similar to your friends, I do prefer to use Python the most, though that’s because it’s the one I’m most proficient in, not due to practical reasons. I think the most common reason for Python’s popularity is how easy to understand its syntaxes are, but don’t take my words for it since I am not an absolute master. The languages I mentioned are in descending order of familiarity, with Java only being learnt due to my Data Structure class. I personally think its syntax are quite confusing, but that’s mainly due to my unfamiliarity. I enjoy playing around with HTML and CSS due to its artistic properties, but I haven’t created anything serious with them yet. There’s a project in my mind but I haven’t finished my current project yet. The order will soon change though, since in this class we would use more HTML and CSS, with the addition of PHP too.

  2. Cuong, I agree that humanities students should at least have a base understanding of coding. I also agree that it is important learn some coding to enable better communication between two people who may struggling in that aspect. You said you have some experience coding, do you have any helpful advice for someone who doesn’t have much experience coding?

    1. I think one of the core skills in programming with any programming language is to break down what you want the algorithm to do as much as possible before translating them into actual code. You can even use normal English comments to lay out the structure of the program before you started coding for real. There’s also the basic advices of being patient with bugs, try out new methods and most importantly, Google the answer when you are completely stuck.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

css.php