As an erstwhile literature major who recently enrolled in a coding bootcamp, I often get comments on my seemingly divergent choices of life path. People are confused — you studied literature, why would you switch to something so different? I always offer the easy, quick response — “I couldn’t find a job I wanted in literature and I’ve always been a very math-minded person” — but there is a longer answer.
This blog post is a random collection of thoughts in an attempt to answer this question, for others as well as for myself. Lacey Williams Henschel has written a very well-thought-out and articulate post on the same topic, so if you want something a little meatier go check out her article! This post is essentially just a collection of my own ideas on how learning the study of literary analysis and learning to code may not be as different as you think.
Don’t believe me? Stick around for the next few paragraphs and see if I’ve convinced you at all.
How is code like literature?
Striking out on a path of action with limited guidance
I love this quote from One Job, One Day explaining what literature majors are good at doing:
“English [or literature] majors are used to working with a wide array of information and vague criteria and striking out in a single direction with a precise argument. [They have an] ability to decide on a course of action based on varied or incomplete information…”
This quote has a lot of resonance for me, but not only from my experience writing essays in college. The first time I sat down to an empty text editor to write the code for a webpage and the first time I stared at a blank word doc contemplating a college paper I had to write were strikingly similar. In both instances, you’re creating something crazily huge and complex out of nothing, relying in part on whatever limited outside information you have, but mostly on your own imagination and creativity. This is what makes both literary analysis and code so hard, but so exciting! The world is your oyster, the empty text editor your blank canvas. But it’s all on you to come up with your own unique thoughts and find ways to express them.
Code is language
I’m still a bit baffled by coding language logic, but find it beautiful when you’re able to make these inflexible languages do flexible things. It is similarly amazing when authors can create complex meaning with nothing more than the simple words and sentence structures we use in everyday language. The words “rose,” “name,” and “sweet” are not particularly striking, but combining them together in a specific way — “A rose by any other name would smell as sweet” — generates an entirely different realm of expression.
Extreme attention to detail
There’s no question that code requires extreme attention to detail; one misplaced semicolon could cause an entire program to break. And in literature, when writing a massive research paper analyzing works in different languages and tying together complex ideas, you still have to pay the utmost attention to your own grammar and spelling, to correctly placing every little period and comma.
In an even broader sense, both code and literature require a strong understanding of how small details matter within a larger context. When you’re doing a close reading, you’re always basing an argument on a very short piece of text. This means you have to really dig into the details and draw out whatever meaning they may hold. The ultimate goal, however, is to make a more meaningful argument within some kind of broader context. So you are constantly involved in a dialectical back-and-forth between little details and the overarching “big picture.”
Similarly, you have to be careful when defining variables and setting up functions in code. If you accidentally mistype the name of a variable, or try to access it outside of the scope in which it has been defined, it simply won’t work. As projects grow bigger, you need to be able to understand the significance of even the smallest piece of code and how it contributes to the overall functioning of your program.