04.04.2013 Views

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

Processing: Creative Coding and Computational Art

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PROCESSING: CREATIVE CODING AND COMPUTATIONAL ART<br />

40<br />

structure <strong>and</strong> clarity. The “serious” day painting that I thought was my real work was actually<br />

something else altogether. In retrospect, although the work was self-conscious <strong>and</strong><br />

forced, the discipline of doing the serious painting contributed to my skills <strong>and</strong> technique,<br />

allowing me to let go on Thursday night to really express myself. It was this combination of<br />

discipline <strong>and</strong> freedom that I attribute to the quality of the work. I ended up only putting<br />

the Thursday night work in the show, <strong>and</strong> got a very positive response. Of course I didn’t<br />

get famous, but I certainly kicked butt in Piermont.<br />

So what the heck does that story have to do with <strong>Processing</strong>? Well, when it comes to writing<br />

creative software, there are a number of ways to approach it. There is the “serious”<br />

way <strong>and</strong> there is the Thursday night party way. It is not so much a specific set of techniques<br />

I’m talking about, but rather an attitude. Some programming languages <strong>and</strong> environments<br />

dem<strong>and</strong> a highly structured <strong>and</strong> rigid approach that doesn’t favor spontaneous expressive<br />

shifts. OOP, which is a beautiful construct that I will go into later in the book, requires<br />

planning <strong>and</strong> a well-thought-out plan; Without such a plan, a “by the seat of your pants”<br />

OOP approach can lead to piles <strong>and</strong> piles of code <strong>and</strong> excess complexity, taking you away<br />

from self-expression <strong>and</strong> burying you in pure digital craft, or worse—damage control. The<br />

other extreme, pure gut hacking of unstructured spaghetti code, can yield fast effects <strong>and</strong><br />

little teasers, but it becomes overwhelmingly difficult to carry a creative impulse through<br />

to a more realized form. So there needs to be a middle way, combining structure with fast<br />

prototyping capabilities. This yin/yang approach is possible in <strong>Processing</strong>, which provides a<br />

fast, loose, procedural coding environment with a highly structured <strong>and</strong> powerful objectoriented<br />

backbone. That is not to say there aren’t pitfalls to working in such a flexible<br />

environment, in which it’s easy to develop nasty hacking habits. My recommendation, <strong>and</strong><br />

the way I’ve structured the upcoming tutorial sections in the book, is to begin coding with<br />

passion. Don’t let the fear of doing it right or learning everything first get in the way of<br />

expressing yourself, but at the same time, study the language (first <strong>Processing</strong> <strong>and</strong> then<br />

eventually Java) <strong>and</strong> OOP; it will ultimately empower you to create larger, more expressive<br />

works.<br />

Algorithms aren’t as scary as they sound<br />

1. Buy a new copy of <strong>Processing</strong>: <strong>Creative</strong> <strong>Coding</strong> <strong>and</strong> <strong>Computational</strong> <strong>Art</strong>.<br />

2. Open the book to page 1.<br />

3. Begin reading at the top of page 1.<br />

4. Stop reading at the bottom of the last page of the book.<br />

5. Write a glowing review of the book on Amazon.com.<br />

6. Go to step 1.<br />

These six steps constitute an algorithm. They are not a computer program—they are just<br />

specific directions on how to achieve something. The term algorithm comes from Abu<br />

Abdullah Muhammad bin Musa al-Khwarizmi (referred to just as al-Khwarizmi), a Persian<br />

supergenius (with a really long name) from the early part of the ninth century. We get the<br />

word algorithm from the al-Khwarizmi part of his name. al-Khwarizmi worked near<br />

Baghdad as a scientist, mathematician, astronomer/astrologer, <strong>and</strong> author. He is also commonly<br />

referred to as the father of algebra. You may have first been introduced to the word

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!