Daily Archives: November 18, 2020

Chance Encounters: Pedagogical Methodologies for Teaching Creative Coding

This paper presents a model for teaching drawing with computer programming, using conceptual and visual characteristics of twentieth century avant-garde painting practices. It examines how this pedagogic methodology is then developed to combine, synthesize, and apply these insights algorithmically, using the Python programming language, to produce generative artistic forms that can be evaluated and iteratively refined. The learning unit’s goal is to provide media production students with a tangible formula to continually build their critical, creative, and technical skills as they engage with visual culture.

We often overlook how much of our lives hinge on chance events. From the economic, geographic, and educational environments that we are raised in, to our genetic makeup, these chance occurrences can have a far greater impact on shaping our lives than whatever individual efforts we put forth. How might students develop a creative process that embraces these contingencies in their work? How can an educator inspire undergraduate students who may not have an art history or programming background to imaginatively foster unpredictable artistic outcomes through rigorous procedural thinking? What models can be used for students to embrace problem solving and play in assignments?

I consider these questions in Creative Code, an undergraduate course intended to explore the concept of computer programming as a creative endeavor to produce algorithmically generated artwork. This class provides a foundation in computational skills and aesthetic systems in preparation for advanced classes in programming for gaming, physical computing, and web development in emerging media. In Creative Code we focus on crafting algorithmic poetry, drawing, and sound production using different coding environments and aesthetic tactics to learn essential programming skills. For this unit I model an aesthetic and technical methodology that demonstrates how to identify concepts like chance, constraint, and repetition from the analysis of artistic and programming examples. We then combine, synthesize, and apply these insights to produce new hybrid artistic forms that can be evaluated and refined so students have a formula to continually build their critical, creative, and technical skills.

Presentation and Discussion Methodology

The teaching sequence begins with an analysis and discussion of representative artworks then shifts to in-class programming exercises and is followed by a homework assignment that explores and refines algorithmic drawing. To ground our programming work within a theoretical and aesthetic context, we analyzed and discussed Marcel Duchamp’s Three Standard Stoppages (1913). Duchamp’s piece was created by dropping a meter-long string three times onto separate canvases at a height of a meter and then adhering the string’s unplanned placement to the canvas. This approach, known as using a ‘chance operation’ within the field of the arts, is a process that leaves some element of randomness in the outcome of the artwork. During our discussion of the piece, I asked the students why artists would be interested in incorporating random elements into their authorial vision. I was surprised by the variety of the answers they provided: students gave examples of unpredictable moments that connected to their daily lives, from unexpected delays on the subway to disruptions in internet service. Students suggested that artists who work with chance may be interested in bringing the arbitrariness of existence into their artistic practice.

We then turned our attention to the use of constraint systems, a set of rules or restrictions that limit the range of possible materials, treatments, or outcomes for the creation of art. In the case of Three Standard Stoppages, we saw how there were limitations put to aspects of the piece to give it unity and cohesion, like the fact that each string was the same length and dropped from the same height. These constraints allow for the chance act of the dropping of the string and its physical movement through air, and memorializing the incidental physics at play to have more of an impact in the comparisons when viewing the three pieces together. In addition to Duchamp’s piece, we also looked at the drawing process of contemporary artist Sougwen Chung and how she incorporates chance behavior of traffic patterns in New York City as part of the mark making process in her collaborative artworks with robots. In her duet painting performance Omnia per Omnia (2018), a video camera’s live feed of a traffic intersection in Manhattan is analyzed by a motion engine software analytics program developed at Nokia Bell Labs. Information about the walking patterns of pedestrians and cars is then sent to a swarm of robots that are painting on the same canvas as Chung as she responds to their lines and shapes. The piece mixes chance and constraint because the behavior of the individuals at the intersection is unpredictable but limited by the use of just one particular intersection. The traffic signals function as a set of rules that guide behavior and there is a filtering of the data from the computer vision so only higher-order statistics are sent to the robots for their drawing patterns, not all the data collected (Chung 2018). In discussion of both artworks, the function of repetition was also considered, noting the importance of repeating a process over time for Duchamp and the use of multiple robots creating a small swarm of drawing collaborators with Chung.

This introduction to chance occurrences, constraints, and repetition was then followed by an additional presentation of artwork created in the Russian Suprematism movement, an approach championed by Kazimir Malevich, El Lissitzky, and Lakov Chernikhov. These artists wanted to move away from figurative painting, its history and connotations; they wanted to exclude all imagery except primitive geometric shapes. By critically looking at artworks created in this movement we noticed the parameters that the artists used to produce an infinite variety of imagery through the manipulation of the elements of art and design. The artists used variation in the length of lines in their artwork, the thickness of the lines, the hue, saturation and brightness of the colors of the geometric shapes, and location of the placement of objects on the two-dimensional plane.

In-Class Exercise

After our discussion and analysis of Duchamp, Chung and the Suprematists, the first computer programming exercise was introduced: create an algorithmic drawing that incorporates chance occurrences that is inspired by the Suprematist manipulation of basic geometric shapes. As a conceptual starting point for tackling the exercise we looked at taking the elements of design we identified in our analysis of the images (line, shape, color) and identified how the parameters that give them a specific character (width, length, hue, etc.) can become variables that can manipulated in a computer program. By creating a variable for the length of a line, the thickness of a line, the hue, saturation and brightness of the color, the size, height, and width of the geometric shapes, for instance, we would then be able to assign values from a random number generator in Python to these parameters. Each time the computer program is run it would draw a geometric shape where random variables determine the width, height, location on the screen, and color and then determine different variables the next time it is run.

Student Created Computationally Generated Geometric Design,
Figure 1. Student artwork created with Python programming inspired by the Suprematist movement.

To help students get started on their first algorithmic drawing, a starter file was provided that offered an example of how a line can be drawn as well as a simple shape with the Python library TkInter. In the sample code, one variation for manipulating the hue parameter was shown and it was left to the students to continue to build on many of the additional parameters available for lines and shapes.

Once students had completed the first exercise, a second exercise scaffolded skills learned in a prior class by applying a programming technique called a “for loop.” This is a technique common in many programming languages that enables the programmer to repeat a process a designated amount of times. Students were asked to use a “for loop” to draw one hundred lines or shapes that feature randomness in their drawing. So instead of drawing just one element at a time with a block of code, the goal was to create an algorithm that could generate multiple iterations of a line or shape with varying parameters for each iteration of the “for loop.” Essentially, students could wrap the code from the prior exercise and automate the running of it multiple times. Once students were able to get this second exercise working, we took a moment to evaluate the output. This is an important step in computational art: students learn that although we are handing over some of the control of the artwork to chance operations, the artistic process is still iterative and evaluative. Just as the process of painting or drawing incorporates decisions on whether to erase or refine certain areas, in the digital realm we also look to see if we are getting the behaviors we find aesthetically compelling from the program and hone the code based on our impressions. For instance, if we feel the colors are too saturated or the lines are going too far over to one of the edges of the image, we can modify the parameter ranges to create the impression we would like to communicate.

A screenshot of small amount of code illustrating the For Loop in Python
Figure 2. “For loop” in the Python programming language.

Picking up on our conversation about constraint systems from Duchamp and Chung, we considered how algorithmic constraint systems could be introduced into our programs. How could limiting the ranges of possibility create a striking visual impact for the work? How could limiting the placement of object on the screen or patterns of overlapping shapes add to the composition’s complexity? The students were encouraged to think aesthetically about the possible ranges for their chance parameters and the use of repeated procedures in artistic expression. Some students created a set of monochromatic colors choices that vary in their amounts of brightness and saturation while others only used circles for their design. During this exercise we discussed how constraints and chance can co-exist within an artwork and it can generate a productive tension within the work.

Homework Assignment

This sequence of in-class presentations and exercises was intended to lay a technical and aesthetic foundation for algorithmic drawing and foster a creative interest in the subject that could be expanded upon with new techniques in their homework. For their take-home assignment, students were given a chapter to read on Object Oriented Programming from their textbook and asked to creatively apply these concepts to their algorithmic drawings from our in-class exercises, converting the code they had written to be used with objects and classes in Python. Their final submission was to include two algorithmic drawings, one based on Suprematists geometric abstraction and the other using a “for loop” to create more than one hundred instances of an object. This homework assignment also required scaffolding knowledge of color theory from a prerequisite class. For each drawing they were to use a color scheme, such as monochromatic, complimentary, split complimentary, or analogous, which drew on their design knowledge to create a unified visual look for their piece. In that previous course, they learned how to create a color scheme with a graphic interface in Adobe Photoshop; however, in Creative Code the color scheme was to be created using programming in a text editor.

Outcomes and Reflections

One of the outcomes of this sequence in the class is to enable students to look at their daily visual surroundings and to consider how aspects of art and design might be created computationally. How can I make something I see? How can the elements that constitute an image be turned into variables that can be programmed and automated? This process can help students improve their problem-solving skills and improve their ability to think programmatically and break down ideas into smaller achievable steps. This attention to their visual surroundings can also foster a greater sense of play between analysis and creativity that supports and refines both of these areas.

Not only was this exercise/sequence intended to model procedural thinking, it was also intended to model a methodology for developing a creative computational practice. By fusing two different artistic approaches in this exercise (chance operations and Suprematist geometric abstraction) with two programming approaches (generating random values and looping repetitions) I modeled a framework for making computational artwork. This mode of production emphasizes remixing both the artistic influences and technical skills the student has learned to synthesize these sources and yield inventive new creations.

One issue that this exercise clarified for me was to reconsider the choice of software that is appropriate for both computational poetry and algorithmic drawing. The TkInter library is a little opaque in aspects of its organization and can be confusing for a student’s initial exposure to working with code. The Processing programming language seems far better suited for first time users to begin creative explorations with their drawings. I was worried about shifting between three programming languages in one semester, from Python to Processing and then to Max for the audio and video processing, denying the feeling of proficiency in any development environment. For future iterations, I will remove Python from the course even though it allows for a much wider variety of textual analysis and manipulations for our computational poetry work. I plan on using this assignment again, this time with the Processing programming language, and comparing the results.

After looking at the student submissions of their homework, I was surprised by the variety and overall quality of the graphics from these emerging coders. I have found that the undergraduate students tend to produce some of their best work when the exercise is not too open-ended, where there is room for creativity and variation but within a focused field of play. The students seem to enjoy the ability to generate work that was visually compelling without hundreds of lines of code. Based on their in-class reactions, another pleasurable aspect of this exercise for the students was their excitement to produce one hundred or even one thousand shapes based on just a few minor modifications of their program. For the students’ final project, they were able to choose from any of the computationally generated artistic approaches we covered (sound composition, generative poetry, video processing or algorithmic drawing) and over a third of the class used algorithmic drawing as a significant part of the final project, suggesting this combination of exercises, discussions, and homework instilled an interest in diving deeper into this area. Through this sequence, students were able to see the aesthetic potential of programming as a rewarding area for deep creative explorations.

Bibliography

Chung, Sougwen. 2018. Omnia per Omnia. Accessed August 15, 2020. https://sougwen.com/project/omniaperomnia.

About the Author

Andrew Demirjian is an interdisciplinary artist who works with remix, rhythm and ritual. His work has been exhibited at The Museum of the Moving Image, Eyebeam, Fridman Gallery, Transformer Gallery, Rush Arts, the White Box gallery, the Center for Book Arts, The Newark Museum and many other galleries, festivals and museums. The MacDowell Colony, Nokia Bell Labs, Puffin Foundation, Artslink, and Harvestworks are among some of the organizations that have supported his work. He is a Fellow at the MIT Open Documentary Lab and teaches emerging media courses in the Film and Media Department at Hunter College.

When Wikipedia Fought Back

In this short essay, the author explains what went wrong when he asked his students to tackle an ill-conceived project—an in-class Wikipedia edit—and what he’d do differently next time.

In the fall of 2018, at my last institution, a smaller, teaching-focused university in the Pacific Northwest, I tried—and failed—to use Wikipedia in my survey of digital media course.


The assignment? I urged my students to attempt to edit our institution’s entry on Wikipedia. I had them first read Wikipedia’s own “simple” rules for editing entries (though these by no means are necessarily user-friendly or transparent to beginners, in retrospect). With these rules in mind, I tried to offer some guidance, and we spent the first twenty or so minutes of class creating profiles and discussing how, exactly, to add text, images, and links to Wikipedia entries. It was part of a larger unit on wikis and collaborative digital tools. I was excited. I figured that even if we just succeeded in adding some small bits of information to the page, that would be a success. Students, however, were technically going to be graded on a self-reflection forum post afterward, so it was not necessary that they “succeed” at the process. That helped lower the stakes, but provided enough motivation for students to at least attempt the assignment. 


Like many of my colleagues, I had the best of intentions. I was going to lean in, darn it, to my students’ own learning habits (Wineburg 2018). Inspired by scholar-teachers smarter and savvier than I, I was going to have one of those collective “a-ha!” moments we all yearn for, when, in the silence of an air-conditioned, sun-lit space, the scent of marker lingering in the air, you turn, excitedly, from the whiteboard to gaze upon the newly enlightened faces of your students, who burst into applause.
That did not happen.


As I planned the in-class exercise the night before class, I realized too late that we might get pushback from Wikipedia’s infamously irascible and mysterious volunteer editors (Dougherty and O’Donnell 2015).
“But we’re just adding some innocuous info,” I thought—details like the names of buildings and programs. “What’s the worst that could happen?”

First Mistake

I soon learned, about 25 minutes into the whole affair, that, in fact, a great deal can go horribly wrong when you forget that the thing you’re toying with in real time—in our case, again, our university’s Wikipedia page—can fight back. Wikipedia, my friends, is very much alive.
It started innocently enough. One of my more engaged students raised her hand.
“Umm, Dr. Mari, I think Wikipedia doesn’t like how we’re all in this page editing it together right now.”
I strode over—surely, of all the pages in the wide world of Wikipedia, ours wouldn’t have some kind of odd editing cap on it, right? 

And yet, lo, it did! “Hmmm,” I said. And then I improvised.
“Pair up with Joon,” I said.[1]
And sure enough, things continued well enough for a bit. My students added some benign, or so I thought, facts about our volleyball team, the names of our new degree programs, some of our campus ground’s highlights, and so on. 

But then, one mischievous student decided to get a little… silly.

Second Mistake

“What if I just make up something dumb and put it in here?” he asked me.
“Like what?” 

“Well, what if I add myself to the list of famous alumni?” 

I thought about this for a second. On the one hand, I didn’t want to encourage the accumulation of garbage information in the world and turn my class into a fake news farm. I’d rather not become the subject of a cautionary tale in a journal somewhere.
But … we had just talked about how Wikipedia has a strong internal editing culture—as controversial and problematic as it can be—and I did want to show the students, instead of just prattling on about it.[2] I pushed aside the voice in my head that was saying, “wait a second here, sir.”
“Sure,” I said instead. “Try it and see what happens.”
And so he added his name, and the names of a few friends, for good measure. Within moments, it was deleted. I pulled up the editing log—a veteran Wikipedia volunteer editor, working under a pseudonym, had already corrected the record.
“There, everyone,” I pointed to the projected screen behind me, “just like I told you. This isn’t the Wikipedia of my time as an undergrad, a decade ago. Things have changed for the better and this engagement is part of why Wikipedia…” (see Ayers et al. 2008).
Various hands began shooting up, like baby asparagus shoots.
“Maybe this thing is working after all,” I thought, perhaps a touch too proudly. “Maybe I’m pretty good at this.”
It wasn’t, and I’m not.
My students’ careful and fact-based links, edits, and other changes were being erased and wiped clean, in rapid succession, by the original editor, but also now by several others. The word must have gotten out: we didn’t stand a chance!
We still had more than half of class left to go. But within minutes, all my poor students’ work was gone, vanished. They looked up, over the edges of their phones, laptops, and tablets.
They were not pleased.
I took great pains to try to connect what had just happened with our reading from the week, which had included articles both critical and supportive of Wikipedia and its potential as a kind of refuge, a stronghold of fact-checked information, and some of the irony of that.
I am not always fast on my feet with this kind of extemporaneous pedagogy. I have a stutter, and often need my slides and notes to guide me, as I talk fast and mumble more the more nervous I get, especially in front of twenty skeptical students. There’s almost always something else I wish I had said or added after these kinds of moments when teaching, especially with digital tools. I often write long notes afterward via email or post to our class page, debriefing disastrous assignments.
But in the moment, I just… sort of embraced the “successful failure,” to borrow from our friends at NASA (Leinfelder 2020).
I stopped talking. 

My students had questions: would they still get credit? Even though all their edits had been erased? What were we going to do now?
“Yes, I told them, you’ll get credit. We can talk more about this next time.”
Then I ended class early, thinking hard about power dynamics and hidden infrastructures and black boxes (Jemielniak 2015). In this case, “black boxes” are unexamined, taken-for-granted technologies that are not well understood outside of small circles of experts (Anderson and Kreiss 2013). Wikipedia has come a long way, and I need to be more thoughtful about how I unpack it, contextualize it in time and culture (Cummings 2009; Jemielniak 2015), and contrast it with other “legacy” sites such as Craigslist and Reddit (Lingel 2020, Lagorio-Chafkin, 2018). Wikipedia is not so easy to use as a teaching tool. I need to be less so-sure of myself. 

But I think it worked out OK, for a first attempt working through an exercise like this with students. Later, on their course evals, at least one of my students mentioned that day as one of their favorites, because it made them think about the people behind the software curtain. That helped, but now I know—Wikipedia can fight back. Watch out!
I’ll be ready next time. And for next time, I’ll be more mindful of the power of “black boxes” that are a heady mixture of software and hardware, people and intention, momentum and gatekeeping. I will equip my students to better face these hurdles—and overcome them—by reading more critical accounts of the site and how it works.
Maybe we’ll write an entry about it, while we’re at it. 


Notes

[1] Students’ names have been changed for the purposes of this essay.
[2] And as an avid fan of Stephen Colbert, I had enjoyed watching what happened when his team edited entries in the late aughts for fun—and to make a point: https://en.wikipedia.org/wiki/Wikipedia:Wikiality_and_Other_Tripling_Elephants.

Bibliography

Anderson, C.W. and Daniel Kreiss. 2013. “Black Boxes as Capacities for and Constraints on Action: Electoral Politics, Journalism, and Devices of Representation,” Qualitative Sociology 36, no. 4: 365–382. https://doi.org/10.1007/s11133-013-9258-4.
Ayers, Phoebe, Charles Matthews, and Ben Yates. 2008. How Wikipedia Works: And How You Can Be a Part of It. San Francisco: No Starch Press.
Dougherty, Jack, and Tennyson Lawrence O’Donnell. 2015. Web Writing: Why and How for Liberal Arts Teaching and Learning. Ann Arbor: University of Michigan Press. http://www.jstor.org/stable/10.2307/j.ctv65sxgk.
Cummings, Robert E. 2009. Lazy Virtues: Teaching Writing in the Age of Wikipedia. Nashville: Vanderbilt University Press. http://site.ebrary.com/id/10314047.
Dougherty, Jack, and Kristen Nawrotzki. 2013. Writing History in the Digital Age. Ann Arbor: University of Michigan Press.
Jemielniak, Dariusz. 2015. Common Knowledge?: An Ethnography of Wikipedia. Palo Alto: Stanford University Press.
Lagorio-Chafkin, Christine. 2018. We Are the Nerds: The Birth and Tumultuous Life of Reddit, the Internet’s Culture Laboratory. New York: Hachette Books.
Leinfelder, Andrea. 2020. “Lessons from a ‘successful failure:’ Apollo 13 astronaut, flight director recall famous mission.” Houston Chronicle, April 10, 2020. https://www.houstonchronicle.com/news/houston-texas/houston/article/APOLLO13-ANNIVERSARY-15192303.php
Lingel, Jessa. 2020. An Internet for the People: The Politics and Promise of Craigslist. Princeton: Princeton University Press.
Wineburg, Samuel S. 2018. Why Learn History (When It’s Already on Your Phone). Chicago: University of Chicago Press.

About the Author

Will Mari is now an assistant professor at the Manship School of Mass Communication at Louisiana State University, where he teaches media law and media history and continues to research the history of technology and news work.

Images are for demo purposes only and are properties of their respective owners. ROMA by ThunderThemes.net

Skip to toolbar