CS1

TEACHING PAPER: Computing and the Digital Humanities

This paper introduces three assignments—each with their own “starter kits” for students—for those with a love of the written (and digital) word. These assignments are part of a ‘Computing for Poets’ course that exposes students to leading markup languages (HTML, CSS, XML) and teaches computer programming as a vehicle to explore and “data mine” digitized texts. Recent advances in computer software, hypertext, and database methodologies have made it possible to ask novel questions about a poem, a story, a trilogy, or an entire corpus. Programming facilitates top-down thinking and practice with computational thinking skills such as problem decomposition, algorithmic thinking, and experimental design, topics that humanities students in our experience rarely see. Programming on and with digitized texts introduces students to rich new areas of scholarship including stylometry (i.e., the statistical analysis of variations in literary style between one writer or genre and another), applied to, for example, authorship attribution.

The three assignments highlighted are:

Reading Poetry Backwards 

Conditional If Statements Lab with the SpaceSmasher Game

The purpose of this lab is to let students experiment with conditional “if” statements while building features of an actual game in Java.  The features explored in this lab include determining game over conditions, controlling sprites with a mouse, event handling to control paddle movement via keystroke, and spawning singular balls via keyboard as well as advanced game mechanics such as fire and ice ball power-ups.  Students will practice branching and gain proficiency with Selection Control Structures (“if” and “switch” statements) while producing a customized version of their very own block-breaking realtime simulation. 

Credit Card Validation Project

This is the third project in a series of three programming projects and a set of lecture slides. This project on Credit Card transaction validation builds upon the Luhn Algorithm project and brings it to a higher level of complexity involving different card types, interest rates and rebate plans. The implementation of this third project uses OOP, inheritance and polymorphism.

Engagement Excellence

Luhn Algorithm for Digit Validation. Part of Integrating Concepts in Cyber-Security and Encryption

This is Project 2 in a series of three programming projects and a set of lecture slides. This project is to implement Luhn algorithm for digit validation. This project integrates string manipulation, use of regular expressions, and file i/o together with discussion on security measures on check-digit methods used among credit card numbers and IMEI numbers.

Image Processing (Warhol Pop Art Filter)

This is the eighth lab for computational art (CS1) using Processing where students practice creating an Andy Warhol silkscreen image filter. The goals for this lab are:

  1. Practice creating an Andy Warhol silkscreen image filter
  2. Practice using images in Processing
  3. Practice manipulating pixels of an image
  4. Practice using arrays and writing for loops
  5. Practice indexing a 1D ray with 2D coordinates
  6. Practice using boolean logic to control which parts of an image are modified (including implicit circles) 
Engagement Excellence

Animating Multiple Elements with Arrays

This is lab for computational art (CS1) using Processing where students create a program that animates multiple characters in a scene using loops and arrays.

The goals for this lab are:

  1. Practice writing methods
  2. Practice writing loops
  3. Practice using an array data structure
  4. Practice using animation variables
  5. Practice using arrays

Image Processing: Interactive Self-portrait

This is the third project for computational art (CS1) using Processing where students create a self portrait using a digital image of themselves as the starting point. In this project, students learn about 2D to 1D array mapping and indexing as well as practice using loops via the plotting of a shape using a parametric equation. The objectives for this project are:

Spatial Games and the Prisoner's Dilemma

This is a programming assignment given in the middle of an introductory class aimed at non-CS majors. The assignment is to simulate repeated rounds of the Prisoner's Dilemma where there are many prisoners situated in cells on a grid, and neighboring prisoners interact with each other. Since the location of prisoners matters, these are called "spatial games". Each student works alone to write a program to do this simulation and produce an image of the final configuration of strategies. The CS goals of this assignment are to introduce reading files (since the initial configuration of the prisoners is supplied in a file), to practice working with 2-dimensional arrays and structs, and to gain additional practice with control structures (loops, if). Since we provide a template, an additional goal is to understand a partially written program by reading it.

Art Nouveau Curves and Generative Elements

In this assignment students create an art nouveau style sketch using Processing which includes both animated curved elements and repeated ’tile’ like aspects. This is the second project for computational art (CS1) using Processing. The objectives for this project are:

  1. Practice using a loop to control structure to generate patterns/scenes
  2. Use functions to re-draw parts of a scene
  3. Use random to produce desirable colors and design layout
  4. Use structured layout
  5. Use parametric curves to control curved patterns in a sketch
  6. Apply repetition of drawing certain elements in a sketch
Engagement Excellence

Animated and Remixed Blexbolex

In this project, students merge their lab 2 code and add animation to explore the use of variables (and explore the process of merging two code bases together). The objectives for this project are:

  1. Practice using Processing
  2. Practice using simple primitives and shapes in Processing
  3. Practice using methods to encapsulate parts of your code for re-use
  4. Practice integrating two student’s code
  5. Practice scaling and translating shapes into a single coordinate frame
  6. Practice animating via transforms and variables
  7. Practice developing your aesthetic
  8. Make an interesting ‘story’ combining two existing designs and adding animation
Subscribe to CS1