Categories
Uncategorized

Everyone should learn to code

I think everyone should learn to code, regardless of whether you are studying the computer sciences or the humanities. This blog is a direct response to Evan Donahue’s blog A “Hello World” Apart (why humanities students should NOT learn to program). I don’t agree with what he said because of his definition of engagement.

In his blog post, he wrote:

While programming will indeed usefully equip one better to understand computer scientific discourses, it should NOT be taken as the necessary precondition to engaging with the computer sciences.

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

But what does “engage” here even mean? If one can’t code, how can he/she sit in front of a computer, communicate with it, and let it carry out what he/she wants it to? Engagement is the interaction between a human and a computer. I can’t see how this interaction can happen without code.

I definitely agree with Evan’s idea that coding, just like English, is a tool rather a field of knowledge. But we should not forget that each word in either a computer language or a human language carries fragments of meaning, too; we can sometimes understand a field of computer science much better by reading a piece of code than reading a paragraph. For example, in the Python request library, here’s how you would create an request from a webpage. It is immediately clear that a request needs an URL and some form of authentication.

r = requests.get('https://api.github.com/user', auth=('user', 'pass'))

Of course, there are other sub-fields of computer science in which programs much harder to understand just by reading code because the code hide away certain mathematical or engineering concepts in those fields. This process is known as leaky abstraction, which means that code should not be taken by face value.

I have a machine-learning (ML) background. In ML, all programming languages and libraries counts as leaky abstractions because the code inside them represents much more complicated mathematical objects. One has to do lot of mental work before he/she puts down one line of code. Therefore, one has to get oneself familiar with not only the code but also the math. In fields like ML, as Evan mentioned, one can take two different learning routes: either learning the theory first or the code first. Nevertheless, a good practitioner masters both.

The reason why I explained leaky abstractions is because I think Evan’s idea only applies to leaky abstractions. Yet not all programming languages and libraries are leaky abstractions. As we’ve seen earlier, the Python request library can be taken by face value and you can grasp all the rules of requesting quite well if you just read through the code. HTML is another example. In HTML, HTML tags are meant to be taken by face value. For example, a pair paragraph tag simply denotes the start and end of a paragraph. No more background knowledge is required. There’s no gap between what a code reads and what it does. For these languages and libraries, I would say that programming is the best way to learn these fields.

One reply on “Everyone should learn to code”

Still could not be thoroughly convinced by your point that DH could not be learnt and understood without CS coding experience. To be honest, DH is still in its infancy, and to develop a new subject is so different than to consummate it. The former stage needs leading thoughts, which could guide the later process. If there were no humanity scholars urging for new methods to consummate their subjects in the new centuries, there would not have been so many CS people willing to develop practical tools for DH. I am not saying these practical tools are unimportant in the field of DH, but I believe it is not necessary to require every novice to step into the practical field of DH. People with abundant interest on humanities would still contribute a lot to what I described the consummate process of DH.

Leave a Reply

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

css.php