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.

Without getting too geeky, the main objective in the design of Oak was to develop a relatively<br />

simple-to-program, high-level, universal programming language. The really key word<br />

here is “universal.” A proprietary technology (<strong>and</strong> a refusal by companies to respect <strong>and</strong><br />

adhere to st<strong>and</strong>ards) creates a difficult l<strong>and</strong>scape to work in. This problem is not limited to<br />

the computer industry. A number of years ago my wife <strong>and</strong> I invested in a water filter system<br />

that attaches directly to our kitchen faucet. Over the years we’ve moved a lot, dragging<br />

our filter with us. In almost every new home, we’ve had to contact the filter company<br />

to request yet another odd-sized adapter (we’ve got a quite a collection by now). Lack of<br />

st<strong>and</strong>ardization has up until recently been especially frustrating <strong>and</strong> difficult for web<br />

designers, who were forced to develop multiple sites, limit design concepts, <strong>and</strong> create<br />

crazy workarounds to ensure that their sites worked across all the different web browsers<br />

(this is no longer so much of a problem because of the advent of web st<strong>and</strong>ards, better<br />

development practices, <strong>and</strong> better <strong>and</strong> more consistent support for those st<strong>and</strong>ards across<br />

browsers).<br />

One of the benefits of a program like Flash is a universal Flash player that ensures consistent<br />

content delivery across different platforms (operating systems <strong>and</strong> web browsers).<br />

The history of Flash, originally called FutureSplash Animator, arguably would have been<br />

quite different had Java not a few years earlier pioneered the concept of a portable,<br />

universal language.<br />

So the emergence of the Internet saved Java. Java’s now well-known slogan, “Write once,<br />

run anywhere,” turned out to be the perfect strategy for the Internet. And by 1996, Java<br />

was also embedded in Netscape’s browser, ushering in a revolution in online multimediabased<br />

content <strong>and</strong> development. Interestingly, in the ten years since this development,<br />

Flash has far surpassed Java as the online multimedia-based (front-end) content tool of<br />

choice, <strong>and</strong> Java has moved to the back end of the Web—to the server side. Java is also<br />

widely used on mobile <strong>and</strong> wireless devices, such as PDAs <strong>and</strong> cell phones. With the development<br />

of <strong>Processing</strong>, Java is again being used for online content creation. So arguably,<br />

<strong>Processing</strong> has saved (or at least resurrected) the Java applet. Although unlike Flash, which<br />

is used to enhance/develop entire websites, <strong>Processing</strong> (currently) is being used primarily<br />

for aesthetic exploration. Of course, as more <strong>Processing</strong> tools <strong>and</strong> code libraries are developed,<br />

this could change. OK, so that’s a nice story, but how do Java <strong>and</strong> <strong>Processing</strong> work?<br />

Java is considered both a compiled <strong>and</strong> interpreted language. Unfortunately, the terms<br />

“compiled” <strong>and</strong> “interpreted” don’t quite mean the same thing in programming as in general<br />

parlance. To compile, in computer-speak, is to convert a (usually high-level) programming<br />

language into something lower level. Remember, a computer likes zeros <strong>and</strong> ones<br />

(the lowest-level language), but most people find it frustrating to communicate in binary<br />

code. It is easier to write programs in the same natural language we speak (the highestlevel<br />

language), but a spoken language is extremely complex <strong>and</strong> would dem<strong>and</strong> tons of<br />

processing to be able to interpret it. Therefore, in the design of a programming language,<br />

there is a trade-off between ease of use <strong>and</strong> performance.<br />

Java was designed with this trade-off in mind. Sun’s Java compiler, javac (<strong>Processing</strong> actually<br />

uses a similar open source compiler, developed by IBM, called jikes), converts a programmer’s<br />

code (the stuff we write) into a middle-level language called bytecode (that the<br />

compiler writes). This bytecode (also known as class files) is universal, meaning that I can<br />

take my class files compiled on my Mac <strong>and</strong> run them on a Windows machine, as long as<br />

the Windows machine has a Java Virtual Machine (JVM). As most operating systems <strong>and</strong><br />

CREATIVE CODING<br />

37<br />

2

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

Saved successfully!

Ooh no, something went wrong!