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:
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.”
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:
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.



I’m glad that you talked at the end about the computer as a medium/mediating force. That’s what struck me the most about coding. It seems that the constrictions that are imposed force you to think and build in a way that’s not natural for us as English-y people, and I am curious about what that means, if it’s a good or bad thing, or maybe just a thing.
Oh, man. Thank you so much for posting these screenshots. I kept on hitting a wall with this Pig Latin section. It appears that it wanted me to follow the instructions for “Check Yourself!” when it only displayed the instructions for “Input!” Adding if/else based on your model finally let me progress. Huzzah!