Writing in a Foreign Language

I have always found coding to be oddly comforting in the way that it all, in the end, makes sense.  It is such a straightforward means of communicating with a machine.  You are given rules and regulations, how you can tell it this, how you can tell it that, and then you follow the instructions.  It is the communicative equivalent of baking a cake.  I find something appealing in such a logical formulation of ideas.

That being said, I also find interesting the contrasts that coding language has with the english language, or really any writing language on a broader spectrum.  They start from similar motives in that both are arguably goal-driven.  Whether writing a short story, essay, or program, the author has a direct objective in their crafting of the piece.  Whether you want to elicit some level of emotional response or have a simply program that converts binary to hex, there is a purpose behind the creation.

The difference that I believe stood out the greatest to me was that I did not care about how the coding looked or read in the process.  While Python has some features that require a certain level of organization, as well as allow for comments that the author can use to annotate the process, a lot of the time my main focus was taking the least amount of steps to reach my main goal.  As we read for class, a lot of programmers are paid extremely well to try and simplify and streamline code as much as possible.  It is not about the beauty of the writing, but simply about the speed and accuracy of its results.  This is not to say that there isn’t a great appreciation for beautiful code or a brilliant algorithm, but that those types of compliments are not the end game.

Hand Cramps

I did the Python tutorials in two batches: one that took me 40 minutes, and one that took an hour and 20 minutes. There shouldn’t be any significance in this split, except that I felt my hands cramp up after the first 40 minutes. In my regular usage of the internet and word processing programs, I hardly ever touch the alternate characters of the number line. If procedural literacy has been thought of as a “requirement and right of an educated populace… for over 40 years,” then I am astounded that our keyboards do not allow for ease of programming (Mateas 111). In particular, I am confused that there is a specific number pad off on the right of every one of the Pitt computer lab keyboards but that there is no alternative for the awkward “Shift+ ” sort of input that is required to program. If the number pad is useful because it enables computers to more easily be used for business or number-crunching purposes, why is there not a keyboard layout that enables an easier way to type code? It strikes me as odd that the infrastructure available does not seem to comply with the general stated goals of programming literacy.As far as I can see, computational literacy is of great use to the study of English and the humanities in general. For me, it’s easier to see the necessity of computational literacy for research interests and pedagogical concerns that deal with the contemporary and the future. If one cannot understand procedure, then one will never look at code. However, even within the Python teaching module, there were many, numerous comments hidden within # lines and triple quotation marks. I think that these markers of human making can be as fruitful to study as earlier drafts of poems, diary entries, marginalia. (Even some computational literacy will give context to those comments.) Even in published video games produced by Nintendo and other major corporations, there are packets of unused code that contain clues about the direction that a game might have gone, at one point. This is amazing and incredible, but how relevant is computational literacy to something like Victorian literature? Well, besides being able to use computation as a tool in general research, I also think that literacy will let me (and others) analyze and interact with our current moment’s interaction with and reproduction of our collective (mis)remembering of the Victorian period. That might be Neo-Victorian studies, but that is a whole other area that I find super interesting.

Code & English & a List

I will say up front that I expected to need to break my Python sessions into small, easily digestible segments. My (analog, handwritten) planner very clearly outlines the reticence I was feeling toward learning what felt like a new language and a new math rolled into one. Which is not to say that this is my first stab at coding; but as a few classmates have also written, my comfort zone is somewhat outside of what might be called proper coding. As a high school student, before options like WordPress or Squarespace were available, I created my own HTML website with an FTP client that made wonderfully 1980s-cartoon-style noises every time I uploaded a file. Later, I learned some CSS, and a tiny bit of PHP, though I had only the rare occasion to put either to use in any real way. As an archivist, I frequently encoded finding aids in the XML markup language EAD. Working in libraries and small non-profits, I rarely had a job where I wasn’t asked to customize a WordPress or Omeka template to make it look less like what it was: a template.

So the editor module is not entirely foreign to me, but the process of systematically learning a new language from scratch was intimidating, and I worried that I wouldn’t be able to make sense of it out of context. To put it another way: I felt some anxiety about simply learning for the sake of learning, and wondered if, without a specific problem to solve, would I actually grasp the meaning of the content, and further, would I be able to recall or apply it later? I was surprised to find that time flew by while I worked through the lessons, though I occasionally hit roadblocks where I was sure I was applying the rules appropriately, only to be repeatedly confronted with error messages (I’m looking at you, Conditionals & Control Flow). I would experiment with variations of what I thought I was supposed to be doing, and often found that only when I tried the variation that I was sure was wrong, the code finally worked.

While I worked through the Python lessons, I thought about how I might relate this to English studies, and in the most general sense, I felt that I was acquiring a set of skills that would allow me to navigate a breadth of ideas and content and, eventually, with practice, express my own original content, or a point of view, to communicate with others and contribute to a larger dialogue.

A few notes that I made while I worked:

  1. The process of learning code is not dissimilar from the process of learning grammar and vocabulary. Eventually these will help in the framing of a more sophisticated narrative, but likely only after learning from a series of clumsier choices.
  2. Reading lines of code in examples – not a great stretch from the practice of close reading. Again, much easier when you have an established foundation. Nothing clicks instantly, and practice and examination contribute to a cumulative knowledge over time.
  3. From Python Syntax 5/13 Whitespace: “In Python, whitespace is used to structure code. Whitespace is important, so you have to be careful how you use it.” This is only barely paraphrasing conversations I remember from earning my BFA in poetry.
  4. While the line structure and use of space share bear some resemblance to poetry, the coding process reminded me more of short stories – create the environment, establish the structure, make sure everything that’s included really needs to be included, leave out the elements that don’t contribute anything essential to the narrative.
  5. For all the rules, and all the value of the rules, I suspect that code is more malleable than it feels when we are learning it, in the way that language is not as rigid as rules of grammar and sentence structure could make it seem. Once you learn what you are working with, you build on it and test the boundaries of what you can do outside the rules. This is how we can get new, weird, exciting art, and this is probably also how I can chop up someone’s well-constructed code to make the website my boss asks me to make, without completely destroying it.

 

I’m SO Not a Python Charmer

I suspect I may have the least coding experience of anyone here, which is not what I expected, I don’t think. This two hours of Python tutorials makes up the most significant encounter with code I’ve had basically ever. At my boyfriend’s encouragement (he’s a programmer) and out of boredom I once played with CodeAcademy’s Ruby tutorials, but I didn’t get very far and it wasn’t very meaningful so I remember litter other than the conditional construction which I just re-learned in Python. I found the tutorials for Python fairly easy, though I had my bouts of frustration, too. Still, they don’t seem very meaningful just yet, and I doubt that they will until I’ve completed more of them–indeed, I hope that they eventually do.

I think of the process of learning code more like the process of learning to read, I think. At first, you learn all of these letters, and then you learn the sometimes too-numerous different sounds that each letter can potentially make, and then you learn some rules to help you figure out that the t in “the,” “hat,” and “catch” are all different, but you by then you’re overwhelmed and frustrated and sick of reading stories filled with monosyllabic rhyming words when you know, on whatever level, that there’s Shakespeare out there to be read. That’s where I am. My boyfriend and his peers (and many of my classmates! Kudos!) are reading Shakespeare while I’m still trying to figure out why “bet” and “beet” are two different words. This is all to be expected, and I’m eager to learn–eager and maybe a little nervous!

The way I’ve been relating all of this to English as a discipline is a bit easier for me to talk about (English! I can do English!). I’m thinking about coding as a language that alters the way we think. Think about it. Imagine you’re a coder–well, I guess a project architect or what have you–and someone asks you to make an application for them. They want it to recognize the cadence in a person’s voice and tell you what region of what country of what planet she’s from. You have to take that task and break it down into all of these little mini-tasks that can somehow be converted into data in a database and a bunch of functions that (I’m guessing) look something like the if/elif/else conditionals I was just writing. You’re no longer recognizing someone’s regional accent. You’re now identifying frequencies and pitches of sound waves and putting that data through a series of processes to produce an output. The task changes. In my humanities-oriented mind, I’m tempted to say that it loses something–its soul or something like that.

Of course, there are conventions that we force/encourage young and inexperienced writers to follow, too. There’s MLA style guides and whatever our particular grammar/style pet peeves are that we transmit to our students, intentionally or not. So that’s what I’m wondering. If we’re writing code, whose values are being transmitted to us, shaping us as composers of code? And is there some sort of way that we can shape back, leave our “style” on computer coding as a whole, or even just our own? I have far too primitive an understanding of code to have an answer, but I’m intrigued by the question.

 

I’m excited to learn more Python and maybe be able to USE it to MAKE something soon, and even more excited to hear more from all of you!

Back on the Horse

I’m somewhat lucky in that my experience with coding began in a classroom setting in high school, preparing for the AP Comp Sci exam; learning in this setting meant that the basic rules of computer science were drilled into me from my very first encounter with code, such that it didn’t really matter that my first language (Java) is probably a lot less useful than the ones I’ve learned since (Javascript, C, Basic, HTML, Perl). Knowing the basic skeleton of how coding works and implementing best practices from the get-go makes the learning curve in picking up new languages a lot less steep, and it meant that I was able to get pretty far along in my 2 hours with Python on Codecademy.

That being said, Python has some things that are a little unique and harder to get used to, particularly the way in which it’s whitespace-sensitive, its use of colons, and the generic variable types. The whitespace thing just gets annoying when you want to go back and change the way you’ve nested things and have to tab everything over; the colons are kind of nice actually in that they facilitate that tabbing over and make it easier to keep track of where things are; and the fact that I don’t actually have to define whether something is an int, float, bool, etc. is great for ease of coding but makes me worry about type-checking. But all of these things are in the service of making Python as easy to use as possible. They force you to use good spacing and syntax, and the non-specified variable types make things like lists and dicts extremely mutable, to where you really can keep things simple as long as you’re checking your user input.

In terms of relevance to English studies, I think there are definitely corollaries to the way we learn normal languages (grammar, word choice, etc.), but the best connection I can find is formatting and legibility. There’s a tendency when coding to develop your own style and throw best practices out the window, but as I’ve mentioned, keeping up with those practices makes it easier to transition between languages while also making your code easier for others to read and, therefore, modify. In the same way, when writing, structure and formatting are maybe two elements of word “processing” that are also too easily forgotten, particularly when you’re only just starting to write for classes; pedagogically, learning a little bit about the strict guidelines of a language like Python could maybe be a great way to stress the importance of clarity and ease-of-reading to a freshman writing class, or really any class along those lines.

Towards a Phenomenology of Coding (?)

Terribly caffeinated and full of trepidation at my self-perceived lack of quantitative skills, I made my first go yesterday, for about an hour, at the Python coding tutorial. Maybe I have tried too hard to forget the introduction to coding course I took during my undergraduate years, as I do find coding very fun, at least within the classroom environment. There is something about the tactility of the keyboard and screen, coupled with the addictive move-on-to-the-next-step lesson structure, that seems to inform the “tinkering” experience that others have mentioned here, and that we have discussed in class. When code properly executes, I feel like a microtransaction of some kind has occurred in my brain, one that yells “Success!”

 

At the same time, I find myself feeling an inordinate amount of anxiety in relation to upcoming lessons within the Python tutorial, and also in relation to the prospect of trying to code a functioning, meaningful object of some kind by the end of the semester. (My final project in that undergraduate coding course, a game of blackjack coded through Java, would not execute). As someone who has always loved solving algebra equations, and multiple-choice tests, there is something about exiting the fill-in-the-blank structure of the tutorial that is terrifying to me.

 

Perhaps my coding anxiety comes out of a background in poetry writing — as someone who was never much for recognizable fixed forms, finding ways to innovate experiences in language that had the appearance of developing from the ground up has always been exhilarating. But code in Python, like the traditional sonnet, has a series of beats and lines that must be filled according to protocol; I will not be able to Berriganize my code, despite a desire to, by the end of this class, produce some kind of aesthetic object that eludes fixity.

 

Mptyeay Eepskay Rintingpay when it shouldn’t!!

The PygLatin module is driving me nuts. See my first crack, the one that makes the most sense to me based on the module’s instructions:

 

PygLatin1

 

I didn’t enter a word, so the fact that “empty” appears in the console checks out. Now, here’s when I do enter a word, which should NOT print “empty.”

 

PygLatin2

 

Still get empty for some reason. I’ve noticed that when I type in original = raw_input(“Enter a word:”) in line 5, that I do end up getting the entered word printed:

 

PygLatin3

 

Finally, the word entered is printed and empty is not printed. But “Enter a word:” must occur twice in the console for me to reach this outcome. I moved on for a little to the .isalpha string method, but remain unsatisfied with how this stuff went so far. The “Hint” box in codeacademy was pretty generic, so it wasn’t much help. I checked out some of the forums, and played around with a few things, but it seemed like most questions just didn’t quite look the same as mine. I must be missing something really obvious that I am currently blinded to for the moment, like that sneaky comma splice or the way I used to spell separate as “seperate”. As is written in my word entry in the images above: “ugh.”

Now that my rant is out of the way, I can now confidently (somewhat) talk the talk after walking the walk of getting frustrated with writing code. Overall, the first few modules were kind of fun in the same way that learning your first few phrases in another language are kind of fun. It’s sort of “magical” in that you are accessing this source of knowledge-making that you previously found inaccessible. It’s like opening the “black box” that Mateas writes about when discussing how new media scholars were limiting themselves by not knowing how to program; now that the box is opened–even if only a crack–talking about programming feels a bit more natural, real, exciting.

Also like learning a new language, frustration sets in when applying (or trying to apply) something that just falls flat. In this example above, I kept falling flat. When I tried to order at a Dunkin Donuts in Spain, I got my coffee, but it was unsatisfying. It took way longer and much more cognitive effort (and shortcuts) than I would have liked. Similarly, with this exercise working with Python, I got the result I wanted to move forward (“done enough“), but it’s not the way it “should” look (and I don’t mean “perfect,” but rather, more acceptable or conventional, or maybe, more “precise” is the way to put it). Plus, all the time it took meant I didn’t even get to the actual pig Latin part of the PygLatin exercise, which is disappointing on another level. But really, I look at all the time I spent trying to figure things out in the PygLatin module as what, optimistically, must be a habit of mind that is useful in programming–tinkering and messing around, searching for answers from others, etc.

My analogy to language learning is nothing new, but I’ll use it to think through the relevance of programming to English studies. Just like a good language user can learn about her native language by taking lessons in second and third (and more) languages, spending some time with programming must provide some kind of insight into using a language (what? not sure yet, but I believe it’s there; I can feel it but not really see it quite yet), and more specifically, composing and reading. Programming is a “making” just like writing is a making, and it takes interpretation just as reading does. Plus, going back to the opening of the black box, even if the opening is by someone fairly ignorant (me), it must reveal something about using the medium of the computer to write and read. We love to talk about medium in the humanities, and the computer is certainly the most dominant medium for reading and writing today. How that medium is built and how it performs must offer something surprising and rather insightful about the nature of language and how language appears in the space of the computer and across the internet.

Code (n): “Any system of symbols and rules for expressing information or instructions in a form usable by a computer or other machine for processing or transmitting information.”

If I’m stuck for how to start an utterance I often turn to the Oxford English Dictionary and start from a definition, which often puts me on less sure footing than when I started, but productively so, because we in the humanities like nuanced, complex definitions and are fully willing to let them shift and evolve as we encounter and construct new information. In the world of computer sciences, this is not at all the case. Definitions are agreed upon and clear. In the world of coding, I learned, we can make anything equal anything, so long as what was presented and what was equalled makes sense in the language of the code. What gets outputted might not make any sense — though I was thoroughly amused by the Python tutorials’ references to Monty Python — but it makes something (provided all the quotations, capital letters, and other marks are performed in the right syntax) in that the program can be saved and executed.

Trying to learn Python reminded me of learning the appropriate accents and diacritical marks when I was learning ancient Greek last year. I understood the concept of them, and I even understood the rules for their implementation and why they needed to show up in a particular syllable or why one mark would change into another (in Attic Greek accents will change in different conjugations of a word, depending on the length of the vowel sound and the number of syllables, among other variables). Similarly, I feel I have a base-line literacy when it comes to reading code (at least simple code). I can fairly quickly get a sense about what operation is doing what, and have a sense of why the syntax is in what order. When it came to executing those accent marks though, just like in executing lines of code in Python, I produced all kinds of errors. I’d read the instructions, understand the function of the variable and the rule, and would then have trouble getting it exact enough. Part of this is my own writerly style — things I would naturally want to capitalize in the sentence-level are not capitalized (like print), or some flourish I’d want to write into whatever text I’d produce wouldn’t work because symbols I’d use are (like parentheticals, which I obviously like and use a lot of).

What am I trying to say here — possibly that if as Mateas and others have emphasized that programming is an expressive medium, then I like that idea conceptually but at what point of comfort with programming do I get to express beyond execution? It feels like with other forms of writing, expression can happen immediately. With coding, I’m not so sure. And I’m not necessarily speaking from the expressivists paradigm necessarily, this is not about my autonomous “voice” emerging through the code, it’s about (perhaps) a version of machine-woman symbiosis I just haven’t reached yet.

All I Code Hope For: Coding, English, and a Vaguely Over-Ambitious Project

When I signed into Codecademy this week, I found myself face to face with a 16% complete Python course, a system reminder stating that my account had been inactive for two years, and a sense of slowly rising panic. During the liminal space between finishing undergrad and finding a “real job,” I had briefly dabbled with code, gaining a limited knowledge of HTML & CSS and JavaScript, and promptly forgetting it in the following “gap” years. Fortunately, due to the logical structure of code and the site’s accessible system, I found it relatively easy to pick up where I had left off. At the moment, coding feels a bit like plugging in quite a bit of work for a rather anti-climatic payoff (great, I spent twenty minutes poking about with parentheses and double equals signs so that my computer could tell me that 5 is not, in fact, equivalent to 3). However, I understand the importance of a solid foundation, and I’m excited to see what I can potentially accomplish with code, especially in terms of games, simulations, and other interactive programs.

Additionally, due to Ford’s “What is Code?” article, I downloaded Xcode-beta from the App Store, and I’ve been experimenting with the Swift language in the program’s “Playground.” I’m finding it interesting that, while syntax and terminology vary from language to language, the general principles remain the same (e.g. a series of simple cause/effect commands contributing to a complex program’s makeup and functionality). Furthermore, because the program includes several pre-established frameworks and libraries to assist the user with creating applications for Apple systems (iOS, watchOS, and OS X), I believe that it will be a useful tool for exploring the practical results of learning code and potentially building a final project for this class.

Coding ties directly into studying English because I can use it as a tool to express the ideas that I am already interested in studying, such as queer theory, feminism, and gender, to a larger, more diverse audience and through a wider variety of media. Traditionally, studying English amounts to composing a written analysis with the intention of publication or presentation. Relatively speaking, the audience that reads an article published in an academic journal or attends an academic conference isn’t very large due to factors such as physical accessibility and complicated jargon. By coding, I can present my ideas in a more consumable format (anything from a mildly amusing blog post to a game) and present it to anyone who has access to the Internet (which is still problematic due to socio-economic factors, but this blog post is already too long). I’m especially interested in basic simulations that allow the audience to interact with the topic through a series of choices. This interest is inspired by an online “trans* life simulator” that I recently played, which allows the viewer a brief glimpse into the life and struggles of a trans* person today. By creating a simple game such as this one, I hope to help bridge the gap between theory and lived experience.

Coding pedagogy

One thing I appreciate about coding is that when you make mistakes, you have to tinker around until you identify the bug and fix it. For example, at the end of the first Python module, I forgot to capitalize “true”, so the interpreter didn’t recognize that line as a Boolean variable. I clicked the hint button, but apparently this isn’t a common error, because all of the tutorial’s hints were about other kinds of mistakes. I was forced to figure out the mistake on my own, and it was much more liberating and empowering than simply referring to a troubleshooting manual. (Frankly, I believe tinkering is the best way to learn anything, whether it’s cooking, a board game, or the aggressively mediocre my.pitt interface.) I think this self-directed aspect of coding helps account for the addictive mindset it seems to inspire in its programmers.

I’m curious whether English pedagogy could do more to encourage this type of learning. I was an English major in college, and while it was a wonderful experience, most of my instructors coddled their students more than I believe was desirable. As I wrote my senior thesis, my advisors would identify any flaws for me and give me clear, simple instructions about how to fix them. “Include these two sources.” “Add a paragraph break here.” I remember that one very eager graduate student would even rewrite entire sentences for me, which, looking back, I’m pretty sure wasn’t kosher. I’m not saying that we should only correct our students’ papers in inscrutable koans—clear communication is important, especially when they’re working on a deadline and juggling other commitments. However, I wonder if a bit less hand-holding and a pinch more self-direction might leave them more confident and self-reliant in the long run.