<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>I am Burke Holland.  I am an Evangelist For Kendo UI. I built Instasharp.  I live in Nashville.  Click here to contact me.</description><title>A Shiny New Me</title><generator>Tumblr (3.0; @burkeholland)</generator><link>http://a.shinynew.me/</link><item><title>Bridging The PhoneGap: Twitter Plugin</title><description>&lt;p&gt;In the &lt;a href="http://a.shinynew.me/post/19786775381/bridging-the-phonegap-childbrowser-plugin"&gt;first part&lt;/a&gt; of this epic and questionably long series, I did a very quick introduction to the ChildBrowser plugin for &lt;a href="http://www.phonegap.com"&gt;PhoneGap&lt;/a&gt;.  In this post, i&amp;#8217;m going to expand the application I built in the first post to leverage the deep Twitter integration in iOS 5.&lt;/p&gt;

&lt;h2&gt;The Twitter Plugin&lt;/h2&gt;

&lt;h2&gt;Why&lt;/h2&gt;

&lt;p&gt;You may come to a point in your application when you want to allow people to share what they have found or created via your application, with the rest of the internet via Twitter.  There are a variety of ways to accomplish this.&lt;/p&gt;

&lt;p&gt;You could roll your own where you authenticate the user to Twitter via their OAuth mechanism.  If you like that sort of pain, this can work just fine.  However, you have fringe issues that you will have to address immediately, which include shortening links and the nightmare that is trying to share images by uploading them to Twitter&amp;#8217;s sharing service.&lt;/p&gt;

&lt;p&gt;Someone once Tweeted that sharing on the internet is in fact broken, because OAuth makes it so darn painful.  Oh wait, that was me.&lt;/p&gt;

&lt;div class="centered"&gt;
&lt;img src="http://media.tumblr.com/tumblr_m1veh49mb51qcj4eq.png"/&gt;&lt;/div&gt;

&lt;p&gt;In the case of my application, I could rely on the pages that I link to having share buttons, but then you have to navigate the page, click on the tiny twitter button and sign in if you haven&amp;#8217;t already signed in on your phone since the last time you cleared the cache.  That&amp;#8217;s a terrible user experience though.  Case in point below&amp;#8230;&lt;/p&gt;

&lt;div class="centered"&gt;
&lt;img src="http://media.tumblr.com/tumblr_m1veveckzU1qcj4eq.png"/&gt;&lt;/div&gt;

&lt;p&gt;Note that this is not a problem with the author&amp;#8217;s site, its simply a usability issue that mobile doesn&amp;#8217;t handle very well.  The button is tiny and when you click on it, you are redirected to yet another window to post to Twitter.  On the web, this is fine.  On a phone, not so much.&lt;/p&gt;

&lt;p&gt;What you may or may not know, is that iOS has deep integration with Twitter.  It&amp;#8217;s actually built right into the OS and will take care of shortening links, uploading images - the whole 9.  But as with many PhoneGap situations, there is no way to use this with PhoneGap out of the box.&lt;/p&gt;

&lt;h2&gt;What&lt;/h2&gt;

&lt;p&gt;Luckily for us, &lt;a href="https://twitter.com/#!/RandyMcMillan"&gt;Randy McMillan&lt;/a&gt; has built a nifty plugin for PhoneGap that allows us to take advantage of the native Twitter sharing and it&amp;#8217;s darn easy.&lt;/p&gt;

&lt;p&gt;As with most PhoneGap plugins, the trickiest part about the plugin is getting it installed correctly and running.  Once you do that, the API is dead simple and Randy has done a great job of making sure that all scenarios are covered.  Let&amp;#8217;s take a look at how to use the Twitter Plugin for PhoneGap.&lt;/p&gt;

&lt;h2&gt;How&lt;/h2&gt;

&lt;p&gt;Download the &lt;a href="https://github.com/phonegap/phonegap-plugins"&gt;PhoneGap Plugins&lt;/a&gt; if you haven&amp;#8217;t already.&lt;/p&gt;

&lt;p&gt;Inside the iOS folder, you will find the Twitter Plugin.  I&amp;#8217;m simply going to extend the &lt;a href="https://github.com/burkeholland/bridging-the-phone-gap"&gt;Reddit Browser Application&lt;/a&gt; that I built in the ChildBrowser Plugin post to allow users to tweet a Reddit story directly from the application using the really nice Twitter integration in iOS 5.&lt;/p&gt;

&lt;p&gt;Inside the Twitter folder, you will find an &lt;strong&gt;native&lt;/strong&gt; folder in which you will see a &lt;strong&gt;native&lt;/strong&gt; folder.  This is the folder that you want to add to your project.&lt;/p&gt;

&lt;p&gt;Right-click the &lt;strong&gt;plugins&lt;/strong&gt; folder in your project and select &lt;strong&gt;Add Files&lt;/strong&gt;.  Browse to that &lt;strong&gt;ios&lt;/strong&gt; folder and select it.  Remember to choose &lt;strong&gt;&amp;#8220;Add groups for any added folders&amp;#8221;&lt;/strong&gt;.  This will create a yellow folder under plugins.  If it creates a blue one, you did it wrong.  Delete them and do it again.&lt;/p&gt;

&lt;div class="centered"&gt;
&lt;img src="http://media.tumblr.com/tumblr_m1vffbbUZv1qcj4eq.png"/&gt;&lt;/div&gt;

&lt;p&gt;Add the entry to your Cordova.plist file.  The entry key is &lt;strong&gt;com.phonegap.twitter&lt;/strong&gt; and &lt;strong&gt;TwitterPlugin&lt;/strong&gt; for the value.&lt;/p&gt;

&lt;div class="centered"&gt;
&lt;img src="http://media.tumblr.com/tumblr_m1vfjgEhws1qcj4eq.png"/&gt;&lt;/div&gt;

&lt;p&gt;We are going to need to add Account and Twitter references to our build phases.  To do that, select your project name, in the side bar that appears next to it select &lt;strong&gt;Targets&lt;/strong&gt; and your project name.  Then select the &lt;strong&gt;Build Phases&lt;/strong&gt; tab and add &lt;strong&gt;Twitter&lt;/strong&gt; and &lt;strong&gt;Accounts&lt;/strong&gt; to the &lt;strong&gt;Link Binary With Libraries&lt;/strong&gt; section.&lt;/p&gt;

&lt;div class="centered"&gt;
&lt;img src="http://media.tumblr.com/tumblr_m1yklwkBOH1qcj4eq.png"/&gt;&lt;/div&gt;

&lt;p&gt;Add the &lt;strong&gt;TwitterPlugin.js&lt;/strong&gt; file to your &lt;strong&gt;www&lt;/strong&gt; folder and don&amp;#8217;t forget to add the reference to your &lt;strong&gt;index.html&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you get some errors when running your project, check the &lt;strong&gt;weak linking&lt;/strong&gt; issue at the bottom of the plugin &lt;a href="https://github.com/phonegap/phonegap-plugins/tree/master/iOS/Twitter"&gt;GitHub page&lt;/a&gt;.  I had to make this change to my project in order to get the plugin to work.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now I can tweet one of the Reddit stories simply by calling the plugin and the &lt;strong&gt;composeTweet&lt;/strong&gt; method.&lt;/p&gt;

&lt;p&gt;The method takes 4 parameters.&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;The function to call on success of the Tweet.&lt;/li&gt;
&lt;li&gt;The function to call on Tweet failure (note that this fires when the user clicks &lt;strong&gt;Cancel&lt;/strong&gt; as well).&lt;/li&gt;
&lt;li&gt;The text of the tweet.&lt;/li&gt;
&lt;li&gt;An object parameter that can take an image, several images, a URL or some combination of all three.  &lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;In this case, I am just passing the title of the story along with the URL.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$("#popular_news").on("click", ".tweet-button", function(e) {
    var title = $(e.currentTarget).data("title"),
    url = $(e.currentTarget).data("url")

    window.plugins.twitter.composeTweet(
        null,
        function(e) {
            if ($(e).trim().toLower() !== "canceled") {
                navigator.notify.alert("Failed sending Tweet..." + e);
             }
         },
         title, {
             urlAttach: url
         }
    );
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I&amp;#8217;m not doing anything in the above &lt;strong&gt;success&lt;/strong&gt; function so I just pass null.  But the &lt;strong&gt;failure&lt;/strong&gt; function is necessary in case the user tries to Tweet without a connection.  This function returns a string error.  It returns &lt;strong&gt;Canceled&lt;/strong&gt; if the user simply cancels out of the dialog.  In that case, we don&amp;#8217;t want to pop up a notification.  Only in actual failures do we want to show something.&lt;/p&gt;

&lt;div class="centered"&gt;
&lt;img src="http://media.tumblr.com/tumblr_m1x4qkJ1Nj1qcj4eq.png"/&gt;&lt;/div&gt;

&lt;p&gt;But there is one thing here that we are assuming, and that is the fact that the user has iOS 5 which supports Twitter integration their Twitter account linked to their phone.  Like I said, Randy thought things through so we have some functions to check for that.&lt;/p&gt;

&lt;p&gt;In the case that they are not on iOS 5, I&amp;#8217;m going to hide the tweet button via a boolean value.  In the case that they have Twitter integration, but they have not linked their account, I&amp;#8217;m going to prompt them to go do that.&lt;/p&gt;

&lt;div class="centered"&gt;
&lt;img src="http://media.tumblr.com/tumblr_m1x522JBcY1qcj4eq.png"/&gt;&lt;/div&gt;

&lt;pre&gt;&lt;code&gt;$("#popular_news").on("click", ".tweet-button", function(e) {
    var title = $(e.currentTarget).data("title"),
    url = $(e.currentTarget).data("url")

    // is twitter setup? If not, tell the user to go do it  
    window.plugins.twitter.isTwitterSetup(function(r) {
       if (r === 1) {
            // twitter is setup, compose a new tweet
            window.plugins.twitter.composeTweet(
                null,
                function(e) {
                    if ($(e).trim().toLower() !== "canceled") {
                        alert("Failed sending Tweet..." + e);
                    }
                },
                title, {
                    urlAttach: url
                }
            );
        }
        else {
            navigator.notification.alert("Please setup Twitter under Settings to use this feature", 
            null, "No Twitter :(");              }
    });

    e.preventDefault();
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And here is a short video demonstrating the Twitter Plugin leveraging the Twitter Integration is iOS 5.&lt;/p&gt;

&lt;iframe width="640" height="360" src="http://www.youtube.com/embed/L6sXZWjL3JY?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;&lt;br/&gt;
I hope this rundown on the Twitter Plugin has been useful for you.  This plugin does more than just tweet, including getting Timeline and Mentions.  As always, you can grab the source code off of my &lt;a href="https://github.com/burkeholland/bridging-the-phonegap"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;</description><link>http://a.shinynew.me/post/20369076673</link><guid>http://a.shinynew.me/post/20369076673</guid><pubDate>Mon, 02 Apr 2012 17:53:00 -0400</pubDate></item><item><title>Bridging The PhoneGap: ChildBrowser Plugin</title><description>&lt;p&gt;This is the first post in a series that I have been meaning to write for a while.  &lt;a href="http://www.phonegap.com"&gt;PhoneGap&lt;/a&gt; (now called Cordova) is the defacto platform for building native applications with HTML5.  In the past few years we have seen quite a few JavaScript frameworks pop up to help you with your UI, which has always been the toughest part.&lt;/p&gt;

&lt;p&gt;To name a few we have&amp;#8230;&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;&lt;a href="http://jquerymobile.com"&gt;jQuery Mobile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://kendoui.com/mobile"&gt;Kendo UI Mobile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.sencha.com/products/touch"&gt;Sencha Touch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://dojotoolkit.org/features/mobile"&gt;Dojo Mobile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.jqtouch.com/"&gt;jQTouch&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&amp;#8230;and several &lt;a href="http://www.mobiletuxedo.com/"&gt;more&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We&amp;#8217;ve just about got this nut cracked.  PhoneGap provides a fantastic wrapper for deploying your applications and taking advantage of native device features.&lt;/p&gt;

&lt;p&gt;But there are places where we still have a gap.  Fortunately enough, there is a &lt;a href="https://github.com/phonegap/phonegap-plugins"&gt;GitHub Repo&lt;/a&gt; dedicated to bridging this gap with plugins for &lt;a href="http://phonegap.com/"&gt;PhoneGap&lt;/a&gt; that provide missing or extended functionality to the base PhoneGap install.&lt;/p&gt;

&lt;p&gt;In this post, we&amp;#8217;ll take a look at one of these plugins called &lt;strong&gt;The ChildBrowser Plugin&lt;/strong&gt;.  I&amp;#8217;ll go over the (Why, What, Where, How) &lt;strong&gt;WWWH&lt;/strong&gt; for each of these plugins.&lt;/p&gt;

&lt;p&gt;All of my demos will be done in iOS.  Note that the process for doing this on Android may be different than what you see here.&lt;/p&gt;

&lt;h2&gt;The Child Browser Plugin&lt;/h2&gt;

&lt;h4&gt;Why&lt;/h4&gt;

&lt;p&gt;&lt;a href="http://phonegap.com/"&gt;PhoneGap&lt;/a&gt; wraps your application in a mobile Safari window.  But what if you want to open a new window?  While we are doing HTML/JavaScript development in PhoneGap, some things do not work.  For instance, you cannot simply call&amp;#8230;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;window.open("http://google.com")

or

&amp;lt;a href="http://www.reddit.com"&amp;gt;View On Reddit&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Spawning new windows or redirecting to other content is not OK and doesn&amp;#8217;t work they way it does on the web.  The reasons for spawning a new window in a web application vary, but consider the following scenarios&amp;#8230;&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;You want to let a user browse a link in your application without actually having to leave your app.&lt;/li&gt;
&lt;li&gt;You want to popup a window so they can login to a 3rd party (read Facebook, Twitter) without having to leave your application.&lt;/li&gt;
&lt;li&gt;You want to display a PDF document for them to read.&lt;/li&gt;
&lt;/ol&gt;&lt;h4&gt;What&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;Child Browser Plugin&lt;/strong&gt; was created just for this scenario.  It allows you to open a new window and even has events to capture responses from the spawned child window.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;ChildBrowser&lt;/strong&gt; is part of the &lt;a href="https://github.com/phonegap/phonegap-plugins/tree/master/iOS"&gt;PhoneGap Plugins Project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you download it, you need to install it.  I&amp;#8217;m going to create a sample application that lets you pull in Reddit Stories and then click on a link to view the article full screen in the child browser window if you so choose to do so.&lt;/p&gt;

&lt;p&gt;In my first pass at this, I create a link for each item with the &lt;strong&gt;href&lt;/strong&gt; set to the url of the article.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m1g2hrWAzX1qcj4eq.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;What happens when I click on the link?&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m1g2itv9yN1qcj4eq.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;Hmmmm, thats weird.  It took us to the right web page and we didn&amp;#8217;t leave the application, but now my application is gone and we have a website instead with no back button.  Not what we wanted.&lt;/p&gt;

&lt;p&gt;Let&amp;#8217;s try it again and set the &lt;strong&gt;target&lt;/strong&gt; of the &lt;strong&gt;href&lt;/strong&gt; to &lt;strong&gt;_blank&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m1g2laFBg41qcj4eq.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;That works too, but it opened up mobile Safari and my app went away.  It&amp;#8217;s going to be a pain for users to click on links, go to Safari, come back to my app and then repeat over and over again.  We need a way to let them browse web content without leaving our app.&lt;/p&gt;

&lt;p&gt;We&amp;#8217;ve seen enough of the &lt;strong&gt;What&lt;/strong&gt; and &lt;strong&gt;Why&lt;/strong&gt;, let&amp;#8217;s look at the &lt;strong&gt;How&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;How&lt;/h4&gt;

&lt;p&gt;The first step is of course to download the &lt;strong&gt;ChildBrowser&lt;/strong&gt; plugin.  You can download the whole repo of plugins, which contains a version for every platform.  As I mentioned earlier, I am going to be targeting iOS.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s important to mention here that if you haven&amp;#8217;t downloaded &lt;a href="http://phonegap.com/"&gt;PhoneGap&lt;/a&gt; (Cordova) recently, you need to do it again.  It recently switched to being called &lt;strong&gt;Cordova&lt;/strong&gt; and all the namespaces changed.  The plugins will throw errors if you don&amp;#8217;t have Cordova.&lt;/p&gt;

&lt;p&gt;For my UI, I am using the new &lt;a href="http://kendoui.com/mobile"&gt;Kendo UI Mobile&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Once you have downloaded the plugins, browse to the &lt;strong&gt;iOS&lt;/strong&gt; directory and then to the &lt;strong&gt;ChildBrowser&lt;/strong&gt; folder.  Inside that folder, drag &lt;strong&gt;ChildBrowser.js&lt;/strong&gt; or &lt;strong&gt;ChildBrowser.min.js&lt;/strong&gt; to the &lt;strong&gt;www&lt;/strong&gt; folder of your application.  You can delete the &lt;strong&gt;FBConnect&lt;/strong&gt; example.&lt;/p&gt;

&lt;p&gt;Now in XCode, right click on the &lt;strong&gt;Plugins&lt;/strong&gt; folder and select &lt;strong&gt;Add Files&lt;/strong&gt;.  Browse to the &lt;strong&gt;ChildBrowser&lt;/strong&gt; folder and select it.  When you click &lt;strong&gt;Add&lt;/strong&gt;, make sure you have the &lt;strong&gt;Create folder references for any added folders&lt;/strong&gt; selected.  You also want the &lt;strong&gt;Destination&lt;/strong&gt; checkbox checked, but it should be by default.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m1g2z2cwVF1qcj4eq.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;Now we need to tell &lt;a href="http://phonegap.com/"&gt;PhoneGap&lt;/a&gt; (Cordova) about this new plugin by opening up the Cordova.plist file and making an entry in the plugins section.  The correct key/value pair entry is &lt;strong&gt;ChildBrowserCommand&lt;/strong&gt; on both sides.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_m1hwqzGgWV1qcj4eq.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;Add a script reference for the &lt;strong&gt;ChildBrowser.js&lt;/strong&gt; or &lt;strong&gt;ChildBrowser.min.js&lt;/strong&gt; to your &lt;strong&gt;index.html&lt;/strong&gt; file in the &lt;strong&gt;www&lt;/strong&gt; folder.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script src="ChildBrowser.js"&amp;gt;&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once the script reference has been added, I can call the ChildBrowser plugin from JavaScript.  The following function will be called when an item is clicked.  It open a child window and sets the url of the window.  Notice that we have to install the plugin first and make sure it is in fact installed before trying to use it.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pub.goToUrl = function(sender) {
  // get url off of data attribute from item that was clicked
  var url = $(sender).data("url"); 

  // install ChildBrowser
  var cb = ChildBrowser.install();
  // if ChildBrowser is installed, open it with target set
  if(cb != null)
    window.plugins.childBrowser.showWebPage(url);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now when I click on an item, a nifty window slides up from the bottom.  It allows the user to fully navigate web content, and when they are done, it simply slides down and goes away, bringing them right back to my application.  Check out the short YouTube video below showcasing the &lt;strong&gt;ChildBrowser&lt;/strong&gt; in action.&lt;/p&gt;

&lt;iframe width="640" height="480" src="http://www.youtube.com/embed/mm75keyW0AI?rel=0" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;h4&gt;ChildBrowser&lt;/h4&gt;

&lt;p&gt;The &lt;strong&gt;ChildBrowser&lt;/strong&gt; plugin is a very nice way to display external content or allow your users to read PDF files without them ever having to leave you application.  This is a much better experience for the user.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://phonegap.com/"&gt;PhoneGap&lt;/a&gt; (Cordova) is really great, but you have to know how to bridge the gaps in functionality when they exist.&lt;/p&gt;

&lt;p&gt;You can grab the Xcode project used here on my GitHub page.  I&amp;#8217;ll keep this repo updated with this series of posts, providing the demo projects that I built here.  Hop on over and &lt;a href="https://github.com/burkeholland/bridging-the-phonegap"&gt;grab the download&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Start developing with &lt;a href="http://phonegap.com/"&gt;PhoneGap&lt;/a&gt;.  It&amp;#8217;s easy, and it&amp;#8217;s getting better all the time.  There are gaps, but we can bridge those with plugins providing an end to end native experience with HTML5.&lt;/p&gt;</description><link>http://a.shinynew.me/post/19786775381</link><guid>http://a.shinynew.me/post/19786775381</guid><pubDate>Fri, 23 Mar 2012 12:58:00 -0400</pubDate></item><item><title>Harness The Power Of JavaScript [ Array Notation ]</title><description>&lt;p&gt;I&amp;#8217;ve been following along with &lt;a href="http://jeffrey-way.com/" target="_blank"&gt;Jeffrey Way&lt;/a&gt; (who has a smokin&amp;#8217; hot wife - &lt;a href="http://jeffrey-way.com/about/" target="_blank"&gt;his words&lt;/a&gt;) and his &lt;a href="http://tutsplus.com/course/30-days-to-learn-jquery/" target="_blank"&gt;30 Days To Learn jQuery&lt;/a&gt; over on &lt;a href="http://tutsplus.com" target="_blank"&gt;Tuts+&lt;/a&gt;.  I can&amp;#8217;t say enough about this series.  &lt;/p&gt;
&lt;p&gt;It&amp;#8217;s. So. Good.  &lt;/p&gt;
&lt;p&gt;His understanding of not just jQuery, but JavaScript in general and the ability to create relevant demos and examples is unmatched.  &lt;/p&gt;
&lt;p&gt;OK.  Enough about Jeffrey.  I don&amp;#8217;t get paid to talk about Tuts+.  But maybe I should&amp;#8230; Hit me up Jeff.&lt;/p&gt;
&lt;h2&gt;Rewind&lt;/h2&gt;
&lt;p&gt;He did something in a recent episode that made me go. &amp;#8220;&lt;strong&gt;WAIT!  WHAT!?!  You can do that?&lt;/strong&gt;&amp;#8221;.  Touch slider to rewind on iPad. Touch slider&amp;#8230;touch slider&amp;#8230;.Finally - rewind and watch again.  Why is it so hard to grab the video scrubber on iOS sometimes?&lt;/p&gt;
&lt;p&gt;He showed &lt;a href="http://www.jibbering.com/faq/faq_notes/square_brackets.html" target="_blank"&gt;JavaScript Array Notation&lt;/a&gt;.  This also commonly referred to as &amp;#8220;Square Bracket Notation&amp;#8221;.  Now this was something that I sort of *&lt;strong&gt;knew&lt;/strong&gt;* about in the back of my mind, but it never clicked really.  I never used it.&lt;/p&gt;
&lt;p&gt;The concept is simple.  You have a JavaScript object.  That object has methods.  You already know that you can call these methods with the dot notation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;object.method();&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;Laaaaassssieeee!!!!&lt;/h2&gt;
&lt;p&gt;Let&amp;#8217;s look at a simple demo.  In this example I have created an &lt;strong&gt;object&lt;/strong&gt; called &lt;strong&gt;Lassie&lt;/strong&gt;.  &lt;strong&gt;Lassie&lt;/strong&gt; has some methods that she can execute.  Instead of just logging an event, I used pictures I stole off the internet.  Because it&amp;#8217;s more fun.&lt;/p&gt;
&lt;p&gt;In this rather bad example, I have two buttons.  Each time a button is clicked, I can fire a method on the &lt;strong&gt;lassie&lt;/strong&gt; object.  Try it out.&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="300" src="http://jsfiddle.net/jpddh/1/embedded/result,js" width="600"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;That works, but we have 4 methods and we would need a button for each method.  It would be better to have a drop down of available actions and then execute the right method based on the selection.&lt;/p&gt;
&lt;p&gt;What you might not realize is that JavaScript also allows you to call a method with Array Notation.  So instead of calling this&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;lassie.bark();&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can call this&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;lassie[&amp;#8220;bark&amp;#8221;]();&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Did you catch that?&lt;/strong&gt;  All you need is the string representation of the method name.  We could now refactor the above example to use a drop down list instead and then just use the value of the selected option to execute the right method.  Dynamically.&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="300" src="http://jsfiddle.net/jpddh/5/embedded/result,js" width="600"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;h2&gt;A Real World Example&lt;/h2&gt;
&lt;p&gt;Lets look at another less ridiculous example of array notation.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been working on an HTML5 application called &lt;strong&gt;&lt;a href="http://html5camera.com" target="_blank"&gt;HTML5 Camera&lt;/a&gt;&lt;/strong&gt;.  This site uses bleeding edge &lt;a href="http://a.shinynew.me/post/16887310071/html5-native-video-streaming-with-webrtc" target="_blank"&gt;WebRTC&lt;/a&gt; to capture video from your webcam and play it back through an HTML5&amp;#160;&lt;strong&gt;video&lt;/strong&gt; tag.  It then captures the video output to a canvas element.  Once the image is on the canvas, I can manipulate the pixels to apply effects to the image.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m currently using a forked version of &lt;a href="http://vintagejs.com" target="_blank"&gt;VintageJS&lt;/a&gt; from &lt;a href="http://vintagejs.com/contact/" target="_blank"&gt;Robert Fleischman&lt;/a&gt;.  It allows you to apply vintage effects to an image with JavaScript.&lt;/p&gt;
&lt;p&gt;In my version, each time I call the &lt;strong&gt;vintage()&lt;/strong&gt; method on an image, I have to pass in an object which contains configuration values.  For instance, the standard vintage object looks like this&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="440" src="http://jsfiddle.net/G33HT/4/embedded/js" width="600"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Each of the effects presets look like this.  I have a JavaScript file that is full of these presets.  Now in my case, I will eventually be loading these effects objects from a remote URL and serializing them into JSON objects so my implementation will change slightly.  Well, probably a lot.&lt;/p&gt;
&lt;p&gt;I need to call the &lt;strong&gt;vintage() &lt;/strong&gt;method on the image and pass in the object containing the presets.  Normally, if I knew what preset to pass, I would just pass it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;$(&amp;#8220;img&amp;#8221;).vintage(effects.presets.default);&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What I needed to do was have a drop down list that would display each of the effects dynamically as I add them and put them in a drop down list.  I could do that easy enough with a &lt;strong&gt;for&lt;/strong&gt; loop and &lt;strong&gt;&lt;a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/HasOwnProperty" target="_blank"&gt;hasOwnProperty&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Then I can apply the effect by selecting the image, calling the &lt;strong&gt;.vintage()&lt;/strong&gt; method (which is part of the VintageJS jQuery plugin) and passing in an effects object based on the value of the drop down list.&lt;/p&gt;
&lt;p&gt;What follows is a working example.  You can set the effect on the image of me &amp;#8220;raising the roof&amp;#8221; by changing the drop down value.  There is no list of effects anywhere.  This drop down is populated directly off of the effects object and then the effect is applied using JavaScrpt array notation passing in the string value of the selected drop down list item.&lt;/p&gt;
&lt;div class="centered"&gt;&lt;iframe frameborder="0" height="400" src="http://html5camera.com/array/notation.html" width="400"&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;p&gt;And this is the code that both populates the drop down and executes retrieves the appropriate object for based on the user&amp;#8217;s selection in the drop down.&lt;/p&gt;
&lt;p&gt;&lt;script src="https://gist.github.com/1934761.js?file=gistfile1.html"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;So in this last example, I wasn&amp;#8217;t calling a method - but rather retrieving an object based on it&amp;#8217;s &amp;#8220;string&amp;#8221; representation.&lt;/p&gt;
&lt;p&gt;If you have worked with static languages before, you know that in order to do something like this (pre-dynamics in .NET 4.0 and things like that), you had to use &lt;a href="http://www.codeproject.com/Articles/55710/Reflection-in-NET" target="_blank"&gt;Reflection&lt;/a&gt;.  And it was not fun.  Kind of like the flu is not fun.&lt;/p&gt;
&lt;p&gt;There is so much power in dynamic languages.  With JavaScript Array Notation, you can execute arbitrary methods or retrieve objects inside of other objects without having anything more than the string representation of the object/method name.  And &lt;strong&gt;that&lt;/strong&gt;, is sexy.&lt;/p&gt;</description><link>http://a.shinynew.me/post/18438267212</link><guid>http://a.shinynew.me/post/18438267212</guid><pubDate>Tue, 28 Feb 2012 10:16:00 -0500</pubDate></item><item><title>Legitimate Uses For Private Browsing Mode</title><description>&lt;p&gt;Let&amp;#8217;s talk about Private Browsing mode.&lt;/p&gt;
&lt;p&gt;You know what it is.  It has other names that are less savory as it is generally agreed upon that browsing privately is because you don&amp;#8217;t want other people to know what you are looking at.  It&amp;#8217;s commonly called &amp;#8220;Porn Mode&amp;#8221;.  Well, so much for staying classy.&lt;/p&gt;
&lt;p&gt;But we&amp;#8217;re all adults here.  We can get through this.  Stop the giggling.&lt;/p&gt;
&lt;p&gt;Mozilla has offered some very eye opening metrics on this subject, including the fact that Private Browsing mode is used usually in a window of 10 minutes or less.  Here is a chart offered by Mozilla from their &lt;a href="http://null"&gt;metrics blog&lt;/a&gt; on the issue.&lt;/p&gt;
&lt;div class="centered"&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzhr5ljjpj1qcj4eq.png"/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Source&lt;/strong&gt;: &lt;a href="http://blog.mozilla.com/metrics/2010/08/23/understanding-private-browsing/" target="_blank"&gt;Blog Of Metrics - Understanding Private Browsing&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;Care to see some &lt;a href="http://blog.mozilla.com/metrics/2010/08/23/understanding-private-browsing/"&gt;more metrics&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;None of it is really that surprising.  I found myself in an odd conversation at dinner lately about Chrome&amp;#8217;s &lt;a href="http://support.google.com/chrome/bin/answer.py?hl=en&amp;amp;answer=95464"&gt;Incognito Mode&lt;/a&gt; (FireFox calls it &lt;a href="http://support.mozilla.org/en-US/kb/Private-Browsing"&gt;Private Browsing&lt;/a&gt;).  We all had a good laugh, but I thought about all the legitimate uses that Private Browsing has.  Besides buying gifts for your wife.&lt;/p&gt;
&lt;p&gt;Shockingly, it is an essential tool in every day web use when you find out what it can do for you.  I even polled some other people on this and found that it has quite a few legitimate uses.  Here are some of the ones I use myself along with ones that were recommended to me.&lt;/p&gt;
&lt;p&gt;So fire up your favorite browser and let&amp;#8217;s make a Private Browsing an honest citizen.  I will be using Chrome for these examples.  On a Mac, that&amp;#8217;s cmd + shift + n. &lt;/p&gt;
&lt;h3&gt;Web App Development&lt;/h3&gt;
&lt;p&gt;What is one of the single most annoying things about Chrome when you are doing web development?   Caching.  Chrome will cache certain files, especially if you&amp;#8217;re using external templates in JavaScript and loading them in. It persists the cache across window instances as well.  Closing the browser and re-opening does not help.&lt;/p&gt;
&lt;div class="centered"&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzhxkrCTGn1qcj4eq.png"/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Uhhhh.  That&amp;#8217;s so annoying.&lt;/p&gt;
&lt;p&gt;When you refresh in Private Browsing mode, it won&amp;#8217;t read from the cache.  Well, that&amp;#8217;s partially true.  I&amp;#8217;ve seen it read from the cache on the initial load in a new tab but not when the tab is refreshed.  So just watch the network activity to make sure that you have a fresh copy of your files.&lt;/p&gt;
&lt;h3&gt;Multiple Gmail Accounts&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://ralphwhitbeck.com/" target="_blank"&gt;Ralph Whitbeck&lt;/a&gt; pointed out to me that it&amp;#8217;s super useful for multiple Gmail accounts. Beyond that, it&amp;#8217;s super useful for Google accounts in general.  Say you are logged into Gmail in one tab and you want to log in on another tab on a different account.  Once you log yourself out in the second tab, it logs you out in the first as well.  &lt;/p&gt;
&lt;p&gt;This actually happens in Chrome Incognito Mode as well.  The trick is to keep one account open in regular browsing mode and the second in Incognito mode.  Now you could log in to your Gmail account and a seperate - perhaps &amp;#8220;company&amp;#8221; - YouTube account at the same time without stepping on yourself.&lt;/p&gt;
&lt;p&gt;And guess where else this works&amp;#8230;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;FACEBOOK!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Yes - that&amp;#8217;s right.  Once called the &amp;#8220;The Birthday Website&amp;#8221; by &lt;a href="http://www.hanselman.com" target="_blank"&gt;Scott Hanselman&lt;/a&gt;, the prolific social network for sharing what you are cooking for dinner and giving people completely disingenuous birthday wishes is a great candidate for multiple accounts.  &lt;/p&gt;
&lt;div class="centered"&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzhx7nFLcb1qcj4eq.png"/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: You are a lover scorned.  You need to have your regular account open so you can stay up to date on the lives of a bunch of people you hated in high school, but you also need one for your fake account so you can stalk your ex and find out who they are seeing now.  You need to be able to do both so you can launch your break with reality at just the right time.  &lt;/p&gt;
&lt;p&gt;As a point of fact, I have my facebook and my wife&amp;#8217;s open right now.  Wait, she&amp;#8217;s listed as single?!?  Hold on.  I&amp;#8217;ll be right back.&lt;/p&gt;
&lt;p&gt;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&amp;#8230;&lt;/p&gt;
&lt;p&gt;Ok, back.  In other news I&amp;#8217;m now single.&lt;/p&gt;
&lt;h3&gt;Going Down The Rabbit Hole&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://www.mennovanslooten.nl/" target="_blank"&gt;Menno Van Slooten&lt;/a&gt; noticed that it&amp;#8217;s also great for going down viral rabbit holes.  You know, someone sends you a video of a large person falling down and you click on all the other videos of large people falling down.  4 hours and 300 memes later your internet history is shot to hell and you cannot find that article you were reading the other day about legitimate uses of private browsing mode.&lt;/p&gt;
&lt;div class="centered"&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lzhwlb9UOq1qcj4eq.jpg"/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Since private browsing does not store your history, it won&amp;#8217;t polute your main timeline. Don&amp;#8217;t just randomly browse the web in a normal window or your history gets pretty useless pretty fast.&lt;/p&gt;
&lt;h2&gt;LEGITIMIZED!&lt;/h2&gt;
&lt;p&gt;From helping you with development to allowing you to unleash your inner psycho on Facebook, it&amp;#8217;s great to remember that private browsing mode is good for more than just your sultry late night browsing. Although its really good for that too.&lt;/p&gt;</description><link>http://a.shinynew.me/post/17716312879</link><guid>http://a.shinynew.me/post/17716312879</guid><pubDate>Thu, 16 Feb 2012 12:20:00 -0500</pubDate></item><item><title>How to know what items in your project actually belong in...</title><description>&lt;img src="http://24.media.tumblr.com/tumblr_lzc50urd6P1qdr598o1_400.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;h1&gt;How to know what items in your project actually belong in GitHub.&lt;/h1&gt;&lt;/p&gt;</description><link>http://a.shinynew.me/post/17551047261</link><guid>http://a.shinynew.me/post/17551047261</guid><pubDate>Mon, 13 Feb 2012 09:17:18 -0500</pubDate></item><item><title>HTML5 Native Video Streaming With WebRTC</title><description>&lt;p&gt;I did a tounge-in-cheek video response to &lt;a href="http://twitter.com/#!/wesbos" target="_blank"&gt;Web Bos&lt;/a&gt; this week who sumbitted this epic video for &lt;a href="http://fluentconf.com/fluent2012" target="_blank"&gt;FluentConf&lt;/a&gt; showcasing his all around HTML5 video awesomeness.  In this video he streams directly to his browser and applies effects on the fly from the console.  If this doesn&amp;#8217;t impress you, you may be heavily medicated.&lt;/p&gt;
&lt;div class="centered"&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="480" src="http://www.youtube.com/embed/TaUyxQYtR30" width="640"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Uh - yeah.  Like A Boss.  Or rather like a &lt;a href="http://twitter.com/#!/wesbos" target="_blank"&gt;Bos&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now I saw this and had 2 thoughts&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. That&amp;#8217;s awesome. My video now sucks.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. How the heck did he do that?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In the name of education and also to increase my own chances of getting picked up for FluentConf, I made an HTML5 video video of my own.  Video video.&lt;/p&gt;
&lt;div class="centered"&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="480" src="http://www.youtube.com/embed/iCjMSqoPj3c" width="640"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;My video wasn&amp;#8217;t nearly as good, but I really enjoyed working with the new methods for capturing native video with nothing but a browser.  No plugins, just Chrome and JavaScript.&lt;/p&gt;
&lt;h2&gt;WebRTC&lt;/h2&gt;
&lt;p&gt;First lets do a little primer on WebRTC.  This is a project that was open sourced by Google last year in an attempt to enable Real Time Communication within a browser, handled natively by the browser.  Hence the RTC name.&lt;/p&gt;
&lt;p&gt;Apparently, WebRTC has been around for a while and according to the WebRTC site is:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;&amp;#8220;Already integrated with best-of-breed voice and video engines that have been deployed on millions of end points over the last 8+ years.&amp;#8221;&lt;/em&gt;&lt;/strong&gt;&lt;em&gt;. &lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- &lt;/em&gt;&lt;em&gt;&lt;a href="http://www.webrtc.org/faq#TOC-What-is-WebRTC-"&gt;http://www.webrtc.org/faq#TOC-What-is-WebRTC-&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;It appears that now Google is attempting to make this the defacto standard for real time communication in the browser.&lt;/p&gt;
&lt;p&gt;WebRTC provides a layer of abstraction which allows developers to use whichever supported &amp;#8220;signaling&amp;#8221; protocol they wish.  Additionally WebRTC has a broad range of codecs for audio and video as well as networking support for buffering and to prevent against packet loss.&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s a whole site dedicated just to WebRTC and I encourage you too read up on it here. Especially if you are having trouble sleeping.&lt;/p&gt;
&lt;h2&gt;Browser Support&lt;/h2&gt;
&lt;p&gt;WebRTC is currently supported in the dev branch of Chrome along with Canary - which you can think of as the bleeding edge of Chrome.  I use the stable branch of Chrome along with Canary for one main reason.  You can run Canary side-by-side with your existing stable Chrome install without any adverse affects.  They use different profiles.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lyqeretgnw1qcj4eq.png"/&gt;&lt;/p&gt;
&lt;p&gt;Once you have downloaded either the dev or Canary builds, you have to enable WebRTC.  There are two ways to do this.  The documentation says to enable it by launching it with the &amp;#8220;&amp;#8212;enable-media-stream&amp;#8221; switch.  This is to complicated for me, so intead just launch Chrome and go to chrome://flags.  That will take you to a GUI page where you can scroll down an enable WebRTC support.&lt;/p&gt;
&lt;div class="centered"&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lyqfepkGD41qcj4eq.png"/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Who gives you amazing screenshots with unnecessary arrows?  It&amp;#8217;s just what I believe in.&lt;/p&gt;
&lt;h2&gt;Streaming The Video&lt;/h2&gt;
&lt;p&gt;Streaming the video to your browser is dead simple.  First you have to have a webcam for obvious reasons.&lt;/p&gt;
&lt;p&gt;Start with a simple HTML5 video tag in your page.  Remember, if the video tag is not supported by the browser, you will see the text in between the open and close video tags.&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/1719966.js?file=gistfile1.html"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s time to drop down into the JavaScript and fire up the webcam.  &lt;/p&gt;
&lt;p&gt;The method we are going to be looking at is found off the &lt;strong&gt;navigator&lt;/strong&gt; object which comes along for the ride with a supported browser.  The function we will call is &lt;strong&gt;webkitGetUserMedia()&lt;/strong&gt;.  This is incredibly Chrome specific at the moment, but it&amp;#8217;s the bleeding edge of HTML5.&lt;/p&gt;
&lt;p&gt;This method takes in 3 arguments. The first is a string denoting the type of media we are going to get - in this case &amp;#8220;video&amp;#8221;.  The second is the callback for when the stream is acquired and the third is a function that executes if there is an error while getting the stream.&lt;/p&gt;
&lt;p&gt;Note that the error function does not work if WebRTC is not supported.  If the browser doesn&amp;#8217;t support it, it dies silently but you can see it under the covers in your dev tools.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lyqlzofY3L1qcj4eq.png"/&gt;&lt;/p&gt;
&lt;p&gt;Assuming that your browser supports WebRTC and you got the stream, you enter the callback for success.  The success callback is where you need to select the video tag on your page and assign it the stream from the &lt;strong&gt;navigator&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The complete code for a page that displays your beautiful face via the webcam looks like this&amp;#8230;&lt;/p&gt;
&lt;p&gt;
&lt;script src="https://gist.github.com/1720112.js"&gt; &lt;/script&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s pretty darn simple code for what you get. Now the cool thing is that this video is an HTML DOM object that you can manipulate however you want!  In my video, I just shrunk it down to 0 by 0, delayed and then brought it back to size using jQuery animate functions.&lt;/p&gt;
&lt;p&gt;If you are viewing this blog on a supported browser, you should see yourself below.  If you see nothing, it&amp;#8217;s because you aren&amp;#8217;t supported.  I could wrap in a try catch but it&amp;#8217;s late and I&amp;#8217;m lazy.&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="400px" src="http://jsfiddle.net/burkeholland/jUvnH/embedded/result" width="600px"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;In Wes&amp;#8217;s video, he does some really cool stuff by adding effects to the stream.  I would write a blog post on that, but you should come to &lt;a href="http://fluentconf.com/fluent2012" target="_blank"&gt;FluentConf&lt;/a&gt; and check out &lt;a href="http://twitter.com/#!/wesbos" target="_blank"&gt;Wes&amp;#8217;s&lt;/a&gt; session instead.&lt;/p&gt;
&lt;p&gt;A special thanks to &lt;a href="http://wesbos.com" target="_blank"&gt;Wes Bos&lt;/a&gt; for reviewing this post and pointing out that Opera does in fact have support for &lt;strong&gt;getUserMedia&lt;/strong&gt; as well.&lt;/p&gt;</description><link>http://a.shinynew.me/post/16887310071</link><guid>http://a.shinynew.me/post/16887310071</guid><pubDate>Wed, 01 Feb 2012 18:28:00 -0500</pubDate></item><item><title>A CoffeeScript Revealing Module</title><description>&lt;p&gt;This past week I had the pleasure - and it was a pleasure - to visit the fine city of Sandusky, Ohio.  Now up until this point, all I&amp;#8217;ve known about Sandusky is this&amp;#8230;&lt;/p&gt;
&lt;div class="centered"&gt;&lt;img src="http://media.tumblr.com/tumblr_ly024wDjZH1qcj4eq.jpg"/&gt;&lt;/div&gt;
&lt;p&gt;We were at the Kalahari Resort for CodeMash.  This is a fabulous place by the way.  Not only is it a fantastic indoor water park, but they have several restaurants, a wicked awesome candy shop and an arcade that will blow your mind.  And your wallet.&lt;/p&gt;
&lt;p&gt;CodeMash itself was epic.  Unfortunately, being at an indoor water park does not mean you actually get to GO there.  We spent almost all of our time at the conference, and since I was actually helping to proctor the event, I stayed pretty busy and didn&amp;#8217;t get to attend many sessions.&lt;/p&gt;
&lt;p&gt;I did make it to one session though that had a major impact on me.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://userinexperience.com/" target="_blank"&gt;Brandon Satrom&lt;/a&gt; did &amp;#8220;CoffeeScript Is For Closers&amp;#8221;.  Brandon recorded a version prior to CodeMash and you can find the video &lt;a href="http://userinexperience.com/?p=732" target="_blank"&gt;here&lt;/a&gt;.  I highly recommend watching it.  The session is outstanding.  &lt;/p&gt;
&lt;p&gt;I had tried CoffeeScript in the past and found it frustrating.  I found it frustrating for a couple of reasons.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. How exactly do you use it with your project?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I get it.  It&amp;#8217;s a small language that compiles to JavaScript.  It removes curly braces and semicolons.  Great.  Now how do I get it into Visual Studio or my Rails project?  I had tried some third party plugins which I found disappointing because I couldn&amp;#8217;t figure out how to use them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. My favorite patterns aren&amp;#8217;t working anymore&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I tend to develop using the same sort of JavaScript patterns over and over again.  These patterns essentially stopped working with CoffeeScript because I couldn&amp;#8217;t figure out how to structure them.  No matter what I did, I couldn&amp;#8217;t get CoffeeScript to write the JavaScript that I wanted.  So I figured, why not just write the JavaScript myself?&lt;/p&gt;
&lt;h2&gt;#1 SOLVED&lt;/h2&gt;
&lt;p&gt;If you have this problem, watch Brandon&amp;#8217;s &lt;a href="http://userinexperience.com/?p=732" target="_blank"&gt;video&lt;/a&gt; as he will show you what to do.  That&amp;#8217;s not the point of this post.&lt;/p&gt;
&lt;h2&gt;#2 WAT&lt;/h2&gt;
&lt;p&gt;What I learned about CoffeeScript is that it enforces some JavaScript best practices on you.  If you aren&amp;#8217;t prepared for this, it can be just a tad bit confusing.  When I got home, I gave CoffeeScript another try and here is what I learned about how to recreate my favorite pattern in JavaScript, which is the Revealing Module.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Revealing Module&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is my absolute favorite way to structure my applications.  The idea here is that you declare a variable which you set to a function.  That function returns a variable which has methods.  Each of these methods is public.  Any functions not returned on that variable are private.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s take a look at a sample revealing module.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;JavaScript&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="350" src="http://jsfiddle.net/burkeholland/qJPa6/embedded/" width="100%"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;This simple module is a logger.  When it is intialized, I pass in a jQuery object representing the DOM element on the page where I want content to be logged.  The init() and log() functions are public.  The write() function which actually does the work, is not.&lt;/p&gt;
&lt;p&gt;Additionally, I pass in the jQuery library to the main function and set that to $.  It&amp;#8217;s a good idea to not just assume that $ is always jQuery.  But it should be.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;CoffeeScript&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;My first run at this with CoffeeScript was a disaster.  This is what I did&amp;#8230;(CoffeeScript is on the left and JavaScript is on the right)&lt;/p&gt;
&lt;p&gt;&lt;iframe class="2col" frameborder="0" height="325" src="http://jsfiddle.net/burkeholland/qJPa6/2/embedded/"&gt;&lt;/iframe&gt;&lt;iframe class="2col col2" frameborder="0" height="325" src="http://jsfiddle.net/burkeholland/qJPa6/5/embedded/"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;There is so much wrong with this, I just don&amp;#8217;t know where to start.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s start with the fact that when you run this, pub is undefined.  What? I thought in CoffeeScript you just started rocking with variables without having to declare anything.&lt;/p&gt;
&lt;p&gt;Yes, but in this case that you are referencing a variable on a variable that does not exist, you need to first define the variable.  Ok, I can do that&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="325" src="http://jsfiddle.net/burkeholland/qJPa6/3/embedded/"&gt;&lt;/iframe&gt;&lt;iframe frameborder="0" height="325" src="http://jsfiddle.net/burkeholland/qJPa6/6/embedded/"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Now pub is defined, but if you look at the JavaScript that&amp;#8217;s getting generated, the last thing returned is the &lt;strong&gt;Write&lt;/strong&gt; function.  That&amp;#8217;s the ONLY thing I don&amp;#8217;t want returned.  You can see how this gets frustrating.&lt;/p&gt;
&lt;p&gt;To fix this you can just &lt;strong&gt;return pub&lt;/strong&gt; - or if you want, just type the word &lt;strong&gt;pub&lt;/strong&gt;.  CoffeeScript returns the last thing by default.  Fine, &lt;strong&gt;pub&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" height="325" src="http://jsfiddle.net/burkeholland/qJPa6/8/embedded/"&gt;&lt;/iframe&gt;&lt;iframe frameborder="0" height="325" src="http://jsfiddle.net/burkeholland/qJPa6/7/embedded/"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;h2&gt;Best Practices.  Pffffftttt.&lt;/h2&gt;
&lt;p&gt;Now the right thing is being returned out of the function.  But here comes the &amp;#8220;Best Pratices&amp;#8221;.&lt;/p&gt;
&lt;p&gt;Normally, we would reference this &lt;strong&gt;logger&lt;/strong&gt; variable as &lt;strong&gt;logger.init()&lt;/strong&gt; and then &lt;strong&gt;logger.write()&lt;/strong&gt;.  After we have loaded the JavaScript file, it should be available.  But it&amp;#8217;s not.  Why not?&lt;/p&gt;
&lt;p&gt;Notice that CoffeeScript is enclosing this whole variable &lt;strong&gt;logger&lt;/strong&gt; in an anonymous function.  It then executes &lt;strong&gt;call(this)&lt;/strong&gt;.  What this basically does is protect the global namespace, and make sure that &lt;strong&gt;this&lt;/strong&gt; = &lt;strong&gt;this&lt;/strong&gt;. It can be tricky to keep up with exactly what &lt;strong&gt;this &lt;/strong&gt;is equal to in JavaScript because it may be changing with the current scope.  CoffeeScript is ensuring that &lt;strong&gt;this&lt;/strong&gt; is in fact the global &lt;strong&gt;this&lt;/strong&gt; when the function executes.&lt;/p&gt;
&lt;p&gt;This is where I learned an important lesson.  CoffeeScript protects the global namespace at all costs.  It&amp;#8217;s basically saying &amp;#8220;You&amp;#8217;re mom doesn&amp;#8217;t live here.  Don&amp;#8217;t leave your crap lying around&amp;#8221;.  In &amp;#8220;JavaScript, The Good Parts&amp;#8221;, Crockford recommends prefixing variables that are going to go onto the global namespace with something like MYAPP.  I don&amp;#8217;t like that, but the point is that you aren&amp;#8217;t just shoving things that could overwrite each other onto the global scope.  CoffeeScript is protecting the global namespace by wrapping my variable declaration in a closure.  As soon as the function is exited, it&amp;#8217;s no longer available.&lt;/p&gt;
&lt;p&gt;Now that we have talked about why you shouldn&amp;#8217;t put things in the global namespace, let me show you how to put something in the global namespace. &lt;img src="http://media.tumblr.com/tumblr_ly9a2tyjw91qcj4eq.png"/&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s take a page right out of &lt;a href="https://twitter.com/#!/jashkenas" target="_blank"&gt;Jeremey Ashkenas&lt;/a&gt; own playbook.  He wrote CoffeeScript btw.&lt;/p&gt;
&lt;p&gt;Having a look at &lt;a href="http://jashkenas.github.com/coffee-script/documentation/docs/underscore.html" target="_blank"&gt;Underscore.coffee&lt;/a&gt;, you can see that the first thing he does is assign root to this.  Then, he assigns his underscore variable to the root.  This makes the _, and all of it&amp;#8217;s functions available off the global namespace.&lt;/p&gt;
&lt;div class="centered"&gt;&lt;img src="http://media.tumblr.com/tumblr_ly0jn5MJV91qcj4eq.png"/&gt;&lt;/div&gt;
&lt;p&gt;Passing in jQuery becomes different as well.  Since the whole thing is wrapped in an anonymous function, we don&amp;#8217;t need to pass in jQuery like we would with JavaScript.  Instead, we can use the CoffeeScript &lt;strong&gt;do&lt;/strong&gt;, which will create a closure around the &lt;strong&gt;logger &lt;/strong&gt;function, allowing us to pass in jQuery there. &lt;/p&gt;
&lt;p&gt;Here is what the revealing module looks like all finished.&lt;/p&gt;
&lt;p&gt;&lt;iframe class="2col" frameborder="0" height="360" src="http://jsfiddle.net/burkeholland/qJPa6/11/embedded/"&gt;&lt;/iframe&gt;&lt;iframe class="2col col2" frameborder="0" height="360" src="http://jsfiddle.net/burkeholland/qJPa6/12/embedded/"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Now that I know what CoffeeScript is going to do, I&amp;#8217;m much more inclined to use it.  I&amp;#8217;m actually looking forward to using it because it makes code much easier to read.  Go look at &lt;a href="http://jashkenas.github.com/coffee-script/documentation/docs/underscore.html"&gt;underscore.coffee&lt;/a&gt; and see how easy it is to follow.  It&amp;#8217;s brilliant how this works really.  Not only does it compile down to JavaScript, but it teaches you quite a bit about JavaScript in the process.&lt;/p&gt;
&lt;p&gt;A special thanks to &lt;a href="http://bloggemdano.blogspot.com/" target="_blank"&gt;Dan Mohl&lt;/a&gt; who gave me input on this article and contributed to some of the content, including cleaning up the final example.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;EDIT&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is what I love about blogging.  Steve Howell provided us with a super sexy and more terse example in this gist from his &lt;a href="http://a.shinynew.me/post/16063066350/a-coffeescript-revealing-module#comment-418899703" target="_self"&gt;comment below&lt;/a&gt;.  Thanks Steve!&lt;/p&gt;
&lt;script src="https://gist.github.com/1663926.js"&gt; &lt;/script&gt;</description><link>http://a.shinynew.me/post/16063066350</link><guid>http://a.shinynew.me/post/16063066350</guid><pubDate>Wed, 18 Jan 2012 15:21:55 -0500</pubDate></item><item><title>JsFiddle Tips And Tricks</title><description>&lt;p&gt;I did a quick 15 minute presentation on &lt;a href="http://www.jsfiddle.net" target="_blank"&gt;JsFiddle&lt;/a&gt; Tips And Tricks and I was surprised at how many people had not even heard of &lt;a href="http://www.jsfiddle.net" target="_blank"&gt;JsFiddle&lt;/a&gt;.  I think 3 or 4 hands went up in a room of nearly 100. &lt;/p&gt;
&lt;p&gt;Of course, you do have to account for the 75% of people who just don&amp;#8217;t answer questions in a group setting.  That&amp;#8217;s cool.  I&amp;#8217;m that guy sometimes.  Especially if I haven&amp;#8217;t been paying attention to what you are saying. &lt;/p&gt;
&lt;p&gt;So assuming 25% of you haven&amp;#8217;t heard of &lt;a href="http://www.jsfiddle.net" target="_blank"&gt;JsFiddle&lt;/a&gt;, that&amp;#8217;s unacceptable.&lt;/p&gt;
&lt;p&gt;&lt;img align="left" height="196" src="http://media.tumblr.com/tumblr_lx1b1xVjXh1qcj4eq.png" width="275"/&gt;&lt;/p&gt;
&lt;p&gt;JsFiddle is a browser based application created by &lt;a href="http://webdev.zalewa.info/" target="_blank"&gt;Piotr Zalewa&lt;/a&gt; for creating snippets of HTML/CSS and JavaScript that you can version and share with others.  It&amp;#8217;s good for so many things and I use it pretty much every day.  I have a fluid application setup just for JsFiddle.  I also made an icon for it. Which I copied from Google.  Ok, so I didn&amp;#8217;t &amp;#8220;make&amp;#8221; it - I resized it.  Which coincidentally is about the extent of my design skills.  Just right-click that nifty JsFiddle PNG to the left there and save it.  You will get the full PNG with transparency.&lt;/p&gt;
&lt;p&gt;With JsFiddle, you have no need to create scratch or throwaway projects just to build a POC or prototype some idea.  The syntax highlighting and auto-indentation support is really impressive for a web based application.  In fact, the text editing capabilities are what really set it apart.  It&amp;#8217;s got a lot of obvious features, but some of the nicer ones aren&amp;#8217;t as obvious.  &lt;/p&gt;
&lt;br/&gt;&lt;h1&gt;Tips And Tricks&lt;/h1&gt;
&lt;br/&gt;&lt;h2&gt;1. Use JsFiddle With StackOverflow&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.stackoverflow.com" target="_blank"&gt;StackOverflow&lt;/a&gt; is such a great way to get answers and help others out.  It&amp;#8217;s really redefined how we get solutions to our problems with some parameters around the validity of an answer.  One thing that will really scare people away from trying to answer your questions, is you post something with 250 lines of code.  It&amp;#8217;s just too much for the eyes.  However, you can create a simple fiddle in JsFiddle and it&amp;#8217;s much easier for people to not only debug your code, but also give you an answer by forking your code and then providing the link to the fix.&lt;/p&gt;
&lt;p&gt;I hope that StackOverflow will consider direct JsFiddle integration.  It&amp;#8217;s a subject that&amp;#8217;s already been broached on &lt;a href="http://meta.stackoverflow.com/questions/49728/custom-jsfiddle-for-stackoverflow" target="_blank"&gt;meta.stackoverflow.com&lt;/a&gt;&lt;/p&gt;
&lt;br/&gt;&lt;h2&gt;Tip 2 - Create Templates&lt;/h2&gt;
&lt;p&gt;Once you create an account and login to JsFiddle, you can create templates by adding in resources under the &amp;#8220;Manage Resources&amp;#8221; section - like external js/css libraries.  &lt;/p&gt;
&lt;br/&gt;&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lx1c2yQRr91qcj4eq.png"/&gt;&lt;/p&gt;
&lt;br/&gt;&lt;p&gt;Drag the link to the fiddle to your toolbar in your respective browser and when you need to write a new fiddle with those same references, you just click the link, fork the fiddle and go.  I created several templates a &lt;a href="http://a.shinynew.me/post/11609958774/jsfiddle-project-templates" target="_blank"&gt;while back&lt;/a&gt; for some commonly used resources and UI libraries.&lt;/p&gt;
&lt;br/&gt;&lt;p&gt;&lt;img align="middle" src="http://media.tumblr.com/tumblr_lx1bsmD7Tm1qcj4eq.png"/&gt;&lt;/p&gt;
&lt;br/&gt;&lt;h2&gt;Tip 3 - Embedding Fiddles&lt;/h2&gt;
&lt;p&gt;You can embed fiddles from the &amp;#8220;share&amp;#8221; menu on JsFiddle.  You can then share them directly in your posts.  I do that ALL the time both here and on &lt;a href="http://www.kendoui.com/blogs" target="_blank"&gt;kendoui.com/blogs&lt;/a&gt;.  The embedding is pretty simple and clear. &lt;/p&gt;
&lt;p&gt;Hit the &amp;#8220;share&amp;#8221; menu and then select embed and copy the code.  Then just paste the code into your site or blog post.  That&amp;#8217;s pretty simple.&lt;/p&gt;
&lt;br/&gt;&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lx1c4nqpLq1qcj4eq.png"/&gt;&lt;/p&gt;
&lt;br/&gt;&lt;p&gt;Then it will look something like this in your page.&lt;/p&gt;
&lt;br/&gt;&lt;p&gt;&lt;iframe frameborder="0" width="100%" height="400px;" src="http://jsfiddle.net/burkeholland/JwDZN/embedded/"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;br/&gt;&lt;p&gt;Once you have it in the page, you can adjust the tabs that the user sees by adding certain variables after the &amp;#8220;embedded/&amp;#8221;.  You can add &amp;#8220;result&amp;#8221;, &amp;#8220;js&amp;#8221;, &amp;#8220;html and &amp;#8220;css&amp;#8221;.  Each of these is delimited by a comma.  For instance&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8230;/burkeholland/JwDZN/embedded/result,js&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;would show only the results and js tabs in that order.&lt;/p&gt;
&lt;p&gt;&lt;iframe frameborder="0" width="100%" height="400px" src="http://jsfiddle.net/burkeholland/JwDZN/embedded/result,js"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;h2&gt;Tip 4 - Clear The Clutter&lt;/h2&gt;
&lt;p&gt;Sometimes the clutter of the JsFiddle windows interferes with debugging because you have to take the whole UI in the browser tools.  You can get rid of all that by appending /show on the end of your fiddle.  This will show you just the result and make debugging and inspecting elements a whole lot simpler.&lt;/p&gt;
&lt;h3&gt;Edit&lt;/h3&gt;
&lt;p&gt;Piotr has pointed out in the comments below that the &amp;#8220;show&amp;#8221; is not a good idea as it&amp;#8217;s vulnerable to cookie stealing.  Instead, he recommends using the &amp;#8220;draft&amp;#8221; feature.  The only drawback to this is that you have to be a registered user.  This is something you should do anyway.  Once you have done this, you can clear away the jsfiddle interface by running &lt;b&gt;jsfiddle.net/draft&lt;/b&gt; which will show the last executed fiddle without the jsfiddle interface.&lt;/p&gt;
&lt;h2&gt;Tip 5 - Mock Your Ajax&lt;/h2&gt;
&lt;p&gt;JsFiddle actually contains built-in functionality for mocking ajax requests.  This is good because developing in JsFiddle means you probably can&amp;#8217;t get at your data.  Even if you could, it&amp;#8217;s going to be cross domain.  You can solve that by doing some ajax mocking.  While JsFiddle does contain it&amp;#8217;s on mocking tools, you have to post the data that you want back.  A better option for me has turned out to be using &lt;a href="https://github.com/appendto/jquery-mockjax" target="_blank"&gt;MockJax&lt;/a&gt; from &lt;a href="http://www.appendto.com/" target="_blank"&gt;AppendTo&lt;/a&gt; in your fiddles for Ajax Mocking.  Here is a sample fiddle where I am mocking some Ajax.  Here is also a &lt;a href="http://enterprisejquery.com/2010/07/mock-your-ajax-requests-with-mockjax-for-rapid-development/" target="_blank"&gt;great article&lt;/a&gt; from AppendTo on how to use this library.&lt;/p&gt;
&lt;br/&gt;&lt;p&gt;&lt;iframe frameborder="0" width="100%" height="700px" src="http://jsfiddle.net/burkeholland/gLgKy/embedded/js,result"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;br/&gt;&lt;h2&gt;Tip 6 - Use DropBox For A Personal CDN&lt;/h2&gt;
&lt;p&gt;If you have a massive JavaScript library that you wrote and want to include, instead of pasting everything in the JavaScript pane, just create a public link in &lt;a href="http://www.dropbox.com" target="_blank"&gt;DropBox&lt;/a&gt; and reference the URL in the &amp;#8220;Managed Resources&amp;#8221; pane.  You can use your DropBox as a CDN by sticking stuff in the public folder.  I have a folder in mine called CDN where I stick all of the large libraries that I need to reference from JsFiddle.  These would be libraries that aren&amp;#8217;t already hosted by an official CDN.&lt;/p&gt;
&lt;p&gt;Check out &lt;a href="http://www.cdnjs.com/"&gt;cdnjs&lt;/a&gt; for a complete list of hosted JS libraries.  Chances are that if you need it, they have it.&lt;/p&gt;
&lt;br/&gt;&lt;h3&gt;JsFiddle Can Be Frustrating&lt;/h3&gt;
&lt;p&gt;JsFiddle is great, but does come with some frustration as it gets laggy during peak times because EVERYONE is using it.  It&amp;#8217;s that good.  And it&amp;#8217;s free.  You will find times when it takes so long to render that you are better off just using a scrap application.  I realize though that this is one person&amp;#8217;s project and speed means more servers and more servers means more cash.  I just appreciate it for what it is and I use it as much as I can when it&amp;#8217;s not under heavy load.&lt;/p&gt;
&lt;br/&gt;&lt;h3&gt;Highly Recommended&lt;/h3&gt;
&lt;p&gt;JsFiddle is a fantastic tool for quick and rapid prototyping, sharing, and troubleshooting.  I use it frequently and find myself only newing up projects on my local box when I&amp;#8217;m actually working on a real project, not the random code question in an email.&lt;/p&gt;</description><link>http://a.shinynew.me/post/15183119139</link><guid>http://a.shinynew.me/post/15183119139</guid><pubDate>Mon, 02 Jan 2012 09:45:00 -0500</pubDate></item><item><title>HTML5 Boilerplate In Visual Studio 2010</title><description>&lt;p&gt;All this talk of HTML5 and where to begin? It&amp;#8217;s such a loosely defined and weird world we live in these days. Since we can&amp;#8217;t wait until 2020 to get moving, where do you start? Is there anything out there that just bundles the &amp;#8220;fundamentals&amp;#8221; of HTML5 up for you in a nice complete package. Something like a template.&lt;/p&gt;
&lt;p&gt;Or maybe&amp;#8230;.A &lt;strong&gt;BOILERPLATE&lt;/strong&gt;!?!&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-OADFf50VHg4/TufarxLu4fI/AAAAAAAABFs/SGxmYkvCK_0/s1600-h/scared_cat-300x2813.jpg"&gt;&lt;img alt="scared_cat-300x281" border="0" height="225" src="http://lh6.ggpht.com/-QlWZUcyXFOU/TufasT1d0uI/AAAAAAAABF0/WMcReZJkPi4/scared_cat-300x281_thumb1.jpg?imgmax=800" title="scared_cat-300x281" width="240"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Well yes in fact there is.&lt;/p&gt;
&lt;p&gt;You have probably already heard about &lt;a href="http://html5boilerplate.com/" target="_blank"&gt;HTML5 Boilerplate&lt;/a&gt;.  It&amp;#8217;s got all the goodies you need to start your HTML5 development included in a &amp;#8220;template&amp;#8221; of sorts. The problem is, it&amp;#8217;s not specifically targeted at Visual Studio users and thusly kind of a bear to implement. It comes with all sorts of Ant Build and other confusing things that just don&amp;#8217;t make a whole lot of sense to ASP.NET developers.&lt;/p&gt;
&lt;p&gt;When I was headed up to TechDays Vancouver, I wanted to do a session on using the boilerplate and I thought I would create a project template. But somebody beat me to it! Which is great because they probably did a better job that I would ever do. So let me present you with &lt;a href="http://visualstudiogallery.msdn.microsoft.com/2b462e2e-5215-4d07-a4de-4c31c432c12b" target="_blank"&gt;Mother Effin HTML Site&lt;/a&gt; created by &lt;a href="http://jacob4u2.blogspot.com/" target="_blank"&gt;Jacob Gable&lt;/a&gt;. I don&amp;#8217;t know much about Jacob except that his handle on ASP.NET Is jacob4u2. I&amp;#8217;m guessing he&amp;#8217;s a U2 fan, so Jacob - this one&amp;#8217;s for you.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-2v95dSRhWJA/Tufas3O8a_I/AAAAAAAABF8/Hd7Wb3hLucA/s1600-h/35_2903.jpg"&gt;&lt;img alt="35_290" border="0" height="240" src="http://lh3.ggpht.com/-cqgz4A5DxrE/TufatCIXkfI/AAAAAAAABGE/kOT-P9Xrbyw/35_290_thumb1.jpg?imgmax=800" title="35_290" width="233"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a Visual Studio 2010 project template, so all of you 2008 / 2005 (God forbid 2003?) people are out of luck.  Also, it&amp;#8217;s MVC.  Webforms is just as good for HTML5 as MVC, it just happens that this is an MVC project template.&lt;/p&gt;
&lt;p&gt;My recommendation on this is for you to first &lt;a href="http://www.youtube.com/watch?v=qyM37XKkmKQ" target="_blank"&gt;watch Paul do his thing on Boilerplate for the San Francisco UG&lt;/a&gt;.  He&amp;#8217;s going to explain what pretty much everything in the index and CSS is for.  It&amp;#8217;s a really good lecture and explains a ton.&lt;/p&gt;
&lt;p&gt;I am going to run down through this project structure and the _layouts (master page for you webforms people out there), but it’s really just a rehash of what Paul has already said in the video above.  You didn’t watch it!?!?&lt;/p&gt;
&lt;p&gt;So when loaded, the solution explorer will look like this…&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-mHsvMMUgt8A/TufatQvxAdI/AAAAAAAABGM/bfiUK2N6euI/s1600-h/b15.png"&gt;&lt;img alt="b1" border="0" height="609" src="http://lh4.ggpht.com/-Y0cfJ9YjzFc/TufatzQhJAI/AAAAAAAABGU/eRKIroQmWcI/b1_thumb3.png?imgmax=800" title="b1" width="365"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let’s step through this thing and explain what each of these folders are.  Some need no explanation because you would expect you might see them (App_Data), and others are going to be completely foreign.&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;App Data &lt;/li&gt;
&lt;li&gt;Controllers       
&lt;ul&gt;&lt;li&gt;Just your standard MVC Controller folder&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;css       
&lt;ul&gt;&lt;li&gt;3 guesses as to what goes here and the first 2 don’t count.  A quick explanation of what’s inside this folder.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-43urAIKxhqw/Tufaud-nzbI/AAAAAAAABGc/xN93Kzs--Aw/s1600-h/b27.png"&gt;&lt;img alt="b2" border="0" height="68" src="http://lh6.ggpht.com/-G6jR1jkbFIs/TufauhB0MJI/AAAAAAAABGk/57ot2KQApC0/b2_thumb5.png?imgmax=800" title="b2" width="138"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;media.css - contains boilerplate css for mobile responsive design, as well as clearfixes and visually / hidden element styles.  Some things you want visually hidden but still accessible for SEO.  Others you want completely invisible to everyone. &lt;/li&gt;
&lt;li&gt;normalize.css – contains all of the style fixes for cross-browser wierdness like legends and other HTML elements that render just slightly differently depending on your browser. &lt;/li&gt;
&lt;li&gt;site.css – this is the standard MVC style sheet that you get out of the box with a standard project.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;demo – deleted in the current version of boilerplate so I just delete it too. &lt;/li&gt;
&lt;li&gt;img – fer yer images &lt;/li&gt;
&lt;li&gt;js       
&lt;ul&gt;&lt;li&gt;My favorite folder in all of the boilerplate.  It’s got some subfolders so let’s have a look&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-WCb9Zim2fDc/Tufau91noDI/AAAAAAAABGs/W-AHb1Ziaks/s1600-h/b33.png"&gt;&lt;img alt="b3" border="0" height="96" src="http://lh3.ggpht.com/-GrLraIOgzMM/TufavSFO21I/AAAAAAAABG0/DEmGBSWd8Gw/b3_thumb1.png?imgmax=800" title="b3" width="207"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;libs    
&lt;ul&gt;&lt;li&gt;This is where you might put things like jQuery.  Or &lt;a href="http://www.kendoui.com/" target="_blank"&gt;Kendo&lt;/a&gt;?&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;mylibs    
&lt;ul&gt;&lt;li&gt;Where you would put your custom built common libraries&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;plugins    
&lt;ul&gt;&lt;li&gt;Any jQuery plugins you may have&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;script    
&lt;ul&gt;&lt;li&gt;The bootstrap script for your application&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Lib       
&lt;ul&gt;&lt;li&gt;This is the home of &lt;a href="http://www.codethinked.com/squishit-the-friendly-aspnet-javascript-and-css-squisher" target="_blank"&gt;SquishIt&lt;/a&gt;.  This is the CSS linking/minifying magic for ASP.NET MVC from &lt;a href="http://www.codethinked.com/" target="_blank"&gt;Justin Etheredge&lt;/a&gt;.  Here is a good read on &lt;a href="http://www.codethinked.com/squishit-the-friendly-aspnet-javascript-and-css-squisher" target="_blank"&gt;SquishIt&lt;/a&gt;, but I’ll go over how to use it quickly anyway later.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Models       
&lt;ul&gt;&lt;li&gt;Standard MVC Models folder.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Test       
&lt;ul&gt;&lt;li&gt;Another folder that appears to have been removed in the current version of boilerplate, but why?  It has your qUnit tests for testing your JavaScript.  &lt;a href="http://jcreamerlive.com/" target="_blank"&gt;Jonathan Creamer&lt;/a&gt; has a &lt;a href="http://freshbrewedcode.com/jonathancreamer/2011/12/08/qunit-layout-for-javascript-testing-in-asp-net-mvc3/" target="_blank"&gt;pretty good article here&lt;/a&gt; on setting that up with MVC.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Views       
&lt;ul&gt;&lt;li&gt;MVC Views folder&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Alright – moving on.&lt;/p&gt;
&lt;p&gt;Lets pop open the _layouts.cshtml folder under Views/Shared and have a look.&lt;/p&gt;
&lt;p&gt;The first thing you will see is some conditional IE hacks. &lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-b4SHNDw4ctI/Tufavhm6XJI/AAAAAAAABG8/SMr9PSbA6sk/s1600-h/b44.png"&gt;&lt;img alt="b4" border="0" height="95" src="http://lh3.ggpht.com/-thzlp_6mFis/TufawCgPp-I/AAAAAAAABHE/kexrF4tWiEA/b4_thumb2.png?imgmax=800" title="b4" width="570"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This looks like a mess, but it’s pretty simple. All this is doing is applying a style of ie6, 7 or 8 to your html element.  Oh – and it defaults it to no-js.  What in the world.&lt;/p&gt;
&lt;p&gt;The idea here is that you can default something to no-js and if js isn’t running in the browser, you can handle that appropriately through CSS.  You can also handle if it’s IE 6, 7 or 8 in your CSS in the same way.  For instance, you might do this…&lt;/p&gt;
&lt;pre class="csharpcode"&gt;.ie6 {&lt;br/&gt;      display: none;&lt;br/&gt;}&lt;/pre&gt;
&lt;!-- .csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt; font-size: small;&lt;br /&gt; color: black;&lt;br /&gt; font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt; background-color: #ffffff;&lt;br /&gt; /*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt; background-color: #f4f4f4;&lt;br /&gt; width: 100%;&lt;br /&gt; margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;br /&gt; --&gt;
&lt;p&gt;I’m &lt;strong&gt;TOTALLY&lt;/strong&gt; kidding.  &lt;/p&gt;
&lt;p&gt;Next you will see some meta tags…&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-bhfHaDRAZJ0/TufawpSqkJI/AAAAAAAABHM/vErQF85txYA/s1600-h/b511.png"&gt;&lt;img alt="b5" border="0" height="194" src="http://lh3.ggpht.com/-pJ3hhF7Tctk/Tufawy9s-DI/AAAAAAAABHU/B-oPFTZKRuE/b5_thumb7.png?imgmax=800" title="b5" width="548"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Oh golly, meta tags.  The first one is something that IE wants.  It has something to do with cross site scripting in utf-7 and the validator will complain if you don’t have it in the first 54 bytes of the file.  &lt;a href="http://www.youtube.com/watch?v=qyM37XKkmKQ" target="_blank"&gt;Listen to Paul explain it&lt;/a&gt; because he does a much better job than me.  Just leave it alone and forget about it.  IE needs it.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;On a side note, I&amp;#8217;ve always wondered if this is related to the issue Rob Connery was experiencing &lt;a href="http://wekeroad.com/2011/10/24/a-fun-little-json-murder-mystery-with-ie9/" target="_blank"&gt;here&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The next one is pretty cool because it does 2 things.  First it tells IE to use the 8 or 9 rendering engine if it is in fact IE 8 or 9.  That’s to stop that whole compatibility mode nonsense that falls back to the IE 7 rendering engine and effectively breaks everything.  By the way, compatibility mode is the default for apps in the intranet zone.  This overrides that.&lt;/p&gt;
&lt;p&gt;The second says “If you have Chrome Frame installed, use it”.  That’s the chrome=1.  It won’t prompt the user for an install, but does use the frame if it’s there.  A nice to have.&lt;/p&gt;
&lt;p&gt;Adding a description and author to your site is just good SEO.&lt;/p&gt;
&lt;p&gt;The viewport business tells it to scale the app to the mobile device viewport.  That’s all.&lt;/p&gt;
&lt;p&gt;Alright, cross off the meta, and moving on.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-R3SdenY-FX4/TufaxZOXNXI/AAAAAAAABHc/8qDoF8IVN7s/s1600-h/b65.png"&gt;&lt;img alt="b6" border="0" height="120" src="http://lh5.ggpht.com/-uK-5y7kEG7Q/TufaxofrX5I/AAAAAAAABHk/vGN6h8uKI3g/b6_thumb3.png?imgmax=800" title="b6" width="715"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now this is some really cool stuff.  This is SquishIt that we talked about earlier.  It’s &lt;a href="http://www.codethinked.com/" target="_blank"&gt;Justin Etheredge&lt;/a&gt; and it works great.  Simple specify what CSS files you want to include here.  As long as you have debug = true set in the web.config, you will get all the files separate.  As soon as you set debug = false in the web.config, it’s going to combine and minify your CSS and give it a random name.  I love SquishIt.  Well done Justin.  You will see SquishIt again down at the bottom.&lt;/p&gt;
&lt;p&gt;Next is a Razor tag that includes custom head content on the fly if you have a partial or something else you want thrown in the header. This is MVC specific, not boilerplate.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-9-7QOyruB2s/TufayOwY_uI/AAAAAAAABHs/8qnQ1DUGqqU/s1600-h/b75.png"&gt;&lt;img alt="b7" border="0" height="51" src="http://lh4.ggpht.com/-A_z5oNXMtpU/TufayjQmEDI/AAAAAAAABH0/YxeQ5HiXs3c/b7_thumb3.png?imgmax=800" title="b7" width="331"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This next section is pretty much explained by the comments:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-4h2aY-m848Y/Tufay887q9I/AAAAAAAABH8/A2dxUH2GqLo/s1600-h/b85.png"&gt;&lt;img alt="b8" border="0" height="108" src="http://lh3.ggpht.com/-jexer66NNzQ/TufazeTGnEI/AAAAAAAABIE/li6Aj-7gIXo/b8_thumb3.png?imgmax=800" title="b8" width="702"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;These are two JavaScript libraries that we need ASAP, hence they are in the header.  &lt;a href="http://www.modernizr.com/" target="_blank"&gt;Modernizr&lt;/a&gt; is feature detection for your browser and when you run your application, your html tag will look something like this…&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh6.ggpht.com/-K-3wA7WTW18/TufazklgwYI/AAAAAAAABIM/wQnZYRXiMGM/s1600-h/b94.png"&gt;&lt;img alt="b9" border="0" height="68" src="http://lh5.ggpht.com/-Lmmk4JNb2L8/Tufa0NrpS7I/AAAAAAAABIU/qywr91DjUig/b9_thumb2.png?imgmax=800" title="b9" width="685"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;…and that frankly is pretty daunting the first time you see it.  It’s just adding classes to your html showing you what features you support so you can respond appropriately in your CSS.  Notice that no-js was replaced by js?  We have to default to no-js because if JavaScript is turned off, Modernizr can’t run.&lt;/p&gt;
&lt;p&gt;That screenshot is from Chrome.  If you have IE 6, 7 or 8 it will look similar but with a “no-” in front of pretty much everything.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-glzqt_TD8Fk/Tufa08G87hI/AAAAAAAABIc/DXT4MT3oM0c/s1600-h/IE-Eats-Paste5.jpg"&gt;&lt;img alt="IE Eats Paste" border="0" height="239" src="http://lh5.ggpht.com/-v708oL6HZ2I/Tufa1A9xxLI/AAAAAAAABIk/VPgO8NSrWxM/IE-Eats-Paste_thumb2.jpg?imgmax=800" title="IE Eats Paste" width="333"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And now the body…&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-x81h_osBZF4/Tufa1XIfuEI/AAAAAAAABIs/ZLAAAs1Nf3g/s1600-h/b104.png"&gt;&lt;img alt="b10" border="0" height="349" src="http://lh3.ggpht.com/-XNtegIFaCao/Tufa1_foDQI/AAAAAAAABI0/ft9YP5SPurg/b10_thumb2.png?imgmax=800" title="b10" width="558"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Nothing fancy here.  Just a standard MVC layout with a logindisplay that you will probably delete straight away.  The @RenderBody renders the views into the contents of the main div.&lt;/p&gt;
&lt;p&gt;Notice the semantic HTML5 tags?  Header?  Footer?  &amp;lt;Cartman&amp;gt;Sweeeeet&amp;lt;/Cartman&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-QIDoRt4Bj2E/Tufa2KmHhWI/AAAAAAAABI8/TxjAR5Z0U1U/s1600-h/b115.png"&gt;&lt;img alt="b11" border="0" height="36" src="http://lh5.ggpht.com/-5x_tCwCnwx0/Tufa2wcaB3I/AAAAAAAABJI/4UcMvdq1vNk/b11_thumb3.png?imgmax=800" title="b11" width="788"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There is some super interesting stuff happening in these jQuery include tags.  The first of which is a &lt;a href="http://paulirish.com/2010/the-protocol-relative-url/" target="_blank"&gt;protocol relative URL&lt;/a&gt;.  It’s basically saying that if the site is running on http, use that to fetch from the CDN.  If it’s running on https, then use an https prefix. &lt;/p&gt;
&lt;p&gt;The other thing here is that second script tag which basically does a test to see whether jQuery exists.  It’s a fallback in case the CDN is down.  CDN’s don’t go down I’m pretty sure.  I personally don’t think this is necessary, but people much smarter than me do.  If jQuery wasn’t loaded from the CDN, it writes a script include to a local copy.   A neat idea, but I just don’t think it’s practical.&lt;/p&gt;
&lt;p&gt;ANYWHO.&lt;/p&gt;
&lt;p&gt;Some more SquishIt for your JavaScript and a render section in case you want to render in some scripts on the fly with a partial view.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-MYw0wQ_GOHo/Tufa3UeC8sI/AAAAAAAABJQ/HURAqR7HfMk/s1600-h/b125.png"&gt;&lt;img alt="b12" border="0" height="145" src="http://lh5.ggpht.com/-lnpPo6fX1d8/Tufa37yGBRI/AAAAAAAABJY/prKZlt5YTI4/b12_thumb3.png?imgmax=800" title="b12" width="543"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the grand finally – a Google Analytics script block for you to uncomment and stick your own UA ID in.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-c-fe-aUnoOI/Tufa4TxEoNI/AAAAAAAABJg/G2HzgPvDXOc/s1600-h/b134.png"&gt;&lt;img alt="b13" border="0" height="140" src="http://lh6.ggpht.com/-72pBkad3Jzk/Tufa4-RD1aI/AAAAAAAABJo/NyGlh93xtbQ/b13_thumb2.png?imgmax=800" title="b13" width="634"/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Whew – we made it through the master page!  Only a few more things of note…&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;There is a humans.txt file which is similar to a robots.txt file except it’s for humans.  Put your personal information in there so people can find it and read it.  It’s for fun. &lt;/li&gt;
&lt;li&gt;There are a bunch of icons.  These are favicons and other icons like the one that will show up if you bookmark the page on iOS. &lt;/li&gt;
&lt;li&gt;There is a 404 page with a bunch of styles and hacks in it.  A good jumping off point for a decent 404.  Please have a decent 404.  The standard IIS error message is not going to do. &lt;/li&gt;
&lt;li&gt;You may notice if you haven’t already that when you drag and select text, the highlighting is hot pink.  That’s how you know its HTML5 Boilerplate.  Anytime you see that custom text highlighting, it’s most likely boilerplate.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;So that’s the HTML5 Boilerplate in Visual Studio.  It’s a bit out of date and a bit ported.  Well, a whole lot ported but still a great place to start your HTML5 development if you are using Visual Studio and MVC.&lt;/p&gt;
&lt;p&gt;If you want to see the application we built at the session in Vancouver, you can see that &lt;a href="http://instaclose.apphb.com" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><link>http://a.shinynew.me/post/14215757504</link><guid>http://a.shinynew.me/post/14215757504</guid><pubDate>Fri, 16 Dec 2011 14:40:09 -0500</pubDate></item><item><title>HTML5 Resources Revised For TechDays</title><description>&lt;p&gt;Wow!  What an amazing trip I had this past week to Vancouver.  I learned about &lt;a href="http://en.wikipedia.org/wiki/Poutine" target="_blank"&gt;Poutine&lt;/a&gt;, &lt;a href="http://www.japadog.com/" target="_blank"&gt;Japadogs&lt;/a&gt; and the shared disdain for Nickelback that we all have.  I really enjoyed the beautiful city of Vancouver and all the really nice people that I met there.&lt;/p&gt;
&lt;p&gt;I had the privalege - and it really was a &amp;#8220;privilege&amp;#8221; to attend the &lt;a href="http://www.webnotwar.ca/" target="_blank"&gt;Make Web Not War&lt;/a&gt; event that Microsoft puts on.  If you aren&amp;#8217;t familiar with Web Not War, it&amp;#8217;s a meetup that Microsoft puts together where all web technology is dicussed, regardless of what technology you are using.  Everyone just gets together and talks about the cool stuff they are doing on the web.  I love to see Microsoft supporting the web community at large.  It was great to be a part of something where we were not .NET or PHP developers, but simply web developers.  It honestly felt like we were one big team.  A great sense of comradery.  If you missed &lt;a href="http://www.webnotwar.ca/" target="_blank"&gt;Web Not War&lt;/a&gt;, I highly recommend you make it your priority to attend the next event.&lt;/p&gt;
&lt;p&gt;As promised, here is a revised list of HTML5 resources as well as the sample project we built in the second session and the deck from the first session.&lt;/p&gt;
&lt;p&gt;Who has two thumbs and hooks up Canadians with sweet HTML5 resources?  This guy!&lt;/p&gt;
&lt;p&gt;&lt;img align="middle" src="http://media.tumblr.com/tumblr_luv230gU1U1qcj4eq.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;Here we go&amp;#8230;.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://dl.dropbox.com/u/19593893/HTML5_Techniques_you_can_use_today.pptx" target="_blank"&gt;Deck From TechDays Is Here&lt;/a&gt;.  The deck from the second session isn&amp;#8217;t posted because, well, there really wasn&amp;#8217;t one.  It was all demo baby.&lt;/p&gt;&lt;br/&gt;&lt;h3&gt;Learning Resources&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.html5rocks.com/en/" target="_blank"&gt;HTML5Rocks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://html5doctor.com/" target="_blank"&gt;HTML5 Doctor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://bit.ly/o1CIDE%20" target="_blank"&gt;HTML5 Cheat Sheet&lt;/a&gt;&amp;#160;: A PDF cheat sheet of what&amp;#8217;s new in HTML5&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;&lt;h3&gt;Tools&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://kendoui.com"&gt;Kendo UI&lt;/a&gt;&amp;#160;: A complete UI framework for HTML5 development including all your mobile needs. It&amp;#8217;s the reason I do what I do.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.modernizr.com/" target="_blank"&gt;Modernizr&lt;/a&gt;&amp;#160;: The JavaScript library which tells you what features are available in the user&amp;#8217;s browser.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills" target="_blank"&gt;Polyfills&lt;/a&gt; &amp;#160;: A comprehensive list of Polyfills.  Forgot what a &lt;a href="http://remysharp.com/2010/10/08/what-is-a-polyfill/" target="_blank"&gt;polyfill&lt;/a&gt; is?&lt;/li&gt;
&lt;li&gt;&lt;a href="http://css3generator.com/" target="_blank"&gt;CSS3 Generator&lt;/a&gt;&amp;#160;: A tools to create your style rules and even creates those browser prefixed ones for you!  Work smarter, not harder.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://html5boilerplate.com/" target="_blank"&gt;HTML5 Boilerplate&lt;/a&gt;&amp;#160;: Your starting point for a new HTML5 application.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://visualstudiogallery.msdn.microsoft.com/2b462e2e-5215-4d07-a4de-4c31c432c12b" target="_blank"&gt;MotherEffin HTML5 Site&lt;/a&gt;&amp;#160;: HTML5 Boilerplate in a Visual Studio 2010 MVC 3 Project template.  Pure goodness.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://mothereffinghsl.com" target="_blank"&gt;Mothereffing HSL&lt;/a&gt;&amp;#160;: Generates your HSL color style rule for you.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://mothereffingtextshadow.com/" target="_blank"&gt;Mother Effing Text-Shadow&lt;/a&gt;&amp;#160;:  Generates that super long style rule for CSS3 text shadows.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.adobe.com/kuler" target="_blank"&gt;Adobe Kuler&lt;/a&gt;&amp;#160;: Generates a complete color scheme for your site. Create a new one, or pick an existing one.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://camendesign.com/code/video_for_everybody" target="_blank"&gt;HTML5 Video For Everyone&lt;/a&gt;&amp;#160;: This generates the HTML and embedded SWF object for your video.  This is a complete polyfill for falling back to browsers without video support.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://caniuse.com" target="_blank"&gt;Can I Use&lt;/a&gt;&amp;#160;: Will tell you what the browser you are currently using is capable of.&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;&lt;h3&gt;Demo&amp;#8217;s&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.chromeexperiments.com/webgl" target="_blank"&gt;Chrome Experiments WebGL&lt;/a&gt;&amp;#160;: So rad. Nothing else you can say here.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://ie.microsoft.com/testdrive/" target="_blank"&gt;IE Test Drive&lt;/a&gt;&amp;#160;: Some cool demo&amp;#8217;s of what&amp;#8217;s possible in IE.  Make sure you do the Paintball demo and check it across browsers.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://visualize.yahoo.com" target="_blank"&gt;Visualizing Yahoo Mail&lt;/a&gt;&amp;#160;: A fantastic example of SVG animations.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.tripwiremagazine.com/2010/07/30-very-useful-html5-tutorials-techniques-and-examples-for-web-developers.html" target="_blank"&gt;Trip Wire Magazine&lt;/a&gt;&amp;#160;: This is a buffet of HTML5 demo&amp;#8217;s, tutorials, tools, generators - you name it.  Holy crap this is good.&lt;/li&gt;
&lt;/ul&gt;&lt;br/&gt;&lt;h3&gt;App Harbor&lt;/h3&gt;
&lt;p&gt;Dead simple and free Azure hosting for your .NET web applications from &lt;a href="http://a.shinynew.me/post/12970511977/html5-resources-revised-for-techdays" target="_blank"&gt;App Harbor&lt;/a&gt;&lt;a&gt;&lt;/a&gt;.  These guys put the &amp;#8220;cious&amp;#8221; in delicious.  No more excuses.  Write that killer app and deploy with no cost to you.  That&amp;#8217;s how it should be.&lt;/p&gt;&lt;br/&gt;&lt;h3&gt;Our HTML5 MVC Project&lt;/h3&gt;
&lt;p&gt;We built a pretty rockin &lt;a href="http://instaclose.apphb.com" target="_blank"&gt;demo application&lt;/a&gt; using Geolocation and some nifty CSS3 concepts.  You can &lt;a href="http://dl.dropbox.com/u/19593893/InstaClose.zip" target="_blank"&gt;download that entire project here&lt;/a&gt;.  Remember that it&amp;#8217;s built on the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/2b462e2e-5215-4d07-a4de-4c31c432c12b" target="_blank"&gt;MotherEffin HTML5 Site&lt;/a&gt;, so you may need to install the .vsix first.&lt;/p&gt;&lt;br/&gt;&lt;h3&gt;Get Started!&lt;/h3&gt;
&lt;p&gt;What are you waiting for!?!  Seriously, stop reading this and start building some HTML5 awesomeness.  It&amp;#8217;s super easy and getting easier.  I enjoyed meeting all of you and look forward to hearing about what you are doing with HTML5.&lt;/p&gt;
&lt;p&gt;Please feel free to &lt;a href="http://twitter.com/burkeholland" target="_blank"&gt;follow me on Twitter&lt;/a&gt;, or &lt;a href="mailto://burke.holland@telerik.com" target="_blank"&gt;email me directly&lt;/a&gt;.&lt;/p&gt;</description><link>http://a.shinynew.me/post/12970511977</link><guid>http://a.shinynew.me/post/12970511977</guid><pubDate>Fri, 18 Nov 2011 11:23:00 -0500</pubDate></item><item><title>HTML5 Resources</title><description>&lt;p&gt;Thanks to everyone who came out last night the &lt;a href="http://www.nashdotnet.org/"&gt;Nashville .NET User Group&lt;/a&gt; meeting to hear my talk on &amp;#8220;HTML5 And CSS3 Techniques You Can Use Today&amp;#8221;.  We had difficulty with the internet a bit, so I wasn&amp;#8217;t able to show all the delicious demo&amp;#8217;s I had.  But fear not, as I said your mind will be blown and your world transformed when you view the goodness that is HTML5.  Here is a comprehensive list of resources that should help you continue your HTML5 exploration.  Please feel free to contact me if you have questions or suggestions on these resources.  Maybe something you have found that should be included in this list?&lt;/p&gt;
&lt;p&gt;First off, all of the demo&amp;#8217;s we did can be found here.  If you want to see the source, just use the developer tools or do a right-click/ view source.  This is all HTML, JavaScript and CSS.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://www.htmlui.com"&gt;htmlui.com &lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;HTML5 Learning Sites&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;a target="_blank" href="http://html5rocks.com"&gt; HTML5Rocks.com &lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;a target="_blank" href="http://html5doctor.com"&gt;html5doctor.com &lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;Mondernizr - feature detection for HTML5&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;a target="_blank" href="http://modernizr.com"&gt;modernizr.com&lt;/a&gt; A comprehensive list of pollyfills can be found here as well (Thanks for the tip Elijah Manor).&lt;/p&gt;

&lt;p&gt;HTML5 Boilerplate is a base project for getting you a fully cross browser site that contains all you need to start building your HTML5 app.  This is essential for going down the HTML5 road and will ease your legacy IE pains quite a bit.&lt;/p&gt;

&lt;p&gt;&lt;a target="_blank" href="http://html5boilerplate.com"&gt; htmlt5boilerplate.com &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HSL is one of the new color declaration schemes we talked about.  It&amp;#8217;s super easy to do in your head and here is a site that will do it for you.&lt;/p&gt;

&lt;p&gt;&lt;a target="_blank" href="http://mothereffinghsl.com"&gt; mothereffinghsl.com &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also be sure to check out Adobe Kuler which will generate your website color scheme for you.  It&amp;#8217;s a great way to make sure your site is consistent and beautiful.&lt;/p&gt;

&lt;p&gt;&lt;a target="_blank" href="http://www.adobe.com/kuler"&gt; &lt;a href="http://www.adobe.com/kuler"&gt;www.adobe.com/kuler&lt;/a&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;HTML5 Video For Everyone will generate a code block for you that will use either HTML5 video or fall back to a plugin for a legacy browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://camendesign.com/code/video_for_everybody"&gt;&lt;a href="http://camendesign.com/code/video_for_everybody"&gt;http://camendesign.com/code/video_for_everybody&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Speaking Microsoft And IE  Check out what Microsoft is doing with their HTML5 labs.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://html5labs.interoperabilitybridges.com/"&gt;&lt;a href="http://html5labs.interoperabilitybridges.com/"&gt;http://html5labs.interoperabilitybridges.com/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you can download and play with IE 10 (safely) here&amp;#8230;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://ie.microsoft.com/testdrive/"&gt;&lt;a href="http://ie.microsoft.com/testdrive/"&gt;http://ie.microsoft.com/testdrive/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Want to know what features your browser right now can use?  Caniuse.com will tell you exactly what you (or your browser at least) is capable of supporting.&lt;/p&gt;

&lt;p&gt;&lt;a target="_blank" href="http://caniuse.com/"&gt; &lt;a href="http://caniuse.com/"&gt;http://caniuse.com/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lastly, be sure to check out Telerik&amp;#8217;s HTML5 web development platform, Kendo UI.  It contains everything you need to do HTML5 development today without having to worry about whether or not your application will work in older browsers, or with touch devices.&lt;/p&gt;

&lt;p&gt;&lt;a target="_blank" href="http://kendoui.com"&gt;kendoui.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The one thing that I really wanted to convey to everyone last night, is that the fact that HTML5 is an evolving specification in no way bears weight on shying away from it today.  Especially with the recent announcement from Adobe.  The HTML5 train has already left the station.  Will you be on it?&lt;/p&gt;</description><link>http://a.shinynew.me/post/12642817410</link><guid>http://a.shinynew.me/post/12642817410</guid><pubDate>Fri, 11 Nov 2011 10:35:00 -0500</pubDate></item><item><title>Tips For The International Traveler</title><description>&lt;p&gt;I’m now on the backside of a week long trip to Eastern Europe.  I flew from Nashille to Houston, Houston to Amsterdam, and Amsterdam to Bulgaria.  This was my first trip where I was flying for nearly 13 hours in total and crossing 8 time zones.  I learned a few very valuable lessons from this trip.  Some of them were simple observations, and others were borne of absolute misery.  Here are a few tips for the international traveler.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;Buy a neck pillow&lt;/h2&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_ltxp1gdAqX1qcj4eq.jpg" width="75" height="75" align="left"/&gt;Yeah, they look stupid.  Probably somewhat on the same level as a fanny pack.  You aren’t going to get dates with a neck pillow, but who cares.  You will use that neck pillow more than you can possibly imagine.  When you sleep (of course).  When your butt hurts after sitting for 9 straight hours you can sit on it.  When you are resting between flights you can lay down on the floor with it.  You can use it as a barrier between you and the less than savory person you are stuck next to on the plane.  The uses are endless.  Buy one at Target.  If you forget, buy one at the airport.  It’s still worth the money.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;Comfortable Earbuds And White Noise&lt;/h2&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_ltxp8u5voh1qcj4eq.png" align="left" style="margin-right: 10px;"/&gt;Traveling abroad is a highly stressful event.  Airports are nurseries of chaos and nobody gives a crap about your comfort.  The sheer sensory overload can be nausiating.  The contant talking.  Someone near you with a creepy laugh.  Buy yourself a set of really comfortable gel earbuds and get some white noise.  If you have an iPhone, you can pick up “&lt;a target="_blank" href="http://itunes.apple.com/us/app/sleepmaker-storms-free/id319376811?mt=8"&gt;SleepMaker Storms&lt;/a&gt;” free edition and listen to hours of rain that will drown out everything else.  You will literally forget where you are.  It will help you sleep and allow you to close your eyes and escape when you need to.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;Tranquilizers&lt;/h2&gt;
&lt;p&gt;&lt;img align="left" src="http://media.tumblr.com/tumblr_ltxph7SYv01qcj4eq.jpg" style="margin-right: 10px;"/&gt;Not like horse tranquilizers.  You don’t need to be like Will Ferrel shot in the neck on “Old School”.  Just a low dose of Xanax will do fine.  Take the proper precautions and talk to your doctor.  Obey all the proper safety precautions about taking too much or becoming dependent.  Get your doctor to give you say just 3 or 4 low dose pills for your trip.  These are better than sleeping pills because if you can’t fall asleep, you won’t feel nearly as bad.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Please&lt;/b&gt; don’t hear me advocating use of controlled substances.  I’m just saying that there are situations which call for this kind of medication, and long distance travel definitely qualifies.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;Hoodie&lt;/h2&gt;
&lt;p&gt;&lt;img align="left" style="margin-right: 10px" src="http://media.tumblr.com/tumblr_ltxpkhJ9yj1qcj4eq.jpg"/&gt;Pretend you LOVE node.js and buy yourself a hoodie.  The deeper the hoodie, the better.  They provide some semblance of privacy when you are crammed into the sardine-can-of-an-airplane, and they are soft.  International flights are also cold.  Its -40 degrees outside that aircraft at 32 thousand feet.  It’s bound to get a tad chilly inside.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;Comfortable Pants&lt;/h2&gt;
&lt;p&gt;&lt;img align="left" src="http://media.tumblr.com/tumblr_ltxpm5eDX31qcj4eq.jpg"/&gt;Pajama pants or some sort of soft nylon pants work great here.  Do not wear shorts.  Definately do not wear jeans.  No matter how good your butt looks in them.  The key here is comfort.  You are going to be sitting for a &lt;em&gt;LONG&lt;/em&gt; time.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;Water&lt;/h2&gt;
&lt;p&gt;&lt;img align="left" src="http://media.tumblr.com/tumblr_ltxpnyU5L81qcj4eq.jpg"/&gt;It seems like you could get water on the plane, and you can, but it’s in tiny cups and you have to wait your turn.  Airplanes get extremely dry inside and you will get very thirsty.  You will have to buy the water after you get through security, but go for it.  You will be glad you did.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;Global Entry&lt;/h2&gt;
&lt;p&gt;&lt;img align="left" style="margin-right: 10px;" src="http://media.tumblr.com/tumblr_ltxppzln0d1qcj4eq.jpg"/&gt;You can go down to your local airport prior to your trip, and they will take some blood samples, do an interview and confiscate your first born child.  Then you will be part of the “&lt;a target="_blank" href="http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=global%20entry&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CDgQFjAA&amp;amp;url=http%3A%2F%2Fwww.globalentry.gov%2F&amp;amp;ei=lLGuTq2ZFImTtwf24vHYDg&amp;amp;usg=AFQjCNFZvIQNnIwu2p-yXqj7e4AlpTizvA"&gt;Global Entry&lt;/a&gt;” program which means no waiting in line at customs.  This will be of utmost importance when you get back to the states and you just want to go home.  Let everyone else stand in line with the Canadians.  You get to walk straight through like a rock star.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;Be Prepared.  Be Comfortable.  Look Stupid&lt;/h2&gt;
&lt;p&gt;Remember, it’s not about looking good, it’s about making it through the next 20 - 30 hours and being abe to arrive at your destination in good spirits.  Your trip will be better and more memerable.  If you prepare accordingly, you may actually enjoy the experience of traveling and you will be much more inclined to do it again.&lt;/p&gt;
&lt;p&gt;So show up at the airport in pajama pants, with a hoodie and a neck pillow.  You may get some odd looks, but that’s just because people don’t realize that you are a professional.&lt;/p&gt;</description><link>http://a.shinynew.me/post/12159975223</link><guid>http://a.shinynew.me/post/12159975223</guid><pubDate>Mon, 31 Oct 2011 10:02:00 -0400</pubDate></item><item><title>JsFiddle Project Templates</title><description>&lt;style&gt;
table {
    width: 100%;
}

td {
   padding: 5px;
}
&lt;/style&gt;&lt;p&gt;I use &lt;a href="http://jsfiddle.net"&gt;JsFiddle&lt;/a&gt;. A Lot.  In fact, I called it an IDE the other day.  I realize that&amp;#8217;s a stretch, but it&amp;#8217;s not an unrealistic one.  The more I use JsFiddle, the more I love it.  There is no better way to write samples of HTML5 and share them.  It&amp;#8217;s constant versioning is really great as well.  Just click the &amp;#8220;Update&amp;#8221; button and save your Fiddle.  Want to revert?  Just lower the version number in the URL. &lt;/p&gt; 
&lt;p&gt;
One thing that I find myself doing over and over is creating my JsFiddle project template.  Adding in all of the resource CDN URL&amp;#8217;s.  It&amp;#8217;s honestly kind of a pain.  What I have started doing is creating what I call &amp;#8220;Project Templates&amp;#8221; for JsFiddle.  They are pre-built Fiddles that have the included resources already, and I can just save the link in my bookmarks bar and then fork the Fiddle and start rolling.  No need to go look up CDN URL&amp;#8217;s.
&lt;/p&gt;
&lt;p&gt;
I have decided to put together several &amp;#8220;Project Templates&amp;#8221;.  Feel free to link to these and fork them to accelerate your development time and cut out the &amp;#8220;googling&amp;#8221; for CDN locations.
&lt;/p&gt;
&lt;table style="margin-top: 20px"&gt;&lt;tr&gt;&lt;td&gt;
&lt;b&gt;jQuery Plain&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/ZcSEh/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/ZcSEh/"&gt;http://jsfiddle.net/burkeholland/ZcSEh/&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;b&gt;Kendo UI&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/mRdxe" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/mRdxe"&gt;http://jsfiddle.net/burkeholland/mRdxe&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
&lt;b&gt;Kendo UI With Backbone&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/yfqvM/2/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/yfqvM/2/"&gt;http://jsfiddle.net/burkeholland/yfqvM/2/&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;b&gt;Kendo UI With Knockout&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/UtQuG/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/UtQuG/"&gt;http://jsfiddle.net/burkeholland/UtQuG/&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
&lt;b&gt;Backbone&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/TAgMH/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/TAgMH/"&gt;http://jsfiddle.net/burkeholland/TAgMH/&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;b&gt;jQuery UI (Base Theme)&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/N8kR4/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/N8kR4/"&gt;http://jsfiddle.net/burkeholland/N8kR4/&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
&lt;b&gt;jQuery UI (Base Theme) With Knockout&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/URcqn/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/URcqn/"&gt;http://jsfiddle.net/burkeholland/URcqn/&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;b&gt;jQuery UI (Base Theme) With Backbone&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/Y9Ppq/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/Y9Ppq/"&gt;http://jsfiddle.net/burkeholland/Y9Ppq/&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;
&lt;b&gt;jQuery UI Mobile&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/JYSLm/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/JYSLm/"&gt;http://jsfiddle.net/burkeholland/JYSLm/&lt;/a&gt;&lt;/a&gt;
&lt;/td&gt;&lt;td&gt;
&lt;b&gt;Knockout&lt;/b&gt;&lt;br/&gt;&lt;a href="http://jsfiddle.net/burkeholland/UBswD/" target="_blank"&gt;&lt;a href="http://jsfiddle.net/burkeholland/UBswD/"&gt;http://jsfiddle.net/burkeholland/UBswD/&lt;/a&gt;&lt;/a&gt;

&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;p&gt;If you would like to contribute any, leave it in the comments.  You can just leave the name of the libraries you need and I&amp;#8217;ll look up the URL&amp;#8217;s.&lt;/p&gt;
&lt;p&gt;
&lt;br/&gt;&lt;/p&gt;&lt;h3&gt;Edit&lt;/h3&gt;
I updated all the references to base projects and aded MockJax to each template.</description><link>http://a.shinynew.me/post/11609958774</link><guid>http://a.shinynew.me/post/11609958774</guid><pubDate>Tue, 18 Oct 2011 07:59:00 -0400</pubDate></item><item><title>Coder's Remorse</title><description>&lt;blockquote&gt;
  &lt;div style="padding-bottom: 10px; background-color: #e3e3e3; padding-left: 10px; padding-right: 10px; padding-top: 10px"&gt;
    &lt;p&gt;A flash of lightning illuminated the object, and discovered its shape plainly to me; its gigantic stature, and the deformity of its aspect more hideous than belongs to humanity, instantly informed me that it was the wretch, the filthy daemon, to whom I had given life.&lt;/p&gt;

    &lt;p&gt;&lt;strong&gt;Frankenstein, or the Modern Prometheus&lt;/strong&gt; by Mary Shelley&lt;/p&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;

&lt;br/&gt;&lt;p&gt;It is a common feeling for developers to mourn the software that they release on the innocent.  They will say to themselves, &amp;#8220;I should have constructed differently.  Better.  I fought with so much of me to make this beautiful, and instead I have created Frankenstein.&lt;/p&gt;

&lt;p&gt;Jeff Atwood wrote in his article &lt;a href="http://www.codinghorror.com/blog/2009/12/version-1-sucks-but-ship-it-anyway.html" target="_blank"&gt;Version 1 Sucks, But Ship It Anyway&lt;/a&gt;:&lt;/p&gt;

&lt;br/&gt;&lt;br/&gt;&lt;blockquote&gt;
  &lt;div style="padding-bottom: 10px; background-color: #e3e3e3; padding-left: 10px; padding-right: 10px; padding-top: 10px"&gt;
    &lt;p&gt;At the end of the development cycle, you end up with &lt;strong&gt;software that is a pale shadow of the shining, glorious monument to software engineering that you envisioned when you started&lt;/strong&gt;.&lt;/p&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;

&lt;br/&gt;&lt;p&gt;Oh the remorse! How did this happen? By the time that you realize what you &amp;#8220;should&amp;#8221; have done, you are already in way too deep.  Then comes that pressing anxiety to refactor. WE HAVE TO REFACTOR.  RIGHT. NOW.  You talk with each other about it.  About all the things you didn&amp;#8217;t know or weren&amp;#8217;t around when you started.  It permeates your conversations at lunch and over IM when you are working at night.&lt;/p&gt;

&lt;br/&gt;&lt;br/&gt;&lt;blockquote&gt;
  &lt;div style="padding-bottom: 10px; background-color: #e3e3e3; padding-left: 10px; padding-right: 10px; padding-top: 10px"&gt;
    &lt;p&gt;&lt;em&gt;&lt;span style="line-height: 20px"&gt;&lt;strong&gt;ZOMG. This is so bad.&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;span style="line-height: 20px"&gt;I know it broseph.&lt;/span&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;em&gt;&lt;span style="line-height: 20px"&gt;&lt;strong&gt;should have used Backbone. Have you seen Backbone?&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;span style="line-height: 20px"&gt;Backbone is def where it’s at!&lt;/span&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;em&gt;&lt;span style="line-height: 20px"&gt;&lt;/span&gt;&lt;/em&gt;&lt;em&gt;&lt;span style="line-height: 20px"&gt;&lt;strong&gt;Or Knockout. Prolly even better than Bizone.&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;

    &lt;p&gt;&lt;span style="line-height: 20px"&gt;&lt;/span&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;span style="line-height: 20px"&gt;Knockout is for real awesome!&lt;/span&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;em&gt;&lt;span style="line-height: 20px"&gt;&lt;strong&gt;Or even better Angular! Angular is nasty good. Think everyone is going that direction.&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;span style="line-height: 20px"&gt;skadoosh!!&lt;/span&gt;&lt;/p&gt;&lt;br/&gt;&lt;/div&gt;
&lt;/blockquote&gt;

&lt;br/&gt;&lt;br/&gt;&lt;p&gt;If this sounds like you, don’t sweat it.  It’s epidemic.&lt;/p&gt;

&lt;p&gt;How do we build applications that shine, when what’s shiny today is a rust bucket tomorrow?  As surely as I write this post, someone is cooking up the next JavaScript MVC Framework, or &lt;a href="http://jashkenas.github.com/coffee-script/" target="_blank"&gt;CoffeScript&lt;/a&gt;.  &lt;a href="http://www.dartlang.org/" target="_blank"&gt;Dart&lt;/a&gt; came out just this week and it’s THE FUTURE OF THE WEB.&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Breath&lt;/h2&gt;

&lt;p&gt;You can’t keep up so stop trying.  All of your endeavors to learn the next “miracle of programming” are not going to numb your developer’s remorse.  Remember these two things.&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Be Realistic&lt;/h2&gt;

&lt;h2&gt;&lt;/h2&gt;

&lt;p&gt;Developers are usually obsessed with the details.  I don’t mean the pixels necessarily, but definitely the structure of the code.  We can get hung up on things like “don’t use var” and “I don’t like Hungarian Notation”.  OOP only exacerbates this problem.  Writing fully OO code is a exercise in inadequacy.   Should this this class be static?  Is this DRY?  Does this object have only 1 responsibility?  You can refactor your code trying to get more and more OO and you will refactor yourself into oblivion. &lt;/p&gt;

&lt;p&gt;The truth is that good code is a mix of pattern and anti-pattern.  The term “pragmatic” has become overused.  Now it’s just an excuse not to understand or learn a pattern.   But take a look at the actual definition of pragmatic.&lt;/p&gt;

&lt;br/&gt;&lt;br/&gt;&lt;div style="padding-bottom: 10px; background-color: #e3e3e3; padding-left: 10px; padding-right: 10px; padding-top: 10px"&gt;
  &lt;blockquote&gt;
    &lt;h5&gt;&lt;font size="5"&gt;&lt;em&gt;&lt;font style="font-weight: bold"&gt;prag·mat·ic&lt;/font&gt;&lt;/em&gt;&lt;font style="font-weight: bold"&gt;/pragˈmatik/&lt;/font&gt;&lt;/font&gt;&lt;/h5&gt;

    &lt;p&gt;Adjective:&lt;/p&gt;

    &lt;ol&gt;&lt;li&gt;Dealing with things &lt;strong&gt;sensibly&lt;/strong&gt; and &lt;strong&gt;realistically&lt;/strong&gt; in a way that is based on practical rather than theoretical considerations. &lt;/li&gt;
    &lt;/ol&gt;&lt;/blockquote&gt;
&lt;/div&gt;

&lt;br/&gt;&lt;br/&gt;&lt;p&gt;If you take nothing else from that definition, read and understand “realistically”.  In the end, no pattern, best practice or awesome framework is going to help you determine what is realistic.  Only you can do that.  And what’s realistic is often going to clash with what’s recommended.  All the theory in the world never shipped a single bit.  Neither has any development methodology.  Software is shipped by the sweat the brow.  The relentless drive to keep going each day until the product materializes and someone has the guts to ship and back it up.&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;em&gt;At the risk of infringing on mad copyright, Dilbert on Agile.&lt;/em&gt;
&lt;img src="http://media.tumblr.com/tumblr_lsx9bhkMwU1qcj4eq.png"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Ship. Improve. Rinse. Repeat.&lt;/h2&gt;

&lt;p&gt;You see, good software is iterative.  Nobody ships v1 and says “It’s Perfect!”.  Beyond that, version numbers are completely arbitrary.  Call it v.09 until you like it enough.  Leave the beta tag on it forever so no matter what happens you can just say “It’s in beta bro” (Gmail anyone?).  If Chrome has proven anything, it’s that version numbers don’t matter at all.  What matters is that your product is constantly improving. &lt;/p&gt;

&lt;p&gt;The iterative cycle will reveal what’s wrong with your project.  Because let’s be honest, if you think you know all the ways your software has fallen short, you are fooling yourself.  You don’t know the half of it.  You can’t until people start using it and telling you all the ways that it sucks.  Or is awesome.  It’s usually the former though.  Take Apple for example.  They re-invent the mobile phone and still had people telling them things like “Your notifications are terrible”.  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;As a side note, notifications on iOS are terrible.&lt;/em&gt;  &lt;/p&gt;

&lt;p&gt;Don’t assume that you will understand the perceived quality of the product.  How many records have been released that the artist said was “Their Best Record Ever”, only for it be be a clear disaster and have them apologize for it later on.  You are consumed with what is behind the beauty, but don’t let that get in the way of your product being  beautiful to begin with.  This is where the value will be for the user.  Nobody is going to care that you implemented the most &lt;em&gt;&lt;strong&gt;wicked awesome inheritance model evah&lt;/strong&gt;&lt;/em&gt; if you ship Windows ME when it’s all said and done.&lt;/p&gt;

&lt;p&gt;Don’t back pedal, you are almost there. Get to the finish line. Release it in all its disgusting glory, go out and drink several beers and then get back to work. That’s how good software is made.&lt;/p&gt;</description><link>http://a.shinynew.me/post/11330641918</link><guid>http://a.shinynew.me/post/11330641918</guid><pubDate>Tue, 11 Oct 2011 17:54:00 -0400</pubDate></item><item><title>Make A Simple Game With HTML5 Canvas</title><description>&lt;p&gt;At DevLink this year, instead of lunch on the last day of the conference, I had a hackathon with &lt;a href="http://love.freeflow.io" target="_blank"&gt;Jim Fleming&lt;/a&gt; who showed me the in’s and out’s of writing a simple game using HTML5 canvas.  What we ended up with was a very rough implementation of HTML5 pong.  Granted we only had two hours to do this.  You can check out the working example &lt;a href="https://github.com/burkeholland/Twilio-Pong" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Canvas Basics&lt;/h2&gt;

&lt;p&gt;Simply put, the canvas is a bitmap-based rendering surface.  It was originally introduced by Apple and is what they use in their “Dashboard” on OS X.  You can think of canvas as a blank area that you can draw on using JavaScript.  Canvas is supported by all current versions of major browsers, but was not supported until IE 9.  Prior versions of IE can support canvas through polyfills such as &lt;a href="http://excanvas.sourceforge.net/" target="_blank"&gt;Explorer Canvas&lt;/a&gt; and &lt;a href="http://flashcanvas.net/" target="_blank"&gt;Flash Canvas&lt;/a&gt;.  The latter is faster than Explorer Canvas, but uses Flash which in some ways negates the benefits of canvas (specifically it’s ability to be rendered by iOS).&lt;/p&gt;

&lt;p&gt;There are some alternatives to the canvas that include &lt;a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics" target="_blank"&gt;SVG&lt;/a&gt; and &lt;a href="http://www.chromeexperiments.com/webgl" target="_blank"&gt;WebGL&lt;/a&gt;.  The main difference between canvas and SVG is that SVG is vector based and canvas is bitmap based.  WebGL is pretty new, but looks promising for replacing canvas in the future for complex scenarios.&lt;/p&gt;

&lt;p&gt;Let’s take a look at the markup for canvas.  &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;canvas&lt;/span&gt; &lt;span class="attr"&gt;width&lt;/span&gt;&lt;span class="kwrd"&gt;="640"&lt;/span&gt; &lt;span class="attr"&gt;height&lt;/span&gt;&lt;span class="kwrd"&gt;="480"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;
ARGGHH! No Canvas Support!
&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;canvas&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;






.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;#8220;Courier New&amp;#8221;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;Now if the browser you are using does not support the canvas, you will see whatever text is in between the tags.  &lt;/p&gt;

&lt;p&gt;So how do we use our canvas?&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;It’s All JavaScript Now, Son&lt;/h2&gt;

&lt;p&gt;There is a &lt;a href="http://dev.w3.org/html5/2dcontext/" target="_blank"&gt;new API for drawing in 2d on the canvas&lt;/a&gt;.  If you just visited that link, then you probably got nauseous from all the content.  It’s a lot of stuff.  Those w3c docs could stand with some reformatting in my opinion.  We can use that new API to start drawing to our canvas.  Our game is going to be a simple game where balls float up and we click on them and they disappear.  Very simple.&lt;/p&gt;

&lt;p&gt;I am going to be using jQuery as well for DOM selection, but it’s definitely not required to work with a canvas.  Here is what the finished product looks like along with all the code you will need to refer back to.&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;iframe style="width: 100%; height: 600px" src="http://jsfiddle.net/qHx3Q/13/embedded/result,js,html"&gt;&lt;/iframe&gt;
&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Create A Draw Loop&lt;/h2&gt;

&lt;p&gt;All games work in pretty much the same way.  We create a draw function that calls itself every so many seconds (framerate).  That function just calls itself over and over again updating the drawing surface.   The function is nothing special, it’s just where all the drawing occurs.  We also need a function that will get our animation frame, or rather wait a certain amount of time before executing the draw loop.  I’ve used a pretty standard function here which attempts to use the “requestAnimationFrame” API call which has not yet been standardized.   What this function is doing is trying to get the current framerate from the browser for the canvas.  If it can’t it falls to a function which sets it to 60.  Each one of these functions takes in a callback and a canvas object. &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// main draw loop&lt;/span&gt;
&lt;span class="kwrd"&gt;function&lt;/span&gt; Draw() {
     get_animation_frame(draw, canvas);
}

&lt;span class="rem"&gt;// get the framerate at 60 FPS or whatever the current framerate &lt;/span&gt;
&lt;span class="kwrd"&gt;function&lt;/span&gt; get_animation_frame() {
     &lt;span class="kwrd"&gt;return&lt;/span&gt; window.requestAnimationFrame || 
            window.webkitRequestAnimationFrame || 
            window.mozRequestAnimationFrame || 
            window.oRequestAnimationFrame || 
            window.msRequestAnimationFrame || 
            &lt;span class="kwrd"&gt;function&lt;/span&gt;(callback, element) {
                &lt;span class="kwrd"&gt;return&lt;/span&gt; window.setTimeout(callback, 1000 / 60);
            };
}&lt;/pre&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;#8220;Courier New&amp;#8221;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Create The Game Elements&lt;/h2&gt;

&lt;p&gt;Now that we have the core of our game, we are ready to draw some actual game objects.  We are going to need a ball so let’s go ahead and create one.  &lt;/p&gt;

&lt;p&gt;We could draw an “arc” to the canvas which would create us a circle, but it would really be much easier to use a ball image.  Since I believe in taking the easiest possible route, let’s go with the image.  It’s 45 square and you can download it below…&lt;/p&gt;

&lt;p&gt;&lt;img src="http://dl.dropbox.com/u/19593893/CDN/ball.png"/&gt;&lt;/p&gt;

&lt;p&gt;Adding the image to our canvas is pretty easy.  All of our drawing will be done to the 2d context of the canvas, not the actual canvas itself.  We can get that context by calling the following.  &lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; canvas = document.getElementById(&lt;span class="str"&gt;"canvas"&lt;/span&gt;);&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;






.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;#8220;Courier New&amp;#8221;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;I put my canvas at the top of my document ready function so it&amp;#8217;s easier to use later. Notice that I&amp;#8217;m not using a jQuery selector to get the canvas. Why not? The jQuery selector will return a jQuery object which will not have the &amp;#8220;getContext&amp;#8221; method on it. We need to get the actual canvas object, not a jQuery object. &lt;/p&gt;

&lt;p&gt;The basic premise of our game is that we have beach balls floating up the screen and we need to try and stop them before the get to the top and float away.  To do this, we are going to need to create numerous beach balls and track each one of them.  We can start by creating a function which will be called every half a second, create a ball and add that ball to an array of balls.  Here is the code and I’ll explain what is happening.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; createBall() {            
    image = &lt;span class="kwrd"&gt;new&lt;/span&gt; Image();
    image.src = &lt;span class="str"&gt;'http://dl.dropbox.com/u/19593893/CDN/ball.png'&lt;/span&gt;;
            
    liveBalls.push({ image: image, 
                     x: Math.floor(Math.random()*580), 
                     y: 640, 
                     index: 0, 
                     speed: Math.floor(Math.random()*5) });
}&lt;/pre&gt;
&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;#8220;Courier New&amp;#8221;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;#8220;Courier New&amp;#8221;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;The first thing that happens is to create a new image and assign the source of that image to our ball png.  The second thing that’s happening here is we are creating a ball object inline and adding it to an array called “liveBalls” that we haven’t created yet.  The x value is set to a random position that is less than the width of the screen (640) minus some room for the image itself.  580 is just an approximation.  Our ball will be created at a random point along the x axis.  The y positioning will put the ball just slightly below the canvas and out of view so we can animate it upwards.  The index allows us to track the current ball when looping, and the speed is another random number between 1 and 5.&lt;/p&gt;

&lt;p&gt;Now add a liveBalls parameter to the top of your document ready function.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; liveBalls = &lt;span class="kwrd"&gt;new&lt;/span&gt; Array();&lt;/pre&gt;

&lt;p&gt;We can add a simple “setTimeout” function now to call our “createBall” function every half a second.&lt;/p&gt;

&lt;p&gt;Now we can begin drawing the balls on our canvas.  In the draw loop, the first thing we need to do is get the “2d” drawing context.  Once we do that, we can enumerate through our array of liveBalls and each one to the context.  To animate the ball, we simply need to decrement it’s y value by the random speed we set for the ball in the createBall method.   We check for the “y” position.  If it’s less than 0 – the height of the image (-48), then we need it to add it to an array of objects that we want to delete.&lt;/p&gt;

&lt;p&gt;Then we loop through our objects to delete and remove them from the liveBalls array.  This will cause them to dissapear.  After that we just delete our array of dead balls.&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Collision Detection&lt;/h2&gt;

&lt;p&gt;It’s enough in this scenario to bind the click event of the mouse on the page to a function which will do our collision detection.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;$(document).click(&lt;span class="kwrd"&gt;function&lt;/span&gt;(e){
     detectCollision(e.pageX,e.pageY);
});&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;#8220;Courier New&amp;#8221;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;The collision detection is not going to be perfect.  Our object is a ball, but our collision detection is going to be square.  It’s not ideal, but should demonstrate the idea of simple collision detection.&lt;/p&gt;

&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; detectCollision(x,y) {
     &lt;span class="rem"&gt;// enumerate through the balls and see if any of them collide with our mouse click&lt;/span&gt;
     &lt;span class="kwrd"&gt;var&lt;/span&gt; collisionDetected = &lt;span class="kwrd"&gt;false&lt;/span&gt;;
     &lt;span class="kwrd"&gt;var&lt;/span&gt; collisionIndex = 0;
            
     &lt;span class="rem"&gt;// collision detection is rough here, could be much better.  Basically detecting&lt;/span&gt;
     &lt;span class="rem"&gt;// if the mouse click falls inside a sqaure that's roughly the same size as the ball.&lt;/span&gt;
     $.each(liveBalls, &lt;span class="kwrd"&gt;function&lt;/span&gt;(index, value) {
           &lt;span class="kwrd"&gt;if&lt;/span&gt; (x &amp;gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.x &amp;amp;&amp;amp; x &amp;lt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.x + 64 &amp;amp;&amp;amp; y &amp;gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.y + 20 &amp;amp;&amp;amp; y &amp;lt; &lt;span class="kwrd"&gt;this&lt;/span&gt;.y + 100) {
                collisionDetected = &lt;span class="kwrd"&gt;true&lt;/span&gt;;
                collisionIndex = &lt;span class="kwrd"&gt;this&lt;/span&gt;.index;
           }
     });
            
     &lt;span class="rem"&gt;// if we detected a collision, remove the object.&lt;/span&gt;
     &lt;span class="kwrd"&gt;if&lt;/span&gt; (collisionDetected) {
         liveBalls.splice(collisionIndex, 1);
     }
}&lt;/pre&gt;

&lt;p&gt;&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, &amp;#8220;Courier New&amp;#8221;, courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;

&lt;p&gt;All we need to add now is a label to track our escape count and add a pretty beach background image to the canvas.&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Homework&lt;/h2&gt;

&lt;p&gt;See if you can do the following things.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;1. Add game start / pause screen&lt;/p&gt;&lt;br/&gt;&lt;p&gt;2. End game when x amount of balls escape&lt;/p&gt;&lt;br/&gt;&lt;p&gt;3. Instead of just removing the ball, have the ball fall back down the screen.&lt;/p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;Additional Resources&lt;/h2&gt;

&lt;p&gt;There are some great additional resources out there for canvas and other HTML5 concepts.&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://htmlui.com" target="_blank"&gt;htmlui.com&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://www.html5rocks.com/en/" target="_blank"&gt;html5rocks.com&lt;/a&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;And here is an in-depth discussion of canvas.&lt;/p&gt;
&lt;br/&gt;&lt;p&gt;&lt;a title="http://dev.opera.com/articles/view/html-5-canvas-the-basics/" href="http://dev.opera.com/articles/view/html-5-canvas-the-basics/"&gt;&lt;a href="http://dev.opera.com/articles/view/html-5-canvas-the-basics/"&gt;http://dev.opera.com/articles/view/html-5-canvas-the-basics/&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://a.shinynew.me/post/11063636700</link><guid>http://a.shinynew.me/post/11063636700</guid><pubDate>Wed, 05 Oct 2011 12:36:00 -0400</pubDate></item><item><title>How To Conquer Your Facebook Addiction</title><description>&lt;a href="http://www.thedailymind.com/productivity/facebook-syndrome-8-ways-to-beat-your-facebook-addiction/"&gt;How To Conquer Your Facebook Addiction&lt;/a&gt;: &lt;p&gt;Repeat after me: “Nobody cares what I’m having for dinner”.&lt;/p&gt;</description><link>http://a.shinynew.me/post/10750019852</link><guid>http://a.shinynew.me/post/10750019852</guid><pubDate>Tue, 27 Sep 2011 21:19:33 -0400</pubDate></item><item><title>I'm Outta Here!!!</title><description>&lt;div style="text-align: center; margin-top: 30px; margin-bottom: 40px;"&gt;
&lt;img src="http://media.tumblr.com/tumblr_lrxk3r15hY1qcj4eq.jpg"/&gt;&lt;/div&gt;
&lt;h1&gt;No.&lt;/h1&gt;
&lt;p&gt;This will not be &lt;a href="http://www.misfitgeek.com/2011/09/my-last-day-at-the-evil-empire-%E2%80%93-free-from-the-borg-collective/" target="_blank"&gt;that post&lt;/a&gt;.  Or &lt;a href="http://techcrunch.com/2011/09/16/last-post/" target="_blank"&gt;this one&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;
After nearly 4 years, today is my last day with &lt;a href="http://www.ocharleysinc.com/" target="_blank"&gt;O&amp;#8217;Charley&amp;#8217;s Inc&lt;/a&gt;.  I usually don&amp;#8217;t specify my employer when I post or speak and that is for their protection.  I don&amp;#8217;t want something I say to reflect poorly on them.
&lt;/p&gt;
&lt;p&gt;
I feel like it&amp;#8217;s appropriate to mention them now as the ride I&amp;#8217;ve been on with them has come to an end.
&lt;/p&gt;
&lt;p&gt;
O&amp;#8217;Charley&amp;#8217;s is one of the few great companies you get to work for.  They truly care about their people in way that I have never seen from another employer.  The people that I worked with were talented and worked incredibly hard.  We did things that teams 10 times our size would have had trouble doing.  All of the people I worked with are incredibly unassuming and yet very skilled.  
&lt;/p&gt;
&lt;p&gt;
A culture like this starts from the top down.  The leadership I worked under was easily the best of the best.  I didn&amp;#8217;t always agree with decisions that were made, but I always knew that the decision makers had what was best for the company and best for the employees in mind.  There was never any doubt.  People are a highly valued asset at O&amp;#8217;Charley&amp;#8217;s.
&lt;/p&gt;
&lt;br/&gt;&lt;br/&gt;&lt;h2&gt;So why would you quit such awesomeness?&lt;/h2&gt;
&lt;p&gt;I have a unique opportunity to go to work for &lt;a href="http://www.telerik.com/" target="_blank"&gt;Telerik&lt;/a&gt; as a Developer Evangelist focused on their jQuery and Device framework - also known as &lt;a href="http://kendoui.com" target="_blank"&gt;Kendo UI&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m very excited about getting out into the community a lot more than I have been able to over the past 7 years.  Telerik has some fantastic tools in the emerging jQuery space as well as some incredible things coming down the line.  I really hope I can do justice to the amazing work that they have done on &lt;a href="http://kendoui.com" target="_blank"&gt;Kendo UI&lt;/a&gt;&lt;a&gt;&lt;/a&gt;.
&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;&lt;h2&gt;Thank you&amp;#8217;s are in order&lt;/h2&gt;
&lt;p&gt;I would like to drop a special note of thanks to &lt;a href="http://ifandelse.com/" target="_blank"&gt;Jim Cowart&lt;/a&gt; who went out of his way to help get me to the Devlink conference when it otherwise would have been financially impossible for me to attend.  A special thanks to &lt;a href="http://www.johnkellar.com/" target="_blank"&gt;John Kellar&lt;/a&gt; as well who paid for my entire trip and got me into the VIP events.  I can not say thank you enough for how much you guys helped me.&lt;/p&gt;

&lt;p&gt;My &lt;a href="http://www.careerbuilder.com/JobSeeker/Jobs/JobDetails.aspx?IPath=ILKGV0K&amp;amp;ff=21&amp;amp;APath=2.31.0.0.0&amp;amp;job_did=J8D0WQ78SSJMCWCP40S" target="_blank"&gt;current position&lt;/a&gt; is now open, and if you are looking for a great place to work in Nashville, I highly recommend you consider O&amp;#8217;Charley&amp;#8217;s.&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s been a great ride.  I&amp;#8217;m grateful to O&amp;#8217;Charley&amp;#8217;s for letting me work here and taking such good care of myself and my family.  When you get hungry, stop in to an O&amp;#8217;Charley&amp;#8217;s, Stoney River or 99 restaurant.  The food is great and so are the people.&lt;/p&gt;</description><link>http://a.shinynew.me/post/10557287944</link><guid>http://a.shinynew.me/post/10557287944</guid><pubDate>Fri, 23 Sep 2011 10:55:00 -0400</pubDate></item><item><title>Installing 64 Bit Windows 8 From 32 Bit Windows 7</title><description>&lt;p&gt;After the Windows 8 unveiling on Monday at the BUILD conference in Anaheim, the number one visited site was the blog of &lt;a href="http://www.hanselman.com"&gt;Scott Hanselman&lt;/a&gt; where he explains &lt;a href="http://www.hanselman.com/blog/GuideToInstallingAndBootingWindows8DeveloperPreviewOffAVHDVirtualHardDisk.aspx"&gt;how to install Windows 8 to a VHD and boot to that VHD.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I followed his instructions step by step, but I had misadventures early on when the tool to make a bootable USB drive with the x64 ISO failed saying it had copied the files, but it couldn&amp;#8217;t make the USB drive bootable.&lt;/p&gt;
&lt;p&gt;At first I thought this was because the contents of the .ISO were more than the 8 gigs I had on my USB stick.  Turns out the ISO is only 5 gigs when mounted.  I had plenty of room free, but I couldn&amp;#8217;t figure out why it wasn&amp;#8217;t working.&lt;/p&gt;
&lt;p&gt;The short answer is &lt;strong&gt;you can&amp;#8217;t use the &lt;a href="http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool"&gt;Windows 7 USB/DVD download tool&lt;/a&gt; to create an x64 bootable USB stick from a 32 bit OS.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I am running Windows 7&amp;#160;32 bit on a 64 bit machine.  Why?  Because the company I work for does not support 64 bit machines - specifically in the areas of VPN and Corporate Anti-Virus / Patching.  I knew my machine was capable of running a 64 bit OS and I really wanted to get my hands on the developer tools.&lt;/p&gt;
&lt;p&gt;I set out to make the disk bootable on my own.&lt;/p&gt;
&lt;p&gt;Before you do this, you will need a copy of Windows 7 x86 or Windows Vista x86.  You are going to need this to make your USB stick bootable.&lt;/p&gt;
&lt;p&gt;So instead of running the nifty tool Scott showed in his post, I used DISKPART to format the USB drive, make it bootable using a Windows 7 x86 installation DVD, and then copy the files from the .ISO over.&lt;/p&gt;
&lt;p&gt;First, mount the Windows 8 x64 ISO.  Right-click the ISO file and select &amp;#8220;Mount&amp;#8221;.&lt;/p&gt;
&lt;div style="text-align: center; margin-top: 20px; margin-bottom: 20px;"&gt;&lt;img src="http://media.tumblr.com/tumblr_lrmdg1qtjn1qcj4eq.png"/&gt;&lt;/div&gt;
&lt;p&gt;After you do this, the ISO will appear as a drive under &amp;#8220;My Computer&amp;#8221; where you can see the contents of the disc.  It&amp;#8217;s 4.83 gigs total.&lt;/p&gt;
&lt;div style="text-align: center; margin-top: 20px; margin-bottom: 20px;"&gt;&lt;img src="http://media.tumblr.com/tumblr_lrmdld7oXf1qcj4eq.png"/&gt;&lt;/div&gt;
&lt;p&gt;Now we need to start working on the USB stick.  I had an 8 gig stick.  Go ahead and insert your USB stick and fire up a command prompt.  We are going to use DISKPART to select the USB stick as a disk and format it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DISKPART&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;LIST DISK&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;SELECT DISK 1&amp;#160;&lt;/strong&gt;(replace the number with whatever disk number your USB stick shows up as)&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;CLEAN&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;CREATE PARTITION PRIMARY&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;SELECT PARTITION 1&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;ACTIVE&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;FORMAT FS=NTFS&lt;/strong&gt; (This can take a while)&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;ASSIGN&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;&lt;strong&gt;EXIT&lt;/strong&gt;&lt;/p&gt;&lt;br/&gt;&lt;p&gt;OK, now our USB stick is formatted and ready for us to make it bootable. This is where you will need your Windows 7 or Vista 32 bit install disc.  Assuming that your install disc is in drive D and your USB stick is drive F, you will use BootSect to make the USB stick bootable in the following manner&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;D:\BOOT\BOOTSECT.EXE /NT60&amp;#160;F:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now copy over the contents of the .ISO file.  Open up the mounted drive, select all and copy over to your USB stick.&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s it!  You&amp;#8217;ve just created a bootable USB stick containing 64 bit Windows 8 from a 32 bit version of Windows.&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-style-span"&gt;You can now pick up with &lt;a href="http://www.hanselman.com/blog/GuideToInstallingAndBootingWindows8DeveloperPreviewOffAVHDVirtualHardDisk.aspx"&gt;Scott&amp;#8217;s excellent article&lt;/a&gt; where he boots to the USB stick.&lt;/span&gt;&lt;/p&gt;</description><link>http://a.shinynew.me/post/10277630075</link><guid>http://a.shinynew.me/post/10277630075</guid><pubDate>Fri, 16 Sep 2011 11:09:00 -0400</pubDate></item><item><title>Twitter Mosaic</title><description>&lt;p&gt;And now a mosaic of all the people I follow on Twitter.  &lt;a href="http://sxoop.com/twitter/"&gt;Get your twitter mosaic here.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://twitter.com/kevindando"&gt;&lt;img width="48" height="48" title="Kevin Westbrook" border="0" src="http://a2.twimg.com/profile_images/987177968/image_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/matthewthiessen"&gt;&lt;img width="48" height="48" title="Matthew Thiessen" border="0" src="http://a2.twimg.com/profile_images/1477651450/image_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/owlcity"&gt;&lt;img width="48" height="48" title="Owl City" border="0" src="http://a1.twimg.com/profile_images/1507695168/Owl_City_ATBAB_Press_Photo_8__Color_-2_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/MattChandler74"&gt;&lt;img width="48" height="48" title="Matt Chandler" border="0" src="http://a2.twimg.com/profile_images/587939802/3599037341_051169e377_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/lights"&gt;&lt;img width="48" height="48" title="Lights" border="0" src="http://a1.twimg.com/profile_images/1445556629/iwanttreats_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/isaacllanes"&gt;&lt;img width="48" height="48" title="isaacllanes" border="0" src="http://a2.twimg.com/profile_images/1267293577/image_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/briancalcara"&gt;&lt;img width="48" height="48" title="Brian Calcara" border="0" src="http://a0.twimg.com/profile_images/1219642645/Photo_13_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/digitalBush"&gt;&lt;img width="48" height="48" title="Josh Bush" border="0" src="http://a3.twimg.com/profile_images/1524478824/IMAG0534-1_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/malsup"&gt;&lt;img width="48" height="48" title="Mike Alsup" border="0" src="http://a2.twimg.com/profile_images/725487795/michael_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/elijahmanor"&gt;&lt;img width="48" height="48" title="Elijah Manor" border="0" src="http://a1.twimg.com/profile_images/1479061888/elijah-blue_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/RickStrahl"&gt;&lt;img width="48" height="48" title="Rick Strahl" border="0" src="http://a0.twimg.com/profile_images/219854363/profile_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/codinghorror"&gt;&lt;img width="48" height="48" title="Jeff Atwood" border="0" src="http://a1.twimg.com/profile_images/58911850/coding-horror-gravatar-128_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/scottgu"&gt;&lt;img width="48" height="48" title="Scott Guthrie" border="0" src="http://a0.twimg.com/profile_images/565139568/redshirt_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/XIANITY"&gt;&lt;img width="48" height="48" title="XIANITY" border="0" src="http://a1.twimg.com/profile_images/524772009/seekthelord_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/joeldev"&gt;&lt;img width="48" height="48" title="Joel Levin" border="0" src="http://a2.twimg.com/profile_images/1115564697/Screen_shot_2010-09-01_at_7.10.01_PM_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/Cotugs"&gt;&lt;img width="48" height="48" title="Adam Cotugno" border="0" src="http://a0.twimg.com/profile_images/1355442923/215913_576515236976_29500115_32923551_1283622_n_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/sulgi23"&gt;&lt;img width="48" height="48" title="Sulgi" border="0" src="http://a0.twimg.com/profile_images/1408509984/206305_750146243879_12817927_39687212_5785224_n_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/dmohl"&gt;&lt;img width="48" height="48" title="Daniel Mohl" border="0" src="http://a0.twimg.com/profile_images/1251271746/dan_twitterpic_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/jenn_said"&gt;&lt;img width="48" height="48" title="Jennifer Wilke" border="0" src="http://a2.twimg.com/profile_images/535205825/Jenn-PhotoBooth-Sq_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/rory_blyth"&gt;&lt;img width="48" height="48" title="Rory Blyth" border="0" src="http://a3.twimg.com/profile_images/812716986/IMG_1168_normal.JPG"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/robconery"&gt;&lt;img width="48" height="48" title="Rob Conery" border="0" src="http://a2.twimg.com/profile_images/1254541372/Screen_shot_2011-02-07_at_9.59.27_AM_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/johnsheehan"&gt;&lt;img width="48" height="48" title="John Sheehan" border="0" src="http://a1.twimg.com/profile_images/1209022899/IMG_5418_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/pixel"&gt;&lt;img width="48" height="48" title="Eric Vitiello" border="0" src="http://a1.twimg.com/profile_images/55003469/Picture_3_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/bryan_hunter"&gt;&lt;img width="48" height="48" title="Bryan Hunter" border="0" src="http://a0.twimg.com/profile_images/731961136/BryanHunter.Office001_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/jeffcutsinger"&gt;&lt;img width="48" height="48" title="Jeff Cutsinger" border="0" src="http://a2.twimg.com/profile_images/764248090/Avatar_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/calvinb"&gt;&lt;img width="48" height="48" title="Calvin Bottoms" border="0" src="http://a3.twimg.com/profile_images/711598409/my_face_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/ultspringhill"&gt;&lt;img width="48" height="48" title="Spring Hill Ultimate" border="0" src="http://a1.twimg.com/profile_images/330898214/Glenn_and_Brian_Action_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/ifandelse"&gt;&lt;img width="48" height="48" title="Jim Cowart" border="0" src="http://a2.twimg.com/profile_images/1317303317/Glider_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/A_Robson"&gt;&lt;img width="48" height="48" title="Alex Robson" border="0" src="http://a1.twimg.com/profile_images/1127921710/ignignokt_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/haacked"&gt;&lt;img width="48" height="48" title="Phil Haack" border="0" src="http://a2.twimg.com/profile_images/1315393964/image_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/jonskeet"&gt;&lt;img width="48" height="48" title="Jon Skeet" border="0" src="http://a2.twimg.com/profile_images/67740198/jonskeet_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/Alan_Reynolds"&gt;&lt;img width="48" height="48" title="AlanReynolds" border="0" src="http://a1.twimg.com/profile_images/1273058871/RL_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/hackernewsbot"&gt;&lt;img width="48" height="48" title="Hacker News Bot" border="0" src="http://a0.twimg.com/profile_images/73596050/yc500_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/jongalloway"&gt;&lt;img width="48" height="48" title="Jon Galloway" border="0" src="http://a3.twimg.com/profile_images/329131438/JonFace420px_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/jaimeohm"&gt;&lt;img width="48" height="48" title="J'aime Ohm" border="0" src="http://a3.twimg.com/profile_images/1368689709/pii2011_avatar_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/alanQuatermain"&gt;&lt;img width="48" height="48" title="Jim Dovey" border="0" src="http://a2.twimg.com/profile_images/1141056288/Jim_crop_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/alexisgoldstein"&gt;&lt;img width="48" height="48" title="alexis goldstein" border="0" src="http://a2.twimg.com/profile_images/1187676546/twitter_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/Behrens"&gt;&lt;img width="48" height="48" title="Jake Behrens" border="0" src="http://a0.twimg.com/profile_images/1522167532/0CA7B5A4-694F-449F-B33C-EB9178E63017_normal"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/reedolsen"&gt;&lt;img width="48" height="48" title="Reed Olsen" border="0" src="http://a1.twimg.com/profile_images/52896168/DSC_0319_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/jacobrelkin"&gt;&lt;img width="48" height="48" title="Jacob Relkin" border="0" src="http://a2.twimg.com/profile_images/1081010563/jacob_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/shanselman"&gt;&lt;img width="48" height="48" title="Scott Hanselman" border="0" src="http://a2.twimg.com/profile_images/1463303502/image_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/joehewitt"&gt;&lt;img width="48" height="48" title="Joe Hewitt" border="0" src="http://a3.twimg.com/profile_images/1115599142/Screen_shot_2010-09-01_at_7.52.31_PM_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/sgordon70"&gt;&lt;img width="48" height="48" title="Scott Gordon" border="0" src="http://a3.twimg.com/profile_images/1228446693/profiletwitter_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/edog1203"&gt;&lt;img width="48" height="48" title="Evan Doll" border="0" src="http://a3.twimg.com/profile_images/195558653/Calvin_and_Hobbes_-_Spaceman_Spiff_normal.gif"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/jcreamer898"&gt;&lt;img width="48" height="48" title="Jonathan Creamer" border="0" src="http://a1.twimg.com/profile_images/1123816907/IMG_5418_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/derekgreer"&gt;&lt;img width="48" height="48" title="Derek Greer" border="0" src="http://a2.twimg.com/profile_images/1524228308/Derek_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/Encosia"&gt;&lt;img width="48" height="48" title="Dave Ward" border="0" src="http://a3.twimg.com/profile_images/421261482/me_128_bw_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/nkohari"&gt;&lt;img width="48" height="48" title="Nate Kohari" border="0" src="http://a0.twimg.com/profile_images/1434412472/profile_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/dhh"&gt;&lt;img width="48" height="48" title="DHH" border="0" src="http://a1.twimg.com/profile_images/67881828/headshot64_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/chrisriesgo"&gt;&lt;img width="48" height="48" title="Chris Riesgo" border="0" src="http://a2.twimg.com/profile_images/1412506455/image_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/justinsoliz"&gt;&lt;img width="48" height="48" title="Justin Soliz" border="0" src="http://a0.twimg.com/profile_images/1143401049/41637_25400130_473_n_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/sfaatz"&gt;&lt;img width="48" height="48" title="Sara Faatz" border="0" src="http://a1.twimg.com/profile_images/1159839492/IMG_1522d_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/toddanglin"&gt;&lt;img width="48" height="48" title="Todd Anglin" border="0" src="http://a1.twimg.com/profile_images/1478082886/todd-anglin-close-up_illustrated_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/danielleswank"&gt;&lt;img width="48" height="48" title="danielle swank" border="0" src="http://a2.twimg.com/profile_images/1325502809/ladyscreaming_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/ikaros_daedalos"&gt;&lt;img width="48" height="48" title="Jim Fleming" border="0" src="http://a0.twimg.com/profile_images/1131798650/1f7247ded3fd0c61c0ed7708745345b1_normal.jpeg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/frank_grimmer"&gt;&lt;img width="48" height="48" title="frank grimmer" border="0" src="http://a0.twimg.com/profile_images/1461849463/NYCSelfPortrait_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/SweetSirena"&gt;&lt;img width="48" height="48" title="SweetSirena" border="0" src="http://a2.twimg.com/profile_images/58674664/My_Head_normal.JPG"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/sethjuarez"&gt;&lt;img width="48" height="48" title="sethjuarez" border="0" src="http://a0.twimg.com/profile_images/1468144658/faace1_normal.png"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/lazycoder"&gt;&lt;img width="48" height="48" title="Scott Koon" border="0" src="http://a3.twimg.com/profile_images/1407903581/90C5AE95-B2CC-45F3-BB3A-07747C15DCDE_normal"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/paul_irish"&gt;&lt;img width="48" height="48" title="Paul Irish ☺" border="0" src="http://a2.twimg.com/profile_images/1326877605/greenavatar_crop_normal.jpg"/&gt;&lt;/a&gt;&lt;a href="http://twitter.com/jeremylikness"&gt;&lt;img width="48" height="48" title="Jeremy Likness" border="0" src="http://a2.twimg.com/profile_images/1296534306/avatar_normal.png"/&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://a.shinynew.me/post/9791684675</link><guid>http://a.shinynew.me/post/9791684675</guid><pubDate>Sun, 04 Sep 2011 11:51:18 -0400</pubDate></item><item><title>InstaBoard</title><description>&lt;p&gt;&lt;a target="_blank" href="http://instaboard.apphb.com"&gt;&lt;img align="left" src="http://media.tumblr.com/tumblr_lqpltmoLfw1qcj4eq.png"/&gt;&lt;/a&gt; I&amp;#8217;ve been wanting to take a hack at the &lt;a href="http://instagram.com/developer/"&gt;Instagram API&lt;/a&gt; for several weeks now.  If you aren&amp;#8217;t familiar with &lt;a href="http://instagr.am/"&gt;Instagram&lt;/a&gt;, it&amp;#8217;s an iPhone application that allows you to take pictures and apply beautiful retro effects to them.  Beyond that, it is a social network of images and people.  Your stream consists of your pictures and those of people you follow.  You can think of it as &lt;a href="http://www.facebook.com"&gt;Facebook&lt;/a&gt; meets &lt;a href="http://www.twitter.com"&gt;Twitter&lt;/a&gt; meets &lt;a href="http://www.flickr.com"&gt;Flickr&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After sitting in &lt;a href="http://twitter.com/#!/johnsheehan"&gt;John Sheehan&amp;#8217;s&lt;/a&gt; Devlink session on webhooks, I learned about &lt;a href="https://appharbor.com/"&gt;AppHarbor&lt;/a&gt;.  &lt;a href="https://appharbor.com/"&gt;AppHarbor&lt;/a&gt; is a Windows Azure hosting service you need to know about.  It is a Git based service which allows you to push your entire Visual Studio solution and then it will build and deploy the solution for you.  They have free plans so there is no cost to get up and running.  I have had a few snags, but for the most part it is a completely painless way to deploy ASP.NET applications.  Amazing.  This is something the .NET community has needed for a long time.&lt;/p&gt;
&lt;p&gt;I used ASP.NET MVC 3 given that I could now deploy to AppHarbor and get my app live with very little effort.&lt;/p&gt;
&lt;p&gt;I got a crash course in &lt;a href="http://oauth.net/"&gt;OAuth&lt;/a&gt; and even posted a question to &lt;a href="http://stackoverflow.com/questions/7155192/oauth-2-0-in-net-with-instagram-api"&gt;Stack Overflow&lt;/a&gt; which I ended up answering myself.&lt;/p&gt;
&lt;p&gt;I also began writing an open source wrapper for the Instagram API called InstaSharp which I have posted to GitHub, but I haven&amp;#8217;t finished wrapping all the methods.  Feel free to download / fork it and add your own methods in the meantime.&lt;/p&gt;
&lt;p&gt;In addition to all that, I got slapped around by Chrome and it&amp;#8217;s crusade against cross-domain scripting.  In short, I couldn&amp;#8217;t call the Instagram API directly from my page.  I had to call the server which then calls Instagram and then sends the response back.  It&amp;#8217;s double the amount of HTTP calls, but it works quite well.  All of that is part of the InstaSharp wrapper.  It still seems that there should be a way to talk to Instagram without having to go through my server as in intermediary.&lt;/p&gt;
&lt;p&gt;I built the UI based on the premise that Instagram photos are vintage and vintage photos belong on a wall with vintage wallpaper.  I also wanted to see the photos in a grid.  The same way that you do in iPhoto.  I find scrolling down a linear news feed to be cumbersome.&lt;/p&gt;
&lt;p&gt;My other goal for the UI was for it to translate fluently to a touch interface.  I was targeting the tablet as much as I was the web experience.  This means no &amp;#8220;mouse-over&amp;#8221; effects or elements in the UI.&lt;/p&gt;
&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h2&gt;&lt;img src="http://media.tumblr.com/tumblr_lqpm6fMSor1qcj4eq.png"/&gt;&lt;/h2&gt;
&lt;p&gt;I built the interface using the new &lt;a href="http://www.kendoui.com/"&gt;Kendo UI&lt;/a&gt; from &lt;a href="http://www.telerik.com/"&gt;Telerik&lt;/a&gt;, and straight jQuery.&lt;/p&gt;
&lt;p&gt;Kendo UI is a &amp;#8220;framework for modern HTML UI&amp;#8221;.  That&amp;#8217;s straight off the Kendo UI site.  It&amp;#8217;s a comprehensive set of javascript controls/widgets, as well as a framework for databinding, templating and themes - all built on jQuery.  It&amp;#8217;s kind of like &lt;a href="http://www.jqueryui.com"&gt;jQuery UI&lt;/a&gt;, &lt;a href="http://api.jquery.com/category/plugins/templates/"&gt;jQuery Templates&lt;/a&gt;, &lt;a href="http://www.jqueryui.com/themeroller"&gt;Themeroller&lt;/a&gt; and &lt;a href="http://knockoutjs.com/"&gt;Knockout.js&lt;/a&gt; all wrapped up in a nice complete package.&lt;/p&gt;
&lt;p&gt;The great thing about Kendo, is that it supports working with other jQuery solutions.  So if you decide you would rather use Knockout.js for binding, the UI widgets won&amp;#8217;t care.&lt;/p&gt;
&lt;p&gt;InstaBoard used the &lt;a href="http://demos.kendoui.com/window/index.html"&gt;Window&lt;/a&gt; control and the &lt;a href="http://demos.kendoui.com/templates/index.html"&gt;Templating&lt;/a&gt; peice of the Kendo UI framework.&lt;/p&gt;
&lt;p&gt;The templating is straightfoward and works exactly the way you think it would.  You declare a script block of the template type and then write your HTML.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_lqpkifgngM1qcj4eq.png"/&gt;&lt;/p&gt;
&lt;p&gt;There is also currently a &lt;a href="http://www.kendoui.com/forums/framework/templates/syntax.aspx"&gt;discussion thread&lt;/a&gt; going on about the syntax in the templating.  Some feel that the &amp;lt; feels a bit awkward since HTML itself is based on &amp;lt;&amp;gt;.  Kendo UI is still in beta so features are still being finalized and refined.  A current proposition is to have a # with an escape mechanism.  I like this idea because the only place a # shows up is in anchors.&lt;/p&gt;
&lt;p&gt;I used the Window widget to display a high definition version of the thumbnail when a user clicks on it.  The Window has some really smooth animation that will remind you of iOS transitions that you are used to.  jQuery UI has a modal widget that I like as well, but I found the Kendo Window to be much smoother with a much more professional feel.  Where it really shines, though, is on the mobile device.  &lt;a href="http://forum.jquery.com/topic/ipad-and-jquery-dialog"&gt;jQuery UI has no support for iOS devices&lt;/a&gt;.  Kendo UI is fully supported on iOS and Android and is just as smooth on the iPad as it is in Chrome.&lt;/p&gt;
&lt;p&gt;This was a huge advantage for me.  I said earlier that I wanted my site to translate without issue and Kendo widgets are great on iOS.  It even works flawlessly on my iPhone, which was not a platform I was targeting.  In addition, the &lt;a href="http://www.kendoui.com/roadmap.aspx"&gt;Kendo UI roadmap&lt;/a&gt; includes new widgets, as well as enhanced mobile support.&lt;/p&gt;
&lt;p&gt;The Kendo team was also very responsive on the various forum threads where I posted with questions or feedback.  The fact that the framework is supported by a core team will be an advantage to companies who need product support and can&amp;#8217;t gamble a large initiative on community supported open source.&lt;/p&gt;
&lt;p&gt;I really like that fact that it doesn&amp;#8217;t impose it&amp;#8217;s will on you.  You can use the parts that you want and replace the parts that you don&amp;#8217;t.  It&amp;#8217;s enhancing your jQuery experience, not locking you in to doing it a certain way.  I like this trend for enterprise tools.  There is ground for both open source and licensed solutions.  The most important thing is that they compliment each other.  It should never be an &amp;#8220;either-or&amp;#8221; situation.&lt;/p&gt;
&lt;p&gt;I have a lot of work left to do on InstaBoard.  I still need search, popular feeds, enhanced sharing and - of course - infinite scrolling.  You can&amp;#8217;t show up at the party without infinite scrolling.  Maybe I can convince the Kendo UI team to work infinite scrolling into the framework.  Off to the &lt;a href="http://www.kendoui.com/forums.aspx"&gt;forums&lt;/a&gt;&amp;#8230;&lt;/p&gt;</description><link>http://a.shinynew.me/post/9560087876</link><guid>http://a.shinynew.me/post/9560087876</guid><pubDate>Mon, 29 Aug 2011 18:06:00 -0400</pubDate></item></channel></rss>

