We live in a highly digitized era where there is debate about whether students in humanities should learn coding. I support students in humanities learning to code. In my opinion, they would benefit greatly from it.”
Integrating coding skills into the humanities is a catalyst for energizing and transforming traditional disciplines. This can break down the boundaries that were once inherent and explore more possibilities. For example, fine art students can use coding to create dynamic digital artworks that enrich their creative expression. History students can digitize artifacts to facilitate preservation and restoration and ensure that they are accessible all around the world. In addition, literature students can perform text analysis, sociology students take advantage of data analysis, and linguistics students can investigate techniques for natural language processing. The combination of traditional disciplines and technical skills equips students with useful tools and allows the fields to continue to advance as technology develops.
I haven’t yet taken any computer science class, and my coding experience comes from the need for projects in my math and statistics classes. Therefore, I find coding to be a very useful tool, but at the same time, a good way to train my problem-solving mind.
Coding often involves addressing complex real-world problems, and we need to see beyond the surface to understand the essence of these issues. It requires breaking them down into smaller, more manageable parts to solve them more easily. This process continually enhances our logical thinking abilities. Additionally, in coding, encountering errors is common, and we need to debug by analyzing issues and tracing code, which cultivates patience and perseverance. These experiences are all significant and useful for solving challenges in all areas. This is well summarized by Matt Kirschenbaum.
I believe that, increasingly, an appreciation of how complex ideas can be imagined and expressed as a set of formal procedures — rules, models, algorithms — in the virtual space of a computer will be an essential element of a humanities education.
Matt Kirschenbaum, Hello Worlds: Why Humanities Students Should Learn to Program
The code below is an example of how I solved the problem in Julia. The problem is figuring out how to meet health needs with as little expense as possible. I need to identify the variables and constraints and set up the objective.
using JuMP, GLPK
diet = Model(GLPK.Optimizer)
@variable(diet, peanutbutter >= 1)
@variable(diet, wholemilk >= 0)
@variable(diet, oats >= 0)
@variable(diet, beef >= 0)
@objective(diet, Min, 0.8*peanutbutter + 0.2*wholemilk + 0.4*oats + 1*beef)
@constraint(diet, constraint0, 7*peanutbutter + 8*wholemilk + 12*oats + 26*beef >= 160)
@constraint(diet, constraint1, 16*peanutbutter + 8*wholemilk + 6*oats + 12*beef <= 90)
@constraint(diet, constraint2, 3*peanutbutter + 11*wholemilk <= 40)
@constraint(diet, constraint3, 2*peanutbutter + 9*oats <= 25)
JuMP.optimize!(diet)
println("Optimal Solutions:")
println("Total cost = ", objective_value(diet))
println("peanutbutter = ", value(peanutbutter))
println("wholemilk = ", value(wholemilk))
println("oats = ", value(oats))
println("beef = ", value(beef))
Hi Lucas! I liked how you used a lot of examples in this post to convey your point. I agree that an understanding of coding allows for students of all disciplines to transform the work that they are doing and take their projects in a new direction. I had never heard of Julia before reading this post, but it looks interesting! Is there a type of project that it works best for?