Guide to programing with Python for the Digital Humanities¶

Finding the Balance Between CS and DH¶

When I was first given this task of creating Digital Humanities (DH) assignments for an introductory programming course, I was faced with a serious dilemma: On one hand, I wanted to make sure that theDHstudents received a good introduction to some of the basic methods of DH research, such as social network analysis, stylometry, textual analysis, and visualization. But on the other hand, I was merely teaching an introductory programming course, so I could not expect all of the students to do professional-grade work, or to write analytical code at the level of functionality expected of advanced computer science practitioners.

My solution was to try to strike a middle ground between the two ends of the spectrum— to give all students a solid introduction to DH analytical methods while keeping the course accessible for novice programmers, using assignments that employ the strengths of the Python language. So the average student in the course should be able to do a good job of programming the assignment, and should also be able to learn something about how programming for humanities research is done.

These are interesting criterion to setup the DH course¶

  • Keep workshop accessible for novice programers

  • The student should be able to program the assignment and learn how to program for Dh

  • Dont scare novice programmers in the first assignment by providing complex exercises

  • Assignments can have different levels of complexity or versions. For instance an assignment can be easier for a certain audience and more challenging for other audiences.

It also might be a good strategy to simply ask the students which level of assignment they would like to do, and let them seek out their own challenges. This might require a longer grading process on your end, but may also increase student learning on theirs. Or some instructors may want to offer an “A assignment” out of the advanced suggestions, a “B assignment” out of the intermediate suggestions, and a “C assignment” out of the novice suggestions (which are proposed in each chapter as the “base” assignment), for which the assignment description is written. Again, this might require more grading on your part, but could be a big step in helping students take control of their own learning.

What is particularly difficult about this task is that it attempts to please a wide range of students. At risk are the computer science (CS) students who only want to learn how to program, and have no interest in the humanities, as well as the DH students who have a great interest in the humanities, but have little or no desire to learn computer programming. The great benefit of having these DH programming assignments is that they are unusual. If you browse the more popular introductory programming in Python textbooks,most of the assignments are math-based, sciencebased, or business-based. Theweb is also filledwith such assignments. SoCSstudents with no interest in the humanities have awholeweb of assignments to use for practice, if they wish to avoid the humanities. Also, DH students who have little interest in learning programming might at least be brought along with assignment topics that are of more interest to them.