• Matthew Davis
    University of Massachussetts Boston
  • Kevin Brock
    North Carolina State University
  • Stephen J. McElroy
    Florida State University

III. Programming as Composing (with) New Media

As we mentioned earlier, it is hardly novel to observe that scholars of rhetoric and composition have spent the last decade expanding beyond the conventional boundaries of the discipline: image (Fleckenstein), sound (Halbritter), games (Gee), and visual design (Kress and van Leeuwen) have all been incorporated into composition theory and practice, with a tremendous amount of scholarship focused on multimodal works (Shipka) created in a variety of media, especially digital media. As Yancey has observed, these varied methods of composition have an even wider variety of purposes, and many students regularly practice composing far more with emerging technologies and forms of communication than we might traditionally be willing (or able, given any number of programmatic or resource-related constraints!) to use in the classroom.

That said, one particularly significant—and generally overlooked—form of contemporary communication is the range of computer code languages that, through their compilation into executable software programs, enable and constrain our digital actions of suasion in powerful and meaningful ways. As instructors, we demonstrate interest and suggest value in engaging in such communication, but as a whole we've been slow to discuss the levels of architecture and action that oversee end-user methods of composition. Below, we will discuss how programming languages are rhetorically powerful forms of composition, situate them within courses on writing and rhetoric, and offer demonstrations of actual programs created by students.

Programming, Procedure, Pisteis

At the heart of software is operational procedure, the expression of an algorithm in order to interpret some output from an initial input. An algorithm is a procedure whose execution is made possible by a set of conditions that influence subsequent steps and conditions within the procedure. For computer science, algorithms serve as frameworks for tasks composed of discrete numbers of well-defined steps. Software programs are made up of thousands of such procedures, often relying on dynamic interrelations of data and user interactions with constructed interfaces to build a meaningful experience for that user. However, these sorts of algorithms are not always as discrete as conventionally described or perceived; in many cases (and especially when it comes to making meaning for specific audiences and outcomes) the types and ranges of conditional influences upon the potential expression(s) of a given algorithm include far more varied and flexible components than computer science would suggest.

This intent—meaningful activity through software use—is squarely in-line with the tenets of rhetoric and composition in no small part because software operation is an increasingly available, and effective, means of persuasion for a digitally-involved population. There have been several proposals to consider more explicitly the potential for software, and the programming thereof, as a valid part of composition and its work. Ian Bogost argues for procedural rhetoric as a means of understanding how interactive systems (like video games) engage users in learning about how rules of procedure enable evaluation of successful routes of action within those systems. Annette Vee suggests that proceduracy—a literacy of computer code and how it operates—is critical for success in the 21st century. David Berry makes a similar case for iteracy as a means of understanding how to apply procedural rules across large bodies of data in the manner of algorithmic expression. The canons of invention and arrangement work procedurally for conventional arguments: rhetors determine what conditions are likely to be most accepted by a given audience and structure their case in an ordered path that facilitates the optimal response to each step in the argumentative procedure.

The affordances and constraints of code upon software functionality and user experience are available means of persuasion: the coding rhetor deals with the arrangement of algorithm, user input and response, and (potentially) dynamic manipulation of data (for an intriguing discussion on invention and style in this vein, see David Rieder's Snowballs and Other Numerate Acts of Textuality). Brian Ballentine has explored the impact of rhetorical awareness related to code written with different levels of obfuscation as constraints—such as to protect proprietary software from competitors—by highlighting the range of (potentially unforeseen) consequences stemming from decisions to make a given code text more or less accessible and readable as part of its composition. Computers enable persuasion not merely by mixing together multiple modes of communication or offering user interaction with texts, but rather by constructing, through code languages (even when hidden from the user), the procedural frameworks by which we can invent novel and complex means of persuasively engaging our audiences. In short: code sets the conditions of rhetorical possibility within which digital texts come to be composed.

Programming as Composing

One might object that code functions primarily, if not exclusively, as mechanical operation devoid of, or outside the realm of, persuasion; one cannot convince a machine that a particular calculation (and the mathematical nature of calculation cannot be understated here) could have any value other than its rigidly-determined solution. Others might argue that end-use reflects more accurately than code the relationship students have with computers. These arguments both have merit, but they also underestimate the possibility of programming as a rhetorically rich and significant form of writing and composing as well as of interactive communication. Donald Knuth, inventor of LaTeX and WEB/CWEB, has long suggested that code has literate, aesthetic value, is a messy and contingent practice not unlike other forms of communication, and should be approached as an art rather than a science; the goal of CWEB, for example, is to regard a program as a communication to human beings rather than as a set of instructions to a computer (Knuth and Levy). Knuth has even published several texts whose titles reflect this perspective of code as artistic and humanities-oriented practice, including Literate Programming and the multi-volume The Art of Computer Programming. Another widely respected programmer, Yukihiro Matsumoto, the initial developer of the Ruby programming language, similarly argues that code—like “natural” writing—is primarily designed for human readers, and it is incidental that code can be executed by machines. Further, software developers around the world engage regularly in arguments about how “best” to style their code for human audiences as well as for computational efficiency.

So how can a mathematical process, or an assembled mass of such processes, offer rhetorical value and serve as a means of composition? Further, how could it benefit writing instructors, especially those who may feel overburdened by the implicit need to include in their syllabi multiple modes and venues for academic and civic genres of communication? First, code allows for a more exposed, and (perhaps ironically) more accessible “machine,” because the mechanisms of code are manipulated in anticipation of user behavior in interaction with the compiled code as software program. Second, code provides a means of exploring and implementing dynamic procedure—what might best be called a flexible algorithm—constrained and constraining individual input as a key variable in its expression. Third, code is a (perhaps the) foundational component of digital media, and including it in a writing course situates it very differently than in a computer science course. Rather than focusing on becoming expert programmers, the context of a writing course allows students to learn both the basics of programming logic and how coders communicate meaningfully with others in and through code.

The third benefit may be the most intimidating for writing teachers: it demands of instructors a familiarity with how code works, and by extension, at least one language that might be accessible enough for students to learn the basics of as part of a single-semester course. This is tricky, since higher level programming languages seem abstracted from the machine operations it describes.

Courses and Projects That Focus on Programming-as-Composing

To examine the possibilities of coding as available means in the writing classroom, we will focus here on an undergraduate course designed to introduce students to code from a rhetorically-informed, humanities perspective. The goal for the course was to get students to think more critically about the capabilities of digital technologies to help composers “make things” digital and physical in nature; this was accomplished technologically with the aid of the Processing IDE (Integrated Development Environment), which is a streamlined version of the Java programming language. Processing was helpful in that it

  1. used simplified syntax (in comparison to Java proper), written specifically for non-programmers;
  2. came installed as a stand-alone application in which sketches (the code programs written in Processing) could be run on the fly with dynamic, quickly-noticeable results;
  3. was available across multiple platforms, meaning that students who preferred to use their own laptops (rather than the Windows XP machines provided in the classroom), or who wanted to practice on their own computers outside of class, could install Processing on their systems regardless of OS.

For students who were—at least at first—overwhelmingly not comfortable with “advanced” or highly-technical uses of computer technology, these affordances were extremely significant since they made the relatively alien act of programming a bit more accessible.

The class was an upper-level special topics course on rhetoric and digital media, cross-listed in English and Communication and titled Code, Computation, and Rhetoric. The course's explicit focus was to introduce students to rhetorical and computational principles and examine the relationship(s) between those two sets of principles. Students were taught the Processing IDE and the fundamentals of programming alongside examples of computational art (e.g. the works of M.C. Escher), music (e.g. fugues, John Cage's music of changes), and literature (with a focus on the works of the Oulipo). The class engaged in critical analysis as well as creative composition, applying their growing understanding of rhetoric to algorithmic procedure.

Student projects were diverse, taking advantage of a variety of rhetorical possibiltiies and available compositional means. One student, who we'll call “Eve,” created a quiz-game called Would You Rather, A Game of Constraints, which offered the user two possible answers to each question; the answer chosen by the user influenced the emergence of a visual collage in a space beneath the quiz. As the user answered more questions, the visual changed according to their answers—what appeared initially to be a set of binary choices dissolved into a complex assemblage of character-based reflection. Eve created her program with a focus on constraint and rhetorical repetition, hoping to force her user, through the act of choosing answers to her questions, to see what sorts of limitations contemporary technologies place upon those decisions. In reflection, Eve also noted that this project allowed her to consider constraint in a similar fashion, as she learned more about how computers facilitated and restricted various types of behavior and activity through code.

Screenshot of choices & collage from Eve's 'Would You Rather' game

In some ways, Eve's project is not entirely “successful” in terms of clearly communicating its meaning to the user; for example, upon completion of her game, the user is told how many times he or she chose option A and option B. This quantification of choice can seem a bit off-putting when compared with the dynamic composition of the final image composite connected to chosen responses. However, the inclusion of this information is telling in that it demonstrates Eve's awareness of the flexible applications of her code: not only can she translate a quiz into a new mode of communication but she understands the multimodal potential of behavior tracking. While this particular game does not make significant use of that tracking, it nonetheless signals that Eve—or another coder-rhetor— could engage in inventive practices centering on a program's ability to record and report on decisions made by, and activities undertaken by, one or more users of that program.

While Eve's project could have been made without exposure to a code language like Processing, she would have taken advantage of (potentially) very different means for composing. For example, Eve noted that a basic understanding of Boolean logic, used to define the various conditions that would be checked in order to set the opacity of various images displayed in her application, provided her with a radically different perspective than if she'd tried to create her quiz in some other form. HTML, for instance, would afford the sort of hyperlinking that serves as the basis for Eve's image opacity construction, but its realization in that medium would not permit the sort of dynamic tracking of data across questions—which in turn continuously affects the emerging composition of the quiz—made possible through Processing.

Another student in this course, who will be referred to as “Kay,” decided to look more closely at the specifics of Processing syntax and structure as a means of studying rhetoric. Interested in specific rhetorical devices and how they are used, she devised a simple game to “click the correct block” that made meaningful use of repetition both in terms of code and in terms of game play (the linked web page, like the link for the mouse game above, provides a simplified demonstration of the primary differences in how the blocks were rendered in each version of the student's project). Kay did this by creating two versions of the game: one that populated each block individually, and one that made use of loops to iteratively construct batches of blocks.

In the first excerpt below, Kay approaches the idea of rhetorical repetition by defining individual rules for each block that would be drawn in Processing. While the analogy is somewhat shaky, one might consider this approach to be the equivalent, in conventional rhetorical terms, of a political candidate listing the unique hardships of individual citizens that he or she hopes to help them overcome after winning an election. The first six lines calculate the random positions of the top left corner of three rectangles to be drawn in a given frame of her program; ax, for example, will be an integer randomly chosen between 0 and 347. The final three lines indicate the rectangle's dimensions: starting at the top left x and y coordinates (e.g. ax and ay), each rectangle will be so many pixels wide and so many pixels tall.

  int ax = int(random(0, 347));
  int ay = int(random(0, 347));
  int bx = int(random(0, 346));
  int by = int(random(0, 346));
  int cx = int(random(0, 345));
  int cy = int(random(0, 345));
  [...]
  rect(ax, ay, 3, 3);
  rect(bx, by, 4, 4);
  rect(cx, cy, 5, 5);

In the second excerpt—Kay's substantial “revision” to her repetitive coding technique—all of the blocks are drawn with the same basic set of rules. While they will not all be drawn exactly the same (since the randomization of their sizing differs with each iteration of the for() loop being calculated), they are each subject to the same overall parameters. To continue the political candidate speech analogy from above, this approach might best be understood as a candidate's defining the shared hardships of the populace that, theoretically, plague each potential voter. Unlike the individal rules guiding each rectangle's creation in Kay's initial version of her code (e.g. rect(bx, by, 4, 4); has a different size and potential placement from the other rectangles), in this model every single block has the same potential qualities (i.e. a width and height of no less than 5 and no greater than 20 pixels and with a top left corner whose coordinates are randomized based on the block's width and height).

  for (int i = 0; i < 20; i++) {
    fill(255, 0, 0);
    var box_size = int(random(5, 20));
    int x = int(random(width - box_size));
    int y = int(random(height - box_size));
    rect(x, y, box_size, box_size);
  }

The latter version of Kay's repetitive blocks code is the comparatively “elegant” way of coding, because it saves time, space, and energy in establishing the rules for block-building in the game. However, the former version employs a much more nuanced use of repetition: a loop provides all elements of repetition with a unified set of rules for their collective construction. In programming terms, this approach is refered to as DRY (for Don't Repeat Yourself): code elegance relates in part to the minimizing of “redundant” operations and procedures. While looping enables the programmer to reduce the amount of writing, and space (visually, for readability's sake, and in regards to file byte size), coding the blocks through independent and individual instructions enables the coder to provide unique and potentially disparate rules, and thus expressive results, for each. This sort of distinction may not ever be noticed by users (assuming they played both versions of the game), but the difference in the rhetorical underpinnings of each version's code is profound.

These examples from Eve and Kay barely scratch the surface of inventive potential when we consider programming as a form of composing and as a rhetorically meaningful means of inherently multimodal communication. That is, students engaging code as a form of meaning-making must do so with an understanding of the, sometimes radically, different modal nature of their work when it is expressed through interactive use. The randomized numbers of Kay's statements become colorful blocks that seem to jump around the screen, while Eve's game of choices has its meaning emerge through the fluctuating opacity of particular photographs.

When incorporated into a writing curriculum, the logic of code allows students learning rhetoric in an increasingly digital society to have at their disposal a fundamental understanding of algorithmic procedure in order to help students achieve rhetorical action. Without it, students may still be able to work within new media environments, but they are not innovating in their inventive practices to the extents possible beyond the “surface” level of technological interfaces. Do students have to dive deep into digital technologies in order to successfully communicate in or through them? Not necessarily—but if we want them to know all the available means of composing, we need to direct them towards interrogating how code works rhetorically and how our compositions in/of new media are constrained by that working. Expanding our notion of literacy in this fashion supports an expansion of composition in directions that can only be revealed through inventive experimentation with emerging forms of communication.