In today’s post, I’m going to show an interesting technique to solve a problem and then I will tear it to pieces and explain why it is actually useless. I believe that negative results should also be published so that we can save other people from wasting time trying the same thing. So here goes… A few days ago, a post on Ajaxian proposed a new version of a somewhat old technique to implement querySelectorAll on old versions of IE, using the browser’s native CSS engine. That sounds like a great idea at first, and the hack is quite clever. The idea is to dynamically add a CSS rule to the document that has the selector that you want to evaluate, and an expression that adds the matched elements to a global array. When I read this, it reminded me...
Kinik just published a pretty amazing #twitcode version of a Mandelbrot set visualization in JavaScript. Here’s the code: for (k=84;k-=1/32;document.write(k%3?i%8: '<br/>' )) for (x=y=0,i=99;--i/y;x=t)t=x*x-y*y+1-k%3,y=1-k/42+y*x*2 And here’s what it renders: http://twitter.com/KiniK/statuses/2575582146 Read More...