Over the next few
weeks months I will be teaching a small introduction to programming course at Viget Labs. I'll be using Processing as a means to explore some basic programming concepts and I'll be following the excellent book Learning Processing: A Beginner's Guide to Programming Images, Animation, and Interaction by Daniel Shiffman. Each lesson will have an accompanying blog post that outlines the topics we'll try to cover and links to any resources we may need. Here is the first installment!
This book tells a story. It is a story of liberation, of taking the first steps toward understanding the foundations of computing, writing your own code, and creating your own media without the bonds of existing software tools. This story is not reserved for computer scientists and engineers. This story is for you.
Because this book uses Processing (more on Processing in a moment), it is especially good for someone studying or working in a visual field, such as graphic design, painting, sculpture, architecture, film, video, illustration, web design, and so on. If you are in one of these fields (at least one that involves using a computer), you are probably well versed in a particular software package, possibly more than one, such as Photoshop, Illustrator, AutoCAD, Maya, After Effects, and so on. The point of this book is to release you, at least in part, from the confines of existing tools. What can you make, what can you design if, instead of using someone else's tools, you write your own? If this question interests you, you are in the right place.
Old: Text In -> Text Out -> Text Interaction
New: Text In -> Visuals Out -> Mouse Interaction (and more)
Not novel idea: Logo, Design by Numbers
Novel implementation: Java, Open Source, Community Driven
Let's say you are a novelist. Or a screenwriter. Is the only time you spend writing the time spent sitting and typing at a computer? Or (gasp) a typewriter? Most likely, this is not the case. Perhaps ideas swirl in your mind as you lie in bed at night. Or maybe you like to sit on a bench in the park, feed the pigeons, and play out dialogue in your head. And one late night, at the local pub, you find yourself scrawling out a brilliant plot twist on a napkin.
Well, writing software, programming, and creating code is no different. It is really easy to forget this since the work itself is so inherently tied to the computer. But you must find time to let your mind wander, think about logic, and brainstorm ideas away from the chair, the desk, and the computer. Personally, I do all my best programming while jogging.
Lesson 1: Chapters 1-3
Lesson 2: Chapters 4-6
Lesson 3: Chapters 7-8
Lesson 4: Chapter 9
Lesson 5: Chapter 10–11
Midterm! (Also, continue Lesson 5: Chapter 12)
Lesson 6: Chapter 13–14
Lesson 7: Chapter 15–16
Lesson 8: Chapters 17-19
Lesson 9: Chapters 20-21
Lesson 10: Chapters 22-23
Final Project Workshop
Final Project Presentations
You will find many resources here such as tutorials, examples, & exercises. Use this website, it is your friend.
You will have bugs. Working in small increments and verifying the work you've done at each increment will help you catch bugs as soon as they are created. It will help you fail fast, which is a good thing in the software development world. In addition to bug squashing, working incrementally lends itself to object-oriented programming, a powerful software development methodology that we'll cover in later lessons.
Programming is the practice of getting a computer to do what you want. It is about communicating with a computer. Computers communicate in only one way: algorithms. A computer will always succeed in performing a precise set of well-defined instructions that dictates what you want. Ever taken a programming course in college? Was it tedious as fuck? In general, algorithms are quite tedious and it is a fact we'll learn to accept and love. Thinking incrementally has the benefit of failing fast, which has the benefit of allowing us to fix the failure fast, which has the benefit of succeeding fast. The tedious nature you may have experienced in past programming courses was most likely a result of slow or negligible feedback. When you start thinking incrementally, what you want the computer to do becomes incremental. You start to see the feedback you want and see it often. Processing has the added benefit of giving you visual feedback and interactivity with a minimal amount of tedium. In a short time you will be incrementally developing algorithms that do exactly what you want!