Beautiful Errors
Well I don't officially know if they are beautiful yet as I am not officially a master of fine art - not until february. This happend as an accident. I was using surebert for an ajax front end to an applictaion and I wanted the repsonses to be in random places on the page so that it was easy to debug.
I got back into my ide but left the browser window open. When I went back, 3000 queries later, the system has drawn me this image based off the following basic colorization code, a little surebert and some error magic.





Here is the tiny simple code that made it happen
function mv(obj,x,y,z){
if(typeof(obj)=='string'){
obj = $(id);
}
obj.style.position='absolute';
obj.style.left = x +'px';
obj.style.top = y +'px';
if(z!=undefined){obj.style.zIndex=z;}
}
function rand(min,max){
min = min || 0;
max = max || 100;
return Math.floor(Math.random()*max+min);
}
function randColor(grey){
if(grey == 1){
grey = rand(0,255);
return "rgb("+grey+","+grey+","+grey+")";
} else {
return "rgb("+rand(0,255)+","+rand(0,255)+","+rand(0,255)+")";
}
}
I got back into my ide but left the browser window open. When I went back, 3000 queries later, the system has drawn me this image based off the following basic colorization code, a little surebert and some error magic.





Here is the tiny simple code that made it happen
function mv(obj,x,y,z){
if(typeof(obj)=='string'){
obj = $(id);
}
obj.style.position='absolute';
obj.style.left = x +'px';
obj.style.top = y +'px';
if(z!=undefined){obj.style.zIndex=z;}
}
function rand(min,max){
min = min || 0;
max = max || 100;
return Math.floor(Math.random()*max+min);
}
function randColor(grey){
if(grey == 1){
grey = rand(0,255);
return "rgb("+grey+","+grey+","+grey+")";
} else {
return "rgb("+rand(0,255)+","+rand(0,255)+","+rand(0,255)+")";
}
}
- Z