What is Creative Computing?
Computers are widely used in art and design. Almost all design work created today contains computationally generated/altered elements.
- New Forms! Stipple Gen Floccugraph
- Dynamic Form! toxi boids
- Interactivity! Vector Park V Motion
Many effects that used to be created by custom code in the past are now baked into photoshop and after effects. Personally, I use coding to create interactive experiences, animations, and even static illustration work, and enjoy the ability to explore variations of complex themes quickly.
With traditional design and art media, you are constrained to a single expression of your intent. With interactive media, you can codify your intent, and create works and forms that can change in response to unknown future contexts. You can create systems that can grow. You can build your intentions into your work and create a work that can not only speak AT your audience but that can engage in a dialog.
What is this Class?
What is a Program?
- A program is a set of instructions that explains to the computer what you want it to do.
- A program is a file on the computer that can be read and executed.
- A program is an art medium that lets you express how your work should behave, rather than simply how it should look.
- A program is kind of like a recipe, where the computer is the chef. -Rory Solomon
What is Programming?
Computer programming is the process of creating a program that does what you want. Programming a computer requires a variety of high-level skills, many of which apply outside of programming as well. To be a succesful programmer you must learn to:
- Frame a problem and solution, carefully detailing what is needed.
- Solve problems through careful observation, deliberate testing, and thoughtful consideration.
- Quickly find and filter technical information in documentation and online forums.
- Express your intent in a language that a computer can understand.
Computers are Ignorant Stupid Jerks
Computers are Ignorant; they have no knowledge. They know how to do only a few very basic things. They will consider your instructions without any sense of context or history. A computer doesn’t know what a square, a day, or a cat is, unless you explain it.
Computers are Stupid; they have no intelligence whatsoever. They can not figure out how to do something on their own. When you teach a person, they are responsible for most of the work of learning. When you explain how to do something to a computer, you must do ALL of the work. They can not “catch on”.
Computers are Jerks; they are obnoxious, rude, and completely lack empathy. Computers don’t mean to be, but because they are stupid and ignorant they often come off like a jerk. They will do exactly what you ask them to, rather than what you clearly intend. When executing your program, if they encounter even the slightest formatting mistake, they will refuse to continue.
Activity 1: Lets Make a Drawing
Learning To Program
Computer programming is the process of creating a program that does what you want.
The most important skill in programming is learning how to think formally about what you are trying to make the computer do—to break down and specifically describe a complex, initially vague goal. This skill is central to programming regardless of the language and environment you choose. This skill is extremely valuable in almost all collaborative (and many solo) creative endeavors, even when a computer is not involved.
The next most important skill is learning how to solve problems. In programming, this is often called debugging. This requires observing the problem and understanding it, research, and deliberate testing. Most of a programmer’s time is spent fixing problems, not writing code. This is especially true when starting to program or programming in a new language or domain. Spending time fixing problems does not indicate that you are bad at programming or don’t “get it”.
A third important skill is learning to read technical documentation. There are many programming languages and countless libraries and other resources. No programmer can remember every detail of the languages and APIs that they use. Programmer spend as much time looking things up as coding.
The final skill is learning how to communicate in the language you are using. This requires both understanding the grammar or syntax of the language, as well as the vocabulary. We will spend much of our time in class covering aspects of this skill, the other skills will largely develop only with experience.
Grammar (Syntax): Paradigms and Pieces
Syntax is the grammar of a programming language determines how you express thoughts. Computer languages are much more strict than natural languages.
- There are many, many computer programming languages. http://en.wikipedia.org/wiki/List_of_programming_languages_by_category
- These languages can be grouped by their general approach. http://en.wikipedia.org/wiki/Programming_paradigm
- Processing can be thought of as Procedural or Object Oriented http://en.wikipedia.org/wiki/Procedural_programming
- Other major paradigms include Functional, and Declarative
Vocabulary: Libraries and Blocks
Remember, computers are ignorant. They don’t know how to draw a circle, or play a sound, or communicate with a keyboard until someone programs them to do these things.
Many programming languages come with a standard library and make use of additional libraries. These libraries contain reusable code for common tasks. Making use of these libraries allows you to do powerful things quickly, without having to explain all the details to the computer. The Processing API has a library full of things relevant to using the computer to create art and design.
The Processing API Reference http://processing.org/reference/
Activity 2: Lego State of Mind
What is Processing
Initially created to serve as a software sketchbook and to teach computer programming fundamentals within a visual context, Processing evolved into a development tool for professionals. Today, there are tens of thousands of students, artists, designers, researchers, and hobbyists who use Processing for learning, prototyping, and production.
The Processing Development Environment
The Processing website http://processing.org/
An IDE is an Integrated Programming Environment. It allows you to edit your code, build your program, and see the result. A Processing project is called a Sketch, it is stored as a folder of files on your drive.
The Processing Reference
Processing Reference http://processing.org/reference/
You will need to refer the processing reference page frequently as you code. If you have the Processing IDE open, you should have this webpage open too.
The Processing Language and API
Processing includes a wide selection of example code. Look at some of the examples included with the PDE. Think about what they do and read the code. You might not understand everything, but this is a great way to start.
Demo: Drawing With Processing
This is a very simple example showing a few Processing drawing commands.
//draw a simple landscape size(300,300); noStroke(); //sky fill(100,150,200); rect(0,0,300,300); //sun fill(200, 200, 10); ellipse(120,120,80,80); //ground fill(20,100,20); rect(0,180,300,120);
Read, re-read this week’s lecture notes.
Get the Getting Started with Processing book. Also get a USB thumb drive. Bring your copy of the book and thumb drive to class next week, I will ask you to hold them up during attendance.
If you plan to work on your own computer, install Processing. If not, find a lab computer with it already installed. Look through some of the examples and try running some to make sure everything is working. Take some time to play.
Read The Table of Contents, Preface, and Chapters 1-3. I strongly recommend typing in the code listing at the end of chapter 3, running the program, and then modifying and playing with it.
Create a hand drawn drawing on paper: self portrait, landscape, still life, whatever you like. This drawing does not need to be complex or polished; I recommend creating a few very quick sketches and spending 5-10 minutes on the drawing.
Create a Processing sketch that recreates your paper drawing. Use a variety of the drawing commands in the Processing API. See book pages 15-32 for help. Experiment and Play. Don’t worry about specifics, structuring your code well, or commenting much. If you see something interesting in the reference, give it a shot. If you can’t get it to work move on to something else. This is an opportunity to explore and play. We will get a little more formal next week.
Bring your hand drawn sketch, a print out of your processing drawing, and a print out of your code to class next week.
Prepare for next weeks lecture by reading chapter 4 in Getting Started with Processing.