Twenty four hours, one laptop at hand, endless combination of cakes and chips, one Nintendo Wii at stake, and two hundred programmers hacking away at code. The last two days was just this, and it is only today that I have caught up with lost sleep. The YAHOO Hack day , Bangalore, India is finally over, but I am still dizzy with all the fun I have had. This post is a short and lazy description of the hack that I came up with, on the Hack day.
Sometime back, I had written about YAHOO India Maps, and all the time I had spent trying hack it. Though the maps teams at YAHOO and Google are struggling hard to come up with ways to show directions, nothing can ever equal a friend drawing the directions on the map. Well, that was my hack - the power of doodling over the maps, and then sharing them with friends.
Done in HTML, picking up code from the canvas painter and YDN Maps, I had to add the power to save the positions, transformations, zooming and distribution. Painting on the canvas is simple, it is the transformations and zooming that took time. Initially, I wanted to leverage the style:width and style:height to zoom and pan, but the solution did not really seem scalable. With increasing doodles, the browser seemed to get a lot slower. Luckily for me, I was drawing paths I had to use AJAX to save and retrieve the paths, just like Yahoo maps draws the images. The only optimization that I could chip in was the retrieval of surrounding paths. Finally, all I could present was a heavily simplified version of an application that I wanted to build !
You can take a look at the most basic version of the hack here (saved as a HTML), as I don't have external hosting space.

So much for a hack, lucky for me, they loved it.. They handed me that Nintendo Wii, autographed by David Filo himself !!!