void draw(){ background(0, 0, 255); }

Douglas Edric Stanley


Andy Best had a fun idea last week: write Processing sketches inside of a tweet. Here’s his original tweet promoting the idea: @peterkirn How about a whole processing sketch in 140 characters?, and his first attempt: [int c,f;void setup(){size(640,480);c=0;f=255;colorMode(HSB);}void draw(){background(color(c,f,f));ellipse(320,240,c,c);c=(c++>255)?0:c;}][5]. He then posted some more on his Twitter feed as well as on his blog.

So last Friday, we decided to take him up on his offer and explore Twetching™ during our Friday meetup at the Atelier Hypermédia.


Here are a few examples of code with links to their authors:

float i;PImage a=loadImage("<a href="http://tiny.cc/Rdn0Z","jpg">http://tiny.cc/Rdn0Z","jpg</a>");void draw(){i+=0.01;translate(50,50);rotate(i);scale(sin(i)<em>2);image(a,-250,-250);} //[@destaouel](http://twitter.com/destaouel/status/1206624450)
import ddf.minim.</em>;AudioPlayer player;Minim minim;minim=new Minim(this); player=minim.loadFile("<a href="http://tinyurl.com/cty59k">http://tinyurl.com/cty59k</a>");player.play(); //[@FlorentDeloison](http://twitter.com/FlorentDeloison/status/1206595763)
float x,y,t;int h=100;void setup(){size(h,h);h/=2;t=0;}void draw(){x=h<em>(sin(9</em>t+1)+1);y=h<em>(sin(8</em>t)+1);point(x,y);t+=0.01;t%=TWO_PI;} //[@benoitespinola](http://twitter.com/benoitespinola/status/1202229913)
int c;void draw(){frameRate(c%120+1);background(++c%2==0?0:255);} //[@tomekjarolim](http://twitter.com/tomekjarolim/status/1206346511)
void draw(){for(int i=3;i<500; i+=random(0,i)){rect(3+i,i,i%24,i%34);}} //[@budoubuda](http://twitter.com/budoubuda/status/1206387708)
float x=2,i=random(1),y=2,j=random(1);void draw(){background(0);ellipse(x+=i,y+=j,10,10);if((x>99)||(x<1))i=-i;if((y>99)||(y<1))j=-j;} //[@benoitespinola](http://twitter.com/benoitespinola/status/1207917244)
float j;void setup(){size(99,99,P3D);}void draw(){j=second();rotateZ(j);translate(j,j);fill(j<em>4,j</em>3,j<em>2,j);box(10);} //[@FlorentDeloison](http://twitter.com/FlorentDeloison/status/1206544746)
float i,j;void setup(){size(99,99,P3D);}void draw(){j=random(0.1,1);rotateZ(i+=0.1+j%1); translate(i+j,i+j);fill(j</em>300);box(10<em>j);} //[@FlorentDeloison](http://twitter.com/FlorentDeloison/status/1206466154)
PFont f=createFont("Serif",25);background(0);textAlign(CENTER);textFont(f);text("vendredi 13 février 1984",1,1,99,99); //[@destaouel](http://twitter.com/destaouel/status/1206487535)
void draw(){for(int i=0;i<500; i++){rect(3+i,random(0,100),10+i,10);}} //[@budoubuda](http://twitter.com/budoubuda/status/1206320468)
int u=100;int v=0;void setup(){size(u,u,P3D);}void draw(){background(0);v=++v%u;for(int i=0;i<1000;i++){curve(0,50,i,i</em>2+v,i<em>4,i</em>2+v,u,u);}} //[@AmmmO](http://twitter.com/AmmmO/status/1206469970)
void draw(){for(int i=0;i<width;i++){colorMode(HSB);noStroke();fill(random(255),255,255);ellipse(random(width), random(height),4,5);}} //[@ destaouel ](http://twitter.com/destaouel/status/1206382263)
int x,y;int c=-16777216;void draw(){frameRate(600);if(c>-1)c=-1;stroke(c);point(x,y);c++;x++;if(x>100){x=0;y++;}if(y>100)y=0;} //[@tomekjarolim](http://twitter.com/tomekjarolim/status/1206399854)
void draw(){background(0);for(int i=0;i<100;i=i+2){stroke (random (0,255),random (0,255),random (0,255));line (i,i,i,1);line (i,i,1,i);}} //[@FlorentDeloison](http://twitter.com/FlorentDeloison/status/1206339166)
int i;void draw(){color[]c=new color[3];c[0]=color(255,0,0);c[1]=color(0,255,0);c[2]=color(0,0,255);background(c[i]);i=++i%3;} //[@tomekjarolim](http://twitter.com/tomekjarolim/status/1206363724)
int c=-16777216;void draw(){if(c>-1)c=-1;background(c);c++;} //[@tomekjarolim](http://twitter.com/tomekjarolim/status/1206406098)
PImage i=loadImage("<a href="http://tiny.cc/RpZTS","jpg">http://tiny.cc/RpZTS","jpg</a>");void setup(){size(743,1155);image(i,0,0);rect(315,335,40,1);} //[@abstractmachine](http://twitter.com/abstractmachine/status/1207071461)
void draw(){colorMode(HSB);stroke(millis()%360,28*9,255);line(mouseX,mouseY,pmouseX,pmouseY);copy(0,0,width,height,-5,-5,width+9,height+9);} //[@abstractmachine](http://twitter.com/abstractmachine/status/1206680149)
String[] s=loadStrings("<a href="http://tiny.cc/2W8tj">http://tiny.cc/2W8tj</a>");println(s); //[@abstractmachine](http://twitter.com/abstractmachine/status/1206596361)


The whole process was a lot of fun, and an excellent pedagogic exercise. We only played around for about an hour, which was probably enough. But I have a feeling we will be doing more « exercises » like this in the future. We do a lot of theory in class, and try to mix that up with play, technical information, project critique, and open discussions. Since what the Atelier Hypermédia basically does is treat code as a « plastic » material, useable in any artistic context (i.e. considering the code itself a possible form of artistic exploration), games like this are really what we are all about. But I was struck by the level of mastery students displayed of the basic rules of Java syntax, and the collective part of the session was a real eye-opener on how good the students have gotten at collective coding. Talking about code is a Good Thing™®, coding with ten or more hands in and Even Better Thing™®. Just afterwards we had a great session with a young artist presenting her project, the exercise being: how would you develop her installation ? There too, the students showed a great capacity at collectively designing the project, even when discussing the complex details of the code. The trick, apparently, is playing such arcane and thick subjects fast and loose, and thereby ignoring the preciousness of the form itself of the code, and doing it collectively, and as a form of play. It’s an intellectual bait and switch which in the end allows for a rigorous form of play.

Original Comments:

2009-02-17 21:16:41


This is really cool. There are so many “let’s do it in 140 characters!” ideas - this one is really a good exercise.

You could make an installation at an exhibition that automatically receives, compiles and runs Twetches..all day long (well, at least until some funny person sends endless loops).

2009-02-20 20:00:41


The “at least until some funny person sends endless loops” part of the previous comment by partikelfernsteuerung is important.

I hope that you remind your students that play has its limits. It might be reasonably safe in the sandpit in your local park, but you shouldn’t play on the road. Similarly, daddy’s power tools are not toys. Remember: computers (especially networked computers) are powerful tools and subject to harmful results through their misuse.

Any “artist” or player should rightly expect their “installation” to be shut down or otherwise heavily abused if open to unfiltered/untrusted content.

2009-02-21 07:23:11

Douglas Edric Stanley

Well, as for play having it’s limits, and double-quoted “artists” dismembering themselves with Oedipal power tools, I don’t know if I give into your rhetoric. I could very well throw that back at you and suggest that one ought to know the basics of form and composition, the difference between pastiche and kitch, and the various dialectics of their interplay before throwing sketches up on to YouTube. Everyone’s got their own meaning of amateur and professional — careful where you walk there.

But if it is “responsibility” you seek, yes, you can rest reassured that I am sufficiently paranoid about networked computers and just taught a 3-day workshop with the very same students where it was constantly question of being sufficiently paranoid when building systems connected to the Internet, and most of all, server-side scripting. I’m a little less paranoid about client-side computing (ex: installations) — that said, allowing your computer to be turned into a drone can put you at serious risk, especially if you’re on Windows. Obviously, script-kiddies and red-meat hackers alike will give little care as to nature of the site; whether you be Microsoft or peaceonearth.com, you will get hacked.

However, to belabor the previous point: there are no absolutes, just as art is not produced in a vaccuum. The nature of things are of great interest to us, in all their complexity. As such we will always reserve the right, as artists yes, to explore all aspects of the beast, including misuse. But again, clearly, if that is not the objective of the piece, then a good dose of paranoia is always good to have at hand when working on yer good ol’ Internets.

2009-02-23 03:32:21


You’ve restored my confidence that the paranoia is… included, and it is perhaps just that the relatively “uninteresting” side of computing (eg network security) isn’t likely to be talked about as much on a site that is about the “interesting” stuff (eg interactive graphical widgets).

In any case, my point was that adult play, just as child play, has limits or dangers, and the example of an endless loop for the art installation idea is probably one of the lesser dangers.

To err is human, to really f*** things up, you need a computer.

A side effect of this notion is that someone else can really mess you up with a computer, maybe your own! :o)


Note: “artist” (with the quotes) was used as a shorthand for any person who might produce such a work, whether they consider themselves to be an artist or otherwise.

2009-03-03 18:09:02


Nice work ! As you wrote in the past “Programming Is Fun” — You have forgotten to say “with you”.

2009-05-01 23:16:07


some more : http://twitter.com/emoc/status/1673868440 + http://twitter.com/emoc/status/1673185369 + http://twitter.com/emoc/status/1673169569

2009-05-18 21:35:36

sinan ascioglu

hey, I created a page to collect sketches that are tagged with hash tag #twskc from twitter, pass them through processingjs, and display it on the page among the code.


2009-08-11 21:46:53

Sinan Ascioglu

Hey everyone, we just launched a competition “Tiny Sketch” within this concept: Can you create a cool sketch under 200 characters, winner to get $200? Brought to you by Rhizome.org and OpenProcessing.org.

2009-09-26 00:10:33

Kelli Garner

Really nice posts. I will be checking back here regularly.

2010-03-18 15:14:49


Truly inspiring.
I even made my own:
void draw(){int x=width,y=height;stroke(200+sin(frameCount.5)5);point((y/2)+random(-5,5),(x/2)+random(-5));copy(0,0,x,y,-5,-5,x+9,y+9);}

A 138 character flight thru the clouds.

2011-09-12 11:20:06

plus tard

another one: PFont f=createFont(“”,90);int n;void draw(){textFont(f);fill(random(255),random(255),random(255));filter(BLUR,2);text(char(n),5,90);n++;}