ENGL539 Designer Blog: (AP)I need a code

I’m updating one more time before the project is due, because clearly by my last post I was not anywhere close to having a viable code to show for the final project. According to my proposal, my code should have been perfected by 4/24/15, but I abandoned hope of that long, long ago.

Via my Googling, I found this blog, explaining how to collect tweets using Tweepy. I didn’t fully understand Tweepy, but from there, I learned that there’s a difference between a “Rest” and a “Streaming” API. From the descriptions, I learned that I would need a Rest API, and from there I found a line of code that would do exactly what I need, called GET statuses.

Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.

The site doesn’t really explain how to use it in context. Based on their example request line of code, I tried:

Screen Shot 2015-05-04 at 10.48.11 AMUnfortunately that did not work.

I went through some tutorials trying to find any that may have used that function. I didn’t see any, but I noticed that all of them had this code at the top that somehow authenticates your bot. I tried including that as well to see if it worked (spoiler alert: it didn’t).

Screen Shot 2015-05-04 at 10.51.05 AM

With a week left, I’m going to spend my time playing around with Tweepy API tutorials. I still haven’t made the jump from Dan’s tutorial on how to have bots produce work to my own goal of having bots collect work. If I figure that out, I’ll be satisfied!


ENGL 539 Designer Blog: IT’S ALIIIIIIIVEEEE (I Made a Bot)

Last week on 4/13/14, our Second Tutorial assignment was due. That forced me to get on track with my coding tutorial and put some of my knowledge to use. I was really happy with how it turned out! It was very basic code, and I’m sure I didn’t go about it in the cleanest, easiest way possible, but I wrote it from scratch and consider that in and of itself a huge accomplishment. Once I had gone through the first few chapters of the coding tutorial, I was able to start Googling smartly. By that I mean I had the basic jargon down, and had a better idea what search terms I should use to get the results that I want.

I still wasn’t sure how to go about applying the code (once I got it) to Twitter to start grabbing tweets for me. Luckily, in class last week we were in groups discussing the progress of our projects, and Dan mentioned that he has a tutorial on Twitter bots. I saw him post it on Facebook, but a. I didn’t know that a bot could do what I was asking—I associate them with Twitter profiles that interact with other users and produce things an b. I was hoping to start from scratch and figure it out on my own so I could understand the logistics of it. That definitely was not working, so I tried out the tutorial.

It went really well! It was very simple—I still ran into problems, but they were Google-able. For example, he instructs to install “tweepy” by using the line:

pip install tweepy

I kept receiving the error message:

-bash: pip: command not found

After a little searching, I found out that “pip” (whatever that is) does not come automatically installed with the version of Python I was using. I tried to manually install it, but after failing, just upgraded my version of Python and it was fixed! Finally, I got the bot to work:

Screen Shot 2015-05-03 at 11.07.32 AMBot results

My aim is to collect data, rather than reproduce tweets, but this was an excellent introduction to bots…now I have a better idea of what I’m working with, and how I use the code to make it do things. I am still woefully behind on having a code ready, but this tutorial introduced me to Tweepy, and I’ve seen a few tutorials about using it to data mine, so I think I’m getting closer.

ENGL706 Pre-class exercise: reflection

Reflection Piece – I’d like you to connect now all that you’ve learned in this class to your own work, be it as a teacher, as a scholar, as a professional writer/technical communicator. How do these new ways of thinking about the visual influence:

  1. How you see information being understood by your audience?
  2. How you approach the invention portion of your projects?
  3. The relationships between the visual and other modes (linguistic, auditory, kinetic, etc.)?

As a scholar, considering the visual influence is important in order to conceptualize information in new ways in the digital age. Burdick et al (2012) argue that the modern role of digital humanists is to democratize information that was once only available to the privileged elite. In order to do so, scholars need to take advantage of the affordances of technology to find creative ways to curate, organize, and transmit ideas. As Lemke (1998) points out, informatic literacy—the understanding of how to retrieve information—is vital in the digital age. He says that without those skills, “future citizens will be as disempowered as those who today cannot write, read, or use a library” (p. 79). As a scholar, making design choices to facilitate the audience’s ability to navigate information is an ethical obligation. Digital media has provided almost unlimited modal affordances to craft realities (Kress and Van Leeuwen, 1996); understanding of design principles and visual rhetoric theories is necessary in order to navigate the vast landscape of digital media.

This class has given me a deeper understanding of how the underlying structure of visuals and design communicate meaning, not just the explicit images. I have taken a visual rhetoric class at the undergraduate level, but the focus was on images, not visuals (a distinction I now understand is very important to note!). The structure of a piece is the way that a rhetor communicates his/her position to the audience. That includes the modalities used, the interactivity allowed, the design choices made, and the content. I now appreciate that the content is only a piece of the overall meaning of a work.

The underlying, less obvious structures related to reaction GIFs (my class project) is essential to drawing conclusions about their rhetorical functions. I’ve expressed some frustration over the semester about how their meaning is highly contextual, and it’s difficult to come to overarching conclusions about them. But I think that talking about the context of where they appear and their modal affordances has really helped ground my arguments. On a purely visual basis, there are a million meanings; each image is associated with different cultural understandings, and it’s impossible to account for all of those. Considering the modal affordances, site structure, and ethos of Gawker Media are much more manageable and useful frames to discuss reaction GIFs.

Because GIFs have been growing in popularity over the last few years, it’s important to understand their rhetorical function as a scholar who studies digital humanities. There are definitely “right” and “wrong” ways to use GIFs (the House of Representatives is famously bad at it). Understanding the “right” ways to use them is essential to establishing ethos. GIFs are a fun, relatable way to relay information,  and I hope that my work from this class helps to highlight a unique, under-studied way to relate to audiences.


Here’s to the end of the semester and a great class!!

(I’d be a hypocrite if I didn’t have at least one GIF in here)

ENGL 539 Python Tutorial: Create Your Own Mad Libs

A note on resources: This tutorial was created on Mac OS X Version 10.9.5. I used the default pre-installed version of Python, version 2.7.5. I used Apple’s pre-installed Terminal application and Bare Bones Software’s free TextWrangler download.

  1. Open TextWrangler
  2. Enter # -*- coding: utf-8 -*- to allow for unicode characters. I had trouble with question marks and semicolons causing errors when running my code; this discussion seemed to fix the problem.
  3. Determine which parts of speech you will be replacing in your text for the Mad Lib. Start simple; for this tutorial, I replaced singular nouns, present tense verbs, adjectives, and adverbs.
  4. Define the part of speech
    1. Type the part of speech label
    2. Type = to indicate the words it will representScreen Shot 2015-04-13 at 3.06.55 PM
    3. Type your values between brackets [ ]Screen Shot 2015-04-13 at 3.07.16 PM
    4. Each value should be enclosed by quotation marks ” “Screen Shot 2015-04-13 at 3.07.27 PM
    5. Separate each value by a comma outside of the quotation marks “,Screen Shot 2015-04-13 at 3.07.37 PM
    6. Repeat for each part of speech you are defining; each list should be on a different line (example below)Screen Shot 2015-04-13 at 4.11.40 PM
  5. Type import random on a new line to import the module that will allow for you to randomize your textScreen Shot 2015-04-13 at 3.07.58 PM
  6. Paste your text on a new line and format. You can use any text, or create your own!
    1. Type print in front of your textScreen Shot 2015-04-13 at 3.09.57 PM
    2. Ensure the text is between quotation marks – this will ensure it appears as-is when the code is runScreen Shot 2015-04-13 at 3.11.04 PM
    3. Consider separating your text into multiple lines, if it is not already, in order to make the code readable
    4. Edit your text to suit the code. Ensure that \ are properly added to words with apostrophes or quotation marks that you would like to print when the code is run. Ensure all apostrophes/quotations are opened and closed properly. Ensure each line has “print” in front of it.Screen Shot 2015-04-13 at 3.12.49 PM
    5. Replace the words with the name of the part of speech in all caps and exclude them from the parentheses enclosing the string. This is so you can easily identify where you will paste the code for the random text generator.Screen Shot 2015-04-13 at 3.26.25 PM
    6. You can take this opportunity to paste in the random.choice code from step 7a, however I suggest waiting so that you can easily review the words that you removed.
    7. Ensure that the words you are replacing match the tense; for example, do not replace a plural noun if the words in your noun list are singular.
  7. Enter the randomization code into your text
    1. Replace the parts of speech in the text with random.choice(part of speech)
    2. Separate the random.choice code from the string of text with a comma
    3. Enclose the word before and and the word after the random.choice code with a quotation mark.Screen Shot 2015-04-13 at 3.34.21 PM
    4. Here is an example of the final code:Screen Shot 2015-04-13 at 3.34.09 PM
  8. Run your code through Terminal by opening the directory where your TextWrangler file is saved typing python filename.pyScreen Shot 2015-04-13 at 3.36.49 PM

Here is what the code looks like in its entirety:

Screen Shot 2015-04-13 at 3.40.35 PM

Here are a few examples of the results:

Screen Shot 2015-04-13 at 2.17.53 PM Screen Shot 2015-04-13 at 4.28.36 PM Screen Shot 2015-04-13 at 4.28.53 PM

ENGL539 Designer Blog: My Proposal Timeline is a Joke

So I turned in my official project proposal on 3/30/15, anddd I’m already off track. I vastly overestimated how quickly I’d get the language. I was basing my time estimations off of when I learned HTML a few years ago…I remember thinking it was really easy as I Googled everything. This is way more complex.

I started going through the Harrison video referenced in my last blog (and stated in my proposal that the tutorial would be done by 4/2/2015), however I just couldn’t get through it. I was lost within the first five minutes when he mentioned importing “cookielib” in the third line of code and didn’t explain further. Google couldn’t even give me a good explanation of what it was. The tutorial assumed you had some basic knowledge about Python, and it was tedious to keep googling along. From the Python beginner’s wiki, I found a very basic tutorial called Learn Python the Hard Way by Zed Shaw. It started as small as teaching how to become comfortable with Mac’s Terminal and TextWrangler, so I feel good about it. It’s very similar to Code Academy; the author strongly encourages readers to follow along and write out the code, even if it’s super basic. I feel much more comfortable with this format over a video tutorial. Unfortunately, I’ll need to take the time to go through Shaw’s book, and in my Proposal I projected that I’d be manipulating some form of my final code by now. Coding is hard 😦

ENGL685: Visualize how you see theory

Wednesday 4/1 Warm-Up: “Use Google Drawings to visualize how you see theory working in your project.” The poor quality wasn’t intentional, but the more I look at it, the more I think it was a subconscious representation of how I’m feeling at this point in the semester. Also, you probably wouldn’t believe that the person who created this has taken some visual rhetoric/design courses, but you’d be wrong.

Ashley's theory visualization