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;}. 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.

Twetching_18
 
Twetching_4
 
Twetching_2
 
Twetching_10
 
Twetching_14
 
Twetching_7
 
Twetching_9
 
Twetching_15
 
Twetching_8
 
Twetching_1
 
Twetching_6
 
Twetching_5
 
Twetching_3
 
Twetching_13
 
Twetching_16
 
Twetching_11
 
Twetching_12
 

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)

Twetching_19
 
Twetching_0

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.