3 Week Summer Course (5/31-6/23), meets twice daily, M-F 10:30-12:00 & 16:00-17:00, in Gates Hall G03/05
In this course, students will learn how to program a computer by manipulating media, including generating images, producing animations, manipulating text, and making media that respond interactively to user input. We will use Processing, a programming language designed for visual and interactive applications, as a basis for creating and developing software ‘sketches’ that allow students to express themselves visually. This course is designed for students with no technical background; students who have already completed CS 1110 or have similar programming background may take the course by permission of the instructor only.
The core concept of this class is to cover the standard introductory programming material including variables, types, control structures, iteration, functions, arrays, and object-oriented programming, but to do so in a way that emphasizes the creative potential of programming and thereby reach students who are turned off by the abstract, mathematical approaches to programming which normally dominate introductory programming courses.
Course meetings will interleave short lectures with interactive programming exercises which students will complete in pairs. There will be daily homework assignments which will account for the bulk of the grade. There will also be 2 exams.
The course uses the following textbook:
Casey Reas and Ben Fry. Processing: A Programming Handbook for Visual Designers and Artists. Published August 2007, MIT Press.
An excellent alternative, optional text on this subject is:
Shiffman, Daniel. Learning Processing: a beginner's guide to programming images, animation, and interaction. Morgan Kaufmann, 2015. (available online through the Cornell library.)
You will also likely find the processing.org website a useful reference.This course is designed for students with no technical background; students who have already completed CS 1110 or have similar programming background may take the course by permission of the instructor only.
Introduction to the class. How to install and use the Processing environment. What a Processing program looks like. Writing a simple program to create shapes on the screen.
Reading:
Using Processing, pp. 9-11 only
Structure 1: Code Elements, pp. 17-21
Homework 0 due 5/31 at 11pm
Image layout. More on drawing shapes and varying what they look like.
Reading:
Shape 1: Coordinates, Primitives pp. 23-35
Homework 1 6/1 at 11pm
Using variables to make it easier to experiment with your sketches by changing their parameters. Activity 1, activity 2.
Reading:
Data 1: Variables, pp. 37-41
Using math to manipulate the variables that control your images. Representation of colors in Processing. Controlling the color of your images. A brief introduction to dynamic code. Activity 1, activity 2.
Quiz
Reading:
Math 1: Arithmetic, Functions, pp. 43-50
Color 1: Color by Numbers, pp. 85-93
Homework 2 due 6/4 at 11pm
Varying the behavior of your program based on what someone is doing with the mouse. Programs that decide to do different things based on input data. Activity 1, activity 2, activity 3,
Reading:
Control 1: Decisions
Input I: Mouse 1, pp. 205-210 only
Constructing and controlling programs that run continuously and respond differently in different situations. Using this to respond dynamically to mouse input data. Activity 1.
Reading:
Structure 2: Continuous
Input I: Mouse 1, pp. 210-215 only
Homework 3 due 6/5 at 11pm
Programs that vary their behavior based on what people type in at the keyboard. More practice in responding differently to different situations. A brief introduction to repetition. Activity 1.
Reading:
Data 2: Text, pp 101-103 only
Input 2: Keyboard, pp. 223-227
Designing programs that 'loop,' or repeat the same instruction multiple times. Using loops to create patterns in an image. Activity 1.
Quiz
Reading:
Control 2: Repetition, pp. 61-68
Homework 4 due 6/6 at 11pm
Introduction to pixels. Altering images by accesing and altering pixels. Loading and saving images. Activity 1.
Reading:
Image 1: Display, Tint, pp. 95-97 only
Image 3: Pixels, pp. 321-325
Output 1: Images, pp. 367-368 only
Introduction to the array, or structured lists of values. Use of the array to allow for more complicated control of images (without making your code more complicated). Activity 1, activity 2,
Reading:
Data 4: Arrays, pp. 301-313
Operating directly on arrays of pixels in order to transform and manipulate images. Array Tutorial.
Reading:
Image 5: Image Processing, pp. 355-360, pp. 364-365
How functions can make your code easier to write and debug. Defining and using functions in your code. Using functions to modularize an image processing program. Activity 1, Activity 2, Activity 3.
Reading:
Structure 3: Functions, pp. 181-190, 193-196
Using for loops, arrays, and functions to read and alter images on the fly. Activity 1, Activity 2, Activity 3.
Reading:
Image 5: Image Processing, pp. 355-360, pp. 364-365
Homework 6 due at 11pm
How Processing stores text. The String object. Data conversion. Creating strings, printing them, and displaying them to the screen. Activity 1, Activity 2, Activity 3.
Reading:
Data 2: Text, pp. 103-104
Data 3: Conversion, Objects, pp. 105-109
Using Processing to read and visualize plain text files. Looking for and visualizing patterns in text.
Homework 7 due 6/14 at 11pmUsing objects and classes to structure your code. Defining and instantiating classes.
Reading:
Structure 4: Objects I, pp. 395-406 only
Arrays of objects. Modularizing files.
Reading:
Structure 4: Objects I, pp. 406-411 only
Homework 8 due 6/15 at 11pmreading text from a file to control your program's output. Finding patterns in text. Using text data to change what programs do.
Reading:
Input 6: File import
Quiz
Writing data from your program to a text file, which can be used as input later.
Reading:
Output 2: File export
Writing data from your program to a text file, which can be used as input later. Finishing out morning lecture and working on Homework 8
Loading a web page, finding the data you want on it, and responding to that data in your program.
Homework 9 due 6/18 at 11pmUsing classes that inherit from other classes. Using these techniques to simplify your code.
Reading:
Structure 5: Objects II, pp. 456-460 only
Homework 10 due at 6/19 11pm
How Processing programs can respond to things that happen outside of it. Real-time interaction using event loops. What is an 'event' and how can programs respond to one. Using events to create meaningful interactivity.
Reading:
Input 3: Events, pp. 229-236
Using multiple constructors and creating composite objects.
Reading:
Structure 5: Objects II, pp. 453-455 only
Using recursion, or functions that call themselves, as a way to generate more complex structured images.
Dorking around with the cool code, for cool outcomes.
The assignments in this course are designed to help you develop and assess programming skills. Your work for the class will consist of the following components: readings from the course textbook and in-class handouts; brief, informal quizzes to help you and us keep tabs on how well you are understanding the course content; near-weekly homeworks that let you practice and develop your programming skills; and a mid-term and final exam. Of all these assignments, the homeworks are most critical because they are where you will really be learning the course material.
Homework assignments are posted to, and can be submitted at, our Course Management System. If you do not have an account for this class, please contact me to be added.
Grading is not just a matter of numbers, but also of judgment. I reserve the right to adjust grades by up to half a letter grade based on knowledge of your performance not summed up in this tidy formula.
Homeworks are generally due via submission to our Course Management System. Late assignments accrue a half-letter-grade penalty for every 24 hours they are late, starting directly after the deadline (i.e. submitting at midnight on the due date would make a one-day penalty). All students may submit up to 2 homeworks in the semester up to 2 days late without a penalty - please save these for emergencies such as sickness, as additional extension requests will only be granted in extraordinary circumstances.
If you believe that there may have been an error in grading your assignment, you may request a regrade in the 7 days after an assignment has been graded by contacting me in person or by email, explaining the nature of the mistake. I reserve the right to lower the grade as well as to raise it.
Academic integrity is taken seriously in this course. Please be aware of the specific requirements of academic integrity at Cornell.
You may be wondering what 'academic integrity' means in the context of programming. In this course, you may consult with other students for conceptual and debugging help while working on your code, but unless otherwise specified on the assignment the final code you submit should be written, tested, and documented by you. This means that, with the exception of code developed in in-class exercises, if 2 students submit code that is substantially the same we will consider this a likely academic violation. All assignments will be automatically scanned for similarity.
It is a usual practice for real-world programmers to find and adapt publically available code written by others in their own projects, and you may also do this in this class. If you use 'found code' from on-line sources you must bring that code up to the standards expected in this course. You must also identify which code is 'found' and document its source with a comment in your code, just as you would for an academic citation in a written paper. Unless otherwise specified for a particular assignment, found code may not take up more than 10% of the code that you submit (counting by correctly formatted lines).