<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Latest Posts - Kamranicus</title>
    <description>Latest blog posts from the Kamranicus blog</description>
    <link>http://kamranicus.com/</link>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Kamranicus" /><feedburner:info uri="kamranicus" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>Kamranicus</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
      <title>This... this is UX</title>
      <pubDate>Wed, 22 Feb 2012 14:18:10 +0000</pubDate>
      <description>&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/36" alt="UX in Action" /&gt;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=mF-EZLp3xGE:SPot1tbr_oU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=mF-EZLp3xGE:SPot1tbr_oU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=mF-EZLp3xGE:SPot1tbr_oU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=mF-EZLp3xGE:SPot1tbr_oU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/mF-EZLp3xGE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/mF-EZLp3xGE/this-this-is-ux</link>
      <category>UX</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/31/this-this-is-ux</feedburner:origLink></item>
    <item>
      <title>Playing with Node: Writing a Reddit CLI</title>
      <pubDate>Thu, 02 Feb 2012 15:21:04 +0000</pubDate>
      <description>&lt;p&gt;This is not a complete post about how to write a fully featured CLI application for Reddit, like &lt;a href="http://cortex.glacicle.org/" target="_blank"&gt;Cortex&lt;/a&gt;. However, I think it demonstrates the ease and simplicity in making such an application.&lt;/p&gt;
&lt;h3&gt;The idea&lt;/h3&gt;
&lt;p&gt;I love &lt;a href="http://reddit.com" target="_blank"&gt;Reddit&lt;/a&gt;. Except for one thing: I don't have much time to browse or keep up with it due to life getting in the way. What I wanted was a simple app I could run that would simply show me the top stories at that moment so I could glance at them and visit them.&lt;/p&gt;
&lt;p&gt;I spent about 20 mins (mostly looking for CLI npm packages) and came up with this:&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/35" alt="Reddit CLI" /&gt;
&lt;/div&gt;
&lt;p&gt;Pretty simple. It goes to the front page, grabs the JSON results, and formats it all into a nice list (shortening titles if they get too uppity), displaying the information I mostly care about: subreddit, score, # of comments, and the poster.&lt;/p&gt;
&lt;p&gt;Now, I haven't yet implemented a way to actually visit the URL of any of these, mainly because I'm short on time. But maybe you can!&lt;/p&gt;
&lt;h3&gt;The code&lt;/h3&gt;
&lt;p&gt;The code is pretty straightforward. I'm using the &lt;a href="http://search.npmjs.org/#/colors" target="_blank"&gt;colors&lt;/a&gt;, &lt;a href="http://search.npmjs.org/#/request" target="_blank"&gt;request&lt;/a&gt;, and &lt;a href="http://search.npmjs.org/#/cli" target="_blank"&gt;cli&lt;/a&gt; npm packages.&lt;/p&gt;
&lt;p&gt;I wanted to do something really quick. The &lt;code&gt;cli&lt;/code&gt; package is way more than I need, in fact, I wrote this originally without using &lt;code&gt;cli&lt;/code&gt; but for future improvement I added it in. The steps I wanted to perform from the get-go were:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Get the JSON for the homepage&lt;/li&gt;
&lt;li&gt;Parse it and build a colorized &amp;quot;row&amp;quot; (two rows, in fact)&lt;/li&gt;
&lt;li&gt;Trim titles so they didn't mess up the flow (my console window is 140 columns)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here it is, all 43 lines of it:&lt;/p&gt;
&lt;pre class='brush: js'&gt;var cli     = require('cli'),
    http    = require('http'),
    request = require('request'),
    colors  = require('colors');

cli.main(function (args, options) {
  console.log("***********".rainbow);
  console.log("Node Reddit".cyan);
  console.log("***********\n\n".rainbow);

  request('http://reddit.com/.json', function (err, res, body) {
    if (!err &amp;&amp; res.statusCode === 200) {
      var reddit  = JSON.parse(body),
          stories = reddit.data.children.map(function (s) { 
                      return s.data; 
                    });

      // Descending score
      stories.sort(function (a, b) { return b.score - a.score; });

      stories.forEach(function (story) {
        var row = "",
          title = story.title.length &amp;gt; 100
                ? story.title.substr(0, 100) + "..." 
                : story.title;

        // Build row
        // [score] [title] [comments] [subreddit]
        // This sucks
        row += story.score.toString().green + "\t";
        row += title.bold
        row += " (" + story.domain + ")";
        row += (" /r/" + story.subreddit).cyan;
        row += "\n\t";
        row += story.author.grey;     
        row += " " + (story.num_comments + " comments").italic.yellow;
        row += "\n";

        console.log(row);
      });
    }
  });
});&lt;/pre&gt;
&lt;p&gt;As you can see, definitely pretty light. That's all there is to it. Now imagine adding in commands (via &lt;code&gt;cli.parse&lt;/code&gt;) or even &lt;a href="http://search.npmjs.org/#/growl" target="_blank"&gt;growl&lt;/a&gt; support (I forked it and added Growl for Windows support, hopefully I can get it working decently and commit it). Then letting it monitor your specific subreddits, perhaps once every 15 minutes or so. Then adding in support for viewing links (interactive CLI app).&lt;/p&gt;
&lt;p&gt;That's all more than I have time for, but maybe some of you that want to learn more about the Power of Node have more time. If so, I welcome additions.&lt;/p&gt;
&lt;p&gt;It's &lt;a href="https://github.com/kamranayub/node-reddit" target="_blank"&gt;available on GitHub&lt;/a&gt;. Feel free to dissect it and improve it, fork it and b0rk it. Have fun!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=NPIOuP2SXdo:__W2q3UmlDQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=NPIOuP2SXdo:__W2q3UmlDQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=NPIOuP2SXdo:__W2q3UmlDQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=NPIOuP2SXdo:__W2q3UmlDQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/NPIOuP2SXdo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/NPIOuP2SXdo/playing-with-node-writing-a-reddit-cli</link>
      <category>Javascript</category>
      <category>Development</category>
      <category>Reddit</category>
      <category>Node.js</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/30/playing-with-node-writing-a-reddit-cli</feedburner:origLink></item>
    <item>
      <title>Programming is difficult business. It should never be undertaken in ignorance.</title>
      <pubDate>Mon, 23 Jan 2012 15:44:30 +0000</pubDate>
      <description>&lt;blockquote&gt;
&lt;p&gt;&amp;quot;Programming is difficult business. It should never be undertaken in ignorance.&amp;quot; - &lt;em&gt;Javascript: The Good Parts&lt;/em&gt;, Douglas Crockford&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What a great quote to program by.&lt;/p&gt;
&lt;p&gt;I've been undertaking a pet project (a &lt;em&gt;game&lt;/em&gt;, no less) that's forced me to brush up on my Javascriptings. I would highly recommend this book if you also want to get your hands dirty with Javascript.&lt;/p&gt;
&lt;p&gt;Oh, my game? Yah, I can't talk about it yet. I've never made a game before (but I've always wanted to) and I think I've finally come up with something I could possibly do (i.e. not 3D, not requiring 25 art designers, and not in a language I don't know). We'll see how it goes and I'll let you know.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=M5he2MX0iZ4:1b1XkHuCGrU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=M5he2MX0iZ4:1b1XkHuCGrU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=M5he2MX0iZ4:1b1XkHuCGrU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=M5he2MX0iZ4:1b1XkHuCGrU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/M5he2MX0iZ4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/M5he2MX0iZ4/programming-is-difficult-business-it-should-never</link>
      <category>words of wisdom</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/29/programming-is-difficult-business-it-should-never</feedburner:origLink></item>
    <item>
      <title>I just transferred all my domains away from my GoDaddy reseller because of SOPA</title>
      <pubDate>Fri, 23 Dec 2011 19:12:45 +0000</pubDate>
      <description>&lt;p&gt;Since I started hosting my own domains and doing web work, I've been using a website aptly named &lt;a href="http://cheap-domainregistration.com" target="_blank"&gt;Cheap-DomainRegistration.com&lt;/a&gt;. I also read today that &lt;a href="http://www.reddit.com/r/politics/comments/nntxp/godaddys_response_to_the_boycott_go_daddy_has/" target="_blank"&gt;GoDaddy supports SOPA&lt;/a&gt;. This is a Bad Thing&lt;sup&gt;TM&lt;/sup&gt;. The proposed &lt;a href="http://americancensorship.org/" target="_blank"&gt;SOPA legislation is bad&lt;/a&gt;, just like drinking anti-freeze is bad for dogs.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;Hah!&amp;quot; I said to myself, grinning in self-assuredness, &amp;quot;I am not using GoDaddy. This does not pertain to me.&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There was a linear relationship between the width of my grin and the amount of uneasiness about issuing my previous utterance. &lt;em&gt;Hmmm. To be frank, I am not sure exactly who owns my current domain host.&lt;/em&gt; Now the wheels in my head began turning (&lt;em&gt;Since I looked at that loony, old man&lt;/em&gt;). I visited the site... tried searching for who the company was registered under. I couldn't find anything. It felt... wrong.&lt;/p&gt;
&lt;p&gt;It turns out with a &lt;a href="http://www.godaddy.com/reseller/domain-reseller.aspx?ci=21918" target="_blank"&gt;little&lt;/a&gt; &lt;a href="http://www.who.is/website-information/godaddy.com/" target="_blank"&gt;Internet&lt;/a&gt; &lt;a href="http://www.who.is/website-information/cheap-domainregistration.com/" target="_blank"&gt;detectivery&lt;/a&gt;, I discovered that my now-late host was, in fact, a &lt;strong&gt;GoDaddy reseller.&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The reseller template CDR used was the &lt;em&gt;first&lt;/em&gt; reseller template available from GD, namely, &amp;quot;Black, Yellow, and Red&amp;quot;. You can see that by clicking &amp;quot;Quick Tour&amp;quot; on the GD Reseller page.&lt;/li&gt;
&lt;li&gt;The addresses are the same for both WHOIS records. Coincidence?&lt;/li&gt;
&lt;li&gt;The Legal Agreement for CDR also cites the same address.&lt;/li&gt;
&lt;li&gt;CDR uses secureserver.net for DNS, which is owned by GoDaddy.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Despair kicked in. I glanced at the brand new JA Henckels chef knife my friend got me for Christmas--the sharp blade, laser edged to perfection... it would be &lt;em&gt;so&lt;/em&gt; easy to--&amp;quot;No,&amp;quot; I said. &lt;em&gt;Keep hold of yourself, man!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Turns out, there's a great host called &lt;a href="http://namecheap.com" target="_blank"&gt;Namecheap.com&lt;/a&gt; that is &lt;a href="http://community.namecheap.com/blog/2011/12/22/we-say-no-to-sopa/" target="_blank"&gt;against SOPA&lt;/a&gt; (as you should be). Needless to say, I've initiated a bulk transfer of all my domains over to Namecheap. &lt;a href="http://latersgd.com/" target="_blank"&gt;I've done my part&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So now the question is, are &lt;strong&gt;you&lt;/strong&gt; inadvertently using a GoDaddy reseller? I highly recommend you double-check because you might just be surprised at what you find.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The more you know...&lt;/em&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=pm5WxfqCvKE:IEHw3l1xU7g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=pm5WxfqCvKE:IEHw3l1xU7g:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=pm5WxfqCvKE:IEHw3l1xU7g:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=pm5WxfqCvKE:IEHw3l1xU7g:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/pm5WxfqCvKE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/pm5WxfqCvKE/i-just-transferred-all-my-domains-away-from-my-god</link>
      <category>SOPA</category>
      <category>GoDaddy</category>
      <category>Namecheap</category>
      <category>Reddit</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/28/i-just-transferred-all-my-domains-away-from-my-god</feedburner:origLink></item>
    <item>
      <title>Using Cassette for semi-complicated scenarios [Updated 1/9/12]</title>
      <pubDate>Thu, 22 Dec 2011 21:24:19 +0000</pubDate>
      <description>&lt;p&gt;I love &lt;a href="http://getcassette.net" target="_blank"&gt;Cassette&lt;/a&gt;. You should too, because as of today, the project has gone MIT licensed which means &lt;strong&gt;you&lt;/strong&gt;, my dear reader, can use it right now.&lt;/p&gt;
&lt;p&gt;It's alright, I'll wait while you download it via Nuget. Done? Great.&lt;/p&gt;
&lt;h3&gt;Updates&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;1/9/12&lt;/strong&gt;: Added print media example&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1/9/12&lt;/strong&gt;: &lt;a href="https://github.com/andrewdavey/cassette/issues/121" target="_blank"&gt;Issue #121&lt;/a&gt; that I opened was fixed in the latest Cassette update, 1.0.1. I've updated my samples accordingly.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;More than a simple case&lt;/h3&gt;
&lt;p&gt;Cassette is &lt;a href="http://hanselminutes.com/260/net-api-design-that-optimizes-for-programmer-joy-with-jonathan-carter" target="_blank"&gt;optimized for programmer happiness&lt;/a&gt;. It's easy to use and there's a lot of small features that make it stand out from the crowd (SquishIt, Combres, etc.). If you want to get started using Cassette out of the box, you only need to do a couple things and those things are outlined well &lt;a href="http://getcassette.net/documentation/getting-started" target="_blank"&gt;in the documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;What I love about Cassette is the flexibility you have when you need to go beyond the simplest use case. For example, let's consider the file structure I am working with on a project right now:&lt;/p&gt;
&lt;pre class='brush: '&gt;Web Project
 |_ Public
   |_ images
   |_ print
     |_ print.css
   |_ scripts
     |_ i8n
       |_ en-US
       |_ zh-CN
     |_ special
       |_ modernizer-2.0.6.js
     |_ vendor
       |_ jquery-1.7.1.js
       |_ other framework files...
     |_ pages
       |_ page1.js
       |_ page2.js
     |_ app.js
   |_ themes
     |_ jquery.ui.core.css
     |_ other jQuery UI files
   |_ base.css
   |_ layout.css
   |_ otherfiles...&lt;/pre&gt;
&lt;p&gt;For the most part, this is how the project was organized and I needed to adapt Cassette to work here. I'll walk through a few things I needed to do first.&lt;/p&gt;
&lt;h3&gt;File organization&lt;/h3&gt;
&lt;p&gt;Before implementing Cassette, &lt;a href="http://modernizr.com" target="_blank"&gt;Modernizr&lt;/a&gt; was also in the &lt;em&gt;vendor&lt;/em&gt; folder. In addition, the localized JS files in &lt;em&gt;i8n&lt;/em&gt; were not in sub-folders according to their culture, they were just in &lt;em&gt;i8n&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;In the &lt;em&gt;vendor&lt;/em&gt; folder, we have both minified and non-minified JS files (mostly from Nuget). We don't want Cassette to minify an already minified file. I'll show you how I avoided that later on.&lt;/p&gt;
&lt;p&gt;I point this out because Cassette works better when things are organized so that they are &amp;quot;bundlable.&amp;quot; For that reason, I moved the files around so the structure looks like above. Since Modernizr has to be included in the page's &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; (it needs to load before the page loads to set up Respond media queries and HTML5 elements) and all other scripts can be included before the &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt; tag, I separated it into the &lt;em&gt;special&lt;/em&gt; folder.&lt;/p&gt;
&lt;p&gt;As for the &lt;em&gt;pages&lt;/em&gt; scripts, these need to be only included on a per-page basis. If areas of your site need multiple assets, I would definitely move them into sub-folders (I would go a step farther perhaps and even include them by convention, the same way MVC plays with Views and Controllers but that's for another blog post!).&lt;/p&gt;
&lt;h3&gt;Configuring the bundles&lt;/h3&gt;
&lt;p&gt;I'll walk you through my Cassette configuration file. If you pull down Cassette via Nuget, you will have a new &lt;code&gt;CassetteConfiguration&lt;/code&gt; file and class. This is what Cassette picks up and uses to bundle your files. You can move it wherever you want, Cassette magically picks it up. It is important to realize that if you want full control over how Cassette bundles your assets, you'll need to do some configuration. Luckily, it's not bad!&lt;/p&gt;
&lt;h4&gt;Excluding directories, minified, and VSDoc files&lt;/h4&gt;
&lt;p&gt;Out-of-the-box, Cassette does not provide an easy mechanism to exclude directories when adding bundles per sub-directory. The reason I think this is important is because we want to set up a general &amp;quot;catch-all&amp;quot; method to deal with bundling, namely: treat each directory as a bundle. That way we can add folders/files and have them bundled automatically for us. This creates less work for the team.&lt;/p&gt;
&lt;p&gt;I also wanted to ignore any pre-minified or -vsdoc files (Cassette by default ignores vsdoc files).&lt;/p&gt;
&lt;p&gt;To solve this issue, I just derived a class from &lt;code&gt;FileSearch&lt;/code&gt; and added my own requirements:&lt;/p&gt;
&lt;p&gt;&lt;script src="https://gist.github.com/1583784.js"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;I could have also implemented my own &lt;code&gt;IFileSearch&lt;/code&gt;, perhaps one that used a fluent interface to exclude directories or file suffixes, but for my limited needs, this would do well and I really only needed to build upon the out-of-the-box &lt;code&gt;FileSearch&lt;/code&gt; class. Maybe I will implement a fluent search interface as a fun project.&lt;/p&gt;
&lt;p&gt;The other thing I needed to add into the &lt;em&gt;Regex&lt;/em&gt; was the ability to exclude any files ending in &amp;quot;.min&amp;quot; or &amp;quot;-min&amp;quot; (just in case). Cassette recommends you simply delete minified files. That's a good tip, except they'll just be back when you do a Nuget update, so why not just ignore them by default as well (&lt;em&gt;ahem&lt;/em&gt;)?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Side note: It seems more efficient to me to allow Cassette to reference minified files but to bypass minification of them. Perhaps this will be implemented in the future?&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Configuring stylesheets&lt;/h4&gt;
&lt;p&gt;For our project, we need to include Google Web Fonts in the page, in addition to the CSS files in the &lt;em&gt;public&lt;/em&gt; directory. We keep the jQuery UI themes separate in case we update via Nuget so we can simply overwrite them.&lt;/p&gt;
&lt;pre class='brush: c#'&gt;private void ConfigureStylesheets(BundleCollection bundles)
{
    // Sub-folder bundled CSS
    bundles.AddPerSubDirectory&amp;lt;StylesheetBundle&amp;gt;("Public",
    new ExcludeDirectorySearch("*.css", new[] { "scripts" }));

    // Print media bundle
    bundles.Get&amp;lt;StylesheetBundle&amp;gt;("~/public/print").Media = "print";


    // Google Web fonts
    bundles.AddUrlWithAlias&amp;lt;StylesheetBundle&amp;gt;(
        Scheme + "://fonts.googleapis.com/css?family=Droid+Sans|Montserrat", "Fonts");
}&lt;/pre&gt;
&lt;p&gt;The first line tells Cassette to add a bundle per sub-directory, so the following bundles will be made:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;public (our CSS)&lt;/li&gt;
&lt;li&gt;public\themes (jQuery UI)&lt;/li&gt;
&lt;li&gt;public\print (print media)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It also uses the class above and excludes the &amp;quot;scripts&amp;quot; directory from search, for good measure.&lt;/p&gt;
&lt;p&gt;One of the caveats to the directory exclude is that it technically does &lt;em&gt;not&lt;/em&gt; exclude directories; Cassette still creates empty bundles. Thus, if you tried to add a &lt;code&gt;~/public/print&lt;/code&gt; bundle, you'd get an exception saying that it already exists. So, we &lt;em&gt;cannot&lt;/em&gt; exclude the &lt;code&gt;print&lt;/code&gt; directory. Instead, you can reference it directly after it's been added and manually set the &lt;code&gt;Media&lt;/code&gt; to print. Problem solved! Ideally, Cassette should not be creating empty bundles.&lt;/p&gt;
&lt;p&gt;The second line includes the direct Google stylesheet reference aliased as &lt;em&gt;Fonts&lt;/em&gt; (in references, &lt;code&gt;~/Fonts&lt;/code&gt;). In this project, our site is behind a load balancer so SSL is terminated at the balancer. This means you can't just use the built-in ASP.NET &lt;code&gt;Request.IsSecureConnection&lt;/code&gt; because by the time the request even hits the web server, SSL is not there. &lt;strike&gt;Therefore, I utilize one of the utilities we have to check if SSL is enabled via server headers that the balancer sets.&lt;/strike&gt; The scheme is not identifiable yet in our &lt;code&gt;Application_Start&lt;/code&gt;, so we cannot use this method, but I will leave it here for posterity. We switched to always using SSL since our site is under SSL to the user. &lt;strong&gt;Note:&lt;/strong&gt; You can simply include fonts normally using the Google Font Loader or by a direct &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; reference, however, why not use Cassette if you're already going that route?&lt;/p&gt;
&lt;pre class='brush: c#'&gt;// Also in CassetteConfiguration.cs
private string Scheme
{
    get { return Utilities.SharedUtils.IsSecureConnection() ? "https" : "http"; }
}&lt;/pre&gt;
&lt;p&gt;In our &lt;em&gt;Layout.cshtml&lt;/em&gt; file, we now need to reference these two bundles and render them to the page.&lt;/p&gt;
&lt;pre class='brush: html'&gt;@{
    Bundles.Reference("public"); // Our CSS
}

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    @Bundles.RenderStylesheets()
&amp;lt;/head&amp;gt;&lt;/pre&gt;
&lt;p&gt;So how does Cassette understand in what order to put these references? First, Cassette goes by the order in which you call &lt;code&gt;@Bundles.Reference&lt;/code&gt;. To make things easier though, I edited our main &lt;em&gt;layout.css&lt;/em&gt; file to add Cassette-compatible references.&lt;/p&gt;
&lt;pre class='brush: css'&gt;/* For Cassette */
/* @reference ~/Fonts base.css skeleton.css themes */&lt;/pre&gt;
&lt;p&gt;When Cassette parses &lt;em&gt;layout.css&lt;/em&gt;, it will detect these references. Since all files are included in our &lt;em&gt;public&lt;/em&gt; bundle, everything goes great and the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt;'s are added in order:&lt;/p&gt;
&lt;pre class='brush: html'&gt;&amp;lt;link href="http://fonts.googleapis.com/css?family=Droid+Sans|Montserrat" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/themes/jquery.ui.button.css?165be2c1b488debc298a8dbaa77347b326a0d2a2" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/themes/jquery.ui.core.css?e5bc0be5bec6729cd338579a99e89c39c844c181" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/themes/jquery.ui.datepicker.css?6243e68daf6d6b3c03ce47d66abef2feba488d94" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/themes/jquery.ui.dialog.css?45faa27d7c66d72df00c39c40506da46bed885e3" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/themes/jquery.ui.resizable.css?a1bf026ec6d01daa0f7853215774c9e3aeb8afa9" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/themes/jquery.ui.theme.css?83294a0e12785f8dac8d3f0de4bf65f481b55f13" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/base.css?6401a75dfde8196c81d8bb39c3e5fb25dab89ad1" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/skeleton.css?d7414571707853cafb3028441861d31291d60789" type="text/css" rel="stylesheet"/&amp;gt;
&amp;lt;link href="/_cassette/asset/Public/layout.css?0ac01597826664dcc3a6c031a61c11ffa17fdd3d" type="text/css" rel="stylesheet"/&amp;gt;&lt;/pre&gt;
&lt;h4&gt;Configuring Javascript&lt;/h4&gt;
&lt;p&gt;The Javascript assets were a bit harder to configure; we needed to do a couple things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Auto-bundle everything except a few special cases&lt;/li&gt;
&lt;li&gt;Have a &amp;quot;special&amp;quot; folder for &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; references&lt;/li&gt;
&lt;li&gt;Avoid editing vendor file references so a Nuget update won't blow the changes away&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is my Javascript configuration:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;private void ConfigureJavascript(BundleCollection bundles)
{
    // Localized JS - i8n/{culture}
    bundles.AddPerSubDirectory&amp;lt;ScriptBundle&amp;gt;("Public/scripts/i8n", true);

    // Per-page JS (eventually may want separate folders as well)
    bundles.AddPerIndividualFile&amp;lt;ScriptBundle&amp;gt;("Public/scripts/pages");

    // Bundle all scripts except special cases above
    bundles.AddPerSubDirectory&amp;lt;ScriptBundle&amp;gt;("Public/scripts",
    new ExcludeDirectorySearch("*.js", new[] { "i8n", "pages" }));
}&lt;/pre&gt;
&lt;p&gt;Our configuration code above does exactly what we need. We can double check by browsing to &lt;em&gt;/_cassette&lt;/em&gt; and seeing what Cassette decided to turn into bundles:&lt;/p&gt;
&lt;pre class='brush: '&gt;~/Public/scripts
    app.js

~/Public/scripts/pages

~/Public/scripts/special
    modernizr-2.0.6.js

~/Public/scripts/vendor
    jquery-1.7.1.js
    jquery-ui-1.8.16.js
    jQuery.tmpl.js
    jquery.validate.js
    jquery.validate.unobtrusive.js

~/Public/scripts/i8n/zh-CN
    jquery.ui.datepicker-zh-CN.js
    jquery.validate-zh-CN.js

~/Public/scripts/i8n/es-MX
    jquery.ui.datepicker-es-MX.js
    jquery.validate-es-MX.js

~/Public/scripts/pages/page1.js
    ~/Public/scripts/pages/page1.js

~/Public/scripts/pages/page2.js
    ~/Public/scripts/pages/page2.js&lt;/pre&gt;
&lt;p&gt;You can see the exclusions worked, since the &lt;em&gt;pages&lt;/em&gt; folder is blank (i.e. not bundled up) and each page script is made later on a per-file basis.&lt;/p&gt;
&lt;p&gt;The reason I like this is because now I can just add folders to &lt;em&gt;scripts&lt;/em&gt; without worrying about adding a manual Cassette bundle; it will just do it automatically and ignore the two folders I need to make a special case for.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Including the script assets&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Remember I said Modernizr should be included in &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; but all the rest of the scripts should be before &lt;code&gt;&amp;lt;/body&amp;gt;&lt;/code&gt;? We can do that easily with Cassette.&lt;/p&gt;
&lt;pre class='brush: '&gt;@* _Layout.cshtml *@
@{
    // CSS
    Bundles.Reference("public");

    // Scripts (vendor first!)
    Bundles.Reference("public/scripts/special", "head");
    Bundles.Reference("public/scripts");
}

&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    @Bundles.RenderStylesheets()

    @* Modernizr needs to be first *@
    @Bundles.RenderScripts("head")
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

    @* All other scripts *@    
    @Bundles.RenderScripts()

    @* Localized scripts *@
    @RazorHelpers.LocalizedScripts()
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;p&gt;Notice the reference for Modernizr. I am using the overloaded &lt;code&gt;Reference&lt;/code&gt; that accepts a &lt;code&gt;pageLocation&lt;/code&gt; argument. This is the same as how you can include Razor sections in MVC3. The location is just a string you use when you call &lt;code&gt;@Bundles.RenderScripts({pageLocation})&lt;/code&gt;. &lt;strong&gt;Tip:&lt;/strong&gt; You can also specify &lt;code&gt;pageLocation&lt;/code&gt; when you create a bundle in your &lt;code&gt;CassetteConfiguration&lt;/code&gt; class. I did not, since I only needed one script in the &lt;code&gt;head&lt;/code&gt; tag, but if you have multiple folders or bundles that need to be in separate locations, you don't have to specify a page location in your view files.&lt;/p&gt;
&lt;p&gt;As with our stylesheets, we need a way to tell Cassette how to order the vendor scripts since we typically have plugins that depend on each other (such as jQuery). You &lt;em&gt;could&lt;/em&gt; edit each vendor file and manually add file references to them, but that's no fun is it? In order to reduce headaches and maintenance, create a &lt;a href="http://getcassette.net/documentation/configuration/bundle-descriptor-file" target="_blank"&gt;Bundle Descriptor File&lt;/a&gt; instead. That way, you will only need to keep that file up-to-date as you add more vendor plugins.&lt;/p&gt;
&lt;p&gt;In the &lt;em&gt;vendors&lt;/em&gt; folder, I simply made a &lt;em&gt;bundle.txt&lt;/em&gt; file:&lt;/p&gt;
&lt;pre class='brush: '&gt;jquery-1.7.1.js
jquery-ui-1.8.16.js
jQuery.tmpl.js
jquery.validate.js
jquery.validate.unobtrusive.js
*&lt;/pre&gt;
&lt;p&gt;The wildcard at the end tells Cassette, &amp;quot;Yo, do whatever you want for the rest of the scripts you find.&amp;quot; How useful! Now there's even &lt;em&gt;less&lt;/em&gt; maintenance (didn't I tell you this baby was optimized for happiness?).&lt;/p&gt;
&lt;p&gt;For localization, I just created a Razor helper to include the right culture files for me (this shows you that you can use the &lt;code&gt;Bundles&lt;/code&gt; object anywhere in your Razor views and Cassette will include the references):&lt;/p&gt;
&lt;pre class='brush: c#'&gt;//
// ~/App_Code/RazorHelpers.cshtml
//
@helper LocalizedScripts()
    {
    string cultureName = System.Threading.Thread.CurrentThread.CurrentCulture.Name;

    if (cultureName != Constants.DefaultCulture)
    {
        Bundles.Reference(String.Format("/public/scripts/i8n/{0}", cultureName));
    }
}&lt;/pre&gt;
&lt;p&gt;And on individual views, I can now included page-specific JS:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;@* Views\Controller1\View1.cshtml *@
@{
    Bundles.Reference("~/public/scripts/pages/page1.js");
}&lt;/pre&gt;
&lt;p&gt;Cassette is smart and will include the JS automatically in the &lt;em&gt;Layout.cshtml&lt;/em&gt; file &lt;em&gt;and&lt;/em&gt; in the proper order (in my case, just at the end. If you had references inside, Cassette would know).&lt;/p&gt;
&lt;h4&gt;To debug or not to debug, that is the question!&lt;/h4&gt;
&lt;p&gt;In our environment, we don't necessarily want to turn off Cassette as soon as the web.config's &lt;code&gt;debug&lt;/code&gt; flag turns to &lt;em&gt;false&lt;/em&gt;. Instead, we have different environments where it might make sense to leave Cassette on. When the site goes out to QA, then it makes sense to turn on Cassette's Release mode, but while developing locally and in staging, we may need to debug a bit more.&lt;/p&gt;
&lt;pre class='brush: c#'&gt;public void Configure(BundleCollection bundles, CassetteSettings settings)
{
    // Debug locally and in staging
    settings.IsDebuggingEnabled = 
        Server.CurrentEnvironment == Server.ServerEnvironment.Developer ||
        Server.CurrentEnvironment == Server.ServerEnvironment.Development;

    ConfigureStylesheets(bundles);
    ConfigureJavascript(bundles);
}&lt;/pre&gt;
&lt;p&gt;And there's my full &lt;code&gt;CassetteConfiguration&lt;/code&gt; class!&lt;/p&gt;
&lt;h3&gt;So what are you waiting for?&lt;/h3&gt;
&lt;p&gt;Cassette is awesome and I hope you learned a couple tips for doing things in a semi-complex environment. Let me know if you've found any more good tips &amp;amp; tricks, or if you notice I missed an optimization or hidden feature.&lt;/p&gt;
&lt;p&gt;I would really like to do some performance testing with Cassette. It &lt;em&gt;does&lt;/em&gt; add to your overhead on the site, but in my Firebug timings, I noticed much less time being spent on CSS files and more time being spent on JS files. If you are worried about performance on a massive scale, it will &lt;strong&gt;always&lt;/strong&gt; be faster to minify and concatenate your files at compile or build time because then IIS is serving the files directly. Components like Cassette are meant to ease your burden by handling that for you, at the expense of some milliseconds. Remember that due to caching and aggressive expiration headers, the browser should &lt;em&gt;not&lt;/em&gt; be requesting assets anyway after the first request.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=LcoTYI8EsiE:W6gvO-8sPSY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=LcoTYI8EsiE:W6gvO-8sPSY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=LcoTYI8EsiE:W6gvO-8sPSY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=LcoTYI8EsiE:W6gvO-8sPSY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/LcoTYI8EsiE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/LcoTYI8EsiE/using-cassette-for-semi-complicated-scenarios-upda</link>
      <category>MVC</category>
      <category>C#</category>
      <category>Tips &amp; Tricks</category>
      <category>Cassette</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/27/using-cassette-for-semi-complicated-scenarios-upda</feedburner:origLink></item>
    <item>
      <title>Tips When Using Backbone.js in a .NET world</title>
      <pubDate>Thu, 15 Dec 2011 20:37:51 +0000</pubDate>
      <description>&lt;p&gt;I am learning &lt;a href="http://documentcloud.github.com/backbone/" target="_blank"&gt;Backbone.js&lt;/a&gt; so I can re-write the main GUI for &lt;a href="http://keeptrackofmygames.com" target="_blank"&gt;KTOMG&lt;/a&gt;. I am still learning and I've run into a couple gotchas that I hope I can clear up for anyone else that dares to tread in these woods. Still, I've been able to rewrite the listing of a user's library in one night using Backbone and all my existing back-end code (the farthest up I edited was my controller). Very impressive for a Backbone n00b!&lt;/p&gt;
&lt;h2&gt;Backbone IS your application&lt;/h2&gt;
&lt;p&gt;After watching the &lt;a href="http://peepcode.com/products/backbone-iii" target="_blank"&gt;PeepCode screencasts&lt;/a&gt; (I, II, and III), I have realized something about Backbone.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Backbone will pretty much replace your MVC views and controller logic.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This didn't hit me until the last episode and at first, this felt threatening. I am working in ASP.NET MVC and it feels wrong to not utilize it. After thinking about it some more, however, there were a few important points to consider:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Backbone doesn't &lt;em&gt;necessarily&lt;/em&gt; have to be your whole app. In fact, right now I am only using Backbone for the main &amp;quot;library&amp;quot; interface and I am keeping the rest of the site in plain-old MVC 3.&lt;/li&gt;
&lt;li&gt;You still use your controllers and could even use your Razor views as HTML templates.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Considering those points, I felt a lot better about using Backbone. Not only will it be a great experience, it'll also make the most important part of my application very responsive and robust, without needing to worry a ton about the plumbing.&lt;/p&gt;
&lt;p&gt;Who knows? Maybe KTOMG will be running on Node.js by the end of the month.&lt;/p&gt;
&lt;h2&gt;Tips When Using Backbone with ASP.NET MVC&lt;/h2&gt;
&lt;p&gt;There were a few gotchas I ran into when using Backbone in my typical .NET environment.&lt;/p&gt;
&lt;h3&gt;Use AttributeRouting, like, now&lt;/h3&gt;
&lt;p&gt;&lt;a href="https://github.com/mccalltd/AttributeRouting" target="_blank"&gt;AttributeRouting&lt;/a&gt; is one of my new favorite packages. It axes the mostly-confusing, mostly-convoluted Global.asax way of handling routes in favor of a more-discoverable (I feel) way of doing routes by decorating actual controller methods:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;using AttributeRouting;

[RoutePrefix("games")]
public class GamesController : Controller {

  //
  // GET: /games/

  [GET("")
  public ActionResult Index() {}

  //
  // POST: /games/

  [POST("")
  public ActionResult New(Model model) {}

}&lt;/pre&gt;
&lt;p&gt;Hopefully you will see why this is useful. Backbone is opinionated in that it assumes you're using a RESTful interface for your API. In normal vanilla MVC, this could turn your Global.asax into a routing nightmare. However, with AttributeRouting, it's easy! Here's an example of a &lt;a href="http://stackoverflow.com/a/6263133/109458" target="_blank"&gt;Backbone-compatible REST controller&lt;/a&gt;:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;using AttributeRouting;

[RoutePrefix("api/games")]
public class GamesApiController : Controller {

    //
    // GET: /api/games/

    [GET("")]
    public JsonResult Index() {}

    //
    // POST: /api/games/

    [POST("")]
    public JsonResult Create() {}

    //
    // GET: /api/games/{id}

    [GET("{id}")]
    public JsonResult Show(int id) {}

    //
    // PUT: /api/games/{id}

    [PUT("{id}")]
    public JsonResult Update(int id) {}

    //
    // DELETE: /api/games/{id}

    [DELETE("{id}")]
    public JsonResult Delete(int id) {}

}&lt;/pre&gt;
&lt;p&gt;Good fodder for a T4 template. If you have a larger site, consider using an &lt;code&gt;Api&lt;/code&gt; MVC Area for cleaner separation.&lt;/p&gt;
&lt;h3&gt;Be careful when serializing your objects&lt;/h3&gt;
&lt;p&gt;I ran into two gotchas with serializing my objects.&lt;/p&gt;
&lt;p&gt;First, if you have an &lt;code&gt;Id&lt;/code&gt; property/field, Backbone will not be happy. &lt;strike&gt;It needs to be lowercase id&lt;/strike&gt;. You should utilize the &lt;a href="https://github.com/documentcloud/backbone/blob/master/backbone.js#L153https://github.com/documentcloud/backbone/blob/master/backbone.js#L153" target="_blank"&gt;&lt;code&gt;idAttribute&lt;/code&gt;&lt;/a&gt; option on your Backbone model to override the property name. It took me forever to figure out why nothing was happening when I deleted a model.&lt;/p&gt;
&lt;pre class='brush: js'&gt;class MyModel extends Backbone.Model
  idAttribute: "Id"&lt;/pre&gt;
&lt;p&gt;Second, if you are going to serialize EF entities when proxying or lazy-loading is enabled, you need to use a serialization framework like &lt;a href="http://json.codeplex.com/" target="_blank"&gt;JSON.NET&lt;/a&gt; &lt;strong&gt;or&lt;/strong&gt; you need to make flat DTO objects (or view models). I opted for the latter approach first because it was quick, but I am in the process of implementing JSON.NET to do serialization of my entities for me.&lt;/p&gt;
&lt;p&gt;For EF serialization, you need to use a custom &lt;code&gt;ContractResolver&lt;/code&gt;. I borrowed &lt;a href="http://stackoverflow.com/questions/6991596/serializing-ef4-1-entities-using-json-net" target="_blank"&gt;this one&lt;/a&gt;. Furthermore, I also needed to set the &lt;code&gt;ReferenceLoopHandling&lt;/code&gt; to &lt;code&gt;Ignore&lt;/code&gt; on a new &lt;code&gt;JsonSerializerSettings&lt;/code&gt; object so it would avoid circular references.&lt;/p&gt;
&lt;p&gt;Finally, this is optional but considering the first gotcha, I highly recommend you inherit the EF contract resolver above from &lt;code&gt;CamelCasePropertyNamesContractResolver&lt;/code&gt; so your JSON is serialized with camelCase properties.&lt;/p&gt;
&lt;h3&gt;Consider leveraging Razor/ASPX partial views for your templates&lt;/h3&gt;
&lt;p&gt;I haven't actually tried this, but I don't see why it wouldn't work. In a Backbone project you'll typically have plenty of templates. Right now I have 3 but I expect it to grow quite a bit in the future. I was planning on moving all these templates to &lt;code&gt;.cshtml&lt;/code&gt; files and then using &lt;code&gt;@Html.Partial(&amp;quot;_TemplateName&amp;quot;)&lt;/code&gt; to include them in my main layout. I may even create a small extension method to wrap that in a &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tag. I will update this post if I do.&lt;/p&gt;
&lt;p&gt;If you happen to be working on an OSS project, you should be using &lt;a href="http://getcassette.net" target="_blank"&gt;Cassette&lt;/a&gt; because it can package up your HTML/Knockout templates and &lt;a href="http://getcassette.net/documentation/html-templates" target="_blank"&gt;include them all in your page for you&lt;/a&gt; &lt;strong&gt;automagically&lt;/strong&gt;. If I wasn't using AppHarbor and I was using a dedicated server, I would buy Cassette in a second. I wish they had per-site licenses.&lt;/p&gt;
&lt;h3&gt;Use those organization skills&lt;/h3&gt;
&lt;p&gt;ASP.NET MVC comes with a friendly and intuitive file layout out-of-the-box:&lt;/p&gt;
&lt;pre class='brush: '&gt;Project
 |_ Controllers
 |_ Models
 |_ Scripts
 |_ Styles
 |_ Views&lt;/pre&gt;
&lt;p&gt;I've shortened mine, plus I've made my scripts directory a bit more Backbone friendly:&lt;/p&gt;
&lt;pre class='brush: '&gt;Project
 |_ Controllers
 |_ Models
 |_ Public
   |_ Images
   |_ Scripts
     |_ App
       |_ Collections.coffee
       |_ Backbone CoffeeScript files
     |_ Framework (or Vendor)
   |_ scss files...
 |_ Views&lt;/pre&gt;
&lt;p&gt;It's up to you how you like to organize, and perhaps you'd even like to separate it further down into modules.&lt;/p&gt;
&lt;h3&gt;Learn CoffeeScript and SASS&lt;/h3&gt;
&lt;p&gt;This technically does not have anything to do with .NET or Backbone. However, your life will be &lt;em&gt;easier&lt;/em&gt; if you learn CoffeeScript as that makes using Backbone that much more pleasant:&lt;/p&gt;
&lt;pre class='brush: '&gt;class GameView extends Backbone.View
  className: 'game'
  template: _.template($("#game-template").html())

  initialize: (options) -&amp;gt; 
    @model.bind 'change', @render, @

  render: -&amp;gt; 
    $(@el).html @template()
    @ # Never forget this line in render() or you'll regret it&lt;/pre&gt;
&lt;p&gt;(&lt;em&gt;Disclaimer:&lt;/em&gt; This is not real and won't run; it's meant as an illustration of Backbone in CoffeeScript)&lt;/p&gt;
&lt;p&gt;It's much nicer to write in Backbone without all those pesky parenthesis and manual &lt;code&gt;bindAll&lt;/code&gt; or &lt;code&gt;extend&lt;/code&gt; shenanigans. Again, I'd recommend &lt;a href="http://peepcode.com/products/coffeescript" target="_blank"&gt;PeepCode's CoffeeScript screencast&lt;/a&gt;, that's about all it takes to learn it properly.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://www.mindscapehq.com/upload/web-workbench/preview.png" alt="Mindscape Example" /&gt;
&lt;/div&gt;
&lt;p&gt;If you do decide to take the plunge (it's worth it!), get yourself &lt;a href="http://www.mindscapehq.com/products/web-workbench" target="_blank"&gt;Mindscape Web Workbench&lt;/a&gt; and you'll be a much happier camper when working with Coffee, SASS, and LESS in Visual Studio.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=olOgElZl7q0:WKArYsqpAAk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=olOgElZl7q0:WKArYsqpAAk:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=olOgElZl7q0:WKArYsqpAAk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=olOgElZl7q0:WKArYsqpAAk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/olOgElZl7q0" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/olOgElZl7q0/tips-when-using-backbonejs-in-a-net-world</link>
      <category>Tips &amp; Tricks</category>
      <category>BackboneJS</category>
      <category>CoffeeScript</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/26/tips-when-using-backbonejs-in-a-net-world</feedburner:origLink></item>
    <item>
      <title>VS Extension for JS Template Support</title>
      <pubDate>Wed, 14 Dec 2011 14:27:33 +0000</pubDate>
      <description>&lt;p&gt;I am thinking of embarking on a journey that involves &lt;a href="http://documentcloud.github.com/backbone/" target="_blank"&gt;Backbone.js&lt;/a&gt; in my MVC 3 project. This would involve heavy use of templating. After thinking about it a bit and doing some Googling, I realized that &lt;strong&gt;there is no JS template extension for Visual Studio.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I realize that you could just name your template files &amp;quot;.html&amp;quot; and be done with it. However, I feel like that isn't &amp;quot;cool&amp;quot; enough.&lt;/p&gt;
&lt;p&gt;Based on some &lt;a href="http://stackoverflow.com/questions/3253205/how-do-i-visual-studio-syntax-highlighting-extension" target="_blank"&gt;preliminary research&lt;/a&gt;, it seems to me it would not be impossible to add support for common JS template syntax highlighting... and perhaps even Intellisense.&lt;/p&gt;
&lt;p&gt;In fact, VS 11 &lt;a href="http://blogs.msdn.com/b/webdevtools/archive/2011/09/15/new-javascript-editing-features-for-web-development-in-visual-studio-11-developer-preview.aspx" target="_blank"&gt;will support jQuery Template syntax highlighting&lt;/a&gt;, but not only is jquery-tmpl &lt;a href="http://weblogs.asp.net/stevewellens/archive/2011/12/01/goodby-jquery-templates-hello-jsrender.aspx" target="_blank"&gt;obsolete&lt;/a&gt;, it is also not the &lt;a href="http://jsperf.com/dom-vs-innerhtml-based-templating/112" target="_blank"&gt;only kind of templating system&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Why am I making this post? I am not sure. Part of me wants to attempt to make such an extension, probably starting out with a simple template syntax like &lt;a href="http://mustache.github.com/" target="_blank"&gt;Mustache&lt;/a&gt; (or &lt;a href="http://www.handlebarsjs.com/" target="_blank"&gt;Handlebars&lt;/a&gt;). I would be happy with an extension that was pretty much an HTML highlighter that also highlighted tokens (e.g. &amp;quot;{{&amp;quot;, &amp;quot;}}&amp;quot;, etc.) just like VS does for Razor. Bonus points awarded if it [somehow] does Intellisense. In my dream world, it would act very much like MVC Razor does right now, where you declare the &amp;quot;model&amp;quot; for the template and that is its context for Intellisense. To me, that seems reasonable for a no-logic template system like Mustache but may prove unwieldy once you allow for normal JS expressions like in jquery-tmpl. That kind of syntax may also not make sense in the first place considering you could pass in whatever you wanted into a template's context.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=qLW-vaQpM30:Zrgg8hX_GF0:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=qLW-vaQpM30:Zrgg8hX_GF0:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=qLW-vaQpM30:Zrgg8hX_GF0:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=qLW-vaQpM30:Zrgg8hX_GF0:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/qLW-vaQpM30" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/qLW-vaQpM30/vs-extension-for-js-template-support</link>
      <category>Javascript</category>
      <category>Visual Studio</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/25/vs-extension-for-js-template-support</feedburner:origLink></item>
    <item>
      <title>Skyrim Mod Request Compilation</title>
      <pubDate>Mon, 14 Nov 2011 16:41:56 +0000</pubDate>
      <description>&lt;p&gt;A compilation of all the Skyrim mods I've thought of or want to see made based on other people's suggestions.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=r-Z2scJBi_g:3t_UMzHXe3Q:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=r-Z2scJBi_g:3t_UMzHXe3Q:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=r-Z2scJBi_g:3t_UMzHXe3Q:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=r-Z2scJBi_g:3t_UMzHXe3Q:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/r-Z2scJBi_g" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/r-Z2scJBi_g/skyrim-mod-request-compilation</link>
      <category>Skyrim</category>
      <category>modding</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/24/skyrim-mod-request-compilation</feedburner:origLink></item>
    <item>
      <title>MVC Pro Tip: Don't use the "id" URL parameter in your routes</title>
      <pubDate>Wed, 02 Nov 2011 14:25:08 +0000</pubDate>
      <description>&lt;p&gt;By default, MVC will use a route layout like this:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;routes.MapRoute(
    "Default", // Route name
    "{controller}/{action}/{id}", // URL with parameters
    new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);&lt;/pre&gt;
&lt;p&gt;Besides the fact that you shouldn't use the default route (use named routes!), there's another issue.&lt;/p&gt;
&lt;p&gt;Do you have any domain models like this?&lt;/p&gt;
&lt;pre class='brush: c#'&gt;class Foo {
    public int Id { get; set; }
}&lt;/pre&gt;
&lt;p&gt;Now, let's say you wanted to add a new Edit method for this model:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;public FooController {
    [HttpPost]
    public ActionResult Edit(int id, Foo foo) {

    }
}&lt;/pre&gt;
&lt;p&gt;There will be a problem here if you expect to be able to change this ID (rare but it happens). MVC will model bind the route's &lt;code&gt;id&lt;/code&gt; parameter to your model's ID, possibly breaking your code. This is because MVC does not differentiate your two &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;Id&lt;/code&gt; parameters, it sees them as one in the same (this has to do with the underlying &lt;code&gt;Request&lt;/code&gt; collection).&lt;/p&gt;
&lt;h3&gt;Fix it!&lt;/h3&gt;
&lt;p&gt;It's simple to fix. Instead of using &lt;code&gt;id&lt;/code&gt; as a URL parameter throughout your application, use something else! I typically use &lt;code&gt;identifier&lt;/code&gt;:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;routes.MapRoute(
    "Default", // Route name
    "{controller}/{action}/{identifier}", // URL with parameters
    new { controller = "Home", action = "Index", identifier = UrlParameter.Optional } // Parameter defaults
);

// Controller
public FooController {
    [HttpPost]
    public ActionResult Edit(int identifier, Foo foo) {

    }
}&lt;/pre&gt;
&lt;p&gt;Voila. No more model binding issues!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=XuSs7YTA4EI:Itj8fdE2Xrw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=XuSs7YTA4EI:Itj8fdE2Xrw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=XuSs7YTA4EI:Itj8fdE2Xrw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=XuSs7YTA4EI:Itj8fdE2Xrw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/XuSs7YTA4EI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/XuSs7YTA4EI/mvc-pro-tip-dont-use-the-id-url-parameter-in-your</link>
      <category>MVC</category>
      <category>Tips &amp; Tricks</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/23/mvc-pro-tip-dont-use-the-id-url-parameter-in-your</feedburner:origLink></item>
    <item>
      <title>What's the most efficient way to read config settings in .NET?</title>
      <pubDate>Thu, 20 Oct 2011 20:33:09 +0000</pubDate>
      <description>&lt;p&gt;In a project I'm contributing to, I saw some code like this (simplified but boiling down to):&lt;/p&gt;
&lt;pre class='brush: c#'&gt;public static string ConfigValue {
    get {
        return System.Configuration.ConfigurationManager.AppSettings["ConfigValue"];
    }
}&lt;/pre&gt;
&lt;p&gt;Is there anything wrong with this? It's a static read-only property. That seems pretty reasonable!&lt;/p&gt;
&lt;h3&gt;Storage matters&lt;/h3&gt;
&lt;p&gt;The issue that I saw was that there's no real reason to do this. You could do this just as easily:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;public static readonly string ConfigValue = 
     System.Configuration.ConfigurationManager.AppSettings["ConfigValue"];&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;So, who cares? It looks the same to me!&lt;/em&gt; As far as I can tell, you should care, even a little bit. Check this out:&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/34" alt="Perf Timer" /&gt;
&lt;/div&gt;
&lt;p&gt;Notice anything? The &lt;code&gt;static readonly&lt;/code&gt; field is far and away faster than any other approach (400 &lt;em&gt;nanoseconds&lt;/em&gt;). The other three approaches are pretty similar, ranging from 95ms to 104ms. I'll do the math for you: &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A &lt;code&gt;static readonly&lt;/code&gt; field is upwards of 200x faster&lt;/strong&gt; than the equivalent property implementation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The reason is simple: &lt;code&gt;get/set&lt;/code&gt; are translated into methods by the compiler. A field is simply a field. Any property will incur some penalty for wrapping methods, so a field will always be faster! I use properties all the time but sometimes it might make sense to forgo a property in favor of a field.&lt;/p&gt;
&lt;h3&gt;The test case&lt;/h3&gt;
&lt;p&gt;Will you ever notice differences this small? I doubt it (the test was 100000 iterations). I did this for a learning experiment and for future reference. &lt;strike&gt;However, reading a config file is I/O at its core. To me, that says you should care about minimizing possible calls to the disk. Under a substantial load test, perhaps this would incur a visible penalty to page load time depending on how many calls you had to your settings wrapper.&lt;/strike&gt; (&lt;strong&gt;Update:&lt;/strong&gt; One of my colleagues pointed out that app config is probably loaded on start-up, so there shouldn't any disk I/O happening.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Performance matters&lt;/strong&gt; but this is probably so picky that you really don't ever need to worry about it. As my co-worker said to me after reading this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;A single call to a suboptimal EF/NHibernate/SQL query is far more damaging than 100,000 calls to these simple properties/fields. If a query took 1 second it would be roughly equivalent to 1,000,000 calls to the most inefficient property implementation. I would say spend your time where you get the biggest bang for your buck.&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Couldn't have said it better myself! If you're doing perf testing, make changes where it matters. This is only a microscopic change compared to some that would make more of a difference (such as how you handle &lt;code&gt;Regex&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Here's the test case. I am not entirely positive if there's unseen overhead but the other three examples are common things I've seen or even done in regards to this type of pattern:&lt;/p&gt;
&lt;p&gt;&lt;script src="https://gist.github.com/1302236.js?file=PerfTestCaseBackingMethods.cs"&gt;&lt;/script&gt;&lt;/p&gt;
&lt;p&gt;Let me know if I made a mistake in the test case that's skewing results and I'll fix it.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=i3_Iv6xDAtE:Q3qGxVTXnrU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=i3_Iv6xDAtE:Q3qGxVTXnrU:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=i3_Iv6xDAtE:Q3qGxVTXnrU:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=i3_Iv6xDAtE:Q3qGxVTXnrU:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/i3_Iv6xDAtE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/i3_Iv6xDAtE/whats-the-most-efficient-way-to-read-config-settin</link>
      <category>C#</category>
      <category>Performance</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/22/whats-the-most-efficient-way-to-read-config-settin</feedburner:origLink></item>
    <item>
      <title>Integrated Disqus comment system into Kamranicus</title>
      <pubDate>Fri, 07 Oct 2011 14:41:16 +0000</pubDate>
      <description>&lt;p&gt;When I wrote Kamranicus, I wanted a simple blog where I could use Markdown and copy/paste images. I achieved that but I also built a simple comment system.&lt;/p&gt;
&lt;p&gt;While fun and a good exercise in using OpenID, I should have thought to check if there is any universal comment system available. There is. It's called &lt;a href="http://disqus.com" target="_blank"&gt;Disqus&lt;/a&gt;. Unfortunately, I discovered it after I made Kamranicus.&lt;/p&gt;
&lt;p&gt;As you can see now, Disqus is now the comment backend for Kamranicus' posts. Now I can allow anyone to comment using whatever provider they want, moderate comments, have comment threads, trackbacks, and loads of other useful features.&lt;/p&gt;
&lt;p&gt;It was easy to integrate. Check it out if you are in the same situation as me.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=uvJIz4H4Cjo:CnMak4YZaVQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=uvJIz4H4Cjo:CnMak4YZaVQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=uvJIz4H4Cjo:CnMak4YZaVQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=uvJIz4H4Cjo:CnMak4YZaVQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/uvJIz4H4Cjo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/uvJIz4H4Cjo/integrated-disqus-comment-system-into-kamranicus</link>
      <category>News</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/21/integrated-disqus-comment-system-into-kamranicus</feedburner:origLink></item>
    <item>
      <title>Some thoughts on the new Mileage Stats .NET sample application</title>
      <pubDate>Tue, 20 Sep 2011 18:35:42 +0000</pubDate>
      <description>&lt;p&gt;I'm [still] reading through the docs on the new Mileage Stats application that was just released by Microsoft. It looks pretty cool! A little more real-world than typical sample applications.&lt;/p&gt;
&lt;h3&gt;But I have some questions...&lt;/h3&gt;
&lt;p&gt;No application design is perfect but as I read some of this documentation, I am wondering about a couple things. &lt;strong&gt;I haven't finished reading all of the docs yet,&lt;/strong&gt; so these are just some random thoughts:&lt;/p&gt;
&lt;h4&gt;BackboneJS&lt;/h4&gt;
&lt;p&gt;It seems like for a sample MVC application that needs to support progressive enhancement and work in JS/non-JS environments, &lt;a href="http://backbonejs.com/" target="_blank"&gt;BackboneJS&lt;/a&gt; would be a suitable alternative to the jQuery UI widget + jQuery BBQ implementation they are using.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;Hah, further down the same Readme page I was looking at, they mentioned BackboneJS or Knockout as alternative considerations:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;A design the Project Silk team is interested in investigating in the future involves the use of jQuery UI Widgets that can be data bound within an MVVM implementation such as Knockout.js.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I wonder why they didn't want to do that for the sample itself? From the reading, it sounds like it was because they wanted to minimize external dependencies. Perhaps it could also be seen as an official endorsement of whatever library they could have chosen (even though they explicitly state for jqPlot that it shouldn't be taken as an &amp;quot;official&amp;quot; recommendation).&lt;/p&gt;
&lt;h4&gt;AmplifyJS&lt;/h4&gt;
&lt;p&gt;Client side data manager is a big emphasis in this application. It says in the Readme that:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;Data is cached in a JavaScript object, rather than using HTML5 local storage or similar APIs, in order to meet the cross-browser requirements of the application.&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hmm, well, won't &lt;a href="http://amplifyjs.com" target="_blank"&gt;AmplifyJs&lt;/a&gt; cover data management needs then? It supports all browsers and &lt;a href="http://amplifyjs.com/api/store/" target="_blank"&gt;unifies the storage mechanism APIs&lt;/a&gt;. It &lt;a href="http://amplifyjs.com/api/pubsub/" target="_blank"&gt;does some pub/sub stuff&lt;/a&gt; for you as well. In old browsers, a non-standard way will be used to store data but on modern browsers, localStorage and sessionStorage will be used.&lt;/p&gt;
&lt;p&gt;I wonder if the team took a look--and if they did, what they thought of it. From the surface, it looks like it would be better than rolling your own storage and pub/sub routines.&lt;/p&gt;
&lt;h3&gt;That's all for now&lt;/h3&gt;
&lt;p&gt;Like I said, I'm still reading/learning it. I'll update this as I read more.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=gMWn4RjCzyM:m7qrdaaYoHw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=gMWn4RjCzyM:m7qrdaaYoHw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=gMWn4RjCzyM:m7qrdaaYoHw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=gMWn4RjCzyM:m7qrdaaYoHw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/gMWn4RjCzyM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/gMWn4RjCzyM/some-thoughts-on-the-new-mileage-stats-net-sample</link>
      <category>MVC</category>
      <category>Javascript</category>
      <category>BackboneJS</category>
      <category>AmplifyJS</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/20/some-thoughts-on-the-new-mileage-stats-net-sample</feedburner:origLink></item>
    <item>
      <title>Immersive UI in RPGs - Thoughts, Concerns, et al.</title>
      <pubDate>Thu, 15 Sep 2011 00:56:52 +0000</pubDate>
      <description>&lt;p&gt;If you don't know, I'm a pretty avid fan of video games. Actually, &amp;quot;avid&amp;quot; is probably an understatement. Video games are a passion of mine, not only for pleasure but also in terms of software development. I've tried my hand at game programming, even some modeling. I don't think I'm cut out for it. That said, I think there are still things I can comment on from a user experience perspective. Games are just software. Virtual worlds, sure, but underneath they are still running on 1's and 0's and made with programming languages and frameworks. Therefore, it follows that as pieces of software, they still must rely on common usability and user experience practices, especially if they display UI (as most do).&lt;/p&gt;
&lt;h3&gt;RPGs and UI&lt;/h3&gt;
&lt;p&gt;I'm going to talk about an upcoming RPG, &lt;a href="http://elderscrolls.com" target="_blank"&gt;The Elder Scrolls V: Skyrim&lt;/a&gt;, since it represents RPGs pretty well in that they are some of the most UI-intensive of all games. I'm also going to talk about it because I'm insanely excited for it and I want to talk about immersion; Bethesda RPGs are mainly about immersive worlds. Dialog, questing, inventory management, spell management, looting, skill trees, equipment, maps, etc. Lots of UI for displaying information to the user. In an RPG, usually (every time?) you are on an epic quest. As a user (player), I don't want to think too much about managing all this information, I want to go on quests and use bigger swords and badder spells. Still, I'm going to have to use the UI no matter what. I have to talk to people. I have to store my big swords. I have to learn spells. I have to navigate the world.&lt;/p&gt;
&lt;p&gt;As I look at screenshots and watch gameplay demos of Skyrim, it got me thinking about their UI decisions and RPG UIs in general. If your goal is to create an immersive world, how come you don't also create immersive UIs? Shouldn't you be trying your darndest to get rid of the dialog- and window-based UI of &amp;quot;regular&amp;quot; software? Or at the very least, to fit your UI into the story or context of the game? It's an interesting idea to think about--how do you decide what will be immersive and what will be a typical dialog/window-based UI?&lt;/p&gt;
&lt;h3&gt;Elder Scrolls vs. Fallout&lt;/h3&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/18" alt="Pipboy 3000" /&gt;
&lt;/div&gt;
&lt;p&gt;When I look at Fallout 3, it strikes me as genius how well they were able to keep the immersion with the &amp;quot;menu&amp;quot; by using the Pipboy. Not only did it perfectly fit into the storyline but it also made total sense in the context of the game. Here you are, a quaint vault dweller, and the PipBoy is given to you at age 10 like every other resident. As an NPC chides, &amp;quot;It'll be your best friend.&amp;quot; It fits perfectly and is a natural way to introduce a way to get at all the information you'd need in a futuristic, post-apocalyptic RPG. Not only that, but it was also usable. A couple clicks would bring you to the maps, one more, equipment, etc. It is the perfect example of an immersive, usable game UI.&lt;/p&gt;
&lt;p&gt;I can't recall a fantasy RPG that was successfully able to use an immersive, believable, and usable menu system like Fallout 3. Fable III tried hard to break the bonds of windows and menus by letting you transport to a &amp;quot;safe house&amp;quot; of sorts. I guess that's close to what I'm talking about and it was serviceable; I was able to play the game to completion without pulling most of my hair out, but it was still cumbersome to be transported to a &amp;quot;virtual menu system&amp;quot; and go around to find and do things like check the map, equip weapons, etc. It fit the bill of being believable and not pulling you out of the game but I would argue it was not efficient in terms of getting things done quickly. It also got old hearing John Cleese say the same quip every time you needed to check your map.&lt;/p&gt;
&lt;p&gt;So, this leaves me wondering: &lt;strong&gt;how can a fantasy RPG like Elder Scrolls achieve a similar immersive menu UI like Fallout 3 that is believeable, efficient, and immersive?&lt;/strong&gt; Here are some of my thoughts.&lt;/p&gt;
&lt;h3&gt;Managing Skills&lt;/h3&gt;
&lt;p&gt;In an RPG, you typically play a lonesome hero or hero leader that has a set of skills and powers they can use. Some are passive (as in Elder Scrolls) and others can be used like items (Titan Quest, Diablo, MMOs, etc.).&lt;/p&gt;
&lt;p&gt;In most games, viewing your skills usually involves opening a dialog with a large tree of skills where you can invest points in acquiring or leveling up skills. There are many variations on this core design.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/24" alt="Star Wars: The Old Republic" /&gt;
&lt;/div&gt;
&lt;p&gt;In Fallout, when you level up you're presented with a dialog where you can pick your &amp;quot;perk&amp;quot; and invest skill points. Here, the game diverges from an immersive UI and falls back on a regular dialog box UI. As a player, this never bothered me and I think is a good example of where a choice was made to use a familiar UI that, while immersion-breaking, made it easy to use.&lt;/p&gt;
&lt;p&gt;In Skyrim, I think they did a good job making this experience immersive and fitting it into the world story. Instead of opening a special menu, your character &amp;quot;looks to the heavens&amp;quot;. There, you can view constellations that correspond to specific skill trees. When you view a constellation, you can see each star, which is associated with a skill. It's exactly what I'm getting at: believable, immersive, and usable.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/25" alt="Skyrim skill system" /&gt;
&lt;/div&gt;
&lt;p&gt;As far as leveling up in Skyrim, I don't think we've seen what that looks like. I'd imagine something similar will happen where you can &amp;quot;look to the sky&amp;quot; and there you'll be presented with some choices of what to do.&lt;/p&gt;
&lt;h3&gt;Managing Inventory&lt;/h3&gt;
&lt;p&gt;In Harry Potter, the inventory question has already been solved. If you've read the books or seen the movies, you know Hermione carries around a bottomless purse which contains everything she needs, from textbooks to tents. It's believable in a magic world, so why shouldn't a game like Elder Scrolls implement something similar?&lt;/p&gt;
&lt;p&gt;I would imagine an animation where your character pulls out a sack from his waist and peers down into it after which you're presented with some sort of UI. Here, you could present a regular table/list-based UI or even 3D visuals of your items.&lt;/p&gt;
&lt;h3&gt;Magic &amp;amp; Spells&lt;/h3&gt;
&lt;p&gt;What immediately jumps to mind is a spellbook your character carries around. You could base the UI off of an open spellbook interface. Many other games do this to good effect. This example is from King's Bounty (which I haven't played so I can't speak to its usability):&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/26" alt="King's Bounty" /&gt;
&lt;/div&gt;
&lt;h3&gt;Quests&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/19"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/19/Large" alt="Quest Journal" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In The Elder Scrolls III: Morrowind, your quests and conversations were recorded in a Journal. While it was sometimes difficult to use, it is still a great idea and other games have played off a quest journal type interface.&lt;/p&gt;
&lt;p&gt;In Skyrim, I do not think we've seen how quests are managed. Interestingly, I did notice that once your character reached a certain point in the cave in one of the recent demos, a message displayed saying, &amp;quot;Quest Started: xxx&amp;quot; telling me that either you overheard a new quest or an active quest can be triggered by going to some special area. You can also cast a spell called &amp;quot;Clairvoyant&amp;quot; to do a Fable-style glowing trail to your closest objective.&lt;/p&gt;
&lt;h3&gt;Map&lt;/h3&gt;
&lt;p&gt;In many RPGs with HUDs, a mini-map is displayed in the corner. In Bethesda RPGs, you've always had to enter a menu to pull up a map (world or local). In Skyrim they've focused on using as little screen real estate as possible for the HUD which is &lt;em&gt;awesome&lt;/em&gt; and in Bethesda's games I haven't ever really felt the need for a minimap (personally) although I liked how in Morrowind you could choose to have one if you wanted.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/28" alt="Dragon Age: Origins Minimap" /&gt;
&lt;/div&gt;
&lt;p&gt;In Skyrim, when you open the map, the camera quickly zooms out and gives you a bird's eye view of the landscape, in fully rendered 3D. It's quite a sight. The only thing that stops it from meeting all of our criteria is that it isn't believable (How can you see that far? Are you a bird? Did you cast a spell? Are you God?).&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/27" alt="Skyrim's Fully 3D In-Game Map" /&gt;
&lt;/div&gt;
&lt;p&gt;Since this a fantasy land and as an adventurer you'd probably carry around a map, we could merge the idea of a &amp;quot;crystal ball&amp;quot; with a paper/cloth map. Your character would pull out a small snowglobe-sized object and peer into it, revealing the 3D world map just as Skyrim has it implemented now. Any sort of animation involving a map or compass or globe would be a perfect combination to the new world map feature.&lt;/p&gt;
&lt;h3&gt;Favorites &amp;amp; Bookmarking&lt;/h3&gt;
&lt;p&gt;In action-oriented or item-oriented RPGs, typically you can assign items to hotkeys. In Fallout 3, you could assign guns and items to numbered slots on the keyboard.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/29"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/29/Large" alt="Dragon Age: Origins Shortcut Bar" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In Skyrim, it appears it is more &amp;quot;bookmark&amp;quot;-based which I think is an interesting idea pulled from our daily lives: browsing the Internet. When you think about it, it makes total sense to implement a bookmark system in an RPG that can contain thousands of items.&lt;/p&gt;
&lt;p&gt;The only issue is that this doesn't really fit into the story at all; it's there purely for organizational purposes. This is exactly the kind of place where a discussion of immersion vs. usability comes into play. You could provide the context of a &amp;quot;belt&amp;quot; and that in your belt you can take out an item in your inventory and place it there for easy access (hotkeys/shortcuts). Assuming your belt was a magical belt, it could &amp;quot;favorite&amp;quot; any number of items.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/30" alt="Skyrim left-hand favorites" /&gt;
&lt;/div&gt;
&lt;p&gt;In Skyrim, there is a single favorites menu and you equip the item in your left/right hand depending on which trigger you pull, as far as I've seen. At least one preview noted that the favorites system was &amp;quot;&lt;a href="http://www.vg247.com/2011/09/27/crouching-spider-hidden-dragon-hands-on-with-skyrim/http://www.vg247.com/2011/09/27/crouching-spider-hidden-dragon-hands-on-with-skyrim/" target="_blank"&gt;slightly clunky&lt;/a&gt;&amp;quot;.&lt;/p&gt;
&lt;p&gt;You could also just argue that your character is &amp;quot;summoning&amp;quot; an item from his inventory; perhaps the cue for this needs only to be a simple sound effect or animation that plays when you hit a hotkey or choose an item. If I had the ability to use magic, it would make sense that I'd probably &amp;quot;tag&amp;quot; items in my bag to be available for summoning at will (or take the Harry Potter approach and say a simple spell, &amp;quot;Accio Sword of Monster Slaying&amp;quot;).&lt;/p&gt;
&lt;p&gt;I am not sure what the best approach here is; but what is important to remember is that this feature is crucial to keeping players immersed and outside of menus, so whether it is immersive or not, it should be easy to use.&lt;/p&gt;
&lt;h3&gt;Looting&lt;/h3&gt;
&lt;p&gt;Every open-world RPG I've played has resorted to a dialog system for one of its core systems: looting.&lt;/p&gt;
&lt;p&gt;If you think about how a loot system works in terms of development, it makes sense. An object can hold either a set or random assortment of items, maybe placed on entering a dungeon or when the game starts. The easiest and most straight-forward way is to present a list of the items to the player in a popup dialog box.&lt;/p&gt;
&lt;p&gt;As a player, I've always been mostly satisfied with looting UI except when a game takes away the single most important shortcut of all: &lt;strong&gt;Take All&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Sometimes, even as a player, you don't know you want a feature until another game implements it, which is why I'm fairly excited to see &lt;em&gt;Kingdoms of Amalur&lt;/em&gt; implements a &amp;quot;junk&amp;quot; system where you can mark items as junk and sell them in one button press to merchants.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/20" alt="KOA Looting System" /&gt;
&lt;/div&gt;
&lt;p&gt;I always thought it would be neat to have an animation where you literally look inside the object you're looting (except maybe bodies). You open a chest, you look in, then a UI that looks like the inside of a chest shows up and you see 3D models of whatever is in it. Then you can &amp;quot;take all&amp;quot; or click/select the items you want. This would work great for chests, barrels, boxes, closets, etc. Not only would this not break the immersion but it would force much more realistic contents for containers. For bodies, something similar to LA Noire where you literally examine the body would be cool but also not very useful for looting quick (thus the immediate 'Take All' button). For a body, I'd even be happy with a view of the body with a list of the items found on the side. Then when you hover over each item, the camera could focus on where on the body it's located. It doesn't have to, if it doesn't make sense (people holding unusually large/small items?).&lt;/p&gt;
&lt;p&gt;Here's a crappy wireframe of what I'm talking about:&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://i.imgur.com/sdNhn.png" alt="Wireframe" /&gt;
&lt;/div&gt;
&lt;p&gt;It always struck me as odd how Elder Scrolls, where every item has a 3D world model, couldn't do this. If you already have a model for every item, why &lt;em&gt;not&lt;/em&gt; be creative in how you do looting? Some top-down RPGs like Diablo will let loot fall out of corpses and containers onto the ground; these games had it right and used immersive loot systems. Why couldn't open-world sandbox RPGs do the same, especially when items are already strewn about the world free for immediate pick up. The only RPG with a robust loot system I can think of that used in-game objects for containers was &lt;em&gt;Borderlands&lt;/em&gt; where loot would magically pop out of lockers, rock piles or corpses but then again, Borderlands didn't have the same item scope as Elder Scrolls. Still, it's a place to start, isn't it?&lt;/p&gt;
&lt;p&gt;At any rate, I think there's more that can be done in RPGs to achieve a more immersive loot UI. I'm positive there's a lot of fun things game designers can do nowadays.&lt;/p&gt;
&lt;h3&gt;Buying/Selling&lt;/h3&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/32"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/32/Large" alt="Well, this is intuitive..." /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Buying and selling items in RPGs has always been a dialog-based system, as far as I'm aware. I understand why it's always been a de-facto standard that merchants carry every item they own (programming, code maintenance, item lists, etc.). The weird thing (for Bethesda games in particular) is why can't I buy things I see in a store? In Morrowind, a shop owner would have items strewn around the store that you could &lt;em&gt;steal&lt;/em&gt; but never buy. It never made sense. I also don't think items disappeared when you bought them (they might have been tied to chests or the NPC themselves). Thus, there seemed to be a disconnect between what the merchant had on them and the items visible in the store. In Fallout, it made a little more sense that traveling traders carried their stock on their pack Brahmin (mules). I could see using a UI for that.&lt;/p&gt;
&lt;p&gt;An interactive in-world store-front would be an awesome idea and it's not new. In Zelda games, you could go to a trader and see 3D models of items you could buy. In this context, that approach probably isn't good for RPGs that deal with dozens of items per merchant but the idea is what is important (seeing and picking items in a store).&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/31" alt="Who says you can't put 50 pearls on a table?" /&gt;
&lt;/div&gt;
&lt;p&gt;For an open-world sandbox like Skyrim, you could simply just have the items in a store on shelves like a normal real-life store. It's not like it hasn't been possible in the past... Morrowind (above) and Oblivion both had items in the store, but like I said, you could never pick one and buy it, only steal it. Make sense? Not really. You could just extend that same design but make all items available in the store marked as &amp;quot;tradable&amp;quot; so you could exchange an item on the spot or buy a new item. Perhaps implement some customer service AI and have the storekeeper follow you or check on you, allowing faster access to talking to him and selling items. This would throw a wrench into stealthy stealing, though, so maybe don't do this (Oblivion shop owners who followed me around made me angry when I tried to break into their store/bedrooms, even though at first it was &amp;quot;kind of cool&amp;quot;).&lt;/p&gt;
&lt;p&gt;This immersive storefront experience would not replace the existing efficiency (or proposed efficiency) of current designs of talking to merchants and entering a trade UI. For people that need to just get in and get out, every store could post a piece of paper tacked onto the door or counter that lists everything they sell. This would be the typical buy/sell UI. For selling, you'd talk to the merchant, tell him you want to sell, and enter this familiar UI, but at least it would be explained in the world. &lt;/p&gt;
&lt;p&gt;The most recent game I played that used a believable immersive trading UI is &lt;em&gt;Deus Ex: Human Revolution&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/33"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/33/Large" alt="alternate title" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Merchants would be standing next to a computer. You talk to the merchant and he directs you to the monitor where you use a faux-OS UI to buy and sell. It was immersive, believable (except you had no idea where the items were stored), and usable (there were some quirks like not being able to use the WASD keys to navigate). In a fantasy game, that computer is probably a (magical?) piece of paper. Maybe there's something even more magical/fantastical that would make better sense.&lt;/p&gt;
&lt;p&gt;At the least, Bethesda, do what you're doing right now, just &lt;em&gt;let me buy items in the world too instead of only allowing me to steal them&lt;/em&gt;. You're going to let me buy the item when I talk to a merchant, why make me go through that UI navigation process if I am literally staring at the item I want? Yes, there are people that buy things rather than steal them every time. Yes, there are people would swear they've never bought an honest item in their adventure. Cater to both audiences equally efficiently.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Since Skyrim is yet to be released, I have not seen or heard how merchants work in the game. Perhaps they've already done this! I'm referencing Oblivion and Morrowind where the technology was there, just not implemented.&lt;/p&gt;
&lt;h3&gt;Talking to people&lt;/h3&gt;
&lt;p&gt;Dialog is always hard because you need to offer the player a list of responses or topics. I think what they are doing in Skyrim is pretty streamlined and concise, not forcing you to listen but showing topics on the side, out of the way. I can't think of a fully-immersive way of presenting textual choices, it seems like it'll break the immersion every time but at least Skyrim is less intrusive than Oblivion/Morrowind/Fallout.&lt;/p&gt;
&lt;p&gt;As a player, conversation systems have never bothered me much and actually, Dragon Age: Origins and Mass Effect (i.e. Bioware RPGs) have always felt like the best systems I've used as they are cinematic, enjoyable, and felt like they belonged there.&lt;/p&gt;
&lt;p&gt;In terms of usability, the best feature I've seen is in Bioware conversations: they will show (in text) the last thing someone said to you. This is so important I can't even properly express it. It reminds me of what David Sirlin talks about in &lt;a href="http://www.gamasutra.com/view/feature/1935/saving_the_day_save_systems_in_.php" target="_blank"&gt;his piece of about save systems in games&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;Games are not for game designers and their ivory-tower ideals--games are for players. Players have lives outside of our games and we should respect those lives and design our games accordingly, rather than expect our players to design their lives around us.&amp;quot; - David Sirlin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I liked this quote because I keep it in mind even when I suggest outlandish ideas like a virtual storefront. In the end, players just want to easily get things done.&lt;/p&gt;
&lt;h3&gt;Other UX considerations&lt;/h3&gt;
&lt;h4&gt;Timing and animations&lt;/h4&gt;
&lt;p&gt;I should clarify: when I talk about animations (for inventory or maps or whatever) I am talking about animations 1-3 seconds long. Anything longer and you're going to run into &amp;quot;OMG JUST LET ME DO THIS QUICK&amp;quot; territory and then your beautiful menu system is going to seem clunky and slow (&lt;strong&gt;cough&lt;/strong&gt;FableIII&lt;strong&gt;cough&lt;/strong&gt;). The Fallout 3 Pipboy animation was perfect: it was fast, you could follow it, you knew what just happened, and it made sense. We live in a world where web pages need to come up in less than 100ms and we can't wait those extra 5 seconds for our download to finish. Keep it short, simple, and believable. You could also use animations to mask processing time; if it takes 100-300ms to load up a player's inventory, an animation would hide that CPU time. I've never programmed a game in my life but on the web, for AJAX requests showing the loading animation even for quick calls is crucial for immediate feedback.&lt;/p&gt;
&lt;p&gt;Timing should be one of--if not the--highest priorities when designing a usable menu system. Ultimately, people want to get things done in your game. That's why you saw me say again and again for storefronts, let power users use the inventory list to buy/sell quickly. It doesn't &lt;em&gt;have&lt;/em&gt; to be totally immersion-breaking. For those of us who sometimes enjoy strolling through a vendor's inventory visually, we can do that. Efficiency is the name of the game (that's why God invented the &lt;em&gt;Take All&lt;/em&gt; command).&lt;/p&gt;
&lt;p&gt;I don't think timing and immersive UI are mutually exclusive. Pipboy is my case in point. Borderlands looting is another case. Game designers are by their nature creative people. Use that creativity to prove that you can make an immersive UI without sacrificing efficiency.&lt;/p&gt;
&lt;h4&gt;Providing critical information at a glance&lt;/h4&gt;
&lt;p&gt;One thing I noticed about the menu system in Skyrim that I'm not super-enthused about is the lack of critical information without &amp;quot;hovering&amp;quot; or selecting an item (as seen here):&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/21" alt="Skyrim Inventory" /&gt;
&lt;/div&gt;
&lt;p&gt;One thing I liked about Oblivion was that they showed some critical information in a table format... so I could sort by damage or weight or see at a glance what the armor rating was for items I held. In Morrowind, you had to do a similar hovering to see stats.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/22" alt="Oblivion Inventory" /&gt;
&lt;/div&gt;
&lt;p&gt;I could see the UI discussion both ways. When I want to equip an item, I don't care about all that other information. However, when I want to sell an item or see if the new item I picked up is any good, I &lt;strong&gt;do&lt;/strong&gt; care about that information. The lack of information in the new UI is both a good thing (clean) and bad thing (lack of information at a glance). I don't know what to think of it yet as I haven't used it but it could turn out OK given some tools to effectively manage my inventory. I'd also like to believe that the console UI is simpler than the usually-more-heavy PC UI.&lt;/p&gt;
&lt;h4&gt;Providing quick comparisons&lt;/h4&gt;
&lt;p&gt;The other thing I didn't see (I think) was a quick compare type UI/popup. Bethesda RPGs have never done this. It boggles my mind. If I find an item in the world, I would immediately like to see if it's better than my current equipped weapons (preferably by simply hovering over it or inside of a loot UI, selecting it). If I am browsing my inventory, I'd like to see an immediate comparison to my equipped weapons. One of the best games that did this was Borderlands and is how I'd love to see it in an Elder Scrolls game; as soon as you found an item it was easily apparent what was better/worse about it:&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/23" alt="Borderlands Looting" /&gt;
&lt;/div&gt;
&lt;h4&gt;Remote trading&lt;/h4&gt;
&lt;p&gt;I don't know if this is a good idea. But... stay with me. In Torchlight, while you are out adventuring, you can send your pet (who doubles as a pack mule) back to town to sell whatever he's carrying. No bartering, no nonsense, he comes back in a certain time depending on how much you sold. It's genius, I think. How many times have you been stuck in a dungeon, with a fricking sweet axe in front of you, put it in your inventory and... now you can't move (or in newer Bethesda games, move at 1in/hr). The very dedicated among us might endure the 5 mile long walk moving at the speed of a snail but why should we? In Torchlight you had a pet with a backpack. It totally makes sense to say to Rufus, &amp;quot;Hey boy, take my crap back so I can carry more. There's a good dog.&amp;quot; In a lone-wolf type game like Elder Scrolls it might make more sense to magically send items to a merchant or... &lt;em&gt;just open a portal&lt;/em&gt;. Hey, you could teleport in Morrowind, it's not a new idea. In Diablo/Torchlight you can open a town portal. That solves the issue, albeit you still have to walk to the merchant, enter the UI, trade, etc. Extend that a bit and you have the ability to remotely buy (or simply sell) items on the spot. Game balance, difficulty, etc. should all be considered in a feature like this but &lt;em&gt;Oh God Wouldn't This Be Useful&lt;/em&gt;?&lt;/p&gt;
&lt;p&gt;I could see some arguments saying that this would make inventory management too easy. Maybe... but isn't that what you want? You &lt;em&gt;can't&lt;/em&gt; tell me you haven't cursed the weight system in Elder Scrolls. I hate to break it to you but now that we've got fast travel, what's a little town portal added to the mix? In Morrowind, one of the first things I do is enchant two amulets: one with Divine Intervention and one with Almsivi Intervention. I pay &lt;em&gt;cash monies&lt;/em&gt; to do it straight away because it makes my life so much easier. I can teleport pretty close to town no matter where I am.&lt;/p&gt;
&lt;p&gt;Anyway, I doubt you'd use this system to just sell your awesome items all the time... you probably want to hang them up in your modded Dracula castle display cases (like me). You probably don't need all those shiny treasures you're carrying, taking up precious space, that you're just going to sell for cash. You want to carry good stuff that you need for a quest or side project (crafting?). I think this would just make it easier to get rid of stuff you don't need fast and easy.&lt;/p&gt;
&lt;p&gt;With new systems like fast travel, this is less of an issue until you're deep inside a dungeon and forgot to empty your rucksack before your curiosity got the better of you and you just &lt;em&gt;had&lt;/em&gt; to enter that underwater cave...&lt;/p&gt;
&lt;h3&gt;Closing thoughts&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;I'm not saying Skyrim's UI is bad or is wrong&lt;/strong&gt;. But as someone who continuously works on building better user experiences at work and at home, I always look at my projects and go, &amp;quot;Man, I could really do this and this and this to make it even easier.&amp;quot; That's all I want to do with this--point out, as an outsider and future player--what concerns and thoughts I had regarding what I've seen so far. &lt;/p&gt;
&lt;p&gt;I'm just wondering why designers/developers don't try harder to make their UIs more immersive and &amp;quot;make sense&amp;quot; within the context of their game. I &lt;em&gt;know&lt;/em&gt; it's possible, I've seen it with my own two eyes. I keep referencing Fallout 3, but it's because I was amazed at how well it all just made sense. Pipboy? Sure why not! Sure, dialog/buying/selling went through typical dialog windows but at least they all matched. Even there you could do similar things to what I was saying, maybe with an interactive storefront. Borderlands is a great example of immersive looting, as well as many top-down RPGs.&lt;/p&gt;
&lt;p&gt;I also want to be clear and say that while I think having an immersive UI is best, &lt;strong&gt;it's also important to let people just get things done.&lt;/strong&gt; What I mean is, have the sweet &amp;amp; snazzy immersive visual storefront with items laying around to buy, but cater to the power users and keep the quick buy/trade UI. See Windows 8 Metro UI v. classic Windows 7 UI.&lt;/p&gt;
&lt;p&gt;I also think you can go too far and just make things clunky and unintuitive. It's a line that's hard to see, I think, and since it's a game and a piece of software, it doesn't all have to be &amp;quot;realistic&amp;quot; and immersive. If it works and is easy to use, that's probably good enough. Going the extra mile to include visual detail is definitely a win in my book, though. What matters in the end is that the player is happy to use your menu system and doesn't curse it until the day they die.&lt;/p&gt;
&lt;p&gt;I'm interested in hearing other people's suggestions; after all, we're the ones that play the games to death. I'm just really surprised Bethesda went with a sort of &amp;quot;contemporary&amp;quot; (Apple-like) UI rather than an immersive one like F3 or even a stylized one found in Blizzard games. It's also important to remember that what we've seen so far of Skyrim has been on 360 not on PC and Bethesda could have done UX optimizations for the mouse rather than the controller-oriented design we've seen so far.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=wBpstzd1daQ:O7P22VBZyJM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=wBpstzd1daQ:O7P22VBZyJM:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=wBpstzd1daQ:O7P22VBZyJM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=wBpstzd1daQ:O7P22VBZyJM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/wBpstzd1daQ" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/wBpstzd1daQ/immersive-ui-in-rpgs-thoughts-concerns-et-al</link>
      <category>Game Design</category>
      <category>UX</category>
      <category>Skyrim</category>
      <category>Bethesda</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/19/immersive-ui-in-rpgs-thoughts-concerns-et-al</feedburner:origLink></item>
    <item>
      <title>I love GitHub so much, I'm a paying member now</title>
      <pubDate>Tue, 26 Jul 2011 14:41:02 +0000</pubDate>
      <description>&lt;p&gt;As you might know, I released &lt;a href="http://kamranicus.com/Blog/Posts/15"&gt;a new site, Keep Track of My Games&lt;/a&gt; a couple days ago.&lt;/p&gt;
&lt;p&gt;I started out with a remote Git repository on AppHarbor, then switched to &lt;a href="http://bitbucket.org" target="_blank"&gt;BitBucket&lt;/a&gt; because it supported free private repositories.&lt;/p&gt;
&lt;p&gt;BitBucket is really nice but after trying to use the Issues list I really missed GitHub's clean issues &amp;amp; milestones management. Really, really missed it.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/17"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/17/Large" alt="BitBucket issues" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;BitBucket's issues list is table-based and displays issue titles in a column. That column gets really small when you have a lot of issues, making it hard to read. I started out typing user stories as the titles but when I went to GH, I made them shorter, task-oriented titles and put the stories inside of them. I think this helps clean up the UI a bit:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/15"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/15/Large" alt="Issues List" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Much easier to read and browse and filter issues, in my opinion. I have a system where items I work on are assigned to me, the rest are considered &amp;quot;future&amp;quot; items. I also have a couple milestones set up to track progress. I create labels for major components of the site and then can assign multiple ones to issues.&lt;/p&gt;
&lt;p&gt;I will be updating my &lt;a href="http://keeptrackofmygames.com/roadmap" target="_blank"&gt;Roadmap&lt;/a&gt; to use GH's REST service and query the issues to display. The nice thing about labels is that I will be able to filter out issues that shouldn't be very public (i.e. security tasks?).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/16"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/16/Large" alt="Milestones" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Beautiful.&lt;/p&gt;
&lt;p&gt;So I bit the bullet and said what the hell? and signed up for a micro plan. I feel pretty good about it. I love GitHub, it's no secret (case in point, this site). It makes me feel good to support them and show them some well-deserved love. I hope my small contribution helps them keep a clean site and awesome user experience.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=45mkMV5iZcU:0jPGLn8vyEQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=45mkMV5iZcU:0jPGLn8vyEQ:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=45mkMV5iZcU:0jPGLn8vyEQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=45mkMV5iZcU:0jPGLn8vyEQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/45mkMV5iZcU" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/45mkMV5iZcU/i-love-github-so-much-im-a-paying-member-now</link>
      <category>GitHub</category>
      <category>BitBucket</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/16/i-love-github-so-much-im-a-paying-member-now</feedburner:origLink></item>
    <item>
      <title>Announcing Keep Track of My Games</title>
      <pubDate>Sun, 24 Jul 2011 17:44:08 +0000</pubDate>
      <description>&lt;p&gt;I am working on a new side project, &lt;a href="http://keeptrackofmygames.com/about" target="_blank"&gt;Keep Track of My Games&lt;/a&gt;.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/10" alt="Yes." /&gt;
&lt;/div&gt;
&lt;h3&gt;The Rundown&lt;/h3&gt;
&lt;p&gt;The goal is simple: &lt;strong&gt;Manage your collection of games and track games that haven't been released.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can read the tour on my &lt;a href="http://blog.keeptrackofmygames.com/post/8003937025/what-is-keep-track-of-my-games" target="_blank"&gt;introduction blog post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I've setup several social outlets:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://twitter.com/keeptrackgames" target="_blank"&gt;@keeptrackgames&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.keeptrackofmygames.com/" target="_blank"&gt;Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://getsatisfaction.com/keeptrack" target="_blank"&gt;GetSatisfaction&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'm also providing a public look into my development cycle via the &lt;a href="http://keeptrackofmygames.com/roadmap" target="_blank"&gt;Roadmap&lt;/a&gt; page.&lt;/p&gt;
&lt;h3&gt;The Technology&lt;/h3&gt;
&lt;p&gt;I am using MVC 3 with EF 4.1 and SQL Server 2008 deployed via Mercurial, BitBucket, and AppHarbor. I am using the JSON API from &lt;a href="http://api.giantbomb.com" target="_blank"&gt;GiantBomb&lt;/a&gt; to fetch search results than caching them locally to the database. I'm not super enthused with the performance but hopefully I can make it better in the coming weeks.&lt;/p&gt;
&lt;p&gt;I use &lt;a href="http://twilio.com" target="_blank"&gt;Twilio&lt;/a&gt; for SMS and for now, regular old SMTP for emails but I may upgrade depending on load. I use a &amp;quot;scheduled&amp;quot; job that runs through the database and figures out if games are coming out soon or are released or if their release dates have changed.&lt;/p&gt;
&lt;h3&gt;The Architecture&lt;/h3&gt;
&lt;p&gt;I have a pretty straightforward and simple architecture: everything goes through application services that do not have any web dependency.&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/11" alt="Layer Diagram" /&gt;
&lt;/div&gt;
&lt;p&gt;My controllers are pretty stupid; they ask the services for information and process the results:&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/12" alt="Adding item to library" /&gt;
&lt;/div&gt;
&lt;p&gt;The key is my &lt;code&gt;ActionConfirmation&lt;/code&gt; class which I borrowed from my co-worker. I thought it was awesome for Service =&amp;gt; Controller communication. The reason being I can pass error messages / validation results cleanly. &lt;/p&gt;
&lt;p&gt;For example, in this action, if an error occurred when saving tracking settings, I need to go and get the current tracking settings to add some view-specific logic (like, whether or not to show the email/phone checkboxes):&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/13" alt="Saving tracking settings" /&gt;
&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;currentTracking&lt;/code&gt; is of type &lt;code&gt;ActionConfirmation&amp;lt;TrackingViewModel&amp;gt;&lt;/code&gt;. So, if a service call was successful, I can retrieve the result via &lt;code&gt;currentTracking.Value&lt;/code&gt;. I also use a non-generic &lt;code&gt;ActionConfirmation&lt;/code&gt; class that doesn't require any return value.&lt;/p&gt;
&lt;p&gt;Here's an example of the service code returning &lt;code&gt;ActionConfirmation&lt;/code&gt;s:&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/14" alt="ActionConfirmation results" /&gt;
&lt;/div&gt;
&lt;p&gt;I am not 100% OK with this because for complex business validation, the results are coming back one at a time. I will be refactoring later to avoid this.&lt;/p&gt;
&lt;h3&gt;The &amp;quot;Open&amp;quot; Source Agenda&lt;/h3&gt;
&lt;p&gt;I have been playing around with making this source code public. Only a few things prevent me from doing so:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I need a way to hide secret tokens for APIs and my passwords for some services.&lt;/li&gt;
&lt;li&gt;If people know the code, they'll see all the security holes and it's possible someone could exploit them and steal my user's data (not cool).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Really item #2 is the big decider. I am using OpenID and DotNetOpenAuth but that doesn't mean the site is totally secure. The worst information that could be obtained is someone's email and phone number, both of which I plan to encrypt for extra safety (once I figure out how that works with EF).&lt;/p&gt;
&lt;p&gt;I am thinking instead of totally making it open source, to allow select contributors I trust into the codebase for reviews and patches.&lt;/p&gt;
&lt;p&gt;If you would be interested in doing that, I have a tester system setup so &lt;a href="http://twitter.com/kamranayub" target="_blank"&gt;let me know&lt;/a&gt; and we'll talk.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=jNC1wd7dgvY:_vP0h6ruj-A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=jNC1wd7dgvY:_vP0h6ruj-A:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=jNC1wd7dgvY:_vP0h6ruj-A:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=jNC1wd7dgvY:_vP0h6ruj-A:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/jNC1wd7dgvY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/jNC1wd7dgvY/announcing-keep-track-of-my-games</link>
      <category>News</category>
      <category>MVC</category>
      <category>AppHarbor</category>
      <category>Programming</category>
      <category>Twilio</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/15/announcing-keep-track-of-my-games</feedburner:origLink></item>
    <item>
      <title>Resolving HTTP 500 errors when deploying to AppHarbor</title>
      <pubDate>Thu, 21 Jul 2011 22:31:40 +0000</pubDate>
      <description>&lt;p&gt;This is a quick post. I was getting HTTP 500 errors when deploying my new site to AppHarbor. Long story short, if you've brought down the DotNetAuth Nuget package, it adds this to your &lt;code&gt;web.config&lt;/code&gt;:&lt;/p&gt;
&lt;pre class='brush: xml'&gt;&amp;lt;section name="uri" type="System.Configuration.UriSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /&amp;gt;&lt;/pre&gt;
&lt;p&gt;AppHarbor already has this defined and it is throwing a duplicate web.config section exception. Remove this line and you should be A-OK!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=OvSWbF0mbb8:eTeQaD4aE0E:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=OvSWbF0mbb8:eTeQaD4aE0E:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=OvSWbF0mbb8:eTeQaD4aE0E:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=OvSWbF0mbb8:eTeQaD4aE0E:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/OvSWbF0mbb8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/OvSWbF0mbb8/resolving-http-500-errors-when-deploying-to-apphar</link>
      <category>MVC</category>
      <category>AppHarbor</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/14/resolving-http-500-errors-when-deploying-to-apphar</feedburner:origLink></item>
    <item>
      <title>My Git workflow for .NET-based projects</title>
      <pubDate>Tue, 28 Jun 2011 17:38:24 +0000</pubDate>
      <description>&lt;p&gt;When I was new to Git, it was very confusing for me to get up and running with how to deal with the command-line interface (if you're fancy and use a GUI, leave now). Once you do get the hang of it, it's super nice and fluid. I used to do terminal CVS at my last job so I'm not out of touch with using version control from a console.&lt;/p&gt;
&lt;h1&gt;Set up your .gitignore&lt;/h1&gt;
&lt;p&gt;Here's mine:&lt;/p&gt;
&lt;pre class='brush: '&gt;#OS junk files
[Tt]humbs.db
*.DS_Store

#Visual Studio files
*.[Oo]bj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.sdf
*.docstates
ipch/
obj/
[Bb]in
[Dd]ebug*/
[Rr]elease*/
[Pp]ublish*/
Ankh.NoLoad

#Tooling
_ReSharper*/
*.resharper
[Tt]est[Rr]esult*

#Project files
[Bb]uild/

#Subversion files
.svn

# Office Temp Files
~$*

# Custom
*.private
readme.html&lt;/pre&gt;
&lt;p&gt;At the end, you can add whatever you want. For some projects, I store API keys in a &lt;code&gt;.private&lt;/code&gt; file. You might want to as well.&lt;/p&gt;
&lt;h1&gt;Init your repo&lt;/h1&gt;
&lt;p&gt;The first command you'll need to execute is &lt;code&gt;git init&lt;/code&gt;. This will make whatever folder you're in a new Git repository (repo).&lt;/p&gt;
&lt;pre class='brush: bash'&gt;Kamran@Kamranicus /c/Projects/Contrib/.JSON
$ git init&lt;/pre&gt;
&lt;p&gt;You should then add all your files and commit them for an initial &amp;quot;base&amp;quot; version.&lt;/p&gt;
&lt;pre class='brush: bash'&gt;git add .
git commit -am "Initial project commit"&lt;/pre&gt;
&lt;p&gt;Because of your &lt;code&gt;.gitignore&lt;/code&gt; file, Git will ignore all the unnecessary files .NET solutions tend to generate.&lt;/p&gt;
&lt;h1&gt;Set up a remote&lt;/h1&gt;
&lt;p&gt;If you're doing stuff on AppHarbor or GitHub, you'll need to add a &amp;quot;remote.&amp;quot; This is just a remote Git repository you can associate with your local repository. You can have lots of remotes. I tend to have one or two.&lt;/p&gt;
&lt;pre class='brush: bash'&gt;git remote add https://kamranayub@github.com/&amp;lt;some url&amp;gt;&lt;/pre&gt;
&lt;p&gt;This information is usually provided by your remote site (GitHub has it when you create a new repo on the site).&lt;/p&gt;
&lt;h1&gt;Status, Add, Commit, Push&lt;/h1&gt;
&lt;p&gt;I do a lot of my projects on &lt;a href="http://appharbor.com" target="_blank"&gt;AppHarbor&lt;/a&gt; now. It's just a real nice workflow and I'll explain why.&lt;/p&gt;
&lt;p&gt;I make changes to my .NET solution and when I'm ready to commit (usually after a feature or bug fix) my console  command history looks like this:&lt;/p&gt;
&lt;pre class='brush: '&gt;git status
git add .
git commit -am "My commit message"
git push appharbor master&lt;/pre&gt;
&lt;h2&gt;git status&lt;/h2&gt;
&lt;p&gt;This command will display what things you currently have pending and what changes are untracked. Use this to determine if you should not track a certain change (using &lt;code&gt;git checkout -- &amp;lt;file&amp;gt;&lt;/code&gt;).&lt;/p&gt;
&lt;h2&gt;git add .&lt;/h2&gt;
&lt;p&gt;This command will add whatever &amp;quot;untracked&amp;quot; and modified changes you have currently pending to ready your commit. Deletes, adds, etc. usually are untracked. Git tracks modifications and renames. The &lt;code&gt;.&lt;/code&gt; adds all files (relative to your current folder). You can be as specific or as generic as you want.&lt;/p&gt;
&lt;h2&gt;git commit -am [message]&lt;/h2&gt;
&lt;p&gt;This command commits your changes. The &lt;code&gt;-am&lt;/code&gt; switch is for all changes (a) with a message (m). You can type &lt;code&gt;-?&lt;/code&gt; to get a list of switches you might want to use. If you don't use the &lt;code&gt;-a&lt;/code&gt; switch, your untracked changes may not be committed. If someone wants to explain why this is the case, I'd love to know (or I guess I could look it up). Whatever the reason is, use &lt;code&gt;-am&lt;/code&gt; unless you know otherwise.&lt;/p&gt;
&lt;h2&gt;git push [remote] [branch]&lt;/h2&gt;
&lt;p&gt;This command will send a git &lt;code&gt;push&lt;/code&gt; command to your remote server. In my case, it's appharbor. GitHub will usually tell you to add their remote as &lt;code&gt;origin&lt;/code&gt; but you can name them whatever you want. I tend to have &lt;code&gt;appharbor&lt;/code&gt; and &lt;code&gt;appharbor-d&lt;/code&gt; for staging.&lt;/p&gt;
&lt;p&gt;Once you push, your latest changes will be on the remote server. It is usually a good idea to wait to push until you have a stable release ready for your branch. It could be after one commit or after 10 commits.&lt;/p&gt;
&lt;h1&gt;Git pushin'&lt;/h1&gt;
&lt;p&gt;So now you know what a typical workflow is for my .NET development. If you're interested in file structure, check out my &lt;a href="http://github.com/kamranayub/.JSON" target="_blank"&gt;.JSON&lt;/a&gt; project.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=ekw3kSusSDY:Wk5FwQNBg6A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=ekw3kSusSDY:Wk5FwQNBg6A:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=ekw3kSusSDY:Wk5FwQNBg6A:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=ekw3kSusSDY:Wk5FwQNBg6A:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/ekw3kSusSDY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/ekw3kSusSDY/my-git-workflow-for-net-based-projects</link>
      <category>AppHarbor</category>
      <category>Git</category>
      <category>GitHub</category>
      <category>Development</category>
      <category>Workflow</category>
      <category>Beginners</category>
      <category>Tutorial</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/13/my-git-workflow-for-net-based-projects</feedburner:origLink></item>
    <item>
      <title>Pass in your variables to console.log as parameters to make them navigable</title>
      <pubDate>Mon, 27 Jun 2011 14:24:54 +0000</pubDate>
      <description>&lt;p&gt;I was helping a co-worker debug a JSON issue when I saw he was trying to use &lt;code&gt;console.log&lt;/code&gt;. I asked how he was passing it in and he was doing exactly what you'd think should work:&lt;/p&gt;
&lt;pre class='brush: js'&gt;// result = some JSON object
console.log("Returned data: " + result);&lt;/pre&gt;
&lt;p&gt;He was seeing:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Returned data: [Object object]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;He was wondering how he could stringify the result. You could do that, I said, but I have a useful tip!&lt;/p&gt;
&lt;p&gt;Try doing this instead:&lt;/p&gt;
&lt;pre class='brush: js'&gt;console.log("Returned data: ", result);&lt;/pre&gt;
&lt;p&gt;And voila, the console will not try to &lt;code&gt;.toString()&lt;/code&gt; your object and it will be navigable:&lt;/p&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://kamranicus.com/Blog/Posts/Image/9" alt="Firebug Console Example" /&gt;
&lt;/div&gt;
&lt;p&gt;Clicking the object link will let you view its properties.&lt;/p&gt;
&lt;p&gt;I always thought this was a useful and not very well known feature of &lt;code&gt;console.log&lt;/code&gt; so hopefully that might assist you in debugging!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=l0IYLjXYplY:7r6b7JIP_eY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=l0IYLjXYplY:7r6b7JIP_eY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=l0IYLjXYplY:7r6b7JIP_eY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=l0IYLjXYplY:7r6b7JIP_eY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/l0IYLjXYplY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/l0IYLjXYplY/pass-in-your-variables-to-consolelog-as-parameters</link>
      <category>Javascript</category>
      <category>Debugging</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/12/pass-in-your-variables-to-consolelog-as-parameters</feedburner:origLink></item>
    <item>
      <title>Using SquishIt Without Writing to the File System</title>
      <pubDate>Wed, 22 Jun 2011 14:16:11 +0000</pubDate>
      <description>&lt;p&gt;I'm a big fan of &lt;a href="https://github.com/jetheredge/SquishIt/" target="_blank"&gt;SquishIt&lt;/a&gt;, which is a library that compresses and minifies CSS and JS. It automatically keeps thing uncompressed locally and then on your web server, versions and compresses your files. The versioning is based on a checksum of your files so it automatically handles any changes you make, it's gold.&lt;/p&gt;
&lt;p&gt;The thing that I don't like is that by default, it writes to your file system which is usually a no-no on shared hosts or even enterprise applications.&lt;/p&gt;
&lt;p&gt;I asked if you could use SquishIt programmatically and you can! I &lt;a href="https://github.com/jetheredge/SquishIt/wiki/Using-SquishIt-programmatically-without-the-file-system" target="_blank"&gt;wrote up a wiki article&lt;/a&gt; on their project page to show how it's done.&lt;/p&gt;
&lt;p&gt;If you haven't used SquishIt, I'd highly recommend it!&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=lnLOkKBJAtI:Tx6QC-xiwl4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=lnLOkKBJAtI:Tx6QC-xiwl4:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=lnLOkKBJAtI:Tx6QC-xiwl4:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=lnLOkKBJAtI:Tx6QC-xiwl4:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/lnLOkKBJAtI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/lnLOkKBJAtI/using-squishit-without-writing-to-the-file-system</link>
      <category>MVC</category>
      <category>SquishIt</category>
      <category>Open Source</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/11/using-squishit-without-writing-to-the-file-system</feedburner:origLink></item>
    <item>
      <title>Released NuGet package of .JSON</title>
      <pubDate>Thu, 16 Jun 2011 19:49:32 +0000</pubDate>
      <description>&lt;p&gt;Yesterday I released my &lt;a href="http://github.com/kamranayub/.JSON" target="_blank"&gt;.JSON&lt;/a&gt; library as a NuGet package (about time). It is named &lt;strong&gt;DotJson.Source&lt;/strong&gt; to follow current conventions. If you need me to, I can also release it as a compiled DLL.&lt;/p&gt;
&lt;p&gt;You can get it via Visual Studio or the &lt;a href="http://nuget.org/List/Packages/DotJson.Source" target="_blank"&gt;Nuget.org&lt;/a&gt; page.&lt;/p&gt;
&lt;h2&gt;To Use It&lt;/h2&gt;
&lt;p&gt;Add it as a library reference via Nuget. In your code file, you can add a &lt;code&gt;using DotJson;&lt;/code&gt; and then start using the library. That's all you have to do.&lt;/p&gt;
&lt;p&gt;See the &lt;a href="http://github.com/kamranayub/.JSON/wiki" target="_blank"&gt;documentation wiki&lt;/a&gt; for more information.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=0x2iVehsevo:SmjcvzFUVHg:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=0x2iVehsevo:SmjcvzFUVHg:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=0x2iVehsevo:SmjcvzFUVHg:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=0x2iVehsevo:SmjcvzFUVHg:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/0x2iVehsevo" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/0x2iVehsevo/released-nuget-package-of-json</link>
      <category>News</category>
      <category>.JSON</category>
      <category>NuGet</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/10/released-nuget-package-of-json</feedburner:origLink></item>
    <item>
      <title>Fixing the POST value of the button element in IE 7 and below</title>
      <pubDate>Thu, 19 May 2011 18:07:48 +0000</pubDate>
      <description>&lt;p&gt;Please &lt;a href="http://www.peterbe.com/plog/button-tag-in-IE" target="_blank"&gt;see this write up&lt;/a&gt; for the exact issue. Basically, IE 7 and below do not properly submit the &amp;quot;value&amp;quot; of the &lt;code&gt;&amp;lt;button&amp;gt;&lt;/code&gt; tag, opting instead to submit the &lt;code&gt;innerText&lt;/code&gt;. We just hit this issue while testing with our users who used IE7 on a project I'm on.&lt;/p&gt;
&lt;p&gt;Here is the fix I'm using which I prefer to all the other alternatives I saw in the comments of that post. It meets two of my objectives:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It's totally transparent&lt;/li&gt;
&lt;li&gt;It's only for IE 7 and 6&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;script src="https://gist.github.com/981360.js?file=iebuttonfix.js"&gt;&lt;/script&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=EMFA3O5AaLg:VnN-RzYV2qk:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=EMFA3O5AaLg:VnN-RzYV2qk:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=EMFA3O5AaLg:VnN-RzYV2qk:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=EMFA3O5AaLg:VnN-RzYV2qk:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/EMFA3O5AaLg" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/EMFA3O5AaLg/fixing-the-post-value-of-the-button-element-in-ie</link>
      <category>Tips &amp; Tricks</category>
      <category>jQuery</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/9/fixing-the-post-value-of-the-button-element-in-ie</feedburner:origLink></item>
    <item>
      <title>Entity Framework, Polymorphism, and AutoMapper: Can't We All Be Friends?</title>
      <pubDate>Fri, 22 Apr 2011 04:41:05 +0000</pubDate>
      <description>&lt;p&gt;At work we were running into an interesting issue. We are using EF Code First, AutoMapper, and the dynamic proxies generated by EF. We map our domain entities onto our view models.&lt;/p&gt;
&lt;h2&gt;The Problem&lt;/h2&gt;
&lt;p&gt;AutoMapper fails to map a derived type to a view model base class for use in a general-use scenario:&lt;/p&gt;
&lt;pre class='brush: c#'&gt;public IEnumerable&amp;lt;AbstractViewModel&amp;gt; GetPolymorphicClasses() {
    var list = db.AbstractClasses.ToList();

    // list is a list of dynamically proxied derived types
    // DerivedTypeA, DerivedTypeB, and so on
    // aka DynamicProxy_xxxxxxx
    return Mapper.Map&amp;lt;IEnumerable&amp;lt;AbstractClass&amp;gt;, IEnumerable&amp;lt;AbstractViewModel&amp;gt;&amp;gt;(list);
}&lt;/pre&gt;
&lt;h2&gt;The &amp;quot;Solution&amp;quot;&lt;/h2&gt;
&lt;p&gt;This is not a solution, but it's the best I could do with &lt;em&gt;limited&lt;/em&gt; knowledge of AutoMapper and a need to just get it working quickly. Thanks to &lt;a href="http://stackoverflow.com/q/3441916/109458" target="_blank"&gt;this post on the same problem&lt;/a&gt;, I was able to retrofit the answerer's answer to a solution that worked for me (his generated a stack overflow because it seemed to get stuck converting in an infinite loop).&lt;/p&gt;
&lt;p&gt;If &lt;a href="http://stackoverflow.com/users/58508/jimmy-bogard" target="_blank"&gt;Jimmy Bogard&lt;/a&gt; reads this, please tell me what I'm doing wrong and how to &lt;em&gt;actually&lt;/em&gt; fix it:&lt;/p&gt;
&lt;p&gt;&lt;script src="https://gist.github.com/935461.js?file=gistfile1.cs"&gt;&lt;/script&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=6egN_GZSxqE:-vTYq-QMo_A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=6egN_GZSxqE:-vTYq-QMo_A:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=6egN_GZSxqE:-vTYq-QMo_A:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=6egN_GZSxqE:-vTYq-QMo_A:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/6egN_GZSxqE" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/6egN_GZSxqE/entity-framework-polymorphism-and-automapper-cant</link>
      <category>C#</category>
      <category>Gist</category>
      <category>AutoMapper</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/8/entity-framework-polymorphism-and-automapper-cant</feedburner:origLink></item>
    <item>
      <title>MIX 11, Day 2 - Kinects, Celebrities, Kings, and Clubbing</title>
      <pubDate>Thu, 14 Apr 2011 21:45:12 +0000</pubDate>
      <description>&lt;p&gt;Have you ever had a day where everything that happens just comes together to create the greatest day ever? Well, let me tell you about mine.&lt;/p&gt;
&lt;h2&gt;Kinects for Everyone&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/6"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/6/Large" alt="MIX Keynote" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I posted about my thoughts on the keynote on &lt;a href="http://kamranicus.com/Blog/Posts/6/mix-11-day-15"&gt;Day 1&lt;/a&gt;. It was mediocre. It seems that Microsoft saved the best for last because the day 2 keynote was, in a word, amazing.&lt;/p&gt;
&lt;p&gt;First, MS covered everything about the new Mango update for Windows Phone 7. I don't even own a WP7 and I wanted to toss my Droid into the trash by the end. Now that there are really awesome and useful APIs being introduced, I may start developing some WP7 applications.&lt;/p&gt;
&lt;p&gt;Second, MS covered Silverlight 5 which actually does introduce some useful features like GPU acceleration, XNA integration, and 3D support. That is pretty cool. I haven't checked but I also hope they offer better clipboard integration.&lt;/p&gt;
&lt;p&gt;Third, and of course, the best part of the keynote, was the announcement of Kinect for Windows SDK. We saw demos for helping navigation for blind folks, a robotic lounge chair, a game, and a galaxy simulator. As if that weren't good enough, &lt;strong&gt;every attendee got a Kinect&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The free Kinect was definitely a surprise and an awesome perk of going to MIX. Unfortunately, I already own one and company policy dictates I can't accept gifts over $100... so I had to forgo that.&lt;/p&gt;
&lt;h2&gt;My inner fanboy is satiated&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://yfrog.com/h3sl2zrhj" target="_blank"&gt;&lt;img src="http://desmond.yfrog.com/Himg615/scaled.php?tn=0&amp;amp;server=615&amp;amp;filename=sl2zrh.jpg&amp;amp;xsize=640&amp;amp;ysize=640" alt="Me, Hanselman, and Haack" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://twitter.com/shanselman" target="_blank"&gt;Scott Hanselman&lt;/a&gt; and &lt;a href="http://haacked.com" target="_blank"&gt;Phil Haack&lt;/a&gt;. I was also within 10 feet of &lt;a href="http://wekeroad.com" target="_blank"&gt;Rob Conery&lt;/a&gt; so that counts, too. 'nuff said.&lt;/p&gt;
&lt;p&gt;Watching presentations by Hanselman is like watching a comedy show, I can only aspire to make people laugh like that during my presentations.&lt;/p&gt;
&lt;h2&gt;Circle of Life&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/8"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/8/Large" alt="Lion King" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Me and Cassie went to &lt;a href="http://www.mandalaybay.com/entertainment/disneys-the-lion-king.aspx" target="_blank"&gt;The Lion King at Mandalay Bay&lt;/a&gt; later that night. It was fantastic, everything about it was amazing. The costumes were incredibly clever and creative, the actors were awesome, the stage sets were great, and the music was top notch. We sat in the 5th row or so and it was perfect.&lt;/p&gt;
&lt;h2&gt;VIP Life in Vegas&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://kamranicus.com/Blog/Posts/Image/7"&gt;&lt;img src="http://kamranicus.com/Blog/Posts/Image/7/Large" alt="The Marquee" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All MIX attendees were invited to &lt;a href="http://www.marqueelasvegas.com/" target="_blank"&gt;The Marquee nightclub&lt;/a&gt;, which is a new club in Vegas. I got a guest pass for Cassie and we went and it was a lot more fun than I had expected. Usually, I am not one for dancing or clubbing, but I figured this was a unique experience I shouldn't pass up. I am glad I didn't! It was a ton of fun and the nerd level was off the charts. Half the people just sat or stood in place, silently sipping their drinks while everyone else was having fun. We sat and drank a bit but decided we needed to have some fun, so for the rest of the time we danced and partied in the &amp;quot;mosh pit.&amp;quot; When you're dancing with a bunch of geeks and nerds, you really don't need to worry about how you dance.&lt;/p&gt;
&lt;h2&gt;So, in summary...&lt;/h2&gt;
&lt;p&gt;Best. Day. Ever.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=31BADapmo_A:T_OriGc5RQI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=31BADapmo_A:T_OriGc5RQI:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=31BADapmo_A:T_OriGc5RQI:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=31BADapmo_A:T_OriGc5RQI:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/31BADapmo_A" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/31BADapmo_A/mix-11-day-2-kinects-celebrities-kings-and-clubbin</link>
      <category>mix11</category>
      <category>Kinect</category>
      <category>WP7</category>
      <category>Dancing</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/7/mix-11-day-2-kinects-celebrities-kings-and-clubbin</feedburner:origLink></item>
    <item>
      <title>MIX 11, Day 1.5</title>
      <pubDate>Tue, 12 Apr 2011 21:57:55 +0000</pubDate>
      <description>&lt;p&gt;This is the first time I've ever been to Vegas. I think that one guy on Twitter had it right, &amp;quot;everything in Vegas is fake.&amp;quot; That said, it's still pretty neat. We walked to the Bellagio last night and saw Celine Dion's water display. My heart &lt;em&gt;did&lt;/em&gt; go on.&lt;/p&gt;
&lt;h2&gt;Open Source Fest&lt;/h2&gt;
&lt;p&gt;The open source fest went swimmingly. I had been afraid I wouldn't meet anyone or no one would like &lt;a href="http://github.com/kamranayub/.JSON" target="_blank"&gt;my library&lt;/a&gt; but that wasn't the case.&lt;/p&gt;
&lt;p&gt;I met John Sheehan from &lt;a href="http://restsharp.org/" target="_blank"&gt;RestSharp&lt;/a&gt;, Sam Saffron and other developers from Stackoverflow, Jonathan Marbutt from the &lt;a href="http://opus.codeplex.com/" target="_blank"&gt;Opus Silverlight framework&lt;/a&gt;, and Jeff Weber from the &lt;a href="http://farseerphysics.codeplex.com/" target="_blank"&gt;Farseer Physics Engine&lt;/a&gt;. I also met lots of lovely people who were kind enough to throw some chips my way.&lt;/p&gt;
&lt;p&gt;From the SO team I also acquired a black StackOverflow tee, which I am geeked out about.&lt;/p&gt;
&lt;p&gt;I got a lot of awesome feedback on my little library, including plenty of questions about whether it works in Silverlight. Looks like I may have some investigating to do.&lt;/p&gt;
&lt;h2&gt;Thoughts on the Keynote&lt;/h2&gt;
&lt;div class="image-caption"&gt;
&lt;img src="http://desmond.yfrog.com/Himg620/scaled.php?tn=0&amp;amp;server=620&amp;amp;filename=zjpwp.jpg&amp;amp;xsize=640&amp;amp;ysize=640" alt="Keynote stage" /&gt;
&lt;/div&gt;
&lt;p&gt;I &lt;a href="http://yfrog.com/h8zjpwpj" target="_blank"&gt;posted a picture&lt;/a&gt; of what the MIX stage looked like at the keynote. It looked like a stage for a rock concert, it was pretty awesome.&lt;/p&gt;
&lt;p&gt;The content of the keynote seemed to generate mixed feelings. Several times the speaker had expected an eruption of applause but the audience wasn't forthcoming. Maybe they had all lost their money the night before?&lt;/p&gt;
&lt;p&gt;The first half was all about IE and how it's so great and excellent and other browsers (&lt;strong&gt;Chrome&lt;/strong&gt;) can't keep up. Personally, I like all the new improvements IE provided and hope to see other browsers play catch-up in terms of hardware acceleration. But the fact that only IE can perform hardware accelerated tasks sort of diminishes the value of the feature, since users not using IE9 (a &lt;em&gt;significant&lt;/em&gt; portion of people) lose out. It's a value judgement you have to make (and in an ideal world, &lt;em&gt;shouldn't&lt;/em&gt; have to make...). I don't know if that's any different than the decisions we've had to make previously as designers about how to tackle issues that other browsers sans IE support, though.&lt;/p&gt;
&lt;p&gt;Notably missing was talk about Silverlight. Microsoft seems to be undecided in what to sell... on one hand they are focusing hard on HTML5 and rich web experiences but on the other they are selling Windows Phone 7 which builds on Silverlight. The rest of the non-MS world has shown it is entirely behind HTML5, so at least on the web, I feel like Silverlight is a losing battle... not that SL is bad by any means, just that more tooling may come out surrounding HTML5 than SL.&lt;/p&gt;
&lt;p&gt;I thought the keynote was &amp;quot;interesting&amp;quot; and that's probably where I'll stick. I didn't expect half the time to be spent on IE but then I really didn't know what I should be expecting.&lt;/p&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=gwYbrBnQ2vk:3Up6eRYsTzw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=gwYbrBnQ2vk:3Up6eRYsTzw:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=gwYbrBnQ2vk:3Up6eRYsTzw:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=gwYbrBnQ2vk:3Up6eRYsTzw:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/gwYbrBnQ2vk" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/gwYbrBnQ2vk/mix-11-day-15</link>
      <category>mix11</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/6/mix-11-day-15</feedburner:origLink></item>
    <item>
      <title>"All the code you write is wrong."</title>
      <pubDate>Fri, 08 Apr 2011 15:47:57 +0000</pubDate>
      <description>&lt;p&gt;Every time I read about a &amp;quot;best practice&amp;quot; or the opinions of highly regarded (to many) developers, I always am amazed at the different opinions in response. This isn't bad. In fact, I think it's pretty cool we all share differing opinions and what works for one person may not work for someone else. I find it refreshing to see all sorts of opinions that propose different ways of doing the same thing.&lt;/p&gt;
&lt;p&gt;Thus, my mantra from now on is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;All the code you write is wrong.&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That works for me considering I never met a developer who always thought what they wrote was perfect.&lt;/p&gt;
&lt;p&gt;I strive to write &amp;quot;good&amp;quot; code but I'm always ready to hear it is terrible and could be done a better way. That's why there are smarter people than me alive.&lt;/p&gt;
&lt;iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/05av9iJvgiQ" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=Ho1f9ieoIe4:mX6NItPJJ8k:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=Ho1f9ieoIe4:mX6NItPJJ8k:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Kamranicus?a=Ho1f9ieoIe4:mX6NItPJJ8k:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Kamranicus?i=Ho1f9ieoIe4:mX6NItPJJ8k:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Kamranicus/~4/Ho1f9ieoIe4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/Kamranicus/~3/Ho1f9ieoIe4/all-the-code-you-write-is-wrong</link>
      <category>Nuggets of Wisdom</category>
      <category>Programming</category>
      <category>Observations</category>
    <feedburner:origLink>http://kamranicus.com/Blog/Posts/5/all-the-code-you-write-is-wrong</feedburner:origLink></item>
  </channel>
</rss>

