Humanities and Programming (and My Experience with Programming)

Should Humanists Learn How to Code? Yes.

The birth of big data, the computer optimization under the Moore’s Law, and the expansion of the field of computer science have significantly advanced the academia world. In biology, the field I am most familiar with, for example, the modern sequencing platform has allowed genomic, proteomic, and transcriptomic data being generated every second. However, only those with computational (i.e. coding) skills can analyze these data. As a consequence, programming has become one of the most sought skills to have in biology field. As a biologist myself, I learn as much about data mining as I learn about human physiology. Although I do not have a sufficient knowledge to make a robust claim, I argue that this is a similar case to the one in humanities. To advance humanities in this digital era, humanists also need to learn how to program.

Digital humanists have proved that this is indeed a possible future direction of humanities. Humanists employ digital analyses in addition to the more traditional ones to study their respective subjects. Of course, humanists can collaborate with a computer scientist or a software engineer to enable them work on a digital project. However, without a sufficient knowledge about programming itself, they would fail to give correct instructions.

“Computers should not be black boxes but rather understood as engines for creating powerful and persuasive models of the world around us.” (M. Kirschenbaum)

People who do not possess programming knowledge would treat computers as “black boxes” that process data and return desirable outputs. As Michael Kirschenbaum argues, they would fail to appreciate computers as “engines for creating powerful and persuasive models of the world around us … [the world that humanists] have been interested in” (M. Kirschenbaum). Kirschenbaum also believes that complex ideas in humanities could be presented as “formal procedures”, just as in computer science. Evan Donahue, however, does not agree with this idea. He argues, “the concerns of the computer sciences and the concerns of the humanities are literally one and the same” (E. Donahue). Although this is a justified assertion, I do think that there is a merit in utilizing computational tools to approach the concerns of the humanities for the reasons of efficacy and accessibility. For instance, linguists would benefit from a computer program in analyzing the structure of a text rather than deciphering it manually due to the efficient work of a computer. Because the program uses the same logic and method, the academic merit would not be sacrificed.

Donahue also clarifies at the end of his post that he is not against humanists learning how to code, but rather against pushing for the necessity of programming. I do think that although not everybody should learn how to program, there is always a merit to know how to code. Humanists can always collaborate with computer scientists, but they still need to know at least the outline of what computer scientists do for a successful collaboration.

My Experience with Programming

A junior math and biology double major, I have used my programming skills in multiple settings so far. I learned how to code the first time when I was in high school and continue the practice in college. Besides coding for the courses I took, I also code to help my research. The past summer, I mostly coded in Python and Matlab to conduct a systems biology research. This winter, I learned Mathematica and used the Wolfram programming language to simulate population genetics. Below is a sample code I wrote for my recent research:

 after[m_, sAa_, saA_, d1_, d2_, r_, b_, model_, background_] := (
 p1 = equilibrium[1., 0., 0., 0., 0., 0., 0., 1., sAa, saA, m];
 q1 = 1 - p1;
 p2 = q1; q2 = p1;

 (*genos1 is a vector representing the initial equilibrial frequency of genotypes in population 1 after the introduction of alleles B.*)
 
 If[background == 1, 
 genos1 = {p1^2*b^2, p1^2*b*(1 - b), p1^2*(1 - b)*b, 
 p1^2*(1 - b)^2, p1*q1*b^2, p1*q1*b*(1 - b), 
 p1*q1*(1 - b)*b, p1*q1*(1 - b)^2, q1*p1*b^2, 
 q1*p1*b*(1 - b), q1*p1*(1 - b)*b, q1*p1*(1 - b)^2, 
 q1^2*b^2, q1^2*b*(1 - b), q1^2*(1 - b)*b, 
 q1^2*(1 - b)^2};

 genos2 = {0., 0., 0., p2^2, 0., 0., 0., p2*q2, 0., 0., 0., q2*p2,
 0., 0., 0., q2^2},
 genos1 = {0., 0., 0., p1^2, 0., 0., 0., p1*q1, 0., 0., 0., q1*p1,
 0., 0., 0., q1^2};

 genos2 = {p2^2*b^2, p2^2*b*(1 - b), p2^2*(1 - b)*b, 
 p2^2*(1 - b)^2, p2*q2*^2, p2*q2*b*(1 - b), 
 p2*q2*(1 - b)*b, p2*q2*(1 - b)^2, q2*p2*b^2, 
 q2*p2*b*(1 - b), q2*p2*(1 - b)*b, q2*p2*(1 - b)^2, 
 q2^2*b^2, q2^2*b*(1 - b), q2^2*(1 - b)*b, 
 q2^2*(1 - b)^2}];

 nestHelp[genos1x_, genos2x_] := (
 pop1Binit = bAllele[genos1x];
 pop2Binit = bAllele[genos2x];
 {newGenos1, newGenos2} = 
 generationAfter[genos1x, genos2x, m, sAa, saA, d1, d2, r, model];
 {dB1, dB2} = {Abs[pop1Binit - bAllele[newGenos1]], 
 Abs[pop2Binit - bAllele[newGenos2]]};
 {newGenos1, newGenos2, dB1, dB2}
 );
 {genos1x, genos2x} = {genos1, genos2};
 test[genos_] := genos[[3]] != 0. || genos[[4]] != 0.;
 a = NestWhileList[
 nestHelp[#[[1]], #[[2]]] &, {genos1x, genos2x, 1., 
 1.}, #[[3]] != 0. && #[[4]] != 0. &, 1, 1000000]
 )

The above code was a snapshot of a population genetics simulation that I wrote in the Wolfram language. Although might not be a good example of my experience with programming, this proves how important the ability to code in modern academia is.

Author: Alief

Leave a Reply

Your email address will not be published. Required fields are marked *