Sick with Bot-ulism

I apologize if this post is a bit late. I was hoping I would be able to program a bot to complete this blogpost for me, along with all of my other assignments and duties. Alas, it was not to be. I sit here actually typing this message with my fingers like a common 20th century chump… or am I? Perhaps I am really a computational creation of the greatest bot-maker ever, pushing the Turing test to new limits even as we speak.

But seriously–after observing the difficulty and hard work that goes into make an interesting Twitterbot, even a simple one, made me think a bit. If computational media classes like this one take off and become part of curriculum for undergraduates one day then perhaps a common assignment will be to have students make Twitterbots or other simple chatbots. I was imagining the hilarious situation where a student, unable or unwilling to really learn how to code a bot, stays up all day and night typing inane chatter into Twitter in an attempt to pretend to be a bot in order to fool the teacher into thinking the programming assignment was completed successfully. The instructor would have to engage in some kind of reverse Turing test to determine the authenticity of the bot. If machines can emulate humans, can humans also emulate machines? I mentioned this thought to a friend who replied that recently a popular Twitterbot was in fact exposed as a human. What new species of intellectual misconduct is this? Passing something off as NOT your original work!

I suppose the best chatbot would actually be a human-machine symbiote, with a program amalgamating all the relevant Twitter and headline chatter and suggesting possible humorous mashups, but with the human getting final review. If Twitter chatter is to be the new form of aesthetic expression, then let’s push it to the limit!

This post was supposed to end brilliantly, but my chat program still seems to experience bugs while winding its random musings into a succinct conclusion. Perhaps one day someth>>> 10 * (1/0) Traceback (most recent call last): File “<stdin>”, line 1, in ? ZeroDivisionError: integer division or modulo by zero >>> 4 + spam*3 Traceback (most recent call last): File “<stdin>”, line 1, in ? NameError: name ‘spam’ is not defined >>> ‘2’ + 2 Traceback (most recent call last): File “<stdin>”, line 1, in ? TypeError: cannot concatenate ‘str’ and ‘int’ objects

 

 

This Lack of a Blog Post Title is Merely Another Symptom…

Hello, all,

It’s been nice to read how people are feeling more confident with their coding and how they feel like they’re making progress. While it was also cool to understand how the code was working on Thursday, even if I don’t quite get what APIs are yet, I generally feel like I’m having an imaginative crisis when it comes to code. This latest section of the Python Codecademy tutorials (Practice Makes Perfect)  is taking me much, much longer to complete now that I have to come up with solutions on my own. That should be expected, but I find myself just staring at Codecademy for an unproductive while before turning to Google to look at how other people have solved the problems (and I don’t like that).

Also, I was hopelessly blank in the workshop. I wanted to push the code and do something interesting and provocative. Instead, I just tweaked the code to tweet out an incomplete first chapter of Alice’s Adventures in Wonderland. I would have felt better about that if I could have written code that reformatted the plain text into lines of 140 characters, but I just tweeted the first 130 characters of a line/paragraph from Notepad. Maybe I’m just having an extended personal moment, but it feels like I’m lagging behind now when I felt that all of us mostly started on the same footing at the beginning of the semester.

I know that code can do cool things, but I’m worried that I can’t do those cool things.

Soy Spambot

Forget love. Forget religion. Forget art. Learning Python is apparently all I need in order to experience the whole spectrum of human emotion. I’ve rejoiced at the success of squaring a list of numbers, fallen into the pits of despair at my utter inability to write a function that will spell a word backwards, and ascended to the level of a king – nay, a god – at producing a workable Battleship game. In all honesty, though, I’ve had a bit of a time trying to wrap my mind around the idea of coding as literacy. At first, its syntax’s inflexible nature struck me as limiting and frustrating. However, after discussing the abilities of Twitterbots and – especially – examining the educational and political use of games, I’m interested in seeing just how far the possibilities of coding can go. I’d hazard to extend the notion that creativity of the code writer is not necessarily displayed through word choice, syntax, or other aesthetics commonly associated with the language arts, but rather through the execution of procedure and the potential of that procedure.

 

I feel like the Twitterbot activity really brought out the malicious aspects of my otherwise charming and soft-spoken nature. My bot is currently following only one person – a friend from back home. I’d really like to program the bot to regenerate her posts and add the ultra-mature phrase “in bed” to the end of them – just to assure that my Arizona legacy is never forgotten. My spambot army doesn’t have to stop at merely trolling my unassuming buddies, however; I believe they can be deployed for widespread social purpose. I was fascinated by the brief discussion of Finn Brunton’s Spam: A Shadow History of the Internet, and I’m curious about the possibility of engaging with a massive demographic on an impersonal level to convey a single (usually unwanted) point. As some of you might have noticed, I’m well on my way to becoming an obnoxiously militant vegan. (Joke: “How do you tell a vegan?” “Don’t worry – she’ll tell you.”) I’m wondering if I could create a Twitterbot that could act as my minion as I embark on this quest. Perhaps I could program one to search for statuses and images pertaining to dairy products, establishments like McDonald’s or Five Guys, and the ever-baffling national idolization of bacon and have it respond with classic, lovable phrases like “Your stomach is a graveyard!”

Feeling Tweepy

I am beginning to wonder whether my progress in “computational literacy” can be measured by my own self-satisfaction with a small victory. (This is what process feels like, isn’t it?). Coding has been hard. My brother is a programmer and I think he must have gotten all of the left-brain genes. As I think I’ve mentioned here, I like algebraic/fill-in-the-blank tinkering but have trouble with conceptual formations in programming / understanding exactly what I’m doing.

 

The project I tried to undertake in class was more or less plagiarism of the code we were initially provided, an attempt to get my bot to tweet Paradise Lost line by line (http: //www.twitter.com/paradiselostbot). The text file was available on Project Gutenberg (and was apparently already input into a computer in the ’60s) — as straightforward as it seemed it would be to get the bot tweeting with a slight alteration to the code, I kept receiving Twitter’s 403 error. At first, it seemed I was tweeting too often, or maybe that each time I restarted the bot Twitter was seeing I had already tweeted a line (despite my attempts to create a more-perfectionist timeline with no restarts by deleting all my tweets before a restart). In the end, I discovered my bot could not read line breaks — by using Matt’s code to start on a later line, I was able to get it to tweet the whole first stanza of the poem, which feels like victory enough for the moment.

Bot (n): An automated program on a network (esp. the Internet), often having features that mimic human reasoning and decision-making

This was the second (third?) time around in bot-making for me, and I was struck by how much just a little more programming experience makes the task so much less daunting. It helped that the tutorial was put together in such an easy to use platform. Coding and hosting environments are still elusive to me (are there free versions? How do we get access to them?). The last time I created a bot a couple years ago (Casual Observer @FlyOnTheWallBot, which is broken right now because Twitter changed their OAuth protocols and I didn’t realize it), I wrote it in Google script so that I could run it from Google Drive without worrying about it. But Google script feels much less intuitive than Python feels to me now, and seems to have much fewer resources in terms of existing libraries to import. When we talked about how to search Twitter and use its results at the end of the workshop, I was awed at how much easier it would be than the script I wrote (with lots of help from web searching, my c.s. boyfriend, and appropriating parts of code from other bot-markers). Certainly I’m nowhere near pro-status when it comes to bot-making, but I feel like I have a lot of ideas that could viably be realized with a bit of work and time, and that’s super exciting!

I, TwitBot

I have to say, the Twitter Bot workshop has been my favorite class thus far. Although working through CodeAcademy has been, at times, frustrating and overwhelming, I really felt it paid off when I basically understood what it meant to import a library, reference a list, etc. I used some code someone else had written in a dev environment that somehow existed in a web browser and slightly modified it in order to make a tweets appear without actually typing them. Okay, when I put it that way, it sounds pretty lame. That said, it felt pretty cool to see it work.

I have a lot of cool ideas that I want to play with moving forward. I do really want to create the cast of bots I talked about in class, though, that tweet the lines of a play at each other. I really want to see what happens when something like Hamlet is broken down into lines, tweeted over time, broken up by other people’s tweets about their eggs Benedict and the scores of Penguins’ games, and tweeted using @Ophelia etc. I’m interested in how a text changes when it’s translated from one medium to another, and also investigating what my role (as a “programmer”–and, as you all know, I’m using that term very generously) in the creative process is when I do something like that.

As a middle-school teacher, I encounter texts–literary texts among others–in a few different ways. Trying to introduce ninth-graders to Romeo and Juliet or middle school students to Naomi Shihab Nye means trying to connect those texts to something in the students’ world. Consequently, there are ZILLIONS of resources out there for high school and middle school teachers to help students to access challenging texts “on their level.” Some of you may have seen texts like Srsly Hamlet and  YOLO Juliet on the end caps at local book stores. As English grad students, many of you have probably thought, “Oh my god, they’re ruining great texts.” But these books are widely popular and used in lots of classrooms across the country, because students find them more engaging/accessible. Of course they do. In a way, it reminds me of those activities I used to do when  was a high school student where you have to translate a difficult passage (usually from Shakespeare. You’ll notice I reference him a lot. And Poe. They’re the staples of the “English Cannon” as it’s presented to the youth of America, whether I like it or not…) into “modern English.” The idea is, supposedly, that the act of translating shows that you understand the content. What we have in the cases I mention above is different because the students are presented with a “translation” already done for them. But it sounds like I’m bashing these texts–in fact, I think that I probably am. But I’m not sure if I’m right to do so.

When I teach a play, and particularly when I teach Shakespeare, I talk a lot with students about the unique quality of drama to be re-imagined. I’ve seen steampunk productions of King Lear, contemporary versions of Othello complete with waterboarding, and I’ve shown students the competing interpretations of Romeo and Juliet that cinema of the last 50 years has given us. If Drama can be reinvented with creative casting choices, setting, costume design, etc., why can’t it be adapted for social media? Well, the answer, obviously, is that it can, but what happens to a text when it is adapted for social media? What if people retweet it? When I was making my bot with you all, and it was just spitting out lines from “The Tell-Tale Heart,” I got a follower. Who? Why?

I’m not sure what to make of pretty much ANY of this. I know that I still think Srsly Hamlet is an abomination. No meter. The wit is basically lost. And it seems trivializing. I don’t think that I’m saying that because I’m an old fuddy-duddy. I think I’m right to cringe. Would a tweeting Bard be equally cringeworthy? That’s what I’m curious to find out!

This was a little bit of a random post–I hope it was meaningful in some way to some of you! Cheers! 🙂

Real people make fake people

I really really appreciated having the opportunity to work in the new Digital Scholarship space last night. The Codeacademy.com tutorials have been helpful, and I do appreciate how the company simulates a community environment in their lively forums, but there’s nothing like sitting down with a group of people in the same room and trying to do something new together.

I am brand new to Twitter and honestly didn’t truly understand Twitterbots until we started writing our own Python code under the guidance of Matt Burton. For some reason I had this preconception that Twitterbots and Spambots were one and the same, and that they were inherently evil (yes I’m a bit of an alarmist, still, despite learning more about computers every day). Troubleshooting with a group of humans, exchanging notes face-to-face, and witnessing each other’s reactions to various steps of the process, made this exercise enjoyable and far more fruitful than some of my individual struggles with coding.

As regards thinking about what the Twitterbot of my dreams could potentially do, I am curious about its potential in the podcasting world. I wonder how it could generate suspense by Tweeting out excerpts of podcast stories, in sequence, in the lead-up to the actual full-length audio episodes being released? Hmm…I probably need to think through this a bit more, but there might be something there?

 

Excited but disappointed but also excited

Learning about Python and Twitterbots was both incredibly exciting and incredibly disappointing. Exciting I’ll get to, but since I’m from the Northeast, the more negative feeling usually surfaces first so I’ll start there.

Now, Matt and the workshop were both fantastic; it was a great job all around. What I mean by disappointing is that there was just SO MUCH I did not know and also did not know that I did not know. I mean, the Python training was pretty hard but I thought I had some handle (ableit fairly small) after doing it. After seeing some of the code (and what might be behind that code), though, and especially after seeing the possibilities of code and the errors that spit back and the ways to interpret the errors and the ways to search for solutions to errors and the eventual befuddlement at what any of those solutions searched for produced and the myriad available libraries and functions that I had difficulty parsing through for building a bot and all of the words that I thought were familiar to me but had no idea what they mean when used in regard to programming (initiating and returning and run and execute)…it’s all kind of exhausting and a tad disheartening.

Still, the sheer amount of possibilities such work holds is really cool. I’m not sure what I might do with this potentiality I have in front of me, but I was able to see how it worked (even if to a small degree) which helped me see some semblance of interesting things that could be an outcome from wielding code. Maybe I’m picking up on some of the procedural expressiveness inherent in such tools by physically doing some of this work in both Codecademy and in the workshop, which is very different from reading Bogost and saying “Yeah, I see that procedures can make arguments and expressions.” Doing it makes it real. And possible. Just don’t know a good how or why of that possible quite yet. I want to do some cool thing related to a research interest I have, but it hasn’t quite come to me yet. It’s out there, somewhere, though. Just need to go find it.

Despite my excitement/disappointment duality, there are things I can think about that were only very hazily apparent to me before I dug into Python and Twitter bots. That’s exciting. And probably exciting only because of this disappointment I seem to be expressing.

Ampin the Bot

I’d only heard of twitterbots once before this evening, and that was from an academic friend with more than a toe in the digital humanities pond. So Matt’s work tonight was very helpful.

I was struck by the way in which he did several things at once. Sure, he helped us follow a functional arc of code rooted in libraries and the sine qua non of digitalia, copy/paste. And boy did he define a host of terms, such as API and ASCII and Unicode, while leaving some opaque (such as “web scraping”). But he also unfolded bits of “brogrammer” lore (his word) and touched upon points of cultural critique, such as the corporate desire to index our online avatars to our consumptive bodies.

He reminded me of a foreign language instructor with whom I am currently taking a class (beginning Turkish). She shows us with infinite patience how a difficult yet extremely regular grammar functions at a code-like level, and intersperses this work with cultural asides in rapid-fire frames. In both cases I see a translation from semiotic domain to semiotic domain, to use a term from Gee’s What Video Games Have to Teach Us About Learning and Literacy. Critical learning, Gee claims, is a matter of both internal and external design grammars — both the content within the design space afforded by a given domain, and the ways of thinking, acting, and being that constitute that domain in the social sense (which many of us felt was spottily addressed by Bogost’s Persuasive Games).

So . . . am I a critical twitter-botter? Hell no. On a functional level, I was able to make the code work only with the hearty assists on offer in the workshop – the boilerplate code, the scaffolded instruction, the chance to ask questions, the comestible goldfish. Even so, I felt able to grasp some of the contours of what we were doing. I wasn’t just copying & pasting blindly, but instead thinking about the shareable nature of Python code, the value of open source libraries, and how so much of the latticed software constituting my humble bots is out there, above the virtual cloud, hosted at its corporate core by twitter to be sure, but working in concert with github, various trouble-shooting sites, and google voice (which provided my bot’s digits).

I had several word files open in which I excitedly took notes. Gee writes that “[a]mplication of input is highly motivating for learning.” I’d been easily stymied in my private sojourns up Mount Python, yet was still able to benefit from the workshop, so I’d say our foray into botland was a fine example of the amplification of input principle.

Twitterbot Check-up

For the Materialities of Writing seminar two years ago, I created a questionable/silly “Old Timey Doctor” bot (@HistoricalWebMD). It spewed out poorly phrased medical advice from a fairly limited word bank for longer than it should have been allowed to run until eventually something broke, and I shut down operations. This week’s excursion is my first time back in Twitterbot land, and since I apparently have enough Twitter accounts for my phone number to not allow me to make a new app, I’m currently reusing my old bot for new testing purposes.

In my last Twitterbot foray, most of the code was provided for me; I just needed to enter the word bank. This time — even with over ten hours of Python tutorial under my belt (confession: in the over ten hours, I maybe made it halfway through) — playing with the code was much more of a challenge. It confounds me how much metadata runs behind what appears to be a simple 140-character (or less) Tweet.

My original/eventual vision for my Computational Media bot is called J. J. Audubot, and it’ll use text from John James Audubon’s Ornithological BiographyI realized, however, that the pdf digitization of the volumes makes it difficult to cut and paste into a text-only document — so I’m still in the early stages of figuring that out, and from there, deciding what J. J. Audubot will actually say, and why it might matter to the wider world of Twitter. (Maybe J. J. Audubot should be a Chatterbot instead).