Life as Clay

All manner of distractions…

leave a comment »


I’ve had 4 books about Processing sitting on my shelves for over a year. I flip through them daily, but I’ve never sat down to lear the language. That’s not true. I did, once, and I started by typing out the code to generate a tree from one of the books. The picture I ended up with did not resemble the picture in the book. I hit a mental block and could not proceed. Convinced that I made a typo, I spent several hours going over the code and eventually closed the book and didn’t open it again. (I’m a perfectionist, duh.)

I bought these books after being wowed by the work of Robert Hodgin, who maintains the blog “flight 404.” I ripped off the phrase “all manner of distractions…” from him for this post. He makes cool things out of code. Just check some of it out. He recently left me wondering why one shouldn’t clean up blood after being cut by a band saw. Haven’t figured that one out yet.

Nevertheless, one of the books that I own is “Learning Processing,” by Daniel Shiffman, who also makes cool things out of code. Upon receipt of the book, just by flipping through it, I automatically proclaimed it to be the clearest book on programming that I had ever seen (out of about 10 others that I actually had seen). The exercise on page 15 is to write code to make your own Zoog. Here’s my Zoog:

zoog

Bernie probably would be a better name...

Never the less, I’ve decided to start again. Anybody who follows this blog (all 2 of you, judging by the stats) knows that I have dabbled with several other programming languages, primarily Ruby. You know, Ruby is great and all, but I REALLY need visual feedback for what I’m doing. I recently read through several Ruby books and while I feel that I understand the concepts, I just don’t feel drawn to Terminal.app, so I end up bored and directionless.

Terminal.appFor a long time I thought that I wanted to be able to make dynamic websites with Ruby and Rails. Well, I do, but not enough to stare at Terminal.app for long periods of time. At least not yet. I need to learn the basics of programming and receive immediate visual feedback before I’m able to abstract from the terminal to the ideas floating in my head. That day will come, but it ain’t here yet, so I’m switching to Processing.

And with that, here’s my Zoog code. I hope to put time towards this daily, so we’ll see what happens. Cheerio.

background(255);
size(400,400);
smooth();

// Body
fill(200,0,0);
rect(150,150,50,100);

// Head
stroke(0);
fill(255);
ellipse(175,150,60,75);

// Nose
noStroke();
fill(0,0,0,80);
ellipse(175,150,10,20);

// Left Eye
fill(0);
ellipse (165,130,10,10);

// Right Eye
fill(0);
ellipse (185,130,10,10);

// Mouth
stroke(0);
strokeWeight(2);
line(160,165,190,165);

// Left Arm
line(150,190,110,220);

// Right Arm
line(200,190,240,220);

// Left Leg
strokeWeight(6);
line(165,250,165,270);

// Right Leg
strokeWeight(6);
line(185,250,185,270);
Advertisements

Written by Clay

October 27, 2009 at 22:15

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: