<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CUENRng-fCp7ImA9WhBbEUg.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027</id><updated>2013-05-10T08:11:37.654+05:30</updated><category term="Social Media" /><category term="TEDxHitechCity" /><category term="Research" /><category term="Hack" /><category term="Outlook" /><category term="Caption" /><category term="Bug" /><category term="Math" /><category term="Softies 2K3" /><category term="Windows" /><category term="Apple" /><category term="Google Books" /><category term="Translation" /><category term="Movie" /><category term="Train" /><category term="Android GingerBread" /><category term="Code" /><category term="eService" /><category term="Web Development" /><category term="Charity" /><category term="AI" /><category term="TEDxChennai" /><category term="Dell" /><category term="Album" /><category term="Easter egg" /><category term="NexuS" /><category term="Video" /><category term="GMail" /><category term="2008" /><category term="Painting" /><category term="Fail" /><category term="PSG Tech" /><category term="Google+" /><category term="Location Aware" /><category term="Energy" /><category term="B2G" /><category term="Wishes" /><category term="CSS" /><category term="Javascript" /><category term="Pune" /><category term="IPL" /><category term="Problems" /><category term="Design" /><category term="Google Mobile" /><category term="Perl" /><category term="Image Editor" /><category term="Tips" /><category term="Workplace" /><category term="Challenge" /><category term="USB" /><category term="Windows Phone 7" /><category term="iPhone" /><category term="Firefox" /><category term="Android ADK" /><category term="NexusOne" /><category term="Chennai" /><category term="Plug-in" /><category term="Internet Explorer" /><category term="CDN" /><category term="Intel" /><category term="Event" /><category term="Blog" /><category term="Random" /><category term="Innovation" /><category term="Printing" /><category term="Help" /><category term="Google Labs" /><category term="Marriage" /><category term="Microsoft" /><category term="Contest" /><category term="ISB" /><category term="JavaFx" /><category term="Swine Flu" /><category term="Statistics" /><category term="Review" /><category term="SMS Channel" /><category term="Scratchpad" /><category term="Batch Day" /><category term="Puzzle" /><category term="Keyboard" /><category term="Google Search" /><category term="NodeJs" /><category term="VLike" /><category term="Google Short Links" /><category term="Tech Talk" /><category term="VServices" /><category term="Arduino" /><category term="Chrome" /><category term="Language" /><category term="Railways" /><category term="Thumb rules" /><category term="Telecom" /><category term="Grow" /><category term="Health" /><category term="India" /><category term="Facebook" /><category term="Cloud" /><category term="BloggerFiesta" /><category term="Tag" /><category term="Multimedia" /><category term="Google Wave" /><category term="Cloud Computing" /><category term="Android 2.3" /><category term="Chrome OS" /><category term="Office" /><category term="Webinar" /><category term="Google Apps Marketplace" /><category term="Earth Hour" /><category term="Project" /><category term="Rupee" /><category term="Humour" /><category term="Fun" /><category term="Algorithms" /><category term="Google" /><category term="DataMining" /><category term="Experiment" /><category term="Canvas" /><category term="Tech Day" /><category term="Features" /><category term="Learning by doing" /><category term="CSS3" /><category term="Tamil" /><category term="Database" /><category term="Linux" /><category term="Web Security" /><category term="Tools" /><category term="TimeZone" /><category term="YSlow" /><category term="Ubuntu" /><category term="Samsung" /><category term="Sports" /><category term="Firefox 3.5" /><category term="TED" /><category term="VOIP" /><category term="Public" /><category term="Personal" /><category term="Google Data API" /><category term="AntiVirus" /><category term="SQL" /><category term="Infrastructure" /><category term="Google Docs" /><category term="Climate Change" /><category term="BarCamp" /><category term="Water" /><category term="Delhi" /><category term="Toon" /><category term="Milestone" /><category term="Flash Game" /><category term="Creativity" /><category term="IM bots" /><category term="Computer" /><category term="Quote" /><category term="TWT" /><category term="Flash" /><category term="Games" /><category term="Applicaion" /><category term="RealTime" /><category term="Champions League" /><category term="Career" /><category term="Privacy" /><category term="Sudoku" /><category term="IRCTC" /><category term="UserScripts" /><category term="Ideas" /><category term="Products" /><category term="D.E. Shaw" /><category term="TEDx" /><category term="Funny" /><category term="HTC" /><category term="Google Reader" /><category term="Gadget" /><category term="myGooglePage" /><category term="New year" /><category term="ChennaiGeeks" /><category term="Birthday" /><category term="Vacation" /><category term="Forward" /><category term="Elections" /><category term="Timeline" /><category term="Chat" /><category term="Bangalore" /><category term="VComment" /><category term="Add-On" /><category term="Learning" /><category term="Labs" /><category term="Google Site" /><category term="Hyderabad" /><category term="HTML" /><category term="100" /><category term="Education" /><category term="Festival" /><category term="Safety" /><category term="Google Maps" /><category term="Usage" /><category term="Analytics" /><category term="Twitter" /><category term="Template" /><category term="Unconference" /><category term="Google Fonts" /><category term="Technology" /><category term="VirualBox" /><category term="2011" /><category term="Family" /><category term="Cricket" /><category term="Reader" /><category term="Friends" /><category term="AJAX" /><category term="Awareness" /><category term="Windows Live" /><category term="Reasoning" /><category term="Programming" /><category term="Froyo" /><category term="Best Practice" /><category term="Advertisement" /><category term="Product development" /><category term="Electronics" /><category term="General" /><category term="Dream" /><category term="Mozilla" /><category term="Android development" /><category term="Conference" /><category term="Weather" /><category term="Diwali" /><category term="Blog action day" /><category term="Chart" /><category term="Google Instant" /><category term="Android" /><category term="Yahoo" /><category term="Application" /><category term="HTML5" /><category term="Windows 7" /><category term="Infibeam" /><category term="Mobile" /><category term="Script" /><category term="Internet" /><category term="Sachin" /><category term="How to" /><category term="Chrome Extension" /><category term="2010" /><category term="YouTube" /><category term="Search" /><category term="Science" /><category term="Java" /><category term="Poverty" /><category term="API" /><category term="Voice Search" /><category term="Google App Engine" /><category term="Daylight Saving Scheme" /><category term="Tool" /><category term="Household" /><category term="Browser" /><category term="Sun" /><category term="Securiy" /><category term="Software Engineer" /><category term="GreaseMonkey" /><category term="Google Blogger" /><category term="Colors" /><category term="Hoax" /><category term="Random Clicks" /><category term="Google Instant Previews" /><category term="Android 3.0" /><category term="Orkut" /><category term="JaJah" /><category term="Tablet" /><category term="US" /><category term="Training" /><category term="Text Editor" /><category term="Google Apps" /><category term="Visitors" /><category term="HoneyComb" /><title>Varun's ScratchPad</title><subtitle type="html">Right place to know about my interests!!</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.varunkumar.me/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>353</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/varunkumar/scratchpad" /><feedburner:info uri="varunkumar/scratchpad" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>varunkumar/scratchpad</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;DUAMQ3k-fSp7ImA9WhNUE08.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-2319006895339090455</id><published>2013-01-05T00:59:00.001+05:30</published><updated>2013-01-05T00:59:42.755+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-05T00:59:42.755+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NodeJs" /><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="Arduino" /><category scheme="http://www.blogger.com/atom/ns#" term="Android ADK" /><title>VBot - Arduino based Quadbot</title><content type="html">&lt;p align="justify"&gt;For a Software engineer who is busy writing code all through the day, working on real world objects is really a cool thing to do. Its fun to control the world around you with the code you write. I have been playing with Arduino for quite sometime and have built &lt;a href="http://blog.varunkumar.me/search/label/Arduino" target="_blank"&gt;few hardware hacks&lt;/a&gt; based on that. Check out my hardware hacks &lt;a href="http://blog.varunkumar.me/search/label/Arduino" target="_blank"&gt;here&lt;/a&gt;. The latest one in that series is &lt;a href="https://github.com/varunkumar/vbot" target="_blank"&gt;VBot&lt;/a&gt;. VBot is a four legged robot which can walk, stretch and even dance. &lt;a href="http://www.youtube.com/watch?v=lD_z1iR0yf0" target="_blank"&gt;Video&lt;/a&gt;. There are different ways in which the bot can be controlled. The bot can receive IR signals and can be controlled using an IR remote. I have also built an Android app for controlling the bot. I have ported the firmware to JavaScript and there is a REPL interface to control to the bot from Node.js app. Fork the project on &lt;a href="https://github.com/varunkumar/vbot" target="_blank"&gt;github&lt;/a&gt;. This project has increased my interests on hardware hacks significantly. Hoping to do more in the coming months.&amp;#160; &lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-X89VeUjQs9k/UOctnzBO6HI/AAAAAAAAm6g/Z4fj6gOSXyc/s1600-h/vbot%25255B15%25255D.png" target="_blank"&gt;&lt;img title="VBot - Android app" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; float: none; margin-left: auto; display: block; border-top-width: 0px; margin-right: auto" border="0" alt="VBot - Android app" src="http://lh3.ggpht.com/--N0oijFTKjI/UOctoyhISBI/AAAAAAAAm6k/0OLcg9kiQcI/vbot_thumb%25255B13%25255D.png?imgmax=800" width="274" height="484" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="center"&gt;&lt;iframe height="360" src="http://www.youtube.com/embed/lD_z1iR0yf0?rel=0" frameborder="0" width="640" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/4hiqmKwDkQk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/2319006895339090455/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=2319006895339090455" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2319006895339090455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2319006895339090455?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/4hiqmKwDkQk/vbot-arduino-based-quadbot.html" title="VBot - Arduino based Quadbot" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/--N0oijFTKjI/UOctoyhISBI/AAAAAAAAm6k/0OLcg9kiQcI/s72-c/vbot_thumb%25255B13%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2013/01/vbot-arduino-based-quadbot.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0IDR38yfSp7ImA9WhJbFE4.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-18830866293259135</id><published>2012-09-24T01:41:00.000+05:30</published><updated>2012-09-24T01:49:36.195+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-24T01:49:36.195+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Hack" /><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Arduino" /><title>Arduino tweet notifier built with Johnny-Five!</title><content type="html">&lt;p style="text-align: justify"&gt;If you have been following this blog, or following me(@&lt;a href="https://twitter.com/varunkumar" target="_blank"&gt;varunkumar&lt;/a&gt;) on Twitter, by now you would have found out that I am a big fan of JavaScript. JavaScript is everywhere. You can use it to write &lt;a href="http://nodejs.org/" target="_blank"&gt;web servers&lt;/a&gt;. You can run it on your mobile devices. You can even use it as a &lt;a href="http://gruntjs.com/" target="_blank"&gt;build tool&lt;/a&gt;. And, of course, you can use it in its original home, the browser. But, what about running it on embedded devices? Can we control robots with JavaScript? Yes, developers have been successful in controlling robots with JavaScript.&amp;nbsp;Read this interesting article on JavaScript robotics: "&lt;a href="http://www.voodootikigod.com/nodebots-the-rise-of-js-robotics" target="_blank"&gt;The Rise of JS Robotics&lt;/a&gt;". In the rest of this post, I will talk about &lt;a href="https://github.com/rwldrn/johnny-five" target="_blank"&gt;Johnny-Five&lt;/a&gt;, a cool JavaScript framework for interfacing with Arduino boards. I will also show how easy it is to build a Tweet notifier (LCD display connected to an Arduino board displaying the count of mentions from Twitter).&lt;/p&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;p style="text-align: justify"&gt;&lt;b&gt;What is Johnny-Five?&lt;/b&gt;&lt;br /&gt;
Johnny-Five is a JavaScript Arduino programming framework written by the awesome JavaScript developer &lt;a href="https://github.com/rwldrn" rel="nofollow" target="_blank"&gt;Rick Waldron&lt;/a&gt; (@&lt;a href="https://twitter.com/rwaldron" rel="nofollow" target="_blank"&gt;rwaldron&lt;/a&gt;). The framework which can be installed as a node module uses &lt;a href="http://firmata.org/wiki/Main_Page" target="_blank"&gt;Firmata protocol&lt;/a&gt;&amp;nbsp;to communicate with Arduino boards. Firmata is&amp;nbsp;a generic protocol for communicating with microcontrollers from software on a host machine. Johnny-Five is a JavaScript implementation of the Firmata protocol which provides easy-to-use modules for interfacing with Arduino boards. Check it out &lt;a href="https://github.com/rwldrn/johnny-five" target="_blank"&gt;here&lt;/a&gt;. &lt;a href="http://jsfiddle.net/rwaldron/dtudh/show/light" target="_blank"&gt;Video&lt;/a&gt;&lt;/p&gt;&lt;p style="text-align: justify"&gt;
&lt;b&gt;Getting started&lt;/b&gt;
&lt;ul style="text-align: left;"&gt;
&lt;li&gt;&lt;b&gt;Preparing your Arduino board&lt;/b&gt;. The first thing you need to do is to flash your Arduino board with Firmata. You can do it from Arduino IDE (File &amp;gt; Examples &amp;gt; Firmata &amp;gt; StandardFirmata). I tried it out on a &lt;a href="http://www.arduino.cc/en/Main/ArduinoBoardADK" target="_blank"&gt;Mega ADK&lt;/a&gt; board. Now, one end of your communication is ready. Software on the host machine will communicate this board using Firmata protocol.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Installing Johnny-Five&lt;/b&gt;. As mentioned above, Johnny-Five is a node module and can be installed using npm (npm install johnny-five). johnny-five depends on node modules &lt;a href="https://github.com/jgautier/firmata" target="_blank"&gt;firmata&lt;/a&gt; and &lt;a href="https://github.com/voodootikigod/node-serialport" target="_blank"&gt;serialport&lt;/a&gt;. Note: You might have to build serialport for your environment using "node-gyp configure build". &amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Writing Hello, world! &lt;/b&gt;In the context of Arduino, writing a hello world is nothing but glowing an LED. You have to write a Node.js JavaScript file and include johnny-five module.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;script src="https://gist.github.com/3772798.js"&gt; &lt;/script&gt;
&lt;/p&gt;&lt;p style="text-align: justify"&gt;
&lt;b&gt;Arduino Tweet notifier&lt;/b&gt;&lt;br /&gt;
This is just a fun hack I have built with Johnny-Five (This is just for demo. You can do much more with JF). I have connected a 16x2 LCD display to an Arduino Mega ADK board (pins 8-13) and was writing data on it using Johnny-Five. Then, I have employed &lt;a href="https://github.com/AvianFlu/ntwitter" target="_blank"&gt;nTwitter&lt;/a&gt; module to get the stream of mentions from twitter. Whenever someone mentions @&lt;a href="https://twitter.com/varunkumar" target="_blank"&gt;varunkumar&lt;/a&gt; on twitter, LCD will display a notification for the same. Check out the code &lt;a href="https://gist.github.com/3772808" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-U1cmN7iU9sc/UF9rGO63nII/AAAAAAAAj6A/QyPHgNjP7Ww/s1600/IMG_2792.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/-U1cmN7iU9sc/UF9rGO63nII/AAAAAAAAj6A/QyPHgNjP7Ww/s320/IMG_2792.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-VbU0c8wiF7Y/UF9rJGNcxzI/AAAAAAAAj6I/5g7eYAm0kNE/s1600/IMG_2793.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-VbU0c8wiF7Y/UF9rJGNcxzI/AAAAAAAAj6I/5g7eYAm0kNE/s320/IMG_2793.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-eS1_a5pVSrA/UF9rLtLkN5I/AAAAAAAAj6Q/ODI7WZrmG80/s1600/IMG_2797.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="240" src="http://1.bp.blogspot.com/-eS1_a5pVSrA/UF9rLtLkN5I/AAAAAAAAj6Q/ODI7WZrmG80/s320/IMG_2797.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-kbsqG_38T4I/UF9rOIlZUnI/AAAAAAAAj6Y/CM2ZsNZZV38/s1600/IMG_2799.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-kbsqG_38T4I/UF9rOIlZUnI/AAAAAAAAj6Y/CM2ZsNZZV38/s320/IMG_2799.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-oJguKvLMmTM/UF9rP8Mj_fI/AAAAAAAAj6k/LavLLEwVgVA/s1600/IMG_2800.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-oJguKvLMmTM/UF9rP8Mj_fI/AAAAAAAAj6k/LavLLEwVgVA/s320/IMG_2800.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/3772808.js"&gt; &lt;/script&gt;&lt;p style="text-align: justify"&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
Johnny-Five. &lt;a href="https://github.com/rwldrn/johnny-five" target="_blank"&gt;Link&lt;/a&gt;.&lt;br /&gt;
Arduino &amp;amp; LCD getting started. &lt;a href="http://arduino.cc/en/Tutorial/LiquidCrystal" target="_blank"&gt;Link&lt;/a&gt;.&lt;/p&gt;&lt;p style="text-align: justify"&gt;
-- Varun&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/Fu-qTPw8auo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/18830866293259135/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=18830866293259135" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/18830866293259135?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/18830866293259135?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/Fu-qTPw8auo/arduino-tweet-notifier.html" title="Arduino tweet notifier built with Johnny-Five!" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-U1cmN7iU9sc/UF9rGO63nII/AAAAAAAAj6A/QyPHgNjP7Ww/s72-c/IMG_2792.JPG" height="72" width="72" /><thr:total>3</thr:total><georss:featurename>Hyderabad, Andhra Pradesh, India</georss:featurename><georss:point>17.385044 78.486671</georss:point><georss:box>17.142593 78.17081400000001 17.627495 78.802528</georss:box><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/09/arduino-tweet-notifier.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEGRnw7eyp7ImA9WhNTGEw.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-523555711195118242</id><published>2012-09-15T22:40:00.000+05:30</published><updated>2012-10-21T16:53:47.203+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-10-21T16:53:47.203+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CSS3" /><title>Animated doodle in CSS!</title><content type="html">&lt;p style="text-align: justify;"&gt;
If you are following the developments on web browsers, you must be knowing the kind of changes CSS is going through. Lots of new features are getting added to CSS3 and you can do lots of stuffs with CSS. Here is a short post about an animated doodle which I had built purely using CSS3. I built this animated logo few months ago for a hackathon we had at our workplace. The speciality of this logo is that it is built only using CSS3 - even the circles and rounded corners are built with CSS and no images are used. You can verify the same with the help of any web inspectors. You can hover over the little guy and see him flip his ears, eyes, teeth, arms and legs. I have employed &lt;a href="http://dev.w3.org/csswg/css3-transitions/" rel="nofollow" target="_blank"&gt;CSS transitions&lt;/a&gt;, &lt;a href="http://www.w3.org/TR/css3-2d-transforms/" rel="nofollow" target="_blank"&gt;CSS transforms&lt;/a&gt; and others to get the work done. The implementation is complex and not optimal. But, it is built just to demonstrate the power of CSS. Browser support: All latest browsers. The CSS used in this experiment can be found &lt;a href="http://deshack.varunkumar.me/stylesheets/logo.css" target="_blank"&gt;here&lt;/a&gt;. If you are not able to view the logo inline, check it out &lt;a href='http://deshack.varunkumar.me' target='_blank'&gt;here&lt;/a&gt;. Have fun with CSS!! :)&lt;/p&gt;
&lt;center&gt;
&lt;div class='logo'&gt;
&lt;div class='head'&gt;
&lt;div class='l_specsend'&gt;
&lt;/div&gt;
&lt;div class='l_specs'&gt;
&lt;div class='l_specsinner eyeContainer' rel='l_eye'&gt;
&lt;div class='l_eye' id='l_eye'&gt;
&lt;div class='l_eyeinner'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class='r_specs'&gt;
&lt;div class='r_specsinner eyeContainer' rel='r_eye'&gt;
&lt;div class='r_eye' id='r_eye'&gt;
&lt;div class='r_eyeinner'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class='m_specs'&gt;
&lt;/div&gt;
&lt;div class='r_specsend'&gt;
&lt;/div&gt;
&lt;div style='clear: both'&gt;
&lt;/div&gt;
&lt;div class='mouth'&gt;
&lt;div class='tooth'&gt;
&lt;/div&gt;
&lt;div class='tooth'&gt;
&lt;/div&gt;
&lt;div class='bluetooth'&gt;
&lt;/div&gt;
&lt;div class='tooth'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style='clear: both'&gt;
&lt;/div&gt;
&lt;div class='l_ear'&gt;
&lt;div class='l_earinner'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class='r_ear'&gt;
&lt;div class='r_earinner'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style='clear: both'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class='l_arm'&gt;
&lt;div class='l_bottomhand'&gt;
&lt;/div&gt;
&lt;div class='l_forehand'&gt;
&lt;/div&gt;
&lt;div class='l_wrist'&gt;
&lt;div class='l_wristinner'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class='l_leg'&gt;
&lt;div class='l_legtop'&gt;
&lt;/div&gt;
&lt;div class='l_legmiddle'&gt;
&lt;/div&gt;
&lt;div class='l_legbottom'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class='r_leg'&gt;
&lt;div class='r_legtop'&gt;
&lt;/div&gt;
&lt;div class='r_legmiddle'&gt;
&lt;/div&gt;
&lt;div class='r_legbottom'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class='r_arm'&gt;
&lt;div class='r_bottomhand'&gt;
&lt;/div&gt;
&lt;div class='r_forehand'&gt;
&lt;/div&gt;
&lt;div class='r_wrist'&gt;
&lt;div class='r_wristinner'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style='clear: both'&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/center&gt;
&lt;p style="text-align: justify;"&gt;-- Varun&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/a4HS-R0710s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/523555711195118242/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=523555711195118242" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/523555711195118242?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/523555711195118242?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/a4HS-R0710s/animated-doodle-in-css.html" title="Animated doodle in CSS!" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><georss:featurename>Hyderabad, Andhra Pradesh, India</georss:featurename><georss:point>17.385044 78.486671</georss:point><georss:box>17.142593 78.17081400000001 17.627495 78.802528</georss:box><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/09/animated-doodle-in-css.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8CRX08fSp7ImA9WhJUF00.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-2800533699016547937</id><published>2012-09-15T16:57:00.001+05:30</published><updated>2012-09-15T17:04:24.375+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-15T17:04:24.375+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Linux" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="How to" /><title>[How to] Install Linux on Android?</title><content type="html">&lt;p align="justify"&gt;As both the Linux and Android OS are open sourced, developers have enjoyed success in porting Linux on to Android and vice versa. Lots of efforts are still going on in this space. Canonical has been busy working on &lt;a href="http://www.ubuntu.com/devices/android" target="_blank"&gt;Ubuntu on Android&lt;/a&gt; which enables Android devices to run Ubuntu. “&lt;a href="http://linuxonandroid.org/" target="_blank"&gt;Linux on Android&lt;/a&gt;” is another awesome project which helps you to install and run a wide range of Linux distros on your Android device. An Android app has been released as part of this project which will guide you through the installation process. I tried it out myself on my Galaxy S2 and the process was very straight forward. Using this app, you will be able to install any distro as this just ‘chroot’ into the Linux image. This technique will run a virtual Linux on top of the Android OS without disturbing your Android OS. You could still use other apps installed on your Android device. We could replace Android with Linux completely but then you wouldn’t be able to use your Android phone as a phone anymore. &lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Pre-requisites&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Android 2.1 or higher. You need to have at least 3.5 GB of free space on your SD card. You can run Linux from internal SD cards as well.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Root access. You must have an Android device with Root access. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Support for &lt;a href="http://en.wikipedia.org/wiki/Loop_device" target="_blank"&gt;Loop devices&lt;/a&gt;. Your Android OS must support loop devices. The stock image on Galaxy S2 didn’t have the support for loop devices. I have flashed the MIUI ROM with a kernel which supports loop devices.&amp;#160; &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Steps to install Linux on Android&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Download and install “&lt;a href="https://play.google.com/store/apps/details?id=com.zpwebsites.linuxonandroid" target="_blank"&gt;Complete Linux Installer&lt;/a&gt;” app from Play store. Also, install &lt;a href="https://play.google.com/store/apps/details?id=android.androidVNC" target="_blank"&gt;VNC Viewer&lt;/a&gt; and &lt;a href="https://play.google.com/store/apps/details?id=jackpal.androidterm" target="_blank"&gt;Terminal App&lt;/a&gt; from Play store.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Launch the application “Complete Linux Installer”. This will guide you through the download links for different Linux distros.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Download the image and place it on your sdcard. By default, the launcher looks for the image directly on the sdcard (for ex: /sdcard/ubuntu). This can be configured from the launch menu. You can create a new launch configuration by specifying the image location and a name to it. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Select the configuration which you want to launch. This will open up the Terminal app with the chosen Linux image (say Ubuntu) mounted. If everything goes well, you should see this message &lt;a href="mailto:&amp;ldquo;root@localhost:/"&gt;“root@localhost:/&lt;/a&gt;#” on the terminal. This terminal will act like a Ubuntu command line. You can connect to the GUI from any of your favorite VNC viewer app (either on the same device or other devices). &lt;/div&gt;   &lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;       &lt;div align="justify"&gt;You will be prompted for the root password, screen size and other options while mounting the Linux image.&lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;If your kernel doesn’t support loop devices, you will get appropriate messages in this phase. &lt;/div&gt;     &lt;/li&gt;      &lt;li&gt;       &lt;div align="justify"&gt;If you don’t have sdcard on your device, you might get some mount errors. You can ignore the errors (close the terminal) and re-connect to the mounted device again.&lt;/div&gt;     &lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;     &lt;div align="justify"&gt;You are done. I have tried both &lt;a href="http://lxde.org/" target="_blank"&gt;LXDE&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Unity_(user_interface)" target="_blank"&gt;Unity&lt;/a&gt; desktops on S2 and both worked reasonably well. &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-37uf4E9FD4Y/UFRl7uL0BCI/AAAAAAAAj00/3lz5x2EBREE/s1600-h/2012.08.27-08.27.24%25255B10%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Terminal Emulator with Ubuntu mounted" border="0" alt="Terminal Emulator with Ubuntu mounted" src="http://lh4.ggpht.com/-zKN1UrM2mdo/UFRl873w12I/AAAAAAAAj08/aMv3744fU68/2012.08.27-08.27.24_thumb%25255B10%25255D.jpg?imgmax=800" width="292" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-2W45CPO9Gc0/UFRl-LcXFEI/AAAAAAAAj1E/n14gYqLyVOo/s1600-h/2012.08.27-08.45.13%25255B9%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="VNC Viewer app running on Galaxy S2 connected to Ubuntu running on the same device - LXDE desktop" border="0" alt="VNC Viewer app running on Galaxy S2 connected to Ubuntu running on the same device - LXDE desktop" src="http://lh5.ggpht.com/-eedQhxUnBJU/UFRl_5jp37I/AAAAAAAAj1M/MOLiJgomB3w/2012.08.27-08.45.13_thumb%25255B9%25255D.jpg?imgmax=800" width="644" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-tkRjd8SGFss/UFRmBGsLl9I/AAAAAAAAj1U/AJ7Bj_aQVGo/s1600-h/2012.08.27-08.34.57%25255B7%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="VNC Viewer app running on Galaxy S2 connected to Ubuntu running on the same device - LXDE desktop" border="0" alt="VNC Viewer app running on Galaxy S2 connected to Ubuntu running on the same device - LXDE desktop" src="http://lh3.ggpht.com/-2lRpGLE-bm8/UFRmCettUDI/AAAAAAAAj1c/bhjP9lenbDM/2012.08.27-08.34.57_thumb%25255B7%25255D.jpg?imgmax=800" width="644" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-I56auqS0N9o/UFRmDQREruI/AAAAAAAAj1g/QQvIJmxttDE/s1600-h/2012.09.15-09.30.07%25255B11%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="VNC Viewer app running on Galaxy S2 connected to Ubuntu running on the same device - Unity" border="0" alt="VNC Viewer app running on Galaxy S2 connected to Ubuntu running on the same device - Unity" src="http://lh3.ggpht.com/-cXWaaEsqQtw/UFRmEiBcC_I/AAAAAAAAj1s/Hv0cyBW98DY/2012.09.15-09.30.07_thumb%25255B11%25255D.jpg?imgmax=800" width="644" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-4QoCMiaQaQc/UFRmF4XuJFI/AAAAAAAAj1w/NWkIZrbP-Ko/s1600-h/2012.09.15-09.32.18%25255B9%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="VNC Viewer app running on Galaxy S2 connected to Ubuntu running on the same device" border="0" alt="VNC Viewer app running on Galaxy S2 connected to Ubuntu running on the same device" src="http://lh6.ggpht.com/-qw8E8WsFlxk/UFRmG-wuGyI/AAAAAAAAj18/AlMUv0e8AXE/2012.09.15-09.32.18_thumb%25255B9%25255D.jpg?imgmax=800" width="644" height="388" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-l5nvDh5FpZ4/UFRmIXt8G8I/AAAAAAAAj2E/CJlnTqHeNHo/s1600-h/Screen%252520shot%2525202012-09-14%252520at%2525209.09.43%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="VNC Viewer running on Mac connected to Ubuntu on Android" border="0" alt="VNC Viewer running on Mac connected to Ubuntu on Android" src="http://lh3.ggpht.com/-xf1wT9raUwI/UFRmKBpG65I/AAAAAAAAj2M/bB2JezllJ0Y/Screen%252520shot%2525202012-09-14%252520at%2525209.09.43%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="640" height="419" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-rAA_vWhKj9g/UFRmLqEBSfI/AAAAAAAAj2U/RQfxjelZEN4/s1600-h/Screen%252520shot%2525202012-09-14%252520at%2525209.15.57%252520AM%25255B10%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="VNC Viewer running on Mac connected to Ubuntu on Android" border="0" alt="VNC Viewer running on Mac connected to Ubuntu on Android" src="http://lh5.ggpht.com/-7E7TsKNQj4s/UFRmNPMUpHI/AAAAAAAAj2c/CHk4KeDk4G4/Screen%252520shot%2525202012-09-14%252520at%2525209.15.57%252520AM_thumb%25255B8%25255D.png?imgmax=800" width="640" height="419" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;More information about “Linux on Android” can be found &lt;a href="http://linuxonandroid.org/" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/tK-3wlRBT7E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/2800533699016547937/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=2800533699016547937" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2800533699016547937?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2800533699016547937?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/tK-3wlRBT7E/how-to-install-linux-on-android.html" title="[How to] Install Linux on Android?" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-zKN1UrM2mdo/UFRl873w12I/AAAAAAAAj08/aMv3744fU68/s72-c/2012.08.27-08.27.24_thumb%25255B10%25255D.jpg?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/09/how-to-install-linux-on-android.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcGRHs9eip7ImA9WhJWFkg.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-2503852308954998108</id><published>2012-08-22T23:18:00.001+05:30</published><updated>2012-08-22T23:23:45.562+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-08-22T23:23:45.562+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Event" /><category scheme="http://www.blogger.com/atom/ns#" term="Bangalore" /><title>JS Foo Bangalore 2012</title><content type="html">&lt;p style="text-align: justify;"&gt;
HTML5 makes the web so powerful that we can do almost everything on the web. Till few years back, Flash was commonly used to build rich applications. Things have changed a lot with HTML5. Browsers are also becoming powerful day-by-day. Many desktop developers have already started moving towards web based application development. JavaScript is growing to be the most important programming language. In fact, the famous &lt;a href="http://www.khanacademy.org/" rel="nofollow" target="_blank"&gt;Khan Academy&lt;/a&gt; has chosen JavaScript as &lt;a href="http://www.khanacademy.org/cs" rel="nofollow" target="_blank"&gt;the first programming language&lt;/a&gt; to teach. As a developer, how do we keep track of the latest happenings? Though there are many online forums (like &lt;a href="http://html5rocks.com/" rel="nofollow" target="_blank"&gt;HTML5Rocks&lt;/a&gt;) to help us, the best way to learn is to hang out with fellow developers and the experts from the field. &lt;a href="http://jsfoo.in/" rel="nofollow" target="_blank"&gt;JS Foo&lt;/a&gt; is a tech event, organized by the good guys at &lt;a href="http://hasgeek.com/" rel="nofollow" target="_blank"&gt;HasGeek&lt;/a&gt;, which facilitates the interaction between JavaScript developers.&lt;/p&gt;
&lt;a name='more'&gt;&lt;/a&gt;
&lt;strong&gt;About JS Foo&lt;/strong&gt;
&lt;p style="text-align: justify;"&gt;
JS Foo is India’s only conference on JavaScript, with editions in Bangalore, Pune and Chennai. It brings together JavaScript developers from different parts of the country, to share their learnings and help others transition to JavaScript. The highlight of the conference is its transparent system of public submission and voting on sessions. Participants have the control over the sessions to be part of the event. Yes, you can go to &lt;a href="http://funnel.hasgeek.com/jsfoo/" rel="nofollow" target="_blank"&gt;http://funnel.hasgeek.com/jsfoo/&lt;/a&gt; to suggest a new session or vote for a session which you like. The schedule for the event will be prepared based on that.&lt;/p&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-ULvi1acVglg/UDUZ_amxgBI/AAAAAAAAjLg/sc-A2YIUjWU/s1600/jsfoo.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img alt="JS Foo" border="0" src="http://1.bp.blogspot.com/-ULvi1acVglg/UDUZ_amxgBI/AAAAAAAAjLg/sc-A2YIUjWU/s1600/jsfoo.png" title="JS Foo" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;strong&gt;About HasGeek&lt;/strong&gt;
&lt;p style="text-align: justify;"&gt;
HasGeek is India’s first and only professional, community-focused technology event organizer. It was founded by Kiran (popularly known as @&lt;a href="http://twitter.com/jackerhack" rel="nofollow" target="_blank"&gt;jackerhack&lt;/a&gt;) in 2010. HasGeek creates discussion space for geeks to collaborate. HasGeek has organized many successful events in the past like DocType HTML5, JS Foo, AndroidCamp, DroidCon, Meta Refresh, etc. I have personally attended some of their past events and really enjoyed them. Believe me, these guys are really awesome. :)&lt;/p&gt;
&lt;strong&gt;JS Foo Bangalore 2012&lt;/strong&gt;
&lt;p style="text-align: justify;"&gt;
The fourth edition of JS Foo is happening in Bangalore on 19th -20th of October 2012. The theme for this edition is JavaScript everywhere. People are pushing the limits of what can be done with JavaScript on the server, in embedded devices, and in its original home, the browser. You can share your experience working with JavaScript and you can listen to the best practices in code and working style from the experts.&lt;br /&gt;
&lt;br /&gt;
Date: Oct 19-20, 2012&lt;br /&gt;
Venue: NIMHANS Convention Centre, Dairy Circle, Bangalore&lt;br /&gt;
Pre-requisite: Basics of web development. You don’t have to be an expert in JavaScript.&lt;br /&gt;
Registration: &lt;a href="http://jsfoo-2012.doattend.com/" rel="nofollow" target="_blank"&gt;http://jsfoo-2012.doattend.com/&lt;/a&gt;&lt;br /&gt;
Site: &lt;a href="http://jsfoo.in/" rel="nofollow" target="_blank"&gt;http://jsfoo.in&lt;/a&gt; (Site is still showing information about previous edition).&lt;/p&gt;
&lt;strong&gt;My Experience&lt;/strong&gt;
&lt;p style="text-align: justify;"&gt;I have attended the third edition of JS Foo in Chennai. It was an awesome experience. Learnt a lot of new stuffs. Check out &lt;a href="http://blog.varunkumar.me/2012/02/jsfoo-chennai-2012.html" target="_blank"&gt;my blog post&lt;/a&gt; to know about my experience at JS Foo Chennai 2012. You can also find the videos from previous editions &lt;a href="http://www.youtube.com/user/hasgeek" rel="nofollow" target="_blank"&gt;here&lt;/a&gt;. I will be attending the event and might even give a talk on JS tools (&lt;a href="http://funnel.hasgeek.com/jsfoo/" rel="nofollow" target="_blank"&gt;http://funnel.hasgeek.com/jsfoo/&lt;/a&gt;). Hope to see you all at the event.&lt;/p&gt;
-- Varun&lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/ZukznecKKk8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/2503852308954998108/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=2503852308954998108" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2503852308954998108?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2503852308954998108?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/ZukznecKKk8/js-foo-bangalore-2012.html" title="JS Foo Bangalore 2012" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-ULvi1acVglg/UDUZ_amxgBI/AAAAAAAAjLg/sc-A2YIUjWU/s72-c/jsfoo.png" height="72" width="72" /><thr:total>0</thr:total><georss:featurename>Bangalore, Karnataka, India</georss:featurename><georss:point>12.9715987 77.5945627</georss:point><georss:box>12.724026199999999 77.2787057 13.2191712 77.91041969999999</georss:box><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/08/js-foo-bangalore-2012.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkEFRX8zfyp7ImA9WhJRE0U.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-5375000166403120097</id><published>2012-07-15T19:09:00.001+05:30</published><updated>2012-07-16T01:00:14.187+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-07-16T01:00:14.187+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Browser" /><title>Binary data processing in JavaScript</title><content type="html">&lt;p align="justify"&gt;Few days ago, I came across an interesting post about &lt;a href="http://syntensity.com/static/espeak.html" target="_blank"&gt;Speaker.js&lt;/a&gt; on Hacker News. Speaker.js is a client side library which enables text-to-speech using only JavaScript and HTML. The library doesn’t do any server side calls to do the conversion. This made me thinking about the techniques used in JavaScript to process large amount of binary data. Old school JavaScript doesn’t provide any support for storing binary data. Traditionally normal arrays were used to simulate the behavior of binary arrays by storing a number in the range of 0 to 255 for each element. Obviously, the above technique will not be suitable for applications that require processing of large amount of data. Then, with the introduction of HTML &lt;a href="http://en.wikipedia.org/wiki/Canvas_element" target="_blank"&gt;canvas element&lt;/a&gt;, developers started using &lt;a href="http://www.html5canvastutorials.com/advanced/html5-canvas-get-image-data-tutorial/" target="_blank"&gt;Canvas’ ‘ImageData’&lt;/a&gt; to hold any binary data needed for their applications. Canvas ImageData is still one of the most widely used techniques to deal with binary data. If you are following the developments on HTML5 standardization and web browsers, you must be aware of “&lt;strong&gt;Typed Arrays&lt;/strong&gt;”. JavaScript “Typed Arrays” provides a mechanism for accessing raw binary data much more efficiently. Rest of this post will focus on “Typed Arrays” and performance metrics of all these three techniques. &lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Typed Arrays&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;JavaScript “Typed Arrays” provide a mechanism for accessing raw binary data much more efficiently. The &lt;a href="http://www.khronos.org/registry/typedarray/specs/latest/" target="_blank"&gt;specification&lt;/a&gt; defines two types: &lt;strong&gt;buffer&lt;/strong&gt; – a generic fixed length buffer type, &lt;strong&gt;view&lt;/strong&gt; - accessor types that allow access to the data stored within the buffer.&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;p align="justify"&gt;&lt;strong&gt;Buffer (implemented by ArrayBuffer). &lt;/strong&gt;The &lt;a href="https://developer.mozilla.org/en/JavaScript_typed_arrays/ArrayBuffer" target="_blank"&gt;ArrayBuffer&lt;/a&gt; is a data type that is used to represent a generic, fixed-length binary data buffer. You can't directly manipulate the contents of an ArrayBuffer; instead, you can create an ArrayBufferView object which represents the buffer in a specific format, and use that to read and write the contents of the buffer. The following line of code will create a chunk of memory with 16 bytes pre-initialized to 0. Note: You will not be able to access data using the variable buffer.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;pre&gt;var buffer = new ArrayBuffer(16);&lt;/pre&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;&lt;p align="justify"&gt;&lt;strong&gt;View (implemented by ArrayBufferView and its subclasses)&lt;/strong&gt;. A view provides a context—that is, a data type, starting offset, and number of elements—that turns the data into an actual typed array. Views are implemented by the &lt;a href="https://developer.mozilla.org/en/JavaScript_typed_arrays/ArrayBufferView" target="_blank"&gt;ArrayBufferView&lt;/a&gt; class and its subclasses. Float32Array, Float64Array, Int8Array, Int16Array, Int32Array, Uint8Array, Uint16Array, Uint32Array are some of the available view classes. There is also a generic view DataView available to read and write data to ArrayBuffer. In the following lines of code, we create a view that treats the data in the buffer as an array of 32-bit signed integers. We can access the data in the buffer just like a normal array. It is possible to create multiple views on the same buffer. By combining a single buffer with multiple views of different types, starting at different offsets into the buffer, we can interact with complex data structures (like data read from a structured file, WebGL, etc).&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;pre&gt;var int32View = new Int32Array(buffer);&lt;br /&gt;for (var i=0; i&amp;lt;int32View.length; i++) {&lt;br /&gt;  int32View[i] = i*2;&lt;br /&gt;}&lt;/pre&gt;&lt;pre&gt;// 16-bit singed integer view on the same buffer. This is allowed.&lt;br /&gt;var int16View = new Int16Array(buffer);&lt;br /&gt;for (var i=0; i&amp;lt;int16View.length; i++) {&lt;br /&gt;  console.log(&amp;quot;Entry &amp;quot; + i + &amp;quot;: &amp;quot; + int16View[i]);&lt;br /&gt;}&lt;/pre&gt;&lt;/blockquote&gt;&lt;p align="justify"&gt;&lt;strong&gt;Browser Support&lt;/strong&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;iframe style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" src="http://caniuse.com/typedarrays/embed/" width="100%" height="300px" justify?="justify?"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;strong&gt;Performance Tests&lt;/strong&gt;&lt;/p&gt;&lt;p align="justify"&gt;&amp;#160;&lt;a href="https://github.com/kanaka" target="_blank"&gt;Kanaka&lt;/a&gt; has written some &lt;a href="https://github.com/kanaka/noVNC/blob/master/tests/arrays.html" target="_blank"&gt;test cases&lt;/a&gt; to test the performance of these three techniques: Normal Arrays, ImageData and Typed Arrays. The test cases are hosted as part of his &lt;a href="https://github.com/kanaka/noVNC" target="_blank"&gt;noVNC&lt;/a&gt; project on github. I ran the same test cases on my Macbook Pro (2 GHz Intel Quad-core i7, 4 GB 1333 MHz DDR3) and it turns out that performance of Chrome is much better than other browsers. In Chrome, ‘Typed Arrays’ proves to be the most efficient technique for manipulating binary data. There are some drastic changes in these metrics when compared to the tests run by Kanaka in &lt;a href="http://blog.n01se.net/blog-n01se-net-p-248.html" target="_blank"&gt;April 2011&lt;/a&gt;. Test results after averaging out 50 test iterations can be found &lt;a href="https://docs.google.com/spreadsheet/pub?key=0AiN4la8ZXs3YdFRHSUM5endjS0Z0ei04cWkzTV9zSGc&amp;amp;single=true&amp;amp;gid=4&amp;amp;output=html" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;p align="justify"&gt;The Four Tests:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p align="justify"&gt;Create - For each test iteration, an array is created and then initialized to zero and this is repeated 2000 times.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p align="justify"&gt;Random read - For each test iteration, 5 million reads are issued to pseudo-random locations in an array.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p align="justify"&gt;Sequential read - For each test iteration, 5 million reads are issued sequentially to an array. The reads loop around to the beginning of the array when they reach the end of the array.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p align="justify"&gt;Sequential write - For each test iteration, 5 million updates are made sequentially to an array. The writes loop around to the beginning of the array when they reach the end of the array.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="center"&gt;&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0AiN4la8ZXs3YdFRHSUM5endjS0Z0ei04cWkzTV9zSGc&amp;transpose=1&amp;headers=1&amp;range=A2%3AE6&amp;gid=4&amp;pub=1","options":{"vAxes":[{"useFormatFromData":true,"title":"MilliSeconds (lesser is better)","viewWindowMode":"pretty","viewWindow":{}},{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}}],"series":[{"type":"bars"}],"curveType":"function","booleanRole":"certainty","title":"Normal Arrays","interpolateNulls":false,"animation":{"duration":0},"legend":"in","theme":"maximized","focusTarget":"category","type":"line","hAxis":{"title":"","useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}},"width":600,"height":371},"state":{},"chartType":"ComboChart","chartName":"Normal Arrays"} &lt;/script&gt;&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0AiN4la8ZXs3YdFRHSUM5endjS0Z0ei04cWkzTV9zSGc&amp;transpose=1&amp;headers=1&amp;merge=COLS&amp;range=A2%3AA6%2CF2%3AI6&amp;gid=4&amp;pub=1","options":{"series":[{"type":"bars"}],"curveType":"function","animation":{"duration":0},"theme":"maximized","type":"line","hAxis":{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}},"vAxes":[{"useFormatFromData":true,"title":"MilliSeconds (lesser is better)","viewWindowMode":"pretty","viewWindow":{}},{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}}],"booleanRole":"certainty","title":"ImageData","interpolateNulls":false,"domainAxis":{"direction":1},"legend":"in","focusTarget":"category","width":600,"height":371},"state":{},"chartType":"ComboChart","chartName":"ImageData"} &lt;/script&gt;&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0AiN4la8ZXs3YdFRHSUM5endjS0Z0ei04cWkzTV9zSGc&amp;transpose=1&amp;headers=1&amp;merge=COLS&amp;range=A2%3AA6%2CJ2%3AM6&amp;gid=4&amp;pub=1","options":{"vAxes":[{"useFormatFromData":true,"title":"MilliSeconds (lesser is better)","minValue":null,"viewWindowMode":"pretty","viewWindow":{"min":null,"max":null},"maxValue":null},{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}}],"series":[{"color":"#3366cc","type":"bars"}],"curveType":"function","title":"Typed Arrays","booleanRole":"certainty","animation":{"duration":0},"legend":"in","theme":"maximized","focusTarget":"category","type":"line","hAxis":{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}},"width":600,"height":371},"state":{},"chartType":"ComboChart","chartName":"Chart 3"} &lt;/script&gt;&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/static/modules/gviz/1.0/chart.js"&gt; {"dataSourceUrl":"//docs.google.com/spreadsheet/tq?key=0AiN4la8ZXs3YdFRHSUM5endjS0Z0ei04cWkzTV9zSGc&amp;transpose=1&amp;headers=1&amp;range=A9%3AE12&amp;gid=4&amp;pub=1","options":{"vAxes":[{"title":"MilliSeconds (lesser is better)","useFormatFromData":false,"formatOptions":{"source":"inline"},"viewWindowMode":"pretty","format":"0.##","logScale":false,"viewWindow":{}},{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}}],"title":"Chrome 20.0.1132.57 on Mac","booleanRole":"certainty","animation":{"duration":0},"legend":"in","theme":"maximized","focusTarget":"category","annotations":{"domain":{}},"hAxis":{"useFormatFromData":true,"viewWindowMode":"pretty","viewWindow":{}},"isStacked":false,"width":600,"height":371},"state":{},"chartType":"ColumnChart","chartName":"Chart 4"} &lt;/script&gt;&lt;/p&gt;&lt;p align="justify"&gt;Chrome is the only browser where “Typed Arrays” seems to be performing well. If you want to use a standard technique, then you can go with ‘Typed Arrays’. Otherwise, you will have to wait for other browser vendors to improve the performance of “Typed Arrays”. More information about “Typed Arrays” can be found &lt;a href="https://developer.mozilla.org/en/JavaScript_typed_arrays" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p align="justify"&gt;&lt;strong&gt;Update:&lt;/strong&gt; I have re-ran the test cases after making the changes pointed out by &lt;a href='http://news.ycombinator.com/user?id=mraleph' target='_blank'&gt;mraleph&lt;/a&gt; (&lt;a href='http://news.ycombinator.com/item?id=4247457' target='_blank'&gt;here&lt;/a&gt;)&lt;ul&gt;&lt;li&gt;Explicitly specifying the arraysize while creating normal arrays&lt;/li&gt;&lt;li&gt;Instead of creating a single test_something function, created separate functions for each array type. It turns out that performance of other browsers has improved significantly after this change. Interesting inference from this result is that the JS engines in Firefox, Safari and Opera do not seem to handle Polymorphism well. &lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-D41pV7yB3vc/UAMaPDYSThI/AAAAAAAAjAQ/T1DJVXl2Ttc/s1600/Screen%2Bshot%2B2012-07-16%2Bat%2B12.50.15%2BAM.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="128" width="400" src="http://4.bp.blogspot.com/-D41pV7yB3vc/UAMaPDYSThI/AAAAAAAAjAQ/T1DJVXl2Ttc/s400/Screen%2Bshot%2B2012-07-16%2Bat%2B12.50.15%2BAM.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/p&gt;&lt;p align="justify"&gt;-- Varun&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/VWsTgeRBImo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/5375000166403120097/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=5375000166403120097" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/5375000166403120097?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/5375000166403120097?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/VWsTgeRBImo/binary-data-processing-in-javascript.html" title="Binary data processing in JavaScript" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-D41pV7yB3vc/UAMaPDYSThI/AAAAAAAAjAQ/T1DJVXl2Ttc/s72-c/Screen%2Bshot%2B2012-07-16%2Bat%2B12.50.15%2BAM.png" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/07/binary-data-processing-in-javascript.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cGRnk_fip7ImA9WhJSFkU.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-7703044690153789127</id><published>2012-07-07T22:40:00.001+05:30</published><updated>2012-07-07T22:40:27.746+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-07-07T22:40:27.746+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Experiment" /><category scheme="http://www.blogger.com/atom/ns#" term="Browser" /><title>Postel’s law and modern day browsers</title><content type="html">&lt;p align="justify"&gt;Today while I was skimming through the feeds from Hacker news, I came across this interesting post -- “&lt;a href="http://news.ycombinator.com/item?id=4209052" target="_blank"&gt;A file that’s both an acceptable HTML page and a JPEG image&lt;/a&gt;”. Apparently &lt;a href="http://lcamtuf.coredump.cx/squirrel/" target="_blank"&gt;this url&lt;/a&gt; (&lt;a title="http://lcamtuf.coredump.cx/squirrel/" href="http://lcamtuf.coredump.cx/squirrel/"&gt;http://lcamtuf.coredump.cx/squirrel/&lt;/a&gt;) can be viewed as a HTML document when opened on a browser and the same can be used as a source to the image element. Yes, it does work. As mentioned on the above page, there is no server side trick involved in this. After inspecting the page for sometime and trying out different tools in my arsenal, I have figured that this is related to Postel’s Iaw.&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;What is Postel’s law?&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Postel’s law or the robustness principle is a general design guideline for software: &lt;i&gt;Be conservative in what you do, be liberal in what you accept from others&lt;/i&gt; (often reworded as &amp;quot;Be conservative in what you send, liberal in what you accept&amp;quot;). (Definition sourced from Wikipedia.) Modern day browsers follow this principle to a greater extent. Let me explain this with an example. Create an empty file and name it as “something.html”. Just add a line of text without any HTML tags. The browsers will render the content even though there are no HTML tags available. Now add html, head and body tags and leave them open without closing. Browsers render the pages even if they are not well formed. In other words, browsers are liberal enough in accepting the contents to render. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;The Squirrel page&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Now, lets use Postel’s law to understand how the Squirrel page works. When we request the url as a HTML document or as an image, the same content is being delivered to the browser (check the screenshot of Chrome Network panel). The content sent from the server is actually an image with HTML contents embedded on it. The browser interprets the content depending on the context in which it is used. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-v4IYxKBbavg/T_htb4WZ6_I/AAAAAAAAi8w/FWjUVFFgr7s/s1600-h/Screen%252520shot%2525202012-07-07%252520at%25252010.15.01%252520PM%25255B14%25255D.png" target="_blank"&gt;&lt;img title="Chrome Network panel showing the data transferred when the page is viewed as a HTML document and as an image" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="115" alt="Chrome Network panel showing the data transferred when the page is viewed as a HTML document and as an image" src="http://lh4.ggpht.com/-hHHFlHRu0-Y/T_htdPo7BrI/AAAAAAAAi84/Ls3eR5JpRD0/Screen%252520shot%2525202012-07-07%252520at%25252010.15.01%252520PM_thumb%25255B12%25255D.png?imgmax=800" width="644" border="0" /&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-jPdV0RYRs3A/T_hteuy4KLI/AAAAAAAAi9A/V-tX7WC5pmE/s1600-h/Screen%252520shot%2525202012-07-07%252520at%25252010.06.38%252520PM%25255B12%25255D.png" target="_blank"&gt;&lt;img title="Page source showing Junk characters" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="261" alt="Page source showing Junk characters" src="http://lh5.ggpht.com/-5hT_wfSBNYQ/T_htgHV4tVI/AAAAAAAAi9I/4zQdqsDisYc/Screen%252520shot%2525202012-07-07%252520at%25252010.06.38%252520PM_thumb%25255B10%25255D.png?imgmax=800" width="644" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Open &lt;a href="http://lcamtuf.coredump.cx/squirrel/" target="_blank"&gt;the page&lt;/a&gt; on a browser to view the HTML contents. If you view the page source, you will find some junk characters in the source. You will find a set of junk characters at the beginning of the file and some more contents at the end of file within HTML comments. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;The initial set of contents are outside any HTML tag. This corresponds to the headers of the image file and has to be outside of HTML tag for the parsers to pick them as image. However, when we render the url as a HTML document, browser will try to render those junk characters even though they are outside any HTML tag. Hence, they are hidden explicitly on the HTML page with the help of CSS. &lt;font face="Courier New"&gt;&lt;em&gt;body { visibility: hidden; }. &lt;/em&gt;&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;The actual image contents are placed inside a HTML comment block. Browsers will safely ignore any comments while rendering the page where as when we use it as an image the parsers will understand the contents and parse the image data.&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;Since the browsers are liberal enough to render the content based on the context, the same url can be used as a HTML document and as an image. Try saving the source and open in your favorite text editor, you will find junk characters. Rename the save file as jpeg, and open the file in browser, the contents will be rendered as image and not HTML. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Update&lt;/strong&gt;: Just read through the comments on the Hacker news page. Looks like the same technique is used to compress JS files inside PNG files for &lt;a href="http://js1k.com/" target="_blank"&gt;JS1K&lt;/a&gt; contest.&lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/nGUzkLqZ7GM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/7703044690153789127/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=7703044690153789127" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7703044690153789127?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7703044690153789127?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/nGUzkLqZ7GM/postels-law-and-modern-day-browsers.html" title="Postel’s law and modern day browsers" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-hHHFlHRu0-Y/T_htdPo7BrI/AAAAAAAAi84/Ls3eR5JpRD0/s72-c/Screen%252520shot%2525202012-07-07%252520at%25252010.15.01%252520PM_thumb%25255B12%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/07/postels-law-and-modern-day-browsers.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4ER38_fCp7ImA9WhVRFEk.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-1929206741097160198</id><published>2012-03-18T18:59:00.001+05:30</published><updated>2012-03-22T23:58:26.144+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-22T23:58:26.144+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="B2G" /><category scheme="http://www.blogger.com/atom/ns#" term="Mozilla" /><category scheme="http://www.blogger.com/atom/ns#" term="Mobile" /><title>[Screenshots] Mozilla’s Mobile OS, Boot2Gecko (B2G)</title><content type="html">&lt;p align="justify"&gt;Mozilla has been working on its own Mobile OS code named “&lt;a href="http://www.mozilla.org/en-US/b2g/" target="_blank"&gt;Boot to Gecko&lt;/a&gt;”(&lt;a href="https://wiki.mozilla.org/B2G" target="_blank"&gt;B2G&lt;/a&gt;) for quite sometime. B2G is a browser based operating system built using the standard web technology stack. B2G is expected to run on low end smart phones as well. I am impressed with the idea of using standard web technologies for mobile app development (on the similar lines of Windows 8 HTML5 apps). Mozilla claims that they are working on web APIs to expose device capabilities such as telephony and other media devices. The project is still in its early stages. B2G was &lt;a href="http://mobile.dzone.com/articles/mozillas-web-based-phone?mz=46483-html5" target="_blank"&gt;show running on&lt;/a&gt; Samsung Galaxy S2 at the Mobile World Congress last month. If you are interested in contributing to this project, check out the code from &lt;a href="https://github.com/andreasgal/B2G" target="_blank"&gt;here&lt;/a&gt;. Neat instructions are provided to build the code and an Android based emulator is also included for testing. B2G uses the same low level building blocks (Linux kernel, libusb, etc) which Android uses. I played around with it last night and here are some screenshots of B2G. The user interface was a bit on the slower side in the emulator. &lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-71WoRGQJA2Q/T2XiXaPCcNI/AAAAAAAAaG0/XcSmxSuwjC4/s1600-h/home_screen_locked%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Home Screen" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Home Screen" src="http://lh5.ggpht.com/-qOsPi9Pw2o8/T2XiYo9NybI/AAAAAAAAaG8/DIm-unS-w0M/home_screen_locked_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-zT-gXQC6AgY/T2XiamaAP5I/AAAAAAAAaHE/QomDxOG0WOc/s1600-h/home_screen%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Home Screen" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Home Screen" src="http://lh3.ggpht.com/-0BF7bUW01Kg/T2XicCr9EjI/AAAAAAAAaHM/HfeQ_wmCGTQ/home_screen_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-drgD1897pj0/T2XidVzp2CI/AAAAAAAAaHU/00eImqI82Xc/s1600-h/home_screen_3%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Home Screen" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Home Screen" src="http://lh4.ggpht.com/-JqdlNk5erEE/T2Xie8ADEhI/AAAAAAAAaHc/CdtXWitpHec/home_screen_3_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-Dhd4nSfKcvY/T2XigpUFrwI/AAAAAAAAaHk/5zF0oWh8NNY/s1600-h/home_screen_2%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Home Screen" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Home Screen" src="http://lh6.ggpht.com/-rY3LKRxTVuc/T2Xih5yhmrI/AAAAAAAAaHs/j4B7cfWTB48/home_screen_2_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-52pREczD6Z8/T2XijqxLZAI/AAAAAAAAaH0/iO2vw00jswc/s1600-h/settings%25255B12%25255D.png" target="_blank"&gt;&lt;img title="B2G - Settings" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Settings" src="http://lh3.ggpht.com/-5c-pDEdiHvA/T2XilCVFlTI/AAAAAAAAaH8/0xCqmwGzHlA/settings_thumb%25255B10%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-TbTGJABQrHM/T2XimYcAyDI/AAAAAAAAaIE/GchnO28-L50/s1600-h/dialer%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Dialer" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Dialer" src="http://lh5.ggpht.com/-JGHaVooHCrs/T2Xin2iIiAI/AAAAAAAAaIM/x_0aaSmf5G8/dialer_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-ZZte89IBZSI/T2XipDCThsI/AAAAAAAAaIU/7xuWaG1i2F4/s1600-h/gallery%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Gallery" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Gallery" src="http://lh6.ggpht.com/-4QE17u00SRw/T2Xiq78J_wI/AAAAAAAAaIc/YeJYdHAfCnU/gallery_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-bWNXb3fvgqg/T2XisfC60FI/AAAAAAAAaIk/z2tuCqki9Fk/s1600-h/videos%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Video Playback" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Video Playback" src="http://lh5.ggpht.com/-Gr1vtdWJEJA/T2XiuLTXjKI/AAAAAAAAaIs/uvHFaHcdYbA/videos_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-N-XWJqcIp94/T2Xivggkm7I/AAAAAAAAaI0/SSRUV-J87JY/s1600-h/market%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Mozilla Marketplace" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Mozilla Marketplace" src="http://lh5.ggpht.com/--9cWWm8L5oc/T2XixPE3OAI/AAAAAAAAaI8/Rl4XoUu7nyw/market_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-h2Npo8X_tXQ/T2XiycOlh0I/AAAAAAAAaJE/ryIF9eNq3fA/s1600-h/music%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Music App" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Music App" src="http://lh5.ggpht.com/-HCSml70FPpc/T2XizcUCZ_I/AAAAAAAAaJM/pToyFEyeY3M/music_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-8h6h19gaVqQ/T2Xi08okH4I/AAAAAAAAaJU/1-wTS0x5Md8/s1600-h/music_2%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Music Playback" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Music Playback" src="http://lh6.ggpht.com/-8GFxXFNHzNM/T2Xi2Yt3zXI/AAAAAAAAaJc/_uoo29rH3SA/music_2_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-u-3NmP1ylvE/T2Xi4ObtifI/AAAAAAAAaJk/qXpxn6PN-Oc/s1600-h/game%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Penguin Pop Game (Demo)" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Penguin Pop Game (Demo)" src="http://lh4.ggpht.com/-yAzZH-sCkBY/T2Xi5uLI1II/AAAAAAAAaJs/6tNzs42cOtY/game_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-WlMldGLq-Wc/T2Xi7AhMg9I/AAAAAAAAaJ0/HJ1dZoVyfdw/s1600-h/firefox%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Firefox Browser" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Firefox Browser" src="http://lh4.ggpht.com/-ce93LcZeKKc/T2Xi8zE3Z1I/AAAAAAAAaJ8/5_gR5eoMYxQ/firefox_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-08S6E7YM45I/T2Xi-RMM6qI/AAAAAAAAaKE/Swk8uoQiZoc/s1600-h/keyboard%25255B8%25255D.png" target="_blank"&gt;&lt;img title="B2G - Keyboard" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Keyboard" src="http://lh3.ggpht.com/-WhdOAbzJcOI/T2Xi_xEao-I/AAAAAAAAaKM/XWPiZiN5JXM/keyboard_thumb%25255B6%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-yHzNHgU0nO8/T2XjB2EmYyI/AAAAAAAAaKU/iIPPCIUd9Ts/s1600-h/cut_the_rope%25255B11%25255D.png" target="_blank"&gt;&lt;img title="B2G - Cut the Rope (HTML5 game)" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Cut the Rope (HTML5 game)" src="http://lh3.ggpht.com/-_xBrHPRJrJs/T2XjEPl19OI/AAAAAAAAaKc/su9c0WfS4_A/cut_the_rope_thumb%25255B9%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&amp;#160;&lt;a href="http://lh6.ggpht.com/-kQ-31QRTpkE/T2XjF0H1Q3I/AAAAAAAAaKk/RkXRdp9UPxU/s1600-h/cut_the_rope_2%25255B9%25255D.png" target="_blank"&gt;&lt;img title="B2G - Cut the Rope (HTML5 Game)" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="B2G - Cut the Rope (HTML5 Game)" src="http://lh6.ggpht.com/-UZPMId0p_bs/T2XjHrqCj3I/AAAAAAAAaKs/TDMbmjBJL70/cut_the_rope_2_thumb%25255B7%25255D.png?imgmax=800" width="495" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/hTO_rCysIY8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/1929206741097160198/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=1929206741097160198" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/1929206741097160198?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/1929206741097160198?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/hTO_rCysIY8/screenshots-mozillas-mobile-os.html" title="[Screenshots] Mozilla’s Mobile OS, Boot2Gecko (B2G)" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-qOsPi9Pw2o8/T2XiYo9NybI/AAAAAAAAaG8/DIm-unS-w0M/s72-c/home_screen_locked_thumb%25255B7%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/03/screenshots-mozillas-mobile-os.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUIFSHw8eip7ImA9WhVSFkQ.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-4212960663901341596</id><published>2012-03-14T02:24:00.001+05:30</published><updated>2012-03-14T08:21:59.272+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-03-14T08:21:59.272+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Google" /><category scheme="http://www.blogger.com/atom/ns#" term="Canvas" /><title>Insight into Google’s Input / Output machine</title><content type="html">&lt;p align="justify"&gt;Google has just updated its &lt;a href="https://developers.google.com/events/io/" target="_blank"&gt;Google I/O site&lt;/a&gt; with details about the 2012 edition of the event. Registration for the event opens on March 27th (If I remember correctly, the tickets for Google I/O 2011 were sold out in less than an hour. Good luck for those looking forward for the tickets.). Like the 2011 edition, this year also Google has added some cool stuff on its site. &lt;a href="http://www.google.com/events/io/2011/index-live.html" target="_blank"&gt;Google I/O 2011 site&lt;/a&gt; had an awesome &lt;a href="http://blog.varunkumar.me/2011/01/how-to-setup-google-io-style-animated.html" target="_blank"&gt;countdown timer&lt;/a&gt; (&lt;a href="http://www.chromeexperiments.com/detail/google-io-conference-html5-countdown-finale/?f=" target="_blank"&gt;Chrome experiment&lt;/a&gt;) which was counting down to start of the event. The brilliant designers at Google have taken it a step further and have built a game called “&lt;a href="https://developers.google.com/events/io/input-output/" target="_blank"&gt;Input/Output&lt;/a&gt;” to play-with till the event. This game is again a Chrome experiment and I am really impressed with it. I played with it for couple of hours and this post is an (unofficial) insight into some of the technologies used in this experiment. &lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;About “Input / Output machine”&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The objective of the game is simple: use the tools and machine parts to create a &lt;a href="http://www.rubegoldberg.com/" target="_blank"&gt;Rube Goldberg&lt;/a&gt;-inspired machine that moves a particle from the &amp;lt;input&amp;gt; to the &amp;lt;/output&amp;gt;. It looks simple but, believe me, it is very addictive. Its the &lt;em&gt;&lt;strong&gt;New Angry Birds&lt;/strong&gt;&lt;/em&gt;!! Once you get going with the machine, you can just unleash your creativity and build some creative ones. Also, Google has promised that some of your creations could be featured at Google I/O 2012. Build your machine and share it on Google+ using &lt;a href="https://plus.google.com/u/0/s/%23io12" target="_blank"&gt;#io12&lt;/a&gt;.&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-Fu8vBFSkTIA/T1-z_TMkJ1I/AAAAAAAAZwI/eVFH3JW6qJU/s1600-h/Screen%252520shot%2525202012-03-14%252520at%2525202.16.32%252520AM%25255B11%25255D.png" target="_blank"&gt;&lt;img title="Google Input / Output machine" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="378" alt="Google Input / Output machine" src="http://lh4.ggpht.com/-mzxaSHM8Qjk/T1-0BmtSv9I/AAAAAAAAZwQ/jzS_egGePu0/Screen%252520shot%2525202012-03-14%252520at%2525202.16.32%252520AM_thumb%25255B9%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Technologies used&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The JavaScript code which is the backbone of this whole experiment is not obfuscated, fortunately. That made it easier for me to dig through what is going behind the scene. The whole experiment seems to be heavily dependent on Canvas rendering. HTML5 canvas element is very powerful but it is very difficult to work with when it comes to handling user interactions. &lt;a href="http://easeljs.com/" target="_blank"&gt;Easel.js&lt;/a&gt; is a neat solution to this problem – It allows you to retain a full hierarchy of display objects rendered on the canvas and enable interaction on them. (If you have seen the cool charts on &lt;a href="http://www.googlezeitgeist.com/" target="_blank"&gt;Google Zeitgest 2011&lt;/a&gt; site, that was also built using Easel.js). Every tool on the toolbox is rendered as a display object onto the board and then the necessary event handlers are added to facilitate the positioning of the tool on the board. &lt;/p&gt;  &lt;p align="justify"&gt;For calculating the motion of the particle and transforming the particle, JavaScript library “&lt;a href="http://sylvester.jcoglan.com/" target="_blank"&gt;Slyvester&lt;/a&gt; – Vector and Matrix Math for JavaScript” has been used. Another interesting JavaScript library used is “&lt;a href="https://github.com/etgryphon/stativus" target="_blank"&gt;Stativus&lt;/a&gt; : StateCharts” which is a micro framework for maintaining state charts of an application. Apart from these, there are few utility libraries like “&lt;a href="http://documentcloud.github.com/underscore/" target="_blank"&gt;Underscore.js&lt;/a&gt;”, “&lt;a href="http://gsgd.co.uk/sandbox/jquery/easing/" target="_blank"&gt;jQuery Easing&lt;/a&gt;”, etc being used. All the aforementioned libraries are packaged inside a single JavaScript file named as “&lt;a href="https://developers.google.com/apps/js/io/experiment.js" target="_blank"&gt;experiment.js&lt;/a&gt;”&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;JavaScript Libraries used&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="http://easeljs.com/" target="_blank"&gt;Easel.js&lt;/a&gt; – Library to work with HTML5 canvas. It provides a retained graphics mode for canvas including a full, hierarchical display list, a core interaction model, and helper classes to make working with Canvas much easier.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="http://sylvester.jcoglan.com/" target="_blank"&gt;Slyvester&lt;/a&gt; - Vector and Matrix Math for JavaScript. It includes classes for modeling vectors and matrices in any number of dimensions, and for modeling infinite lines and planes in 3-dimensional space. It lets you write object-oriented easy-to-read code that mirrors the math it represents.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="https://github.com/etgryphon/stativus" target="_blank"&gt;Stativus&lt;/a&gt; – Library for maintaining the state charts of an application. Statecharts are a great way to organize your web application and make it more robust and increase code reuse. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="http://documentcloud.github.com/underscore/" target="_blank"&gt;Underscore.js&lt;/a&gt; – Utility library that provides a lot of the functional programming support. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="http://gsgd.co.uk/sandbox/jquery/easing/" target="_blank"&gt;jQuery Easing Plugin&lt;/a&gt; – jQuery plugin to give advanced easing options. &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Quick hack to unlock different particles&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;When you click on the &amp;lt;input&amp;gt;, you get options to position the &amp;lt;input&amp;gt; and you will also see another option to change the particle (as shown in the screenshot below). By default, only the first particle is enabled. As you build the machine and progress on the game (not really sure about the trigger – Chrome particle gets active on remixing some existing machine), you will get few additional particles – Anti-gravity Plus particle, Androidify particle, Chrome fast particle. Here is a quick hack to unlock all those particles by default:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Information about the unlocked particles are stored in a variable called &lt;font face="Courier New"&gt;USER_METADATA&lt;/font&gt;. &lt;/li&gt;    &lt;li&gt;Open &lt;font face="Courier New"&gt;JavaScript Console&lt;/font&gt; (Cmd + Shift + J) on your Google Chrome. &lt;/li&gt;    &lt;li&gt;Enter the following lines: &lt;font face="Courier New"&gt;USER_METADATA.hasPlusParticle = true;USER_METADATA.hasAndroidParticle = true;USER_METADATA.hasChromeParticle = true;&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;Yay! You are all set. Now, you can try out all the available particles. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/--P111jALvnU/T1-0CyNz_RI/AAAAAAAAZwY/58FR1T5ZuVo/s1600-h/Screen%252520shot%2525202012-03-14%252520at%2525202.16.44%252520AM%25255B11%25255D.png" target="_blank"&gt;&lt;img title="Google Input / Output machine - Input particles" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="453" alt="Google Input / Output machine - Input particles" src="http://lh3.ggpht.com/-rM-UicqdiyM/T1-0D2Y4cHI/AAAAAAAAZwg/VM_g0TqqmIA/Screen%252520shot%2525202012-03-14%252520at%2525202.16.44%252520AM_thumb%25255B12%25255D.png?imgmax=800" width="580" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Well done, Google! It is very addictive and I am going to spend more days on it. Please let me know if there is anything incorrect in this post. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Thomas Reynolds, the lead developer of this project commented on this post with some corrections. “We actually only use Ease.js, which is the Penner Easing Equations from inside Easel. Our canvas renderer is 100% custom. Regarding the particle hack, so glad you found that! There are a ton of &amp;quot;developer&amp;quot; hacks, mostly global variable, just waiting to be tweaked.”&lt;/p&gt;  &lt;p&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/L4xenhc6clI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/4212960663901341596/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=4212960663901341596" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/4212960663901341596?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/4212960663901341596?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/L4xenhc6clI/insight-into-googles-input-output.html" title="Insight into Google’s Input / Output machine" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-mzxaSHM8Qjk/T1-0BmtSv9I/AAAAAAAAZwQ/jzS_egGePu0/s72-c/Screen%252520shot%2525202012-03-14%252520at%2525202.16.32%252520AM_thumb%25255B9%25255D.png?imgmax=800" height="72" width="72" /><thr:total>6</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/03/insight-into-googles-input-output.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEGRX88cCp7ImA9WhRaFko.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-4552875016810333750</id><published>2012-02-19T23:12:00.001+05:30</published><updated>2012-02-20T00:07:04.178+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-20T00:07:04.178+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Event" /><category scheme="http://www.blogger.com/atom/ns#" term="Chennai" /><title>JSFoo Chennai 2012!</title><content type="html">&lt;p align="justify"&gt;&lt;a href="http://jsfoo.in" target="_blank"&gt;JSFoo&lt;/a&gt; is a one day conference on building rich web applications in JavaScript. Having tasted success on its previous editions in Bangalore and Pune, &lt;a href="http://hasgeek.in" target="_blank"&gt;HasGeek&lt;/a&gt; organized the Chennai edition of JSFoo on 18-Feb-2012. The turn around for the event was quite good. I had reached the event at around 8:30 AM and was catching up with some of the old friends. The day started with an introduction to HasGeek and what followed was a series of interesting talks in two parallel tracks. Overall it was a good learning experience. The videos of the event will be out in the web shortly. Attaching the screenshots of mind map I have created during the event. Click on the images to enlarge them. &lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Cross Platform Mobile apps using JQuery Mobile and RhoMobile&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The first session I attended was on cross platform mobile app development by Balaji Loganathan. He talked about some of the popular web frameworks to build mobile web app. He briefly compared the mobile web app and the native app and explained the need for cross platform mobile app development API. Then, he talked about &lt;a href="http://rhomobile.com/" target="_blank"&gt;RhoMobile&lt;/a&gt; and how handy it is for building enterprise mobile applications.&amp;#160; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-vOn2BkKvb_Q/T0EzIfKthxI/AAAAAAAAY4M/t8EgLGcxvKE/s1600-h/Crossplatformmo%25255B12%25255D.png" target="_blank"&gt;&lt;img title="Cross Platform Mobile apps using JQuery Mobile and RhoMobile" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="296" alt="Cross Platform Mobile apps using JQuery Mobile and RhoMobile" src="http://lh4.ggpht.com/-VGkjeDAviIk/T0EzQmdUx5I/AAAAAAAAY4U/fErBJDOI2HQ/Crossplatformmo_thumb%25255B10%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Production ready apps with Flatiron&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://flatironjs.org" target="_blank"&gt;Flatiron&lt;/a&gt; is a framework for building applications using &lt;a href="http://nodejs.org" target="_blank"&gt;Node.js&lt;/a&gt;. Flatiron is sponsored by &lt;a href="http://nodejitsu.com/" target="_blank"&gt;Nodejitsu&lt;/a&gt; and the code is available on &lt;a href="http://www.github.com/flatiron" target="_blank"&gt;github&lt;/a&gt;. I have built few apps in Node.js before but have never heard about it. The session was delivered by Pavan Kumar Sunkara (&lt;a href="http://twitter.com/pksunkara" target="_blank"&gt;@pksunkara&lt;/a&gt;), a student from IIT Madras who is currently doing his internship with Nodejitsu. Flatiron seems to include some interesting components and it is the responsibility of the app developer to pick and choose what he wants. It is still in its early stages – just two months into development but seems to be promising. All the best to the team. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-jfGS0mgN4Ig/T0EzV3kw4uI/AAAAAAAAY4c/90pD9AX32BM/s1600-h/Flatiron%25255B17%25255D.png" target="_blank"&gt;&lt;img title="Production ready apps with Flatiron" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="288" alt="Production ready apps with Flatiron" src="http://lh5.ggpht.com/-a9SCYidhQ_s/T0EzZopxRbI/AAAAAAAAY4k/U6Rwm2XOHE4/Flatiron_thumb%25255B15%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;JavaScript and the compatible Web&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The session on the compatible web was delivered by Rajesh (&lt;a href="http://twitter.com/avranju" target="_blank"&gt;@avranju&lt;/a&gt;) from Microsoft. Though the session was meant to be a sponsor session (Microsoft was one of the sponsors for the day), Rajesh didn’t focus much about Microsoft products. He talked about the challenges in building web applications because of the availability of wide range of browsers and OS. He talked about Modernizr and other frameworks / techniques to overcome these compatibility challenges. Nice and interesting session.&amp;#160; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-1S-pYgb7Ql8/T0EzgmwHQiI/AAAAAAAAY4s/_8hga8HUQQ0/s1600-h/Javascriptandth%25255B10%25255D.png" target="_blank"&gt;&lt;img title="JavaScript and the compatible Web" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="197" alt="JavaScript and the compatible Web" src="http://lh4.ggpht.com/-OJpBf2eUjp4/T0EzmJS2cEI/AAAAAAAAY40/6b9UnHSxOPA/Javascriptandth_thumb%25255B8%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Data visualisation in JavaScript&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The session was delivered by Anand S (&lt;a href="http://twitter.com/sanand0" target="_blank"&gt;@sanand0&lt;/a&gt;), chief data scientist at Gramener. He talked about the need for visualization. He said “Don’t take too much into average. Try to plot all the points and visualize them”. For visualizing data, one need to be creative and tools are just helpers in the process. You can build rich visualizations with simple divs in HTML without any complex libraries / tools. He demonstrated some of the &lt;a href="http://gramener.com/codersearch/" target="_blank"&gt;cool visualizations&lt;/a&gt; he has build at Gramener. His talk was very crisp and clear. One of my favorite sessions for the day. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-BsvNc9KkZSg/T0Ezq2ldmgI/AAAAAAAAY48/_mgmYsAk4aY/s1600-h/DataVisualizati%25255B16%25255D.png" target="_blank"&gt;&lt;img title="Data visualisation in JavaScript" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="174" alt="Data visualisation in JavaScript" src="http://lh4.ggpht.com/-skRQlK2nizw/T0EzxsrInTI/AAAAAAAAY5E/HC7XsC3RNNs/DataVisualizati_thumb%25255B12%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Building visualisations that rock using Web Standards&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The second session for the day on data visualization was delivered by Harish (&lt;a href="http://twitter.com/hsivaram" target="_blank"&gt;@hsivaram&lt;/a&gt;), a web developer evangelist at Adobe. This was the first session right after the lunch break but still Harish managed to keep us awake. Great job bro! Harish showed us how passionate he is about the data visualization. The session was more like a Show-n-tell where he built a replica of the cool visualization on Google Zeitgeist 2011 site. He used &lt;a href="http://easeljs.com/" target="_blank"&gt;Easel.js&lt;/a&gt; and &lt;a href="https://github.com/sole/tween.js/" target="_blank"&gt;Tween.js&lt;/a&gt; to build the visualization in less than 40 mins. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/--gOtfB7djY0/T0Ez2X8tTGI/AAAAAAAAY5M/vwUKzmbF3Z4/s1600-h/DataVisualizati2%25255B15%25255D.png" target="_blank"&gt;&lt;img title="Building visualisations that rock using Web Standards" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="86" alt="Building visualisations that rock using Web Standards" src="http://lh3.ggpht.com/-c9ZKbMaYTX0/T0Ez8LwZwHI/AAAAAAAAY5U/0iHTR24JBto/DataVisualizati2_thumb%25255B13%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Tracking Memory Leaks in Client Side JavaScript Application&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;This is a session by another sponsor of the event - &lt;a href="http://www.directi.com/" target="_blank"&gt;Directi&lt;/a&gt;. Vishnu (@&lt;a href="http://twitter.com/pathsny" target="_blank"&gt;pathsny&lt;/a&gt;) from Directi delivered this much useful session. He talked about how to identify memory leaks in JavaScript and some of the good practices to avoid them. His session was very informative and I would rate this as the best one for the day. I have learnt a lot from this session. Looking forward to the video of this session and the demo app he has built.&amp;#160; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-DfLxnU-VLgE/T0E0CNEQzQI/AAAAAAAAY5c/PhWclw4y8l0/s1600-h/MemoryLeaks%25255B11%25255D.png" target="_blank"&gt;&lt;img title="Tracking Memory Leaks in Client Side JavaScript Apploication" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="229" alt="Tracking Memory Leaks in Client Side JavaScript Apploication" src="http://lh4.ggpht.com/-5mPwo6AeSjE/T0E0IpjQvFI/AAAAAAAAY5k/oBbfbvVDqiI/MemoryLeaks_thumb%25255B9%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;JavaScript is mischievous. Handle 3rd party content with care!&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;This interesting session was delivered by Krishna Chaitanya T (&lt;a href="http://twitter.com/novogeek" target="_blank"&gt;@novogeek&lt;/a&gt;), a Microsoft MVP for IE. He talked about mashups and the things we need to consider while including third party scripts in our web application. He briefed on the possible attacks because of the usage of third party scripts via script injection or frames. The demo was also quite interesting. This is another session for which I would give the highest ratings. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-Z8IHIYiXQUM/T0E0N09984I/AAAAAAAAY5s/GbUYM3-lruY/s1600-h/Javascriptismis%25255B12%25255D.png" target="_blank"&gt;&lt;img title="JavaScript is mischievous. Handle 3rd party conttent with care!" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="256" alt="JavaScript is mischievous. Handle 3rd party conttent with care!" src="http://lh4.ggpht.com/-owPU_JNruJU/T0E0S1J70HI/AAAAAAAAY50/GjEAFbKjBII/Javascriptismis_thumb%25255B10%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Ajax is history - Build real time apps in JavaScript&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The last session of the day was on building real time web application. It was delivered by Srirangan S. He talked about how the web applications have evolved in the last two decades. Then, he demonstrated how he built his site review19 using Node.js and &lt;a href="http://socket.io/" target="_blank"&gt;Socket.io&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-NuHVGapA9SI/T0E0YTpgUxI/AAAAAAAAY58/80-7LJ27MIw/s1600-h/Ajaxishistory%25255B10%25255D.png" target="_blank"&gt;&lt;img title="Ajax is history - Build real time apps in JavaScript" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="127" alt="Ajax is history - Build real time apps in JavaScript" src="http://lh3.ggpht.com/-VF5RTySPBVU/T0E0cvB7dNI/AAAAAAAAY6E/NdkRKfTqgOM/Ajaxishistory_thumb%25255B8%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/xaLf_4bup4E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/4552875016810333750/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=4552875016810333750" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/4552875016810333750?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/4552875016810333750?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/xaLf_4bup4E/jsfoo-chennai-2012.html" title="JSFoo Chennai 2012!" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-VGkjeDAviIk/T0EzQmdUx5I/AAAAAAAAY4U/fErBJDOI2HQ/s72-c/Crossplatformmo_thumb%25255B10%25255D.png?imgmax=800" height="72" width="72" /><thr:total>3</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2012/02/jsfoo-chennai-2012.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcMQ3s8eCp7ImA9WhRXGUo.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-7643301467069941726</id><published>2011-12-27T14:58:00.001+05:30</published><updated>2011-12-27T14:58:02.570+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-27T14:58:02.570+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tools" /><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="Firefox" /><title>[How to] Use error console in Native UI for Firefox on Android</title><content type="html">&lt;p align="justify"&gt;Developers use different techniques for debugging their web applications. Though there are lots of &lt;a href="http://blog.varunkumar.me/2011/09/javascript-remote-debugging.html" target="_blank"&gt;new techniques&lt;/a&gt; coming up in this space, one technique which is still widely used is console logging. Every browser (including the mobile browsers) supports this feature in some capacity. I have been using Firefox on my Nexus One and it has an in-built error console which can be enabled from &lt;a href="https://quality.mozilla.org/docs/mobile-firefox/firefox-mobile-enabling-the-error-console/" target="_blank"&gt;about:config&lt;/a&gt;.&amp;#160; However, with the new native UI for Firefox on Android, this option does not seem to be available. Read through this post to find out how you can use error console in the native UI.&lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Error Console in Firefox Native UI&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Firefox Native UI writes all the console messages to Android system log which can be read via &lt;a href="http://developer.android.com/guide/developing/tools/logcat.html" target="_blank"&gt;logcat&lt;/a&gt; which comes along with the Android SDK.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;&lt;strong&gt;Android SDK&lt;/strong&gt;. Download and install the latest Android SDK from &lt;a href="http://developer.android.com/index.html"&gt;here&lt;/a&gt;. This comes up with all the tools needed for development and testing of your application. Once the SDK is installed, go to the location on which the SDK is installed. Run &lt;font size="3" face="Courier New"&gt;‘adb logcat’ - &lt;/font&gt;this will show the complete log from Android system. To&amp;#160; view Firefox specific log messages, do a grep: &lt;font size="3" face="Courier New"&gt;‘adb logcat | grep “Gecko”’. &lt;/font&gt;To view Firefox console messages alone, do a grep: &lt;font size="3" face="Courier New"&gt;‘adb logcat | grep “GeckoConsole”’.&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;If you don't want to install Android SDK, you can use apps like &lt;a href="https://market.android.com/details?id=org.jtb.alogcat&amp;amp;hl=en" target="_blank"&gt;aLogCat&lt;/a&gt; (Android app for viewing the logs). The app provides an option for filtering the logs and also comes with lots of other accessibility options. &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-j_eacsN6dQE/TvmPl7xsyCI/AAAAAAAAYv0/1MP3qPwwSlA/s1600-h/Screen%252520shot%2525202011-12-10%252520at%2525205.32.00%252520PM%25255B11%25255D.png" target="_blank"&gt;&lt;img title="Firefox Native UI - Conole logs" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="Firefox Native UI - Conole logs" src="http://lh5.ggpht.com/-1MzdmIQxm5w/TvmPnT4OmqI/AAAAAAAAYv8/q1QK17pJopE/Screen%252520shot%2525202011-12-10%252520at%2525205.32.00%252520PM_thumb%25255B9%25255D.png?imgmax=800" width="660" height="137" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;img title="Firefox Native UI - Conole logs" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; float: none; margin-left: auto; display: block; border-top-width: 0px; margin-right: auto" alt="Firefox Native UI - Conole logs" src="http://lh6.ggpht.com/-aGV8PiE488k/TvmPoWjnFiI/AAAAAAAAYwE/HJ63N3VqaKw/Screen%252520shot%2525202011-12-10%252520at%2525205.32.33%252520PM%25255B13%25255D.png?imgmax=800" width="605" height="381" /&gt;&lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/fxXTf6TUpS8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/7643301467069941726/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=7643301467069941726" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7643301467069941726?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7643301467069941726?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/fxXTf6TUpS8/how-to-use-error-console-in-native-ui.html" title="[How to] Use error console in Native UI for Firefox on Android" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-1MzdmIQxm5w/TvmPnT4OmqI/AAAAAAAAYv8/q1QK17pJopE/s72-c/Screen%252520shot%2525202011-12-10%252520at%2525205.32.00%252520PM_thumb%25255B9%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/12/how-to-use-error-console-in-native-ui.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMASX06fSp7ImA9WhRRE04.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-5125099178421755074</id><published>2011-11-27T01:10:00.001+05:30</published><updated>2011-11-27T01:10:48.315+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-27T01:10:48.315+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NodeJs" /><category scheme="http://www.blogger.com/atom/ns#" term="Hack" /><category scheme="http://www.blogger.com/atom/ns#" term="Arduino" /><category scheme="http://www.blogger.com/atom/ns#" term="Android ADK" /><title>Arduino based game controller</title><content type="html">&lt;p align="justify"&gt;Being the big fan of technology that I am, I always wanted to try out the latest things happening on the technology world. Some of the buzz words being talked about in the technology world are HTML5 and mobile development. After having fun writing games during my college days, I was interested in building a HTML5 based game. Then, I came across &lt;a href="http://arandomurl.com/2010/08/05/html5-helicopter.html" target="_blank"&gt;this&lt;/a&gt; HTML5 based implementation of classic Helicopter game. In the mean time, I was also playing around with Android ADK and &lt;a href="http://blog.varunkumar.me/2011/08/new-toy-in-house-arduino-adk.html" target="_blank"&gt;Arduino boards&lt;/a&gt;. Finally, made up my mind to hack something cool connecting all these technologies – HTML5, mobile and USB accessories. And, here is the result of the experiment - “Arduino based game controller”. In a nutshell, it’s a game controller which can be connected to an Android phone using which we can play HTML5 games on the browser. The heart of the hack was built over a weekend and source code of the same can be found &lt;a href="https://github.com/varunkumar/arduino-game-controller" target="_blank"&gt;here&lt;/a&gt;. Check out the video demo of the hack at the end of this post.&lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;What is it?&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Arduino based game controller is a Joystick / game controller which can be connected to an Android phone via USB.&amp;#160; Using the controller, we can&amp;#160; play games on the browser. An android driver app has been built which reads the data from the game controller (using &lt;a href="http://developer.android.com/guide/topics/usb/adk.html" target="_blank"&gt;Android ADK&lt;/a&gt;) and routes it to the browser over &lt;a href="http://en.wikipedia.org/wiki/WebSocket" target="_blank"&gt;web sockets&lt;/a&gt;. The game has been hosted &lt;a href="http://varunkumar.no.de" target="_blank"&gt;here&lt;/a&gt; (The multi-player mode might not work properly as the hosting site does not support web sockets). More detailed information can be found &lt;a href="https://github.com/varunkumar/arduino-game-controller" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-38Iu3B37HRY/TtFAkWehLaI/AAAAAAAAYlc/dGU8_L2w5i8/s1600-h/Screen%252520shot%2525202011-11-27%252520at%25252012.17.24%252520AM%25255B18%25255D.png" target="_blank"&gt;&lt;img title="Arduino Game Controller" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; display: block; padding-right: 0px; border-top-width: 0px; margin-right: auto" border="0" alt="Arduino Game Controller" src="http://lh6.ggpht.com/-pbKaWfmFfgo/TtFAllviDsI/AAAAAAAAYlk/vQXb4fx0mVc/Screen%252520shot%2525202011-11-27%252520at%25252012.17.24%252520AM_thumb%25255B16%25255D.png?imgmax=800" width="406" height="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The hack consists of three core modules:&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;1. Game module&lt;/strong&gt;. HTML5 based Helicopter game originally written by Dale Harvey. The game uses HTML5 canvas for rendering the game elements. I have forked &lt;a href="https://github.com/daleharvey/helicopter" target="_blank"&gt;his code&lt;/a&gt; and have built the networking layer of the game. I have integrated the game with &lt;a href="http://nodejs.org" target="_blank"&gt;Node.js&lt;/a&gt; and &lt;a href="http://socket.io" target="_blank"&gt;Socket.io&lt;/a&gt; to support multi-user mode. In order to facilitate seamless communication between the controller and the game module, web socket technologies have been used. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;2. Joystick / Controller module&lt;/strong&gt;. For this hack, I have used &lt;a href="http://www.arduino.cc/en/Main/ArduinoBoardADK" target="_blank"&gt;Arduino Mega ADK&lt;/a&gt; board and a &lt;a href="http://simplelabs.co.in/content/joystick-shield-fully-assembled" target="_blank"&gt;joystick shield&lt;/a&gt; mounted on top of it. Arduino board has been flashed with the firmware which reads analog data from the controller and sends it to the connected Android device using Android accessory protocol. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;3. Android module&lt;/strong&gt;. An android app for linking the game module and the controller. The app can be installed on any device running Android 2.3.4 (Your device needs to have the USB compatibility library). It reads the data from the controller and forwards it to the browser over web sockets. &lt;/p&gt; &lt;center&gt;&lt;iframe height="315" src="http://www.youtube.com/embed/URPEyz5ee9o" frameborder="0" width="560" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;/center&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-r1H35qZnf7U/TtFAoxbfFzI/AAAAAAAAYls/2rqRwrSOcVM/s1600-h/Screen%252520shot%2525202011-11-27%252520at%25252012.07.29%252520AM%25255B15%25255D.png" target="_blank"&gt;&lt;img title="HTML5 Helicopter game" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="HTML5 Helicopter game" src="http://lh5.ggpht.com/-jKSJknfiZHQ/TtFAqLzfEXI/AAAAAAAAYl0/B2jZyK9MMSU/Screen%252520shot%2525202011-11-27%252520at%25252012.07.29%252520AM_thumb%25255B13%25255D.png?imgmax=800" width="660" height="420" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-8qZl0JJ4xZ4/TtFArr8ZZCI/AAAAAAAAYl8/vJZDMuRqdFc/s1600-h/IMG_20111105_214847%25255B14%25255D.jpg" target="_blank"&gt;&lt;img title="Arduino Mega ADK board with Joystick shield" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Arduino Mega ADK board with Joystick shield" src="http://lh6.ggpht.com/-P7ZNUWCWcO4/TtFAss5mvtI/AAAAAAAAYmE/oSFLQGB2EOs/IMG_20111105_214847_thumb%25255B11%25255D.jpg?imgmax=800" width="660" height="500" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-Fbi8z_SENe8/TtFAt-b1N7I/AAAAAAAAYmM/ONDQu2uJfgw/s1600-h/ScreenShot%25255B15%25255D.png" target="_blank"&gt;&lt;img title="Android driver app" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="Android driver app" src="http://lh5.ggpht.com/-f8O4WJAdN90/TtFAvaFuK0I/AAAAAAAAYmU/LlHf1O0Bz4o/ScreenShot_thumb%25255B13%25255D.png?imgmax=800" width="500" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;How to contribute?&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The source code is available &lt;a href="https://github.com/varunkumar/arduino-game-controller" target="_blank"&gt;here&lt;/a&gt; under MIT licence. I have added enough inline documentations all around the code. Please send any bugs, feedback, complaints, patches about the hack to me at &lt;a href="mailto:varunkumar.n@gmail.com"&gt;varunkumar.n@gmail.com&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/3TUt4D9ufdY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/5125099178421755074/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=5125099178421755074" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/5125099178421755074?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/5125099178421755074?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/3TUt4D9ufdY/arduino-based-game-controller.html" title="Arduino based game controller" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-pbKaWfmFfgo/TtFAllviDsI/AAAAAAAAYlk/vQXb4fx0mVc/s72-c/Screen%252520shot%2525202011-11-27%252520at%25252012.17.24%252520AM_thumb%25255B16%25255D.png?imgmax=800" height="72" width="72" /><thr:total>8</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/11/arduino-based-game-controller.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AAR347cCp7ImA9WhdbGUQ.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-3104538567022114086</id><published>2011-10-19T10:19:00.001+05:30</published><updated>2011-10-19T10:19:06.008+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-19T10:19:06.008+05:30</app:edited><title>Android 4.0 Ice Cream Sandwich Screenshots</title><content type="html">&lt;p align="justify"&gt;Google and Samsung announced their latest smart phone &lt;a href="http://google.com/nexus" target="_blank"&gt;Galaxy Nexus&lt;/a&gt; earlier today. It has awesome hardware capabilities and the offerings from Android 4.0 are quite exciting. Check out the official blog post &lt;a href="http://googlemobile.blogspot.com/2011/10/unwrapping-ice-cream-sandwich-on-galaxy.html" target="_blank"&gt;here&lt;/a&gt;. Android 4.0 SDK was also released today and you can download it from &lt;a href="http://android-developers.blogspot.com/2011/10/android-40-platform-and-updated-sdk.html" target="_blank"&gt;here&lt;/a&gt;. I downloaded the SDK and played around with the emulator. Emulator seems to be faster than that of HoneyComb but still you will find some slowness compared to previous versions. &lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="center"&gt;&lt;strong&gt;Note: Hover over each screenshot to know more about it. Click on a screenshot to enlarge it.&lt;/strong&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh4.ggpht.com/-omwkm555bjU/Tp5V3mfLs6I/AAAAAAAAYW0/QlekneviOPo/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525208.53.22%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Installation" border="0" alt="Android 4.0 SDK - Installation" src="http://lh5.ggpht.com/-ViVBJ3r--XQ/Tp5V4rqc7WI/AAAAAAAAYW8/DdtBnIK8OeM/Screen%252520shot%2525202011-10-19%252520at%2525208.53.22%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="644" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh5.ggpht.com/-IX0-LB5Nx6c/Tp5V5bApOuI/AAAAAAAAYXE/fFXJcxzkHYw/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525208.54.44%252520AM%25255B16%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Installation" border="0" alt="Android 4.0 SDK - Installation" src="http://lh3.ggpht.com/-6YrOBTMxPYQ/Tp5V6XkLxfI/AAAAAAAAYXM/JD9EKLBngNc/Screen%252520shot%2525202011-10-19%252520at%2525208.54.44%252520AM_thumb%25255B14%25255D.png?imgmax=800" width="644" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-Q1Vd4sAurJE/Tp5V658wrmI/AAAAAAAAYXU/ZG5apMmsMZ8/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.05.41%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Emulator with Ice Cream Sandwich virtual device" border="0" alt="Android 4.0 SDK - Emulator with Ice Cream Sandwich virtual device" src="http://lh6.ggpht.com/-0fYsNLD0Fow/Tp5V7hh1FaI/AAAAAAAAYXc/3EtgaMIOcdE/Screen%252520shot%2525202011-10-19%252520at%2525209.05.41%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="644" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-OT4pSwbxiOA/Tp5V80dvH3I/AAAAAAAAYXk/9kGjeeIh2z0/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.12.34%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich home screen" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich home screen" src="http://lh4.ggpht.com/-ZCvOWN2Bt5I/Tp5V9yKmkfI/AAAAAAAAYXs/2wTf8JcmcdQ/Screen%252520shot%2525202011-10-19%252520at%2525209.12.34%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-T5pXygfaqzQ/Tp5V_0tEmvI/AAAAAAAAYX0/OsFENTQe5-U/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.12.56%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich lock screen" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich lock screen" src="http://lh4.ggpht.com/-d29A6VAs-BU/Tp5WA5Y-NmI/AAAAAAAAYX8/5ncNE1zWzCk/Screen%252520shot%2525202011-10-19%252520at%2525209.12.56%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-HXv-2mr-Deo/Tp5WCDQEoDI/AAAAAAAAYYE/H2KDaNDLF0Q/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.13.14%252520AM%25255B10%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Apps screen" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Apps screen" src="http://lh3.ggpht.com/-U-8tEW7zkHQ/Tp5WDND4u6I/AAAAAAAAYYM/Zft432fAJFw/Screen%252520shot%2525202011-10-19%252520at%2525209.13.14%252520AM_thumb%25255B8%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-UjJSi17dV68/Tp5WD_aEMwI/AAAAAAAAYYU/Y2qZJMqgK5s/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.13.55%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Widgets screen" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Widgets screen" src="http://lh4.ggpht.com/-gjjLQ-1xaxw/Tp5WE02iiPI/AAAAAAAAYYc/wmbUUF1CT2w/Screen%252520shot%2525202011-10-19%252520at%2525209.13.55%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-quEEUxUCICw/Tp5WGSjNyHI/AAAAAAAAYYk/3qFdmq_yZJQ/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.14.19%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Improved Phone app" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Improved Phone app" src="http://lh3.ggpht.com/-kpQMhrF0KDM/Tp5WHQej-VI/AAAAAAAAYYs/ag47q9Y3GzU/Screen%252520shot%2525202011-10-19%252520at%2525209.14.19%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-xKIlZRDMg8k/Tp5WInMKpCI/AAAAAAAAYY0/lsiEma3OuZs/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.15.18%252520AM%25255B10%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Improved Browser App" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Improved Browser App" src="http://lh4.ggpht.com/-QsWF3ZIjI2o/Tp5WJSAgBzI/AAAAAAAAYY8/6pcM6iMDos4/Screen%252520shot%2525202011-10-19%252520at%2525209.15.18%252520AM_thumb%25255B8%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-LHllXiPZP1Y/Tp5WKhwEAvI/AAAAAAAAYZE/6WUESdsdvPc/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.15.38%252520AM%25255B11%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Browser Options" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Browser Options" src="http://lh4.ggpht.com/-vscTd3BOHEc/Tp5WLqY_3MI/AAAAAAAAYZM/PnkQkY1HA3Y/Screen%252520shot%2525202011-10-19%252520at%2525209.15.38%252520AM_thumb%25255B9%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-5ahb8hK1D74/Tp5WMl4VDGI/AAAAAAAAYZU/nQXZZVcak2s/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.18.36%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Browser Tabbed browsing" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Browser Tabbed browsing" src="http://lh6.ggpht.com/-wqgV4rNqMaI/Tp5WNkJhJCI/AAAAAAAAYZc/Bg2jhGy_xYc/Screen%252520shot%2525202011-10-19%252520at%2525209.18.36%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-XbPKFFP9mUs/Tp5WOmB8U5I/AAAAAAAAYZk/4wBu3NCmALQ/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.19.02%252520AM%25255B10%25255D.png" target="_blank"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Browser App" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Browser App" src="http://lh4.ggpht.com/-_a87Wl_0FTU/Tp5WPcLwehI/AAAAAAAAYZs/7ebBeu8zwLc/Screen%252520shot%2525202011-10-19%252520at%2525209.19.02%252520AM_thumb%25255B8%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-rnYbZ2gN7j4/Tp5WROZMBqI/AAAAAAAAYZ0/Xa1P054vK28/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.19.34%252520AM%25255B11%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Improved Copy-Paste options" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Improved Copy-Paste options" src="http://lh4.ggpht.com/-XJ5z0XVVmK0/Tp5WSDGN_1I/AAAAAAAAYZ8/8_yDsCkYf3s/Screen%252520shot%2525202011-10-19%252520at%2525209.19.34%252520AM_thumb%25255B9%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-Q5-ytHAMGm4/Tp5WTGZyCLI/AAAAAAAAYaE/RZaON3ibYMk/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.20.01%252520AM%25255B10%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Settings" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Settings" src="http://lh3.ggpht.com/-ZSCRKuof9PY/Tp5WUJEktiI/AAAAAAAAYaM/KjRRRWImM-w/Screen%252520shot%2525202011-10-19%252520at%2525209.20.01%252520AM_thumb%25255B8%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-BNGU_HOXSpA/Tp5WVKcrF1I/AAAAAAAAYaU/n5p2QS_ImpM/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.20.17%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Data Usage app" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Data Usage app" src="http://lh4.ggpht.com/-Y9Q_F3sRf5U/Tp5WV3Au6YI/AAAAAAAAYac/qSI7Gb6w37U/Screen%252520shot%2525202011-10-19%252520at%2525209.20.17%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-20y9nxE8Sis/Tp5WXMG0DJI/AAAAAAAAYak/nlFtSGbx6rM/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.21.29%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Installed apps" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Installed apps" src="http://lh6.ggpht.com/-ZPxqtovMPTI/Tp5WX_38woI/AAAAAAAAYas/0UxzUNWumYM/Screen%252520shot%2525202011-10-19%252520at%2525209.21.29%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-3VaXYdmGQnA/Tp5WZSHWWwI/AAAAAAAAYa0/zw-jnLKph8U/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.21.51%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Resizing widgets" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Resizing widgets" src="http://lh4.ggpht.com/-2d8MVr890Kg/Tp5WaUXAspI/AAAAAAAAYa8/4QQIky_ZnAI/Screen%252520shot%2525202011-10-19%252520at%2525209.21.51%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-lgsf78dUpq4/Tp5Wbr7394I/AAAAAAAAYbE/8rZABhk4Wf4/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.22.09%252520AM%25255B10%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Resizing widgets" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Resizing widgets" src="http://lh6.ggpht.com/-FqQwcgGOX5U/Tp5Wct2tqdI/AAAAAAAAYbM/dWzwC14QIe0/Screen%252520shot%2525202011-10-19%252520at%2525209.22.09%252520AM_thumb%25255B8%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-vcw7PfXG9tM/Tp5WdtQLSoI/AAAAAAAAYbU/W2UKTyDp8vc/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.22.50%252520AM%25255B11%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich People app. Unfortunately I was not able to connect my Google account." border="0" alt="Android 4.0 SDK - Ice Cream Sandwich People app. Unfortunately I was not able to connect my Google account." src="http://lh4.ggpht.com/-gyUsWieJIe8/Tp5WeYhg-iI/AAAAAAAAYbc/px6Sax7w2Kg/Screen%252520shot%2525202011-10-19%252520at%2525209.22.50%252520AM_thumb%25255B9%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/--1NwTZVe2dw/Tp5Wf3KpHkI/AAAAAAAAYbk/LAh-xjNZZ6k/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.23.10%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich Calendar app" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich Calendar app" src="http://lh4.ggpht.com/-ROWz_ruZEUU/Tp5Wgm5b6XI/AAAAAAAAYbs/_HtRu_CXJ5k/Screen%252520shot%2525202011-10-19%252520at%2525209.23.10%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-a797e1_CjGU/Tp5Wh8KiBOI/AAAAAAAAYb0/L7P1uFzJODU/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.23.44%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Ice Cream Sandwich" border="0" alt="Android 4.0 SDK - Ice Cream Sandwich" src="http://lh5.ggpht.com/-CaNG8I5Psis/Tp5WiyETRoI/AAAAAAAAYb8/N2kpa13smaY/Screen%252520shot%2525202011-10-19%252520at%2525209.23.44%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-ejGVihrFcq4/Tp5WjaiBc0I/AAAAAAAAYcE/czH7iJ1Dp4M/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.25.00%252520AM%25255B11%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - Virtual Devices" border="0" alt="Android 4.0 SDK - Virtual Devices" src="http://lh6.ggpht.com/-t9lYwlqCueA/Tp5WkcP234I/AAAAAAAAYcM/1_GYNho4w54/Screen%252520shot%2525202011-10-19%252520at%2525209.25.00%252520AM_thumb%25255B9%25255D.png?imgmax=800" width="644" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-Rldk3eMsDCU/Tp5Wl5MfV7I/AAAAAAAAYcU/S-xVVspqvxk/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.29.28%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - IceCream Sandwich" border="0" alt="Android 4.0 SDK - IceCream Sandwich" src="http://lh5.ggpht.com/-bcLZsS8fp70/Tp5WmuvQwZI/AAAAAAAAYcc/b-MCx0N7cTs/Screen%252520shot%2525202011-10-19%252520at%2525209.29.28%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-vsXujC1YPso/Tp5Wny431HI/AAAAAAAAYck/VXUFicfFB6s/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.29.56%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - IceCream Sandwich" border="0" alt="Android 4.0 SDK - IceCream Sandwich" src="http://lh3.ggpht.com/-JzL8Mey89zw/Tp5Woz9Jn8I/AAAAAAAAYcs/xYGcGZ8HyG4/Screen%252520shot%2525202011-10-19%252520at%2525209.29.56%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-FpvsRH5npQM/Tp5WrJ2jFtI/AAAAAAAAYc0/gZI-Xka2u9o/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.30.32%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - IceCream Sandwich Account setup. Unfortunately, this does not work on emulator." border="0" alt="Android 4.0 SDK - IceCream Sandwich Account setup. Unfortunately, this does not work on emulator." src="http://lh6.ggpht.com/-PVVbWIdfb7M/Tp5Wsi19-yI/AAAAAAAAYc8/AIY7CRT-5t4/Screen%252520shot%2525202011-10-19%252520at%2525209.30.32%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-aZTfypLV0ks/Tp5WtrDmwSI/AAAAAAAAYdE/yNAz6f-Muzs/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.30.48%252520AM%25255B10%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - IceCream Sandwich Account setup. Unfortunately, this does not work on emulator." border="0" alt="Android 4.0 SDK - IceCream Sandwich Account setup. Unfortunately, this does not work on emulator." src="http://lh4.ggpht.com/-sm-yxUZRBNI/Tp5WuTBUYYI/AAAAAAAAYdM/x2SfzzhNGWI/Screen%252520shot%2525202011-10-19%252520at%2525209.30.48%252520AM_thumb%25255B8%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-j2f5yND_gCs/Tp5WvZ6rpiI/AAAAAAAAYdU/BFaXrF9Q388/s1600-h/Screen%252520shot%2525202011-10-19%252520at%2525209.34.47%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Android 4.0 SDK - IceCream Sandwich. It rocks!!" border="0" alt="Android 4.0 SDK - IceCream Sandwich. It rocks!!" src="http://lh4.ggpht.com/-8vkoX-B-MTk/Tp5WwOV1anI/AAAAAAAAYdc/QRKfwT1r8BU/Screen%252520shot%2525202011-10-19%252520at%2525209.34.47%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="539" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/YTu_ykJSCdA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/3104538567022114086/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=3104538567022114086" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/3104538567022114086?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/3104538567022114086?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/YTu_ykJSCdA/android-40-ice-cream-sandwich.html" title="Android 4.0 Ice Cream Sandwich Screenshots" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-ViVBJ3r--XQ/Tp5V4rqc7WI/AAAAAAAAYW8/DdtBnIK8OeM/s72-c/Screen%252520shot%2525202011-10-19%252520at%2525208.53.22%252520AM_thumb%25255B7%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/10/android-40-ice-cream-sandwich.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMERXk8eip7ImA9WhdbGE8.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-7831202316340411915</id><published>2011-10-17T09:20:00.001+05:30</published><updated>2011-10-17T09:20:04.772+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-17T09:20:04.772+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tools" /><category scheme="http://www.blogger.com/atom/ns#" term="Web Development" /><title>Less , the dynamic style sheet language</title><content type="html">&lt;p align="justify"&gt;A style sheet language is one which describes how a document has to be structured and styled. The most widely used style sheet language is &lt;a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets" target="_blank"&gt;CSS&lt;/a&gt; and is mostly used for styling web pages written in HTML. If you have developed even a simple web page, you would have definitely come across CSS and would have used it in some form. CSS plays an important role in the success of modern web applications with rich UI. CSS has gone through &lt;a href="http://en.wikipedia.org/wiki/Cascading_Style_Sheets#Variations" target="_blank"&gt;various iterations&lt;/a&gt; with the latest one being CSS3. However, there are some limitations with CSS. We can’t do dynamic stuffs like interpolating a property based on a variable, re-using a property value across classes, etc. &lt;a href="http://lesscss.org/" target="_blank"&gt;Less&lt;/a&gt; is an extension to CSS with dynamic behaviour such as variables, mixins, operations and functions. We can write complex CSS styles with Less. Do more with Less. &lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Highlights&lt;/strong&gt;:&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Variables&lt;/strong&gt;. This is a very useful addition to CSS. In most of our CSS files, we would have some repeating values like color, font-size, etc. With Less, we can define global variables for these values and use them across the classes. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;img title="Less - Variables" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="Less - Variables" src="http://lh3.ggpht.com/-7C4cCNAX8F8/Tpul001QMoI/AAAAAAAAYWU/D-TyGeB9uY0/Screen%252520shot%2525202011-10-17%252520at%2525208.17.49%252520AM%25255B4%25255D.png?imgmax=800" width="750" height="223" /&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Mixins&lt;/strong&gt;. Mixins allow you to embed all the properties of a class into another class by simply including the class name as one of its properties. It’s just like variables, but for whole classes.&lt;/p&gt;  &lt;p align="center"&gt;&lt;img title="Less - Mixins" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Less - Mixins" src="http://lh5.ggpht.com/-1ReQxL0xD4Q/Tpul18x2fnI/AAAAAAAAYWc/pWgbkCQRv7c/Screen%252520shot%2525202011-10-17%252520at%2525208.18.08%252520AM%25255B4%25255D.png?imgmax=800" width="751" height="296" /&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Nested Rules&lt;/strong&gt;. Often, we write some complex selectors which are lengthy and hard to read. With Less, you can simply nest selectors inside other selectors. This will improve the readability and makes inheritance clear.&lt;/p&gt;  &lt;p align="center"&gt;&lt;img title="Less - Nested Rules" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Less - Nested Rules" src="http://lh4.ggpht.com/-E2VMYEXlTak/Tpul2lvWC1I/AAAAAAAAYWk/-ciJO6hgN6E/Screen%252520shot%2525202011-10-17%252520at%2525208.18.24%252520AM%25255B4%25255D.png?imgmax=800" width="750" height="331" /&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Functions &amp;amp; Operations&lt;/strong&gt;. Sometimes we would need to write a class in proportion to an existing class, for example a class for hover will have properties opposite to that of its base class. With Less operations (add, subtract, multiply and divide) on property values, you can build a complex relationship between properties. &lt;/p&gt;  &lt;p align="center"&gt;&lt;img title="Less - Functions &amp;amp; Operations" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Less - Functions &amp;amp; Operations" src="http://lh5.ggpht.com/-K3dasftSXvo/Tpul6aqkCiI/AAAAAAAAYWs/Ecdtq-AVJA0/Screen%252520shot%2525202011-10-17%252520at%2525208.18.46%252520AM%25255B4%25255D.png?imgmax=800" width="750" height="331" /&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;How to use Less?&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Less can be used on the client side (on browser) as well as on the server side (using &lt;a href="http://nodejs.org" target="_blank"&gt;Node.js&lt;/a&gt;). &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;On the client side, we need someone to understand Less syntax and converts them to browser understandable CSS. This is done by &lt;a href="http://lesscss.googlecode.com/files/less-1.1.3.min.js" target="_blank"&gt;Less.js&lt;/a&gt; which needs to be included on the client side. Less files are saved with .less extension and can be linked to your page with &lt;font face="Courier New"&gt;rel&lt;/font&gt; attribute set to ‘&lt;font face="Courier New"&gt;stylesheet/less&lt;/font&gt;’. Make sure the style sheet is included before loading Less.js. The only drawback with this approach is that the conversion happens every time the page is loaded. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;On the server side, we can pre-render Less files to CSS and serve the compiled CSS files. This is more efficient than doing it on the client side. You need to have Node.js installed to do this pre-rendering. Check out more info &lt;a href="http://lesscss.org/#-client-side-usage" target="_blank"&gt;here&lt;/a&gt;. If you are on Mac, you can use &lt;a href="http://incident57.com/less/" target="_blank"&gt;this app&lt;/a&gt;.&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Browser Support&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Since Less uses basic JavaScript techniques, almost all the browsers support Less - IE 6+, Webkit and Firefox.&lt;/p&gt;  &lt;p align="justify"&gt;I have been using Less for quite sometime now and it seems to be very handy. Who else uses this? Twitter uses Less in its UI toolkit &lt;a href="http://twitter.github.com/bootstrap/" target="_blank"&gt;Bootstrap&lt;/a&gt;. Try it out yourself. Do more with Less. The source for Less is available &lt;a href="https://github.com/cloudhead/less.js" target="_blank"&gt;here&lt;/a&gt; under Apache License. Know more about it &lt;a href="http://lesscss.org/#docs" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/0HuQFupicSQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/7831202316340411915/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=7831202316340411915" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7831202316340411915?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7831202316340411915?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/0HuQFupicSQ/less-dynamic-style-sheet-language.html" title="Less , the dynamic style sheet language" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-7C4cCNAX8F8/Tpul001QMoI/AAAAAAAAYWU/D-TyGeB9uY0/s72-c/Screen%252520shot%2525202011-10-17%252520at%2525208.17.49%252520AM%25255B4%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/10/less-dynamic-style-sheet-language.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQGSH8-cCp7ImA9WhdbFE4.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-4569549415477295266</id><published>2011-10-12T22:22:00.001+05:30</published><updated>2011-10-12T22:22:09.158+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-12T22:22:09.158+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><title>[How to] Run Android apps on Windows</title><content type="html">&lt;p align="justify"&gt;I have written earlier about &lt;a href="http://blog.varunkumar.me/2010/11/how-to-install-android-market-in-google.html" target="_blank"&gt;installing Android market on the emulator&lt;/a&gt; and running Android apps on it. Here is a much simpler way of running Android apps from your PC. &lt;a href="http://bluestacks.com/" target="_blank"&gt;BlueStacks&lt;/a&gt; is a cool app which lets you run Android apps on your Windows PC. The application is available for free and it supports only Windows as of now. There is also an Android app which facilitates syncing of apps between your smartphone and the PC. &lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Features&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Full screen mode for apps.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Sync apps between Android smartphone and PC using BlueStacks Cloud Connect.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Install up to a maximum of 26 apps. (Unlimited in the case of yet to be released Pro version).&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;&lt;img title="BlueStacks" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="BlueStacks" src="http://lh6.ggpht.com/-nQuPx9b7y3k/TpXFpp5eWqI/AAAAAAAAYV0/08ZTm8ng_Og/gadget%25255B14%25255D.png?imgmax=800" width="210" height="189" /&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;img title="BlueStacks Gadget" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="BlueStacks Gadget" src="http://lh4.ggpht.com/--mwh7XOFUXc/TpXFrFqWxiI/AAAAAAAAYV8/Uo-yUYoQZ_o/apps%25255B14%25255D.png?imgmax=800" width="552" height="374" /&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-N1Ip5OMC9j4/TpXFsl-iwdI/AAAAAAAAYWE/XEPaXKQsO7A/s1600-h/tom%25255B18%25255D.png"&gt;&lt;img title="BlueStacks - Talking Tom2" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: none; padding-top: 0px; padding-left: 0px; margin-left: auto; border-left: 0px; display: block; padding-right: 0px; margin-right: auto" border="0" alt="BlueStacks - Talking Tom2" src="http://lh4.ggpht.com/-2YWSgK0xI60/TpXFt-VvOTI/AAAAAAAAYWM/PPwsUWJbCLQ/tom_thumb%25255B16%25255D.png?imgmax=800" width="552" height="415" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Try it out &lt;a href="http://bluestacks.com/" target="_blank"&gt;here&lt;/a&gt;. Mac version of BlueStacks will be available soon.&lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/fj4NXj7ewFA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/4569549415477295266/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=4569549415477295266" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/4569549415477295266?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/4569549415477295266?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/fj4NXj7ewFA/how-to-run-android-apps-on-windows.html" title="[How to] Run Android apps on Windows" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-nQuPx9b7y3k/TpXFpp5eWqI/AAAAAAAAYV0/08ZTm8ng_Og/s72-c/gadget%25255B14%25255D.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/10/how-to-run-android-apps-on-windows.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkIMQXo4fSp7ImA9WhdUFEQ.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-4365460284345316523</id><published>2011-10-02T01:19:00.001+05:30</published><updated>2011-10-02T01:19:40.435+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-02T01:19:40.435+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="HTML5" /><title>Per-Element FullScreen API</title><content type="html">&lt;p align="justify"&gt;I have been following the developments on Chromium channel and one thing which caught my attention last week is the fullscreen API. As the name suggests, the API supports “&lt;strong&gt;per-element&lt;/strong&gt;” fullscreen on the browser. Traditionally browsers have been supporting fullscreen mode for the entire page but not for the elements on the page. This API will be handy if you want to focus on a particular piece of information on the page. Most of the analytics application can make use of this API to show more detailed information. I have worked on applications which spans across two monitors as it displays huge amount of information. With this API, I can utilize the real estate effectively. Multimedia contents can also be shown on fullscreen. The API, which is based on the &lt;a href="https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI" target="_blank"&gt;Mozilla’s proposal&lt;/a&gt;, has two JavaScript methods: &lt;font face="Courier New"&gt;requestFullScreen()&lt;/font&gt; and &lt;font face="Courier New"&gt;cancelFullScreen()&lt;/font&gt;. Check out the demo &lt;a href="http://static.varunkumar.me/api/fullscreen.html" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;How do we use it?&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The API includes the following methods to all the elements in the DOM: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;&lt;font face="Courier New"&gt;requestFullScreen()&lt;/font&gt;: Requesting the browser to render the current element in fullscreen. On using this method, the keys will be disabled and the element will not receive any keyboard events. This is to protect the users from potential phishing attacks in fullscreen mode.&amp;#160; &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;font face="Courier New"&gt;requestFullScreenWithKeys()&lt;/font&gt;: Same as &lt;font face="Courier New"&gt;requestFullScreen()&lt;/font&gt; but with access to keyboard events. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;font face="Courier New"&gt;cancelFullScreen()&lt;/font&gt;: Use this method to return back to the normal mode. &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;These methods have been added to all the elements in the DOM. Apart of this, a new attribute &lt;font face="Courier New"&gt;allowfullscreen&lt;/font&gt; has been added for the iframe element. You can also listen to the event &lt;font face="Courier New"&gt;fullscreenchange&lt;/font&gt; to know the state of the element. Three CSS pseudo elements have also been added: &lt;font face="Courier New"&gt;:full-screen&lt;/font&gt;, &lt;font face="Courier New"&gt;:full-screen-doc&lt;/font&gt; and &lt;font face="Courier New"&gt;:full-screen-root-with-target&lt;/font&gt;. Using these pseudo elements, you can control how you want your elements to appear in fullscreen mode. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Criticism&lt;/strong&gt;:&lt;/p&gt;  &lt;p align="justify"&gt;The proposal received many criticism from the security experts. Some of the concerns are: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Attackers can request fullscreen and pre-empt keyboard focus. Your security credentials could possibly be stolen. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Increased chances for phishing attacks.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;One could open up fullscreen mode without user interaction (which in my opinion is very bad).&amp;#160; &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;The aforementioned concerns can be addressed if control is given to the users to allow / deny fullscreen mode. Also, plug-ins should be disabled in the fullscreen mode. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Browser Support&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Safari 5+ (with webkit prefix)&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Chrome 14+ (with webkit prefix). Chrome 14 requires the flag: –enable-fullscreen. It has been enabled by default in Chrome 15 (not yet released at the time of this post)&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Implementation of the API is &lt;a href="https://wiki.mozilla.org/Platform/Features/Full_Screen_APIs" target="_blank"&gt;in progress&lt;/a&gt; for Firefox. It is expected to be available as part of Firefox 10. &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;Check out &lt;a href="http://static.varunkumar.me/api/fullscreen.html" target="_blank"&gt;this page&lt;/a&gt; for demo. More details can be found &lt;a href="https://wiki.mozilla.org/index.php?title=Gecko:FullScreenAPI" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/_FPqWo_Mx5o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/4365460284345316523/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=4365460284345316523" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/4365460284345316523?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/4365460284345316523?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/_FPqWo_Mx5o/per-element-fullscreen-api.html" title="Per-Element FullScreen API" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/10/per-element-fullscreen-api.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcEQX49fCp7ImA9WhdVFEg.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-2735977602411193070</id><published>2011-09-19T23:43:00.001+05:30</published><updated>2011-09-19T23:43:20.064+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-19T23:43:20.064+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tools" /><category scheme="http://www.blogger.com/atom/ns#" term="Web Development" /><title>LocalTunnel: Access your local web server on the internet</title><content type="html">&lt;p align="justify"&gt;If you are a web developer, here is an interesting article for you. At some stage of the development, you might want to share / demo your web application to people outside your local network. This is a common problem in the life of a web developer. There are many ways to expose the contents on your local web server to the external world. Some of the commonly used techniques include: Port forwarding, SSH reverse tunnelling, etc. &lt;a href="http://progrium.com/localtunnel/" target="_blank"&gt;LocalTunnel&lt;/a&gt; is a free service that lets you share your local web server in an easy way.&lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt; LocalTunnel is a &lt;a href="http://ruby-lang.org" target="_blank"&gt;Ruby&lt;/a&gt; program which works on the basis of SSH reverse tunnelling. It connects to a remote host that has Gateway ports enabled. The remote host service is available for free at &lt;a href="http://localtunnel.com"&gt;http://localtunnel.com&lt;/a&gt;. After installing LocalTunnel, localtunnel command facilitates the connection between local server and the remote host.&amp;#160; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;How to use?&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;LocalTunnel can be installed using &lt;a href="http://rubygems.org" target="_blank"&gt;RubyGems&lt;/a&gt;. &lt;font face="Courier New"&gt;sudo gem install localtunnel&lt;/font&gt;. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Start your local development server. It can run on any port. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Run the localtunnel command passing the local port number. When the command is executed for the first time, you need to pass the SSH public key. More details &lt;a href="http://en.wikipedia.org/wiki/Ssh-keygen" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; &lt;font face="Courier New"&gt;localtunnel –k ~/.ssh/id_rsa.pub 8888&lt;/font&gt;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;If the command was successfully executed, it will show the URL to access the dev server. Note: The URL is valid only for this session. Share it with your friends. And, you are done. &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;LocalTunnel is hosted on &lt;a href="https://github.com/progrium/localtunnel" target="_blank"&gt;github&lt;/a&gt; under MIT license. &lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/GXcFb4u-7xg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/2735977602411193070/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=2735977602411193070" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2735977602411193070?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2735977602411193070?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/GXcFb4u-7xg/localtunnel-access-your-local-web.html" title="LocalTunnel: Access your local web server on the internet" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><thr:total>2</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/09/localtunnel-access-your-local-web.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkMASHw-eip7ImA9WhdWGUU.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-7046771521650226337</id><published>2011-09-14T11:28:00.001+05:30</published><updated>2011-09-14T11:37:29.252+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-14T11:37:29.252+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Javascript" /><category scheme="http://www.blogger.com/atom/ns#" term="Tools" /><title>JavaScript Remote Debugging</title><content type="html">&lt;p align="justify"&gt;Mobile browsers are becoming more powerful day-by-day and you can do almost everything you do on your desktop browser. Many mobile app developers have already started moving towards mobile web app instead of native app. Apps are being built using HTML5 and rich JS libraries. However, one of the major concerns for the developers is the lack of developer tools. The reasons are quite obvious – real estate needed to show the debugger, non-developer friendly environment. The solution to this problem is remote debugging. I have been using &lt;a href="http://www.youtube.com/watch?v=DSH392Gxaho" target="_blank"&gt;JSConsole&lt;/a&gt; for this purpose. It comes handy when we want to inspect DOM of the webpage. I stumbled upon “&lt;a href="http://lexandera.com/aardwolf/" target="_blank"&gt;Aardwolf&lt;/a&gt;” yesterday and it seems to be a better alternative for JSConsole when it comes to JavaScript debugging. Aardwolf is powered by &lt;a href="http://nodejs.org" target="_blank"&gt;Node.js&lt;/a&gt;. &lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Features:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Breakpoints&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Call Stack&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Exception reporting&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;JS Console remoting&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-6wYiYUkuOsc/TnBCeAFtJWI/AAAAAAAAYPM/OIT6t3lQeVU/s1600-h/Screen%252520shot%2525202011-09-14%252520at%25252010.00.28%252520AM%25255B19%25255D.png" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="AardWolf" border="0" alt="AardWolf" src="http://lh5.ggpht.com/-0zsDt-9c29Q/TnBCe6E9MEI/AAAAAAAAYPQ/rHIkMYWk5-c/Screen%252520shot%2525202011-09-14%252520at%25252010.00.28%252520AM_thumb%25255B17%25255D.png?imgmax=800" width="660" height="300" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;How does it work?&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Aardwolf is a Node application which listens on two ports – One for the debugger UI (8000), another one for the JS file server (8500). It has a code rewriter which rewrites the JS files to be debugged (dynamically). The rewritten JS files are served by the JS file server. The application to be debugged should consume JS files from the above mentioned JS server (rather than the original JS files). This will help establishing connection and adding hooks for debugging. Once the connection is established, we can add breakpoints and debug the JavaScript file.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;How to set up Aardwolf?&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;&lt;div align="justify"&gt;Check out the Aardwolf source code from &lt;a href="https://github.com/lexandera/Aardwolf" target="_blank"&gt;here&lt;/a&gt; or &lt;a href="https://bitbucket.org/lexandera/aardwolf/" target="_blank"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;Create a file ‘config/config.local.js’ within the checked out location. Add the following lines to it:&lt;/div&gt;&lt;/li&gt; &lt;/ul&gt;&lt;blockquote&gt;&lt;pre&gt;var config = require('../config/config.defaults.js');&lt;br /&gt;config.serverHost = 'ip-or-hostname-of-your-computer';&lt;br /&gt;config.jsFileServerBaseDir = '/path/to/www/root';&lt;/pre&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;&lt;div align="justify"&gt;Start the server by running “node app.js” (Make sure that &lt;a href="http://nodejs.org" target="_blank"&gt;Node.js&lt;/a&gt; is installed on your machine)&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;Add the debug library to your web app. Also, all the JS files to be debugged should be served from the JS file server.&lt;br /&gt;      &lt;pre&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://ip-or-hostname-of-your-computer:8500/aardwolf.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://ip-or-hostname-of-your-computer:8500/some-script.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://ip-or-hostname-of-your-computer:8500/some-other-script.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;br /&gt;    &lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;After the server starts up, open &lt;a href="http://localhost:8000"&gt;http://localhost:8000&lt;/a&gt; in your desktop browser. The debugger UI should appear.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;Open the web app on your phone and wait for the page to load. The debugger UI will show “Mobile device connected” once the connection is established.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div align="justify"&gt;You can set the breakpoints and view the call stacks on the right pane. &lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p align="justify"&gt;The source code is available on &lt;a href="https://github.com/lexandera/Aardwolf" target="_blank"&gt;github&lt;/a&gt; as well as on &lt;a href="https://bitbucket.org/lexandera/aardwolf/" target="_blank"&gt;bitbucket&lt;/a&gt;. The project is available under the MIT license. Aardwolf does not seem to be good at inspecting DOM elements. We can employ both JSConsole and Aardwolf to make our debugging job easier. Happy debugging!!&lt;br /&gt;&lt;br /&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/8mvJG69DAVw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/7046771521650226337/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=7046771521650226337" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7046771521650226337?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7046771521650226337?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/8mvJG69DAVw/javascript-remote-debugging.html" title="JavaScript Remote Debugging" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-0zsDt-9c29Q/TnBCe6E9MEI/AAAAAAAAYPQ/rHIkMYWk5-c/s72-c/Screen%252520shot%2525202011-09-14%252520at%25252010.00.28%252520AM_thumb%25255B17%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/09/javascript-remote-debugging.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cEQH04eyp7ImA9WhdWGUU.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-9266904928259229</id><published>2011-09-13T22:49:00.001+05:30</published><updated>2011-09-14T11:46:41.333+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-14T11:46:41.333+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Google Docs" /><title>New sharing option “Comment-Only” in Google Docs</title><content type="html">&lt;p align="justify"&gt;Google has just updated Google Docs with a much needed feature – New sharing option “Comment-Only”. This feature will be rolled out in the coming weeks. In the current version of Google Docs, we need to give edit permission for the collaborator to add comments. With the new “Comment-Only” permission, we can build better workflow system around Google Docs. The reviewer of the doc can only do the job of reviewing. I was planning to write a &lt;a href="http://blog.varunkumar.me/2010/10/google-app-scripts-for-google-sites.html" target="_blank"&gt;Google app script&lt;/a&gt; to implement a similar functionality with Google Docs Spreadsheet. “Comment-Only” permission can be mixed with the access permission for the doc. &lt;/p&gt;  &lt;a name='more'&gt;&lt;/a&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Comment-Only in Google Docs" border="0" alt="Comment-Only in Google Docs" src="http://lh5.ggpht.com/-NwhunJZW-lY/Tm-QohSneeI/AAAAAAAAYPU/4P5R44__ANY/Screen%252520shot%2525202011-09-13%252520at%25252010.28.06%252520PM%25255B6%25255D.png?imgmax=800" width="520" height="478" /&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Comment-Only in Google Docs" border="0" alt="Comment-Only in Google Docs" src="http://lh5.ggpht.com/-RiPgbqXyNWw/Tm-Qps6fnYI/AAAAAAAAYPY/21skWbTrbgA/Screen%252520shot%2525202011-09-13%252520at%25252010.47.39%252520PM%25255B5%25255D.png?imgmax=800" width="508" height="385" /&gt;&lt;/p&gt;  &lt;p&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/sS3414mVI00" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/9266904928259229/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=9266904928259229" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/9266904928259229?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/9266904928259229?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/sS3414mVI00/new-sharing-option-comment-only-in.html" title="New sharing option “Comment-Only” in Google Docs" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-NwhunJZW-lY/Tm-QohSneeI/AAAAAAAAYPU/4P5R44__ANY/s72-c/Screen%252520shot%2525202011-09-13%252520at%25252010.28.06%252520PM%25255B6%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/09/new-sharing-option-comment-only-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEUCQH48eip7ImA9WhdWE04.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-5045779305792941785</id><published>2011-09-07T00:31:00.000+05:30</published><updated>2011-09-07T00:41:01.072+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-07T00:41:01.072+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="India" /><category scheme="http://www.blogger.com/atom/ns#" term="Tech Talk" /><category scheme="http://www.blogger.com/atom/ns#" term="Google" /><category scheme="http://www.blogger.com/atom/ns#" term="Bangalore" /><category scheme="http://www.blogger.com/atom/ns#" term="Hyderabad" /><title>Google DevFests India 2011</title><content type="html">&lt;div style="padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em; text-align: justify;"&gt;
&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;Google has been organizing many developer events across the globe to meet the developers and understand their expectations. DevFest is one such event which provides a great opportunity to learn more about Google technologies and developer products. Developer advocates and engineers from Google will be present at the event. This will be an useful forum for the developers to interact with Google engineers. The event is open to all. There are only limited seats. Register &lt;a href="http://code.google.com/events/devfests/2011/india.html" target="_blank"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style="padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 1em; text-align: justify;"&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;b&gt;Event &amp;nbsp;&lt;/b&gt;: Google DevFest 2011&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;b&gt;Venue &lt;/b&gt;: The Lalit Ashok Bangalore&lt;/span&gt;&lt;br/&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;b&gt;Date &amp;nbsp; &amp;nbsp;&lt;/b&gt;: Sep 15, 2011 08:30 - 17:00&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;b&gt;Venue &lt;/b&gt;: HICC and Novotel, Hyderabad&lt;/span&gt;&lt;br/&gt;&lt;span class="Apple-style-span" style="line-height: 16px;"&gt;&lt;b&gt;Date &amp;nbsp; &amp;nbsp;&lt;/b&gt;: Sep 17, 2011 08:30 - 17:00&lt;/span&gt;&lt;/blockquote&gt;
More details &lt;a href="http://code.google.com/events/devfests/2011/india.html" target="_blank"&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
-- Varun&lt;br /&gt;
&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/XoOeUPAksl8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/5045779305792941785/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=5045779305792941785" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/5045779305792941785?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/5045779305792941785?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/XoOeUPAksl8/google-devfests-india-2011.html" title="Google DevFests India 2011" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/09/google-devfests-india-2011.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUGQXw8eyp7ImA9WhdQFUg.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-3478281107737655841</id><published>2011-08-17T09:23:00.001+05:30</published><updated>2011-08-17T09:23:40.273+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-17T09:23:40.273+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Android" /><category scheme="http://www.blogger.com/atom/ns#" term="Arduino" /><category scheme="http://www.blogger.com/atom/ns#" term="Android ADK" /><title>New toy in the house: Arduino ADK</title><content type="html">&lt;p align="justify"&gt;Yay! I have got a new toy in the house to play with – Just bought &lt;a href="http://arduino.cc/en/Main/ArduinoBoardADK" target="_blank"&gt;Arduino ADK board&lt;/a&gt;. Ever since Google announced &lt;a href="http://developer.android.com/guide/topics/usb/adk.html" target="_blank"&gt;Android ADK&lt;/a&gt; at Google I/O 2011, I have been trying to get hold of one. I couldn’t get it till now because of my geographical location and the demand for the board. Finally, I have ordered it from &lt;a href="http://simplelabs.co.in" target="_blank"&gt;SimpleLabs&lt;/a&gt;, Chennai and received the package yesterday. I will be playing around with it in the next couple of weeks and share my experience in this blog. &lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;What is Android ADK?&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;Android 3.1 introduces powerful new APIs which allows external USB hardware to interact with an Android device. The APIs are based on a USB stack and services that are built into the platform, including support for both USB host and device interactions. Using the APIs, we can create applications that are able to discover, communicate with, and manage a variety of device types connected over USB. More info &lt;a href="http://developer.android.com/guide/topics/usb/adk.html" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh3.ggpht.com/-xfPjlUbSyUg/Tks61uvxTiI/AAAAAAAAYF4/9Lnu_IccdVc/s1600-h/IMG_20110817_005801%25255B8%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="Arduino ADK" border="0" alt="Arduino ADK" src="http://lh6.ggpht.com/-fE5PZ47BTb0/Tks63E4yIgI/AAAAAAAAYF8/CFhyAtQQ3jg/IMG_20110817_005801_thumb%25255B5%25255D.jpg?imgmax=800" width="344" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-Sx9hSboaDew/Tks65pN9M1I/AAAAAAAAYGA/GNMrRawXnZ0/s1600-h/IMG_20110817_005823%25255B5%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Arduino ADK" border="0" alt="Arduino ADK" src="http://lh5.ggpht.com/-WoPyTaSIEb0/Tks67TXUTDI/AAAAAAAAYGE/mbqhsekPv0w/IMG_20110817_005823_thumb%25255B2%25255D.jpg?imgmax=800" width="344" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh4.ggpht.com/-A5cgPJpXOdI/Tks69v7mRPI/AAAAAAAAYGI/bBg4TG7lqYU/s1600-h/IMG_20110817_005931%25255B5%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Quick Starter Kit" border="0" alt="Quick Starter Kit" src="http://lh4.ggpht.com/-GH5lA4xgMQg/Tks6_F6c6gI/AAAAAAAAYGM/qzXIyKPwuu8/IMG_20110817_005931_thumb%25255B2%25255D.jpg?imgmax=800" width="344" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-gYGLwibvNxk/Tks7Bl0Q-vI/AAAAAAAAYGQ/DlDtgyDMK08/s1600-h/IMG_20110817_010134%25255B5%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Arduino ADK" border="0" alt="Arduino ADK" src="http://lh3.ggpht.com/-9J1H0-ozCDo/Tks7CpIZb9I/AAAAAAAAYGU/GXQl6swUGsU/IMG_20110817_010134_thumb%25255B2%25255D.jpg?imgmax=800" width="344" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh3.ggpht.com/-VXOFZQX43yc/Tks7EyRgYLI/AAAAAAAAYGY/W8QBIu3-raY/s1600-h/IMG_20110817_010311%25255B5%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Arduino ADK" border="0" alt="Arduino ADK" src="http://lh4.ggpht.com/-97mSfoyd7Q0/Tks7GXJDT1I/AAAAAAAAYGc/kLg4w_ETuwk/IMG_20110817_010311_thumb%25255B2%25255D.jpg?imgmax=800" width="344" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-Kr8hkH0X7tg/Tks7Iui0tUI/AAAAAAAAYGg/Z6cj7kFI7io/s1600-h/IMG_20110817_010412%25255B5%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Arduino ADK" border="0" alt="Arduino ADK" src="http://lh6.ggpht.com/-eXrd8Tj3v-Y/Tks7MXq5iNI/AAAAAAAAYGo/4QUqtfJdsNY/IMG_20110817_010412_thumb%25255B2%25255D.jpg?imgmax=800" width="344" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh5.ggpht.com/-YYBmbrYT3ac/Tks7PaNc0MI/AAAAAAAAYGs/beeACb09lRs/s1600-h/IMG_20110817_010431%25255B5%25255D.jpg" target="_blank"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Arduino ADK" border="0" alt="Arduino ADK" src="http://lh6.ggpht.com/-iyl5VvnGkSc/Tks7QnYsstI/AAAAAAAAYGw/lqRdjqHeGB8/IMG_20110817_010431_thumb%25255B2%25255D.jpg?imgmax=800" width="344" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Arduino ADK&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;The Arduino ADK is a microcontroller board based on the ATmega2560 (&lt;a href="http://www.atmel.com/dyn/resources/prod_documents/doc2549.PDF" target="_blank"&gt;datasheet&lt;/a&gt;). It has a USB host interface to connect with Android based phones, based on the MAX3421e IC. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button. Source: &lt;a href="http://arduino.cc/en/Main/ArduinoBoardADK" target="_blank"&gt;Arduino.cc&lt;/a&gt;&lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/V7ppyRn9Dqo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/3478281107737655841/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=3478281107737655841" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/3478281107737655841?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/3478281107737655841?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/V7ppyRn9Dqo/new-toy-in-house-arduino-adk.html" title="New toy in the house: Arduino ADK" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-fE5PZ47BTb0/Tks63E4yIgI/AAAAAAAAYF8/CFhyAtQQ3jg/s72-c/IMG_20110817_005801_thumb%25255B5%25255D.jpg?imgmax=800" height="72" width="72" /><thr:total>3</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/08/new-toy-in-house-arduino-adk.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8CQXwyeyp7ImA9WhdRGUw.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-2618223157171424675</id><published>2011-08-10T00:37:00.001+05:30</published><updated>2011-08-10T00:37:40.293+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-10T00:37:40.293+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="API" /><category scheme="http://www.blogger.com/atom/ns#" term="HTML5" /><title>HTML5: Page Visibility API</title><content type="html">&lt;p align="justify"&gt;Today I stumbled upon an interesting API being introduced in HTML5 – &lt;a href="http://www.w3.org/TR/page-visibility/" target="_blank"&gt;Page Visibility API&lt;/a&gt;. As the name suggests, the API facilitates the developers to programmatically determine the current visibility of the page. User interface designers can take advantage of this API, which is still in Working Draft, to give better experience to the visitors. This will also help in better resource utilization. For example, if your page has an animation, you can efficiently render it only when the page is visible without having to hog the resources. The specification introduces a new interface named “&lt;a href="http://www.w3.org/TR/page-visibility/#pv-document-visibility-interface" target="_blank"&gt;DocumentVisibility&lt;/a&gt;” that provides Web applications with the means to programmatically determine the current visibility of a page and be notified of visibility changes. Check out the demo &lt;a href="http://static.varunkumar.me/api/visibility.html" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;The specification includes three main parts:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Attribute &lt;em&gt;“&lt;strong&gt;document.hidden&lt;/strong&gt;”&lt;/em&gt;: This is a Boolean attribute of &lt;a href="http://www.w3.org/TR/page-visibility/#pv-document-visibility-interface" target="_blank"&gt;DocumentVisibility&lt;/a&gt; interface indicating if the page is hidden from view. It will return ‘false’ even if part of the page is visible. There are vendor specific implementations for this. It is implemented as &lt;em&gt;document.msHidden&lt;/em&gt; in IE and &lt;em&gt;document.webkitHidden&lt;/em&gt; in Chrome. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Attribute &lt;em&gt;“&lt;strong&gt;document.visibilityState&lt;/strong&gt;”&lt;/em&gt;: This is an attribute of DocumentVisibility interface indicating the state of the page. The specification includes three different states: “hidden”, “visible”, “preview” – The page is not visible but a preview of it is visible. Again, its open to vendors to define their own states. Its implemented as &lt;em&gt;document.msVisibilityState &lt;/em&gt;in IE and &lt;em&gt;document.webkitVisibilityState&lt;/em&gt; in Chrome. The major deference, however, is that &lt;em&gt;document.msVisibilityState&lt;/em&gt; is a numeric value where as &lt;em&gt;document.webkitVisibilityState&lt;/em&gt; is a string value. Hence, its better to stick to &lt;em&gt;document.hidden&lt;/em&gt; till the API matures.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Event &lt;em&gt;“&lt;strong&gt;visibilitychange&lt;/strong&gt;”&lt;/em&gt;: The &lt;em&gt;visibilitychange&lt;/em&gt; event will be fired whenever a change is made to the &lt;em&gt;document.visibilityState&lt;/em&gt; attribute. We can listen to this event on document and as mentioned in point#2, its advisable to use &lt;em&gt;document.hidden &lt;/em&gt;to find out the new state within the listener. Here, again, you will have to listen to vendor specific events. &lt;/div&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Demo&lt;/strong&gt;:&lt;/p&gt;  &lt;p align="justify"&gt;I have setup &lt;a href="http://static.varunkumar.me/api/visibility.html" target="_blank"&gt;this demo page&lt;/a&gt; to explore the Page Visibility API. It runs a timer to show clock on the page. The timer will be disabled whenever we move away from the page and will be re-activated as we enter the page with the adjusted clock timing. Smart developers always view the source. View the page source to know more. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Browser Support&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;Internet Explorer (10+)&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Chrome (12+)&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;Page Visibility API will be really useful if vendors follow the specifications completely and move away from the vendor prefixes. More info about Page Visibility can be found &lt;a href="http://www.w3.org/TR/page-visibility/" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/IOjmpoZ09dw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/2618223157171424675/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=2618223157171424675" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2618223157171424675?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/2618223157171424675?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/IOjmpoZ09dw/html5-page-visibility-api.html" title="HTML5: Page Visibility API" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><thr:total>1</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/08/html5-page-visibility-api.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkcHSXc9eSp7ImA9WhdSFkg.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-5299569820946493620</id><published>2011-07-26T09:50:00.001+05:30</published><updated>2011-07-26T09:50:38.961+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-26T09:50:38.961+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NodeJs" /><title>Diving into Node.js</title><content type="html">&lt;p align="justify"&gt;If you are following the posts on &lt;a href="http://news.ycombinator.com/" target="_blank"&gt;Hacker News&lt;/a&gt;, you would have definitely heard about &lt;a href="http://nodejs.org" target="_blank"&gt;Node.js&lt;/a&gt;. At least one of the posts related to Node.js will be on the front page of Hacker News everyday. Node.js is an event driven server side JavaScript environment. Its a runtime which can execute JavaScript files on the server side using the JavaScript engine &lt;a href="http://en.wikipedia.org/wiki/V8_(JavaScript_engine)" target="_blank"&gt;V8&lt;/a&gt;. It is intended for writing scalable applications like web servers. It was created by &lt;a href="http://en.wikipedia.org/wiki/Ryan_Dahl" target="_blank"&gt;Ryan Dahl&lt;/a&gt; in 2009. I have been playing around with Node.js for about a month now and this post is a consolidation of different things I have came across in the process of learning.&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;&lt;center&gt;&lt;iframe src="http://www.youtube.com/embed/jo_B4LTHi3I" frameborder="0" width="560" height="349" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;/center&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Node.js resources&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="http://nodejs.org" target="_blank"&gt;Node.js official site&lt;/a&gt;. Check out the Wiki on this site.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Node.js &lt;a href="http://www.stoimen.com/blog/2010/11/16/diving-into-node-js-introduction-and-installation/" target="_blank"&gt;Introduction &amp;amp; Installation&lt;/a&gt;. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="http://nodebeginner.org/index.html" target="_blank"&gt;The Node beginner book&lt;/a&gt; by &lt;a href="http://twitter.com/manuelkiessling" target="_blank"&gt;Manuel Kiessling&lt;/a&gt;. This is an excellent book to get started with Node.js and server side JavaScript. It is a great work by the author. He has chosen to explain the concepts via “How not to” and I am really impressed with his writing style. Hats off to the author. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="http://blog.osbutler.com/categories/node-by-example/" target="_blank"&gt;Node by example&lt;/a&gt;. This is an excellent series of posts to showcase some of the available features of Node.js. It is a collection of short code examples.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="https://github.com/joyent/node/wiki/modules" target="_blank"&gt;Node Modules&lt;/a&gt;. This is the list of modules which you can hook into your code. Its a huge list and you can find modules for almost anything you wanted to.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;&lt;a href="https://github.com/joyent/node/wiki/hosting" target="_blank"&gt;Node.js hosting&lt;/a&gt;. This page contains list of hosting sites where you can host your Node.js applications.&lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;If you are from Java background, you can also go through &lt;a href="http://blog.shinetech.com/2011/06/10/nodejs-from-the-enterprise-java-perspective/" target="_blank"&gt;this&lt;/a&gt; and &lt;a href="http://blog.maxant.co.uk/pebble/2011/05/22/1306092969466.html" target="_blank"&gt;this&lt;/a&gt; to know about Node.js from an Enterprise Java perspective. &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Note&lt;/strong&gt;: I have read through all the materials posted here and found them to be useful. If you come across any interesting links about Node.js, share them via comments. &lt;/p&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/RW0FCiJa4gg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/5299569820946493620/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=5299569820946493620" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/5299569820946493620?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/5299569820946493620?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/RW0FCiJa4gg/diving-into-nodejs.html" title="Diving into Node.js" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/jo_B4LTHi3I/default.jpg" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/07/diving-into-nodejs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIDQnk-fip7ImA9WhZaGE0.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-7730939218522826802</id><published>2011-07-05T00:39:00.001+05:30</published><updated>2011-07-05T00:39:33.756+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-05T00:39:33.756+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Google+" /><category scheme="http://www.blogger.com/atom/ns#" term="Facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="VServices" /><title>Facebook Circles Importer: Import Google+ Circles into Facebook</title><content type="html">&lt;p align="justify"&gt;Ever since Google announced its social product &lt;a href="http://google.com/+" target="_blank"&gt;Google+&lt;/a&gt; last week, hackers around the world have built some cool hacks. Here is one such hack built around Google+ and Facebook. Google+ sports a simple and neat interface and the highlight is the interface of &lt;a href="https://plus.google.com/circles" target="_blank"&gt;Google+ Circles&lt;/a&gt;. And, few engineers from Facebook have already built “&lt;a href="http://www.circlehack.com/" target="_blank"&gt;Circle Hack&lt;/a&gt;” and ported the interface of Circles to Facebook (Lists) in no time. This piece of work of mine is an extension to Circles hack which facilitates importing Circles into Facebook. Access it &lt;a href="http://services.varunkumar.me/circles" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Circle Hack&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;One of the important features of Google+ (as bragged about) is Google+ Circles which helps you to share your data with a specific group of people. A similar feature already exists (Lists) on Facebook but is hidden inside a bunch of other features and is not very user friendly. &lt;a href="http://www.circlehack.com/" target="_blank"&gt;Circle Hack&lt;/a&gt; is an excellent piece of work done by few engineers from Facebook to provide a friendly interface to Facebook lists. Circle hack is developed as a node.js application and the backbone of the hack is the &lt;a href="https://github.com/voloko/uki" target="_blank"&gt;UI Kit&lt;/a&gt; developed by the &lt;a href="https://github.com/voloko" target="_blank"&gt;same author&lt;/a&gt;. It is a very popular UI framework for building complex web apps. Again, the author has done a very good job. Source code of Circle Hack can be found &lt;a href="https://github.com/voloko/facebook-circles" target="_blank"&gt;here&lt;/a&gt;. I was hacking through Circle Hack as well as UI Kit and was quite impressed with the offerings of UI Kit. I have browserified the node modules and ported it into &lt;a href="http://services.varunkumar.me" target="_blank"&gt;VServices&lt;/a&gt;, which I already own.&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://lh6.ggpht.com/-uEtY0_JtIk8/ThIP2yH49bI/AAAAAAAAOLA/2Lr9B4wPC5k/s1600-h/Screen%252520shot%2525202011-07-04%252520at%25252011.36.48%252520PM%25255B17%25255D.png" target="_blank"&gt;&lt;img title="&amp;#39;Circle Hack&amp;#39; ported into VServices" style="border-top-width: 0px; display: block; border-left-width: 0px; float: none; border-bottom-width: 0px; margin-left: auto; margin-right: auto; border-right-width: 0px" height="484" alt="&amp;#39;Circle Hack&amp;#39; ported into VServices" src="http://lh6.ggpht.com/-mS08GOxU_9M/ThIP3sItjBI/AAAAAAAAOLE/mOi12MAzjPU/Screen%252520shot%2525202011-07-04%252520at%25252011.36.48%252520PM_thumb%25255B15%25255D.png?imgmax=800" width="605" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;strong&gt;&lt;a href="http://lh4.ggpht.com/-IWnYnmfVXC0/ThIP4ckM5uI/AAAAAAAAOLI/pdb8Nfo8siI/s1600-h/Screen%252520shot%2525202011-07-04%252520at%25252011.37.25%252520PM%25255B12%25255D.png" target="_blank"&gt;&lt;img title="Circle Hack" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="Circle Hack" src="http://lh3.ggpht.com/-VgIp2ActyXw/ThIP5MD0kiI/AAAAAAAAOLM/2hVOaZGvWsU/Screen%252520shot%2525202011-07-04%252520at%25252011.37.25%252520PM_thumb%25255B10%25255D.png?imgmax=800" width="660" border="0" /&gt;&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Circles Importer&lt;/strong&gt;&lt;/p&gt;  &lt;p align="justify"&gt;&lt;a href="http://services.varunkumar.me/circles" target="_blank"&gt;Circles Importer&lt;/a&gt; is an extension to Circle Hack which facilitates importing contacts from an external source (like Google+)&amp;#160; into Facebook and create lists out of them. Facebook mail invite has a similar feature of importing contacts but you have to take the pain of creating the lists yourselves. That is where this tool will fit in. &lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-FySSjw-k_DA/ThIP6De35GI/AAAAAAAAOLQ/CFO4RLVjej8/s1600-h/Screen%252520shot%2525202011-07-05%252520at%25252012.16.36%252520AM%25255B9%25255D.png" target="_blank"&gt;&lt;img title="Facebook Circles Importer" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="Facebook Circles Importer" src="http://lh6.ggpht.com/-5M14BaY5r8I/ThIP7PEH5dI/AAAAAAAAOLU/i8aXtkuS73c/Screen%252520shot%2525202011-07-05%252520at%25252012.16.36%252520AM_thumb%25255B7%25255D.png?imgmax=800" width="603" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p align="justify"&gt;&lt;strong&gt;Steps to import Google+ Circles into Facebook?&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;div&gt;Google has provided us with a handy tool (&lt;a href="https://www.google.com/takeout/" target="_blank"&gt;Google TakeOut&lt;/a&gt;) to extract our data from Google+ whenever we wanted to. Google Takeout lets you download an archive your data from various Google services including Buzz, Contacts and Circles, Picasa, etc. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Sign in to Google Take Out and select the service “Contacts and Circles” for archival. Download the archive (zip). &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;On extracting the archive, you will find &lt;a href="http://en.wikipedia.org/wiki/VCard" target="_blank"&gt;.vcf files&lt;/a&gt; under contacts folder. &lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Upload the .vcf file to the Circles Importer. You can even drag-drop files from your desktop.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Circles Importer will parse the VCard and shows the list of Facebook friends who are part of the uploaded circle.&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="justify"&gt;Choose an existing list from the auto-complete text box or provide a name for the list. Click on ‘Add to list’ to complete the process.&amp;#160; &lt;/div&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p align="justify"&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/e8qhM-vxzxA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/7730939218522826802/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=7730939218522826802" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7730939218522826802?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/7730939218522826802?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/e8qhM-vxzxA/facebook-circles-importer-import-google.html" title="Facebook Circles Importer: Import Google+ Circles into Facebook" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-mS08GOxU_9M/ThIP3sItjBI/AAAAAAAAOLE/mOi12MAzjPU/s72-c/Screen%252520shot%2525202011-07-04%252520at%25252011.36.48%252520PM_thumb%25255B15%25255D.png?imgmax=800" height="72" width="72" /><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/07/facebook-circles-importer-import-google.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcHQX4yfCp7ImA9WhZaFE0.&quot;"><id>tag:blogger.com,1999:blog-2950942336441072027.post-3238332447301989738</id><published>2011-06-30T09:54:00.001+05:30</published><updated>2011-06-30T09:57:10.094+05:30</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-06-30T09:57:10.094+05:30</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="UserScripts" /><category scheme="http://www.blogger.com/atom/ns#" term="GreaseMonkey" /><title>DotJs – A GreaseMonkey alternative</title><content type="html">&lt;p&gt;If you love customizing pages on the web using user scripts, here is an alternative for GreaseMonkey. &lt;a href="https://github.com/defunkt/dotjs" target="_blank"&gt;DotJs&lt;/a&gt; is a Google Chrome extension that executes JavaScript files in &lt;font face="Arial"&gt;&lt;code&gt;~/.js&lt;/code&gt; based on their filename. To customize &lt;code&gt;http://www.google.com/&lt;/code&gt;, you will have to create the userscript&lt;code&gt;&amp;#160; ~/.js/google.com.js&lt;/code&gt;. &lt;/font&gt;&lt;a href="https://github.com/defunkt" target="_blank"&gt;The author&lt;/a&gt; originally built this for Chrome only but was later ported to other browsers &lt;a href="https://github.com/rlr/dotjs-addon" target="_blank"&gt;Firefox&lt;/a&gt;, &lt;a href="https://github.com/wfarr/dotjs.safariextension" target="_blank"&gt;Safari&lt;/a&gt; and &lt;a href="https://github.com/sj26/dotjs-fluid" target="_blank"&gt;Fluid&lt;/a&gt;. Currently, it works **only on OSX**. &lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p&gt;&lt;strong&gt;How to install?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;code&gt;&lt;font face="Arial"&gt;Installation requires you to have Ruby 1.8 and &lt;/font&gt;&lt;a href="http://rake.rubyforge.org/" target="_blank"&gt;&lt;font face="Arial"&gt;rake&lt;/font&gt;&lt;/a&gt;&lt;font face="Arial"&gt; installed. Follow the instructions below to install DotJs.&lt;/font&gt;&lt;/code&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;code&gt;&lt;font face="Arial"&gt;git clone &lt;/font&gt;&lt;a href="http://github.com/defunkt/dotjs"&gt;&lt;font face="Arial"&gt;http://github.com/defunkt/dotjs&lt;/font&gt;&lt;/a&gt;&lt;/code&gt;&lt;/p&gt;    &lt;p&gt;&lt;code&gt;&lt;font face="Arial"&gt;cd dotjs&lt;/font&gt;&lt;/code&gt;&lt;/p&gt;    &lt;p&gt;&lt;code&gt;&lt;font face="Arial"&gt;rake install&lt;/font&gt;&lt;/code&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;strong&gt;How does it work?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There is a security restriction in Chrome which prevents access to the local file system. To overcome this problem, DotJs runs a tiny web server on port 3131 which serves the files from ~/.js. Hence, the need for Ruby. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Is it better than GreaseMonkey?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;DotJs is just an alternative technique which offers the same functionalities as GreaseMonkey offers. The userscripts in DotJs will not be able to use the GM_ functions which means not all your GM scripts will work directly here. However, you can implement the GM_ methods and make all the GM scripts compatible here. The userscripts in DotJs will have jQuery 1.6 loaded regardless of whether the site you're hacking uses jQuery. Also, it adds support for additional plug-ins and other helper functions. &lt;/p&gt;  &lt;p&gt;-- Varun&lt;/p&gt;  &lt;img src="http://feeds.feedburner.com/~r/varunkumar/scratchpad/~4/W6nKj6lCVNI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://blog.varunkumar.me/feeds/3238332447301989738/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2950942336441072027&amp;postID=3238332447301989738" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/3238332447301989738?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2950942336441072027/posts/default/3238332447301989738?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/varunkumar/scratchpad/~3/W6nKj6lCVNI/dotjs-greasemonkey-alternative.html" title="DotJs – A GreaseMonkey alternative" /><author><name>Varunkumar Nagarajan</name><uri>https://plus.google.com/108687347728474862071</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh5.googleusercontent.com/-x8lDrdZs-8Y/AAAAAAAAAAI/AAAAAAAAnd4/3kkH3jUsPFk/s512-c/photo.jpg" /></author><thr:total>0</thr:total><gd:extendedProperty name="commentSource" value="1" /><gd:extendedProperty name="commentModerationMode" value="FILTERED_POSTMOD" /><feedburner:origLink>http://blog.varunkumar.me/2011/06/dotjs-greasemonkey-alternative.html</feedburner:origLink></entry></feed>
