<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Nick Josevski</title>
	<atom:link href="http://blog.nick.josevski.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nick.josevski.com</link>
	<description>Solving problems. Writing code. Creating new problems.</description>
	<lastBuildDate>Sat, 04 May 2013 08:02:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.nick.josevski.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nick Josevski</title>
		<link>http://blog.nick.josevski.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.nick.josevski.com/osd.xml" title="Nick Josevski" />
	<atom:link rel='hub' href='http://blog.nick.josevski.com/?pushpress=hub'/>
		<item>
		<title>Tracking application errors with Raygun.io</title>
		<link>http://blog.nick.josevski.com/2013/03/02/tracking-application-errors-with-raygun-io/</link>
		<comments>http://blog.nick.josevski.com/2013/03/02/tracking-application-errors-with-raygun-io/#comments</comments>
		<pubDate>Sat, 02 Mar 2013 09:52:41 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[HandleError]]></category>
		<category><![CDATA[raygun]]></category>
		<category><![CDATA[tracking]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1780</guid>
		<description><![CDATA[A nice coincidence a few weeks was the news of Raygun going in to public beta crossing my radar. At the time we were fine tuning some things in an application that was in a private beta, we had put a little effort in to ensure that we would get reliable results about errors that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1780&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A nice coincidence a few weeks was the news of <a href="http://raygun.io/">Raygun</a> going in to <a href="http://www.pieterg.com/2013/1/raygunio-has-launched">public beta</a> crossing my radar.</p>
<p>At the time we were fine tuning some things in an application that was in a private beta, we had put a little effort in to ensure that we would get reliable results about errors that happened to the users, but at that point we were just storing the details in a database table.</p>
<h3>Background</h3>
<p>We were capturing 3 levels of errors in the application.<br />
 &#8211; Client-side (JavaScript)<br />
 &#8211; Web Tier (ASP.NET MVC / WebApi)<br />
 &#8211; Back-end (Topshelf hosted services)</p>
<p>Any client side error would be captured, and sent to the Web Tier, Web Tier forwards that and it&#8217;s own errors on to the back end where they would be persisted with low overhead. In a previous <a href="http://blog.nick.josevski.com/2012/08/01/capturing-client-side-javascript-errors-for-later-analysis/">post I have covered this approach</a>.</p>
<p>But to get from entries stored in a database to something actually useful to correctly monitory and to start a resolution process is quite a bit of work. </p>
<p>From our own application structure; we can easily query that table, and just as easily send emails to the dev team when they occur. But this is still short of a robust solution, so a quick glance at the Raygun features and there was very good reason to give it a go.</p>
<h3>What it took for us to set up Raygun</h3>
<p>A quick look at the provided <a href="http://raygun.io/raygun-providers/-net-framework-and-winrt">setup instructions</a> and their <a href="https://github.com/MindscapeHQ/raygun4net">github sample</a>, it looked very easy.</p>
<p>With our particular application structure the global <em>Application_Error</em> method and the sample usage of <em>Server.GetLastError()</em> didn&#8217;t fit well. The clearest example is the arrival of data from client side, which isn&#8217;t a .NET exception, so simply issuing the <em>RaygunClient().Send(exception);</em> call doesn&#8217;t work. In this scenario we basically recreate an exception that represents the issue in the web tier, then have that sent to Raygun.</p>
<p>For errors that originate in our controllers (regular and WebApi) which extend a common base class, we make use of the <strong>HandleError</strong> attribute so we can execute a method to do some extra work, the code looks like:</p>
<pre class="brush: csharp; title: ; notranslate">
[HandleError]
public abstract class BaseController
{
    protected override void OnException(ExceptionContext filterContext)
    {
        //our other logic, some to deal with 500s, some to show 404s

        //make the call here to raygun if it was anything but a 404 that brought us here.
        new RaygunClient().SendInBackground(filterContext.Exception);
    }
}

</pre>
<p>In the scenarios where we actually do have the exception, then it&#8217;s great and it &#8220;just works&#8221;, and we send it off asynchronously, in the catch block by calling a wrapping function like this:</p>
<pre class="brush: csharp; title: ; notranslate">
public static void LogWithRaygun(Exception ex)
{
    new RaygunClient().SendInBackground(ex);
}
</pre>
<h3>Conclusion</h3>
<p>So Raygun really helped us avoid using a weakly hand-rolled half-way solution for tracking errors, now with nice email notifications that look like this, and link into the Raygun detailed information view.</p>
<p>It&#8217;s lacking a few nice to have features, but that&#8217;s more than acceptable for version 1 of the application, and from what we&#8217;ve been told our suggestions are already on track for a future release. One particular one that would benefit lots of people would be to allow an association of errors to be mapped by the user. An example is, 2 seemingly different errors get logged but in actual fact are the same cause, this way the reporting and similarity tracking can continue to group the 2 variations under the one umbrella.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2013/03/raygun-email-example.png"><img src="http://nickjosevski.files.wordpress.com/2013/03/raygun-email-example.png?w=614&#038;h=433" alt="raygun email example" width="614" height="433" class="aligncenter size-full wp-image-1782" /></a></p>
<p>Along with the dashboard summary. </p>
<p><a href="http://nickjosevski.files.wordpress.com/2013/03/error-report-raygun.png"><img src="http://nickjosevski.files.wordpress.com/2013/03/error-report-raygun.png?w=614&#038;h=555" alt="Part of the Raygun  Dashboard" width="614" height="555" class="aligncenter size-full wp-image-1784" /></a></p>
<p>It&#8217;s one less thing we need to worry about. Just an FYI we didn&#8217;t stop saving records into our own database table, we&#8217;re just unlikely to have to go looking in there very much, if ever.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1780/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1780/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1780&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2013/03/02/tracking-application-errors-with-raygun-io/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2013/03/raygun-email-example.png" medium="image">
			<media:title type="html">raygun email example</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2013/03/error-report-raygun.png" medium="image">
			<media:title type="html">Part of the Raygun  Dashboard</media:title>
		</media:content>
	</item>
		<item>
		<title>When you need to generate and send templated emails, consider mailzor</title>
		<link>http://blog.nick.josevski.com/2012/12/20/when-you-need-to-generate-and-send-templated-emails-consider-mailzor/</link>
		<comments>http://blog.nick.josevski.com/2012/12/20/when-you-need-to-generate-and-send-templated-emails-consider-mailzor/#comments</comments>
		<pubDate>Thu, 20 Dec 2012 06:04:37 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Concept]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[email-template]]></category>
		<category><![CDATA[razor]]></category>
		<category><![CDATA[smtp]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1766</guid>
		<description><![CDATA[Mailzor is a basic utility library to help generate and send emails using the Razor view engine to populate email templates, designed to be quickly pluggable into your .NET app. In our applications we send out HTML formatted emails, and seed them with a variety of data. I thought it would be easy to write [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1766&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Mailzor is a basic utility library to help generate and send emails using the Razor view engine to populate email templates, designed to be quickly pluggable into your .NET app.</p>
<p>In our applications we send out HTML formatted emails, and seed them with a variety of data. I thought it would be easy to write them as razor files (cshtml) and then use the razor engine to generate them and send.</p>
<p>It&#8217;s up on <a href="https://nuget.org/packages/mailzor">NuGet</a> and with the release of v1.0.0.11, it&#8217;s more stable.</p>
<p>For the most up to date info follow along with the usage sections of the readme.md file on the <a href="https://github.com/NickJosevski/mailzor">github repository</a>.</p>
<h3>How it works</h3>
<p>I thought I would share some background about the development of it, and hiccups along the way. The original set of code came from <a href="http://kazimanzurrashid.com/posts/use-razor-for-email-template-outside-asp-dot-net-mvc">Kazi Manzur Rashid</a>, which solved the problem of making use of <a href="http://msdn.microsoft.com/en-us/library/system.web.razor.razortemplateengine(v=vs.111).aspx">System.Web.RazorTemplateEngine</a>, which I extended (with permission) to be usable as an injectable dependency and via NuGet.</p>
<p>The core elements are, the creation and management of the SMTP client, the building up of the <em>MailMessage</em>. Then all the compilation related work to get the <em>RazorTemplateEngine</em> up and running.</p>
<p>The RazorTemplateEngine logic boils down to taking the razor file stored on disk and using <em>CSharpCodeProvider.CompileAssemblyFromDom</em>. So if you&#8217;re curious about this code in particular dig into <em>EmailTemplateEngine.cs</em> in the project files.</p>
<p>Prior to version .10 where I went down the path of using ilmerge to solve conflicts of version mismatch with <em>System.Web.Razor</em>.</p>
<p>It seems easy seeing how I took an existing chunk of operational code and extended, and it only seems easy when it is working, but when it doesn&#8217;t work and you&#8217;ve got strange compilation errors, debugging this mechanism is not the greatest. I found myself hunting for temporary files and trying to have other compiler flags to output more information.</p>
<p>In the early versions it was heavily the case of &#8220;works on my machine&#8221;, but now its fine and seems to be feature complete&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1766/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1766&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/12/20/when-you-need-to-generate-and-send-templated-emails-consider-mailzor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
		<item>
		<title>Playing with AppHarbor, Twitter and WebAPI.</title>
		<link>http://blog.nick.josevski.com/2012/10/28/playing-with-appharbor-twitter-and-webapi/</link>
		<comments>http://blog.nick.josevski.com/2012/10/28/playing-with-appharbor-twitter-and-webapi/#comments</comments>
		<pubDate>Sat, 27 Oct 2012 21:21:53 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1769</guid>
		<description><![CDATA[What? This sample application is very contrived, and came out of a throw away twitter account creation joke. Landing Page: usedguids.apphb.com Usage Info: gist.github.com/3964492 Service Features Submit a Guid, have it reserved Will inform you if it&#8217;s taken, or ok. Tweets Tech Details / Steps File, New, Web Api Project ASP.NET 4.5 Web Api Controller [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1769&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h3>What?</h3>
<p>This sample application is very contrived, and came out of a throw away twitter account creation joke.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/10/what-started-it.png"><img src="http://nickjosevski.files.wordpress.com/2012/10/what-started-it.png?w=614" alt="what started it" title="what started it"   class="aligncenter size-full wp-image-1771" /></a></p>
<p>Landing Page: <a href="http://usedguids.apphb.com">usedguids.apphb.com</a></p>
<p>Usage Info: <a href="https://gist.github.com/3964492">gist.github.com/3964492</a></p>
<h3>Service Features</h3>
<ol>
<li>Submit a Guid, have it reserved</li>
<li>Will inform you if it&#8217;s taken, or ok.</li>
<li>Tweets</li>
</ol>
<h3>Tech Details / Steps</h3>
<ul>
<li>File, New, Web Api Project</li>
<li>ASP.NET 4.5 Web Api Controller</li>
<li>PM&gt; Install-Package TweetSharp  (<a href="http://nuget.org/packages/TweetSharp">nuget link</a>, <a href="https://github.com/danielcrenna/tweetsharp">github link</a>)</li>
<li>Git push to remote repo on BitBucket</li>
<li><a href="https://appharbor.com/">AppHarbor</a> link to BitBucket account (this was great, very easy)</li>
<li>Select an app name <strong>usedguids.apphb.com</strong></li>
</ul>
<p><strong>Api Controller Logic</strong></p>
<pre class="brush: csharp; title: ; notranslate">
    public class UsedGuidController : ApiController
    {
        public HttpResponseMessage Post(UsedGuidInputModel ug)
        {
            //check for duplicates,
            //twitter authenticate, tweet
            //save guid
            //return new HttpResponseMessage(what_happened)
        }
    }

</pre>
<h3>Conclusion</h3>
<p>It&#8217;s up and running, we&#8217;ll see how stable it is. In this case the code is very sloppy, the focus was to get this concept up and running, so I decided to host it on BitBucket where I have private repositories on a free account.</p>
<p>The AppHarbor experience was great, no fuss to get it up and running, via the authorise AppHarbor app action when I was taken to <a href="https://bitbucket.org/">BitBucket</a>. Even setting up a back end store was very easy.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/10/app-harbor.png"><img src="http://nickjosevski.files.wordpress.com/2012/10/app-harbor.png?w=614&#038;h=472" alt="app harbor ui" title="app harbor ui" width="614" height="472" class="aligncenter size-full wp-image-1775" /></a></p>
<p>The hardest part was working out how to deal with the Twitter API, and that was only tricky because I was in a hurry to just get it working, without reading enough documentation.</p>
<p>It&#8217;s unlikely I&#8217;ll make time to tidy up that code so it can be of any reasonable use to anyone, there&#8217;s too many hack points to get it operational, in particular around twitter API keys, for the application that performs the posting, and the user linked to the account. Not to mention hard coded connection strings with passwords in them. Quite a long list of what-not-to-do.</p>
<p>I did like that the wizard does warn you of such bad behaviour. There&#8217;s some insight into the storage model on the back end <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/10/efdatamodelcreation.png"><img src="http://nickjosevski.files.wordpress.com/2012/10/efdatamodelcreation.png?w=614&#038;h=546" alt="EfDataModelCreation" title="EfDataModelCreation" width="614" height="546" class="aligncenter size-full wp-image-1770" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1769/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1769/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1769&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/10/28/playing-with-appharbor-twitter-and-webapi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/10/what-started-it.png" medium="image">
			<media:title type="html">what started it</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/10/app-harbor.png" medium="image">
			<media:title type="html">app harbor ui</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/10/efdatamodelcreation.png" medium="image">
			<media:title type="html">EfDataModelCreation</media:title>
		</media:content>
	</item>
		<item>
		<title>Queuing ajax calls to ASP.NET WebApi Controllers</title>
		<link>http://blog.nick.josevski.com/2012/10/05/queuing-ajax-calls-to-asp-net-webapi-controllers/</link>
		<comments>http://blog.nick.josevski.com/2012/10/05/queuing-ajax-calls-to-asp-net-webapi-controllers/#comments</comments>
		<pubDate>Thu, 04 Oct 2012 13:22:57 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[webApi]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1757</guid>
		<description><![CDATA[Objective To halt processing of subsequent ajax calls after one causes an error. Why Any actions related to a similar set of data (or concept) will all go through the same queue. This way if something falls over during processing of any given request, halting the processing of further requests should help not worsen things, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1757&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<h3>Objective</h3>
<blockquote><p>To halt processing of subsequent <a href="http://api.jquery.com/jQuery.ajax/">ajax</a> calls after one causes an error.</p></blockquote>
<h3>Why</h3>
<p>Any actions related to a similar set of data (or concept) will all go through the same queue. This way if something falls over during processing of any given request, halting the processing of further requests should help not worsen things, or at least avoid subsequent errors that are a direct result of the first error.</p>
<p>When something unexpected has happened it&#8217;s likely the underlying system data is not in a valid state. Further actions may complicate things, possibly making matters worse. But more likely further actions will also error and we shouldn&#8217;t subject the system to having to handle them. So the solution is to get the user to reload the application into a known good state, i.e. complete fresh request of data.</p>
<p>There&#8217;s a competing concern that particular user actions may be desirable to have processed even after particular unknown/unexpected errors occur, but for now we&#8217;re going to assume these are rarer and can be dealt with specifically simply by having them bypass this queue (or make use of an alternate queue).</p>
<h3>How</h3>
<p><strong>A toggled case</strong><br />
 &#8211; After an error set a flag that will keep prompting the user to reload the page after an error.</p>
<p><strong>A fixed case</strong><br />
- Do not process items already queued up in the processing queue. </p>
<h3>Queue entry management</h3>
<p>This part is simple. Most of the code is plumbing around building up the ajaxQueue call.</p>
<pre class="brush: jscript; title: ; notranslate">
#CoffeeScript
class ActionCommandQueue

    validState: true
    
    #todo: surface the console log issues to the user

    sendData: (url, data, type, settings) =&gt;
        settings = settings || {}
        settings.url = url
        settings.data = JSON.stringify(data)
        settings.type = type
        settings.contentType = 'application/json; charset=utf-8'
        settings.error = @onError
        if @validState
            $.ajaxQueue(settings)
        else
            console.log &quot;You need to reload the page to continue. (click here).&quot;

    onError: (xhr, status, error) =&gt;
        @validState = false
        console.log &quot;Sorry that action failed. Please reload the page and try again&quot;
</pre>
<p><strong>Usage</strong></p>
<pre class="brush: jscript; title: ; notranslate">
    #CoffeeScript

    sendData '/api/Tasks', { description: &quot;new task&quot; }
</pre>
<p><a href="http://api.jquery.com/queue/" rel="nofollow">http://api.jquery.com/queue/</a></p>
<h3>The queue iteself</h3>
<p>This part is also simple, seeing how the hard work in creating a jQuery .ajaxQueue() method has already been done by <a href="https://twitter.com/gnarf37">gnarf</a>, and here&#8217;s the <a href="http://gnarf.net/2011/06/21/jquery-ajaxqueue/">blog post</a> outlining the code. This came out of a great <a href="http://stackoverflow.com/questions/1058158/can-somebody-explain-jquery-queue-to-me">stackoverflow answer</a> and <a href="http://stackoverflow.com/questions/3034874/sequencing-ajax-requests/3035268#3035268">this one</a>.</p>
<p><strong>Except one modification</strong></p>
<p>The <em>.then( next, next )</em> call was replaced with a failure case, in production code it&#8217;s likely to be a silent failure because there&#8217;s an error handling function higher up in the call chain that will report the problem to the user (no need for repeating the message).</p>
<pre class="brush: jscript; title: ; notranslate">
    function doRequest( next ) {

        fail = function () { console.log('cannot continue to process queue after an error');

        jqXHR = $.ajax( ajaxOpts )
            .done( dfd.resolve )
            .fail( dfd.reject )
            .then( next, fail /*was next*/ );
    }
</pre>
<p>An <strong>added benefit</strong> here is not just around safety for the error case, but this queue approach ensures important user actions will get dispatched and arrive in a correct order.</p>
<h3>Example</h3>
<p>Scenario<br />
1. Create a Task.<br />
2. Update task details<br />
3. Add Sub Task<br />
4. Edit Sub Task [Fails]<br />
5. Some other action (possibly related to the sub task)<br />
6. 7. 8. 9. all same as 5.</p>
<p>At step 4, it fails, because something prevented the sub task being added. <strong>But before</strong> Task 4 failed, the user also issued action 5 very quickly. Step 5 is what the above code is preventing from running because we&#8217;re not sure what the impacts may be.</p>
<p>Before I release some Unit Tests to demonstrate this. I have a crude annotation on the Chrome Developer tools console output. The proof is lack of calls to &#8216;<em>doneCb</em>&#8216; after the error. Note the 500 error, then the 2 error messages that follow.</p>
<div id="attachment_1764" class="wp-caption aligncenter" style="width: 558px"><a href="http://nickjosevski.files.wordpress.com/2012/10/ajax-queue-drop.png"><img src="http://nickjosevski.files.wordpress.com/2012/10/ajax-queue-drop.png?w=614" alt="Ajax Queue Drop" title="Ajax Queue Drop"   class="size-full wp-image-1764" /></a><p class="wp-caption-text">Chrome debug output showing the error output.</p></div>
<h3>Queues, Deferred and Promises</h3>
<p>It&#8217;s beyond the scope of what I wanted to talk about here, but the jQuery.ajax wrapper jQuery.ajaxQueue makes use of <a href="http://api.jquery.com/category/deferred-object/">Deferred</a>, <a href="http://api.jquery.com/deferred.then/">Deffered.then()</a> and Promises, they&#8217;re worth looking into to gain a detailed understanding. Some reading about the <a href="http://stackoverflow.com/questions/1058158/can-somebody-explain-jquery-queue-to-me">queue</a> itself.</p>
<h3>Conclusion</h3>
<p>So now a user can click to their hearts content on a variety of partially related actions on a page, having each fire off an ajax() request. If something goes wrong they can be alerted, and you can save a flood of subsequent errors happening.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1757/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1757/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1757&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/10/05/queuing-ajax-calls-to-asp-net-webapi-controllers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/10/ajax-queue-drop.png" medium="image">
			<media:title type="html">Ajax Queue Drop</media:title>
		</media:content>
	</item>
		<item>
		<title>How much to scratch your own itch as a Startup?</title>
		<link>http://blog.nick.josevski.com/2012/08/25/how-much-to-scratch-your-own-itch-as-a-startup/</link>
		<comments>http://blog.nick.josevski.com/2012/08/25/how-much-to-scratch-your-own-itch-as-a-startup/#comments</comments>
		<pubDate>Sat, 25 Aug 2012 11:46:59 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[opinion]]></category>
		<category><![CDATA[Startups]]></category>
		<category><![CDATA[UX]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1730</guid>
		<description><![CDATA[Let me first define the itch concept – the itch here on in will refer to how far to take of your own opinions and desires of how a piece of software should operate. So the question is from the title: Q: How much to scratch your own itch as a startup? Let me answer [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1730&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Let me first define the itch concept – the itch here on in will refer to how far to take of your own opinions and desires of how a piece of software should operate.</p>
<p>So the question is from the title:</p>
<blockquote><p>Q: How much to scratch your own itch as a startup?</p></blockquote>
<p>Let me answer this right up front:</p>
<blockquote><p>A: The correct amount.</p></blockquote>
<p>Off the back of the Thursday night WDYK event, some Startup and <a href="http://www.youtube.com/watch?v=Ovj4hFxko7c">User Experience</a> talking points were raised that I wanted to discuss. I started off by trying to fit it in to the <a href="http://blog.nick.josevski.com/2012/08/24/web-directions-south-what-do-you-know-night-in-melbourne/">last post</a>, but it didn&#8217;t quite fit there. I&#8217;m working in a <em>Startupesque</em> environment right now and just wanted to put some ideas down on ‘paper’, so here goes&#8230;</p>
<h3>Scratch?</h3>
<p>The statement that sent me off on this thought path was &#8220;<em>don’t just scratch your own itch</em>&#8220;, it&#8217;s good that Joel reminded the audience of this. Often as software developers we inject too much of our own usability ideas into the software being built. This falls over when we eventually realise this is not how typical users of our application would like to use it, even if they are other software developers. What I&#8217;m currently working on is not a core software engineer’s tool, say like bug tracking software. It is targeted at a specific type of user and process. But of course we developers often put our ‘application user’ hat on as we build features. Knowing that we’re building the system for someone other than ourselves doesn&#8217;t inhibit members of our development team from having strong opinions on how it should operate. This isn&#8217;t a bad thing&#8230;</p>
<h3>Start scratching</h3>
<p>There is something in the argument of &#8220;<em>scratching your own itch</em>&#8221; being beneficial – it is a reasonable starting point to turning your idea into a functioning application. But you always need to keep in mind your needs aren’t going to be exactly those of the customer. There’s a fair bit of this kind of opinion floating around on blogs: &#8220;<em>Focusing on our own problems doesn&#8217;t necessarily mean we’re solving other people’s problems, or solving problems that matter at scale</em>&#8220;- <a href="http://www.instigatorblog.com/author/byosko/">Ben Yoskovitz</a>, <a href="http://www.instigatorblog.com/scratching-your-own-itch/2010/08/12/">source</a>. </p>
<p>When subject matter experience/expertise comes in to play in building the application, you possibly are focussing on your interpretation of the problems that do matter. You can’t always get the cleanest/best problem definition from your users.  So you go on to manage the itch combining the expertise and opinion with some user experience analysis. Your team probably has a vision of what the application will be about, heading towards hopefully at least one killer feature/aspect that makes your product stand out. So you go forward combining your ideas and refining with some user testing, now days focussed around the users experience and flow through the application.</p>
<h3>Scratch right</h3>
<p>This is how you get to that <strong>magical place</strong> which is the correct amount of scratching your own itch. Have the application be capable of (within reason) all you desire, but reign that in to simpler flows refined by actual results of real users navigating through the system to achieve their normal expectation of work supported by the system.</p>
<p>When my reaches that magical place, I&#8217;ll share what it took to get there, but for now it&#8217;s just an objective off in the not too far distance.</p>
<h3>Scratch well</h3>
<p>Joel describing his own start-up raised some great points about not needing venture capital, and how your product would likely be better off without it. There&#8217;s no financial pressure from the investor wanting to cash out sometime down the track. The way you do this is by:</p>
<p>1. <em>Make something people want</em>,<br />
2. <em>Make it better than what is out there</em>,<br />
3. <em>Tell people about it</em>. </p>
<p>That last point was a great theme to touch on, Mark had his ideas on this which were about going out to find your users, and not just shouting as he put it (a company blog, a company twitter account). Finding and engaging with users is critical. This is what it will take to get the widest range of feedback to help build your application. But it needs to be guided into a solution that’s not something that has come out of a very large handful of a ‘committee design meetings’.</p>
<p>As an FYI; Joel was <a href="http://twitter.com/jfriedlaender">Joel Friedlaender</a> &#8211; Founder at <a href="http://www.redguava.com.au/">Red Guava</a> and Mark was <a href="http://twitter.com/markmansour">Mark Mansour</a> &#8211; Founder at <a href="http://agilebench.com/">Agile Bench</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1730/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1730/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1730&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/08/25/how-much-to-scratch-your-own-itch-as-a-startup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Directions South &#8211; What Do You Know? Night in Melbourne</title>
		<link>http://blog.nick.josevski.com/2012/08/24/web-directions-south-what-do-you-know-night-in-melbourne/</link>
		<comments>http://blog.nick.josevski.com/2012/08/24/web-directions-south-what-do-you-know-night-in-melbourne/#comments</comments>
		<pubDate>Thu, 23 Aug 2012 22:00:22 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[UX]]></category>
		<category><![CDATA[web-direction-south]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1724</guid>
		<description><![CDATA[Last night Thursday 23rd August 2012, I went along the What Do You Know? event held at The Appartment a great little place I used to frequent when I was working on Exhibition Street. Earlier this year I was at the Web Directions South Code event, so anything put on the Web Directions South team [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1724&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Last night Thursday 23rd August 2012, I went along the <a href="http://whatdoyouknow.webdirections.org">What Do You Know?</a> event held at <a href="http://www.theapartment.com.au/">The Appartment</a> a great little place I used to frequent when I was working on Exhibition Street.</p>
<p>Earlier this year I was at the <a href="http://blog.nick.josevski.com/2012/05/24/web-directions-code-melbourne-2012-day-1/">Web Directions South Code</a> event, so anything put on the Web Directions South team is great and you should attend. In particular the <a href="http://south12.webdirections.org/">up coming conference</a> in mid October 2012, Sydney.</p>
<p>So back to Thursday nights event. There were 12 lightning talks, each 5 minutes long, I&#8217;ll list them off with links to what was most interesting / their entire presentation.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/08/myths-debunked.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/08/myths-debunked.jpg?w=614&#038;h=458" alt="" title="myths debunked" width="614" height="458" class="aligncenter size-full wp-image-1751" /></a></p>
<p>I wanted to talk about a few that stood out to me, mostly because it&#8217;s relevant to what is happening at <a href="http://picnicsoftware.com/blog">Picnic Software</a> at the moment.</p>
<p>The 4 presentations that stood out as very relevant to what we&#8217;re doing at Picnic Software were:</p>
<ul>
<li><strong>Mark</strong> &#8211; 5 Simple Things You’ll Forget When You Start a Startup</li>
<li><strong>Joel</strong> &#8211; DevOps for Startups: Tales from the trenches</li>
<li><strong>Matt</strong> &#8211; What the $%&amp;# is UX Design?</li>
<li><strong>Will</strong> &#8211; The User is Drunk</li>
</ul>
<p>I started off by trying to fit it in to this post, but it ended up longer than I expected so it&#8217;s here: <a href="http://blog.nick.josevski.com/2012/08/25/how-much-to-scratch-your-own-itch-as-a-startup">How much to scratch your own itch as a Startup?</a>.</p>
<p>Summary of the event with links, in order of appearance:</p>
<p><strong>The State of Our Web Performance Union</strong><br />
John Bristowe, <a href="http://twitter.com/JohnBristowe">@JohnBristowe</a></p>
<p>Content being deliver over the web is getting larger faster than bandwidth increases. Aim for performance. Have a look at a data trends <a href="http://httparchive.org/">httparchive.org</a></p>
<p><strong>DevOps for Startups: Tales from the trenches</strong><br />
Lucas Chan, <a href="http://twitter.com/geekylucas">@geekylucas</a></p>
<p>Monitor and be ready for spikes. Uptime is critical. Don&#8217;t build what you can rent.</p>
<p><strong>What the $%&amp;# is UX Design?</strong><br />
Matt Magain, <a href="http://twitter.com/mattymcg">@mattymcg</a></p>
<p>Watch this on <a href="http://www.youtube.com/watch?v=Ovj4hFxko7c">YouTube</a> and check out <a href="http://uxmastery.com/">uxmastery.com</a></p>
<p><strong>A whirlwind tour of D3.js</strong><br />
Tony Milne, <a href="http://twitter.com/tonymilne">@tonymilne</a></p>
<p>It&#8217;s very powerful, check it out <a href="http://d3js.org/">d3js.org/</a></p>
<p><strong>A brief introduction to the Gamepad API</strong><br />
Anette Bergo, <a href="http://twitter.com/anettebgo">@anettebgo</a></p>
<p><a href="http://www.html5rocks.com/en/tutorials/doodles/gamepad/">html5rocks.com/en/tutorials/doodles/gamepad/</a></p>
<p><strong>Getting Sourcey with Javascript</strong><br />
Michael Mifsud, <a href="http://twitter.com/xzyfer">@xzyfer</a></p>
<p>Source Maps are the future of debugging the web &#8211; <a href="http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/">html5rocks.com/en/tutorials/developertools/sourcemaps/</a></p>
<p><strong>Startup Myths Debunked</strong><br />
Joel Friedlaender, <a href="http://twitter.com/jfriedlaender">@jfriedlaender</a></p>
<p>Named some common myths that are all likely wrong; failure is high e.g. 9 in 10 Startups fail, your idea is worthless, you need venture capital, the only costs are your time.</p>
<p><strong>CSS checkboxes and the ridiculous things you can build with them</strong><br />
Ryan Seddon, <a href="http://twitter.com/ryanseddon">@ryanseddon</a></p>
<p><a href="http://cssn.in/ja/wdyk2012">cssn.in/ja/wdyk2012</a></p>
<p><strong>50 handy things you’ve never heard of</strong><br />
Charlie Somerville, <a href="http://twitter.com/charliesome">@charliesome</a></p>
<p><a href="http://charlie.bz/presos/50resources/">charlie.bz/presos/50resources/</a></p>
<p><strong>From zero to superpimp mobile web app using Tres</strong><br />
Julio Cesar Ody, <a href="http://twitter.com/julio_ody">@julio_ody</a></p>
<p>Julio amazingly wrote some non-trivial JavaScript using Backbone.js and his library:<br />
<a href="http://tres.io/">tres.io</a></p>
<p><strong>The User is Drunk</strong><br />
Will Dayble, <a href="http://twitter.com/willdayble">@willdayble</a></p>
<p>Good UI is &#8216;not there&#8217;, say things twice (icon and words), you can&#8217;t beat over the shoulder testing (watching your user).</p>
<p><strong>5 Simple Things You’ll Forget When You Start a Startup</strong><br />
Mark Mansour, <a href="http://twitter.com/markmansour">@markmansour </a></p>
<p>Marketing (is critical and not easy), Product (focus on benefits and customers), Promotion (talk to customers), Price (Tiers and known costs for customers), Place (don&#8217;t shout at your customers, go find them)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1724/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1724/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1724&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/08/24/web-directions-south-what-do-you-know-night-in-melbourne/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/08/myths-debunked.jpg" medium="image">
			<media:title type="html">myths debunked</media:title>
		</media:content>
	</item>
		<item>
		<title>Automating IIS actions with PowerShell &#8211; Create Multiple Sites</title>
		<link>http://blog.nick.josevski.com/2012/08/23/automating-iis-actions-with-powershell-create-multiple-sites/</link>
		<comments>http://blog.nick.josevski.com/2012/08/23/automating-iis-actions-with-powershell-create-multiple-sites/#comments</comments>
		<pubDate>Wed, 22 Aug 2012 13:13:26 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[powershell]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1714</guid>
		<description><![CDATA[I&#8217;m working towards a more complex SignalR based post, but in the mean time part of the work on that involves setting up a few ASP.NET web apps. If you&#8217;re after a more comprehensive guide check out this post on learn.iis.net by Thomas Deml. I&#8217;ve summarised the steps required to get some basic .NET 4 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1714&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m working towards a more complex <a href="http://signalr.net/">SignalR</a> based post, but in the mean time part of the work on that involves setting up a few ASP.NET web apps.</p>
<p>If you&#8217;re after a more comprehensive guide check out this post on <a href="http://learn.iis.net/page.aspx/433/powershell-snap-in-creating-web-sites-web-applications-virtual-directories-and-application-pools/">learn.iis.net</a> by <a href="http://blogs.iis.net/thomad/">Thomas Deml</a>. I&#8217;ve summarised the steps required to get some basic .NET 4 web applications deployed.</p>
<p><strong>Objective</strong><br />
To create <strong>N</strong> identical websites in local IIS, each with an incrementing name Id. Each linked to the same application directory. The exact reason as to why will come in a future post, for now consider it an exercise in manipulating IIS via PowerShell.</p>
<blockquote><p>
    s1.site.local<br />
    s2.site.local<br />
    &#8230;
</p></blockquote>
<p><strong>Step 1 &#8211; Ensure you&#8217;re running the scripts in x86 mode.</strong></p>
<p>Which seems quite common a problem, with a <a href="http://stackoverflow.com/questions/6866150/powershell-new-webapplication">stackoverflow question</a>. I haven&#8217;t worked a way around this yet, but this is the error when not running as x86:</p>
<blockquote><p>
New-Item : Cannot retrieve the dynamic parameters for the cmdlet. Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154.<br />
At line:1 char:9<br />
+ New-Item &lt;&lt;&lt;&lt;  AppPools\test-app-pool<br />
    + CategoryInfo          : InvalidArgument: (:) [New-Item], ParameterBindingException<br />
    + FullyQualifiedErrorId : GetDynamicParametersException,Microsoft.PowerShell.Commands.NewItemCommand
</p></blockquote>
<p><strong>Step 2 &#8211; Import-Module WebAdministration</strong><br />
This loads the IIS namespace which allows you to just navigate in the same way you would the filesystem</p>
<p><em>&gt; CD IIS:\</em></p>
<p><strong>Step 3 &#8211; Create &amp; Configure App Pool</strong></p>
<pre class="brush: bash; title: ; notranslate">
    New-Item AppPools\test.pool

    Set-ItemProperty IIS:\AppPools\test.pool -name &quot;enable32BitAppOnWin64&quot; -Value &quot;true&quot;

    Set-ItemProperty IIS:\AppPools\test.pool -name &quot;managedRuntimeVersion&quot; -Value &quot;v4.0&quot;
</pre>
<p>NOTE: here I didn&#8217;t have any luck storing the app pool path in a variable then using Set-ItemProperty, hence the repeating.</p>
<p><strong>Step 4 &#8211; Variables</strong></p>
<pre class="brush: bash; title: ; notranslate">
    $sitesToCreate = 10
    $path = &quot;C:\dev\project-x\App.Web&quot;
    $appPool = &quot;test.pool&quot;
</pre>
<p><strong>Step 5 &#8211; Create Site &amp; Link AppPool Loop</strong></p>
<p>For N(10) to zero:</p>
<ul>
<li>Create a new site</li>
<li>Set binding info and physical path</li>
<li>Set the app pool</li>
</ul>
<pre class="brush: bash; title: ; notranslate">
    while ($sitesToCreate -gt 0)
    { 
        $siteName = &quot;s&quot; + $sitesToCreate + &quot;.site.local&quot;
        $siteWithIISPrefix = &quot;IIS:\Sites\&quot; + $siteName
        Write-Host &quot;Creating: &quot; $siteName
        
        $site = New-Item $siteWithIISPrefix -bindings @{protocol=&quot;http&quot;;bindingInformation=&quot;*:80:&quot; + $siteName } -physicalPath $path
        
        Set-ItemProperty IIS:\Sites\$siteName -name applicationPool -value $appPool
        $sitesToCreate--
    }
</pre>
<p>Note: &#8216;appPool&#8217; is a text variable, not the &#8216;Get-Item&#8217;. Set-ItemProperty operates on a path not a variable representing the item.</p>
<p><strong>We&#8217;re done</strong></p>
<p>One last note, to get these to resolve correctly on your local developer machine you&#8217;ll need to modify your <em>hosts file</em>.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/08/iis-multisite.png"><img src="http://nickjosevski.files.wordpress.com/2012/08/iis-multisite.png?w=600&#038;h=268" alt="IIS multisite" title="IIS multisite" width="600" height="268" class="aligncenter size-medium wp-image-1717" /></a></p>
<p>The complete code up as a <a href="https://gist.github.com/3425309">Github Gist</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1714/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1714/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1714&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/08/23/automating-iis-actions-with-powershell-create-multiple-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/08/iis-multisite.png?w=300" medium="image">
			<media:title type="html">IIS multisite</media:title>
		</media:content>
	</item>
		<item>
		<title>Capturing client side JavaScript errors for later analysis</title>
		<link>http://blog.nick.josevski.com/2012/08/01/capturing-client-side-javascript-errors-for-later-analysis/</link>
		<comments>http://blog.nick.josevski.com/2012/08/01/capturing-client-side-javascript-errors-for-later-analysis/#comments</comments>
		<pubDate>Wed, 01 Aug 2012 12:29:20 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[asp.net-mvc]]></category>
		<category><![CDATA[error-capture]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1701</guid>
		<description><![CDATA[We&#8217;re getting close to pushing an application to a larger set of test users, and we&#8217;ll be interested in what happens when a larger variety of machine configurations (browsers and operating systems) and of course user actions encounter errors. We started with simply catching any server side errors, and log them to a single database [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1701&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>We&#8217;re getting close to pushing an application to a larger set of test users, and we&#8217;ll be interested in what happens when a larger variety of machine configurations (browsers and operating systems) and of course user actions encounter errors.</p>
<p>We started with simply catching any server side errors, and log them to a single database table (separate database to application). </p>
<p>To achieve this part of it, it is simple as having a very lightweight database connection mechanism to insert this log entry record, this way if there was an error with our applications standard database access mechanism we could also capture that.</p>
<p>In this fashion we can be reasonably sure that anything short of major production environment failure (network infrastructure / machine specific) that we&#8217;ll be able to capture errors while the system is being used. Those types of issues will be handled differently.</p>
<p>Then we realised it would be just as helpful to capture and store client side JavaScript errors in a similar fashion.</p>
<p><strong>Capture</strong></p>
<p>The JavaScript error handler looks like this, making use of <a href="https://developer.mozilla.org/en/DOM/window.onerror">window.error</a>:</p>
<pre class="brush: jscript; title: ; notranslate">
window.$debug.globalErrorHandler = function () {
  window.onerror = function (m, u, l) {
    
    $.ajax({
      url: '/Error/Occurred',
      type: 'POST',
      dataType: 'json',
      data: JSON.stringify({ errorMsg: m, url: u, line: l, uri: window.location.href }),
      contentType: 'application/json; charset=utf-8',
    });
    
    return true;
  };
};
</pre>
<p>An extra note here is I came across a JS library that offered a common &#8216;printStackTrace()&#8217; method. Created by <a href="http://eriwen.com">Eric Wendelin</a> &#8211; <a href="https://github.com/eriwen/javascript-stacktrace">github project</a>. Which doesn&#8217;t work how I would have hoped it would have worked in our global error handler, but that&#8217;s the nature of the error handler event.</p>
<p>Never the less it does look quite helpful, to make use of it you need to have a specific try { } catch { } block around something that may fail. Checkout the <a href="https://github.com/eriwen/javascript-stacktrace/blob/master/README.md">readme</a> on the github project page.</p>
<p><em>Back to the main focus of this post&#8230;</em></p>
<p>We can also decide to call <em>$debug.globalErrorHandler()</em> method in some central part of the web application, so that later it doesn&#8217;t have to be always turned on.</p>
<p><strong>Receive</strong></p>
<p>The MVC side of this is even simpler, since our users are logged in while using the application, we have &#8216;context&#8217; information about them, so that&#8217;s one extra useful piece of information we can capture as part of the error.</p>
<pre class="brush: csharp; title: ; notranslate">
public class ErrorController
{
  public void Occurred(ClientSideJavaScriptException error)
  {
    // this context in our application represents the user, so we know who experienced the error.
    error.User = _userContext.UserName;

    // we send this off elsewhere to be persisted, you could simply persist it here
    _service.Handle(error);
  }
}
</pre>
<p>The <em>ClientSideJavaScriptException</em> class simply has the properties required to send over the information from the ajax post.</p>
<pre class="brush: csharp; title: ; notranslate">
public class ClientSideJavaScriptException
{
  public string ErrorMsg { get; set; }
  public string Url { get; set; }
  public string Line { get; set; }
}
</pre>
<p><strong>Process</strong></p>
<p>Finally the persistence logic here is via the Micro.ORM <a href="https://github.com/schotime/NPoco">NPoco</a> selected because <a href="https://twitter.com/schotime/status/226187986172256257">Adam said it was good</a> <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  and the <a href="http://preview.nuget.org/packages/NPoco">Nuget Package</a> helped.</p>
<pre class="brush: csharp; title: ; notranslate">
//setup
Db = new Database(&quot;configuration_key_name&quot;);

Db.Insert(new Details
{
  OccurredWhere = &quot;client-side-js&quot;,
  ExceptionMessage = errorDetails.ErrorMsg,
  When = DateTime.Now,
  StackTrace = errorDetails.Stack,
  Method = &quot;Line Number:&quot; + errorDetails.Line
}
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1701/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1701/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1701&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/08/01/capturing-client-side-javascript-errors-for-later-analysis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
		<item>
		<title>Life should be a Picnic</title>
		<link>http://blog.nick.josevski.com/2012/07/02/life-should-be-a-picnic/</link>
		<comments>http://blog.nick.josevski.com/2012/07/02/life-should-be-a-picnic/#comments</comments>
		<pubDate>Mon, 02 Jul 2012 08:02:56 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Picnic-Software]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1686</guid>
		<description><![CDATA[Today I officially became part of a new Melbourne based software company called Picnic Software. We&#8217;re all about building high quality software here. Stay tuned for more exciting things I&#8217;ll now have a chance to talk about. Follow the expansion of Picnic on Twitter and on the Picnic blog. We&#8217;ll have some hopefully interesting things [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1686&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Today I officially became part of a new Melbourne based software company called <strong>Picnic Software</strong>.</p>
<p><img src="http://nickjosevski.files.wordpress.com/2012/07/nick-josevski-picnic-software2.png?w=614" alt="Nick Josevski Picnic Software" title="Nick Josevski Picnic Software"   class="aligncenter size-full wp-image-1693" /></p>
<p>We&#8217;re all about building high quality software here. Stay tuned for more exciting things I&#8217;ll now have a chance to talk about.</p>
<p>Follow the expansion of Picnic on <a href="https://twitter.com/#!/PicnicSoftware">Twitter</a> and on the  <a href="http://blog.picnicsoftware.com">Picnic blog</a>.</p>
<p>We&#8217;ll have some hopefully interesting things up in our <a href="https://github.com/picnicbasket">Picnic Basket on GitHub</a> soon too.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1686/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1686&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/07/02/life-should-be-a-picnic/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/07/nick-josevski-picnic-software2.png" medium="image">
			<media:title type="html">Nick Josevski Picnic Software</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Directions Code Melbourne 2012 &#8211; Day 2</title>
		<link>http://blog.nick.josevski.com/2012/05/24/web-directions-code-melbourne-2012-day-2/</link>
		<comments>http://blog.nick.josevski.com/2012/05/24/web-directions-code-melbourne-2012-day-2/#comments</comments>
		<pubDate>Thu, 24 May 2012 12:59:53 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[wdc12]]></category>
		<category><![CDATA[web-tech]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1649</guid>
		<description><![CDATA[After a great 1st day at #WDC12. The small end-of-day-one-party was hosted at LaDiDa, with some booked dinners around Melbourne with some of the locals (which sadly I wasn&#8217;t able to attend). None the less we got right into it with an interesting start to day two. Dmitry Baranovsky JavaScript: enter the dragon This was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1649&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><img src="http://nickjosevski.files.wordpress.com/2012/05/web-directions-code-logo.png?w=614" alt="web-directions-code-logo" title="web-directions-code-logo"   class="alignright size-full wp-image-1681" /></p>
<p>After a great <a href="http://blog.nick.josevski.com/2012/05/24/web-directions-code-melbourne-2012-day-1/">1st day</a> at #WDC12. The small end-of-day-one-party was hosted at <a href="http://www.ladidapeople.com/">LaDiDa</a>, with some booked dinners around Melbourne with some of the locals (which sadly I wasn&#8217;t able to attend). None the less we got right into it with an interesting start to day two.</p>
<p><em>Dmitry Baranovsky</em><br />
<strong>JavaScript: enter the dragon</strong><br />
This was quite an eye opening and scarily entertaining motivational address by Dmitry. The phrase &#8216;You Suck&#8217; was uttered the right number of times to motivate an audience full of developers to strive to be better at JavaScript, software development in general and even physically fitter.</p>
<p>The forced take away was to be aware of the intricacies of JavaScript by actually reading the language specification <a href="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf">PDF link</a> and (<a href="http://es5.github.com/#x4.2">annotated here</a>) and to build your own <strong>JavaScript six-pack</strong>:</p>
<ul>
<li>Types and type coercion</li>
<li>Operators + ==</li>
<li>Objects and primatives</li>
<li>Functions and constructors</li>
<li>Closures</li>
<li>Prototype</li>
</ul>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/enter-the-dragon.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/enter-the-dragon.jpg?w=614&#038;h=395" alt="" title="enter the dragon" width="614" height="395" class="aligncenter size-full wp-image-1653" /></a></p>
<p><em>Jed Schmidt</em><br />
<strong>NPM: Node&#8217;s personal manservant</strong><br />
For those familiar with the .NET world, Jed is a <a href="http://www.hanselman.com">Hanselman</a> grade presenter, with great delivery of a comedy element to deliver a presentation as funny as it is educational. Jed introduced many concepts around package management for node (<a href="http://npmjs.org/">NPM</a>) he built a small <a href="https://github.com/jed/dinkumise">demonstration framework</a> to walk us through various concepts, the readme file contains a complete list of everything he covered.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/dinkumizer.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/dinkumizer.jpg?w=614&#038;h=395" alt="dinkumizer" title="dinkumizer" width="614" height="395" class="aligncenter size-full wp-image-1652" /></a></p>
<p><em>Jared Wyles</em><br />
<strong>Removing the gag from your browser</strong><br />
<a href="https://twitter.com/#!/rioter">Jared</a> delivered a very usefully technical presentation around effectively using the Chrome Developer Tools to trouble shoot, analyse and track site performance. The most important take away was being aware of all the network timing elements for your site when it&#8217;s served to a user for the first time, and ensuring items are cached correctly for subsequent visits. He covered using the memory and CPU snapshot and measurement tools to trace any memory leaks and code inefficiencies in particular around interrogating/traversing the dom.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/jarrad-web-site-perf-tips.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/jarrad-web-site-perf-tips.jpg?w=614&#038;h=377" alt="" title="jarrad web site perf tips" width="614" height="377" class="aligncenter size-full wp-image-1656" /></a></p>
<p><em>Anette Bergo</em><br />
<strong>Truthiness, falsiness, and other JavaScript gotchas</strong><br />
<a href="https://twitter.com/#!/AnetteBgo">Anette</a> took the audience through some of the stranger parts of the JavaScript language where it&#8217;s likely anyone who hasn&#8217;t experienced any of those particular bug prone approaches may run in to trouble. Some key ones to be wary of that you may expect to not really cause problems were:</p>
<ul>
<li>ParseInt()</li>
<li>Operators and coercion</li>
</ul>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/javascript-oh-my.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/javascript-oh-my.jpg?w=614&#038;h=395" alt="" title="javascript oh my" width="614" height="395" class="aligncenter size-full wp-image-1658" /></a></p>
<p><em>Damon Oehlman</em><br />
<strong>The main event: beyond event listeners.</strong><br />
<a href="https://twitter.com/#!/damonoehlman">Damon</a> gave us an introduction to <a href="https://github.com/DmitryBaranovskiy/eve">eve</a> &#8211; an eventing library, just check it out.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/javascript-event-magic.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/javascript-event-magic.jpg?w=614&#038;h=395" alt="" title="javascript event magic" width="614" height="395" class="aligncenter size-full wp-image-1657" /></a></p>
<p><em>Mark Dalgleish</em><br />
<strong>Getting closure</strong><br />
<a href="http://markdalgleish.com/">Mark</a> covered &#8220;Immediately Invoked Function Expressions&#8221; and some of the benefits like protecting against unwanted global variables, and ensuring scope, along with explaining the closure concept. His detailed slides are up on <a href="http://markdalgleish.com/presentations/gettingclosure/">his blog</a>.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/getting-closure.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/getting-closure.jpg?w=614&#038;h=415" alt="" title="getting closure" width="614" height="415" class="aligncenter size-full wp-image-1655" /></a></p>
<p><em>Ryan Seddon</em><br />
<strong>Debugging secrets for lazy developers</strong><br />
<a href="http://www.thecssninja.com/">Ryan</a>&#8216;s theme was automation, get as much of your repeatable tasks scripted. He walked through using headless browsers via <a href="http://travis-ci.org/">Travis-CI</a>, but reminded us that will only get you so far you need to test in real browsers too. An exciting little project of his is a port of the Yahoo Yeti tool, to work without the YUI test runner, his is called <a href="https://github.com/ryanseddon">Bunyip</a> and should be available soon.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/bunyip.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/bunyip.jpg?w=614&#038;h=395" alt="" title="bunyip" width="614" height="395" class="aligncenter size-full wp-image-1650" /></a></p>
<p><em>Tony Milne</em><br />
<strong>Party like it&#8217;s 1999, write JavaScript like it&#8217;s 2012!</strong><br />
<a href="http://tonymilne.com.au/">Tony</a> covered an issue with dependencies in JavaScript when your chain of references gets larger, and how ideally the responsibility to link required JavaScript files should exist in a better place than just the html files. He mentioned <a href="http://requirejs.org/">Require.js</a> is great for in browser use, but the really great ones exist for server side JS.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/tony-milne-2012-style-js.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/tony-milne-2012-style-js.jpg?w=614&#038;h=395" alt="Tony Milne 2012 style JS" title="Tony Milne 2012 style JS" width="614" height="395" class="aligncenter size-full wp-image-1659" /></a></p>
<p><em>Tim Oxley</em><br />
<strong>Clientside templates for reactive UI</strong><br />
<a href="http://github.com/timoxley">Tim</a> was a another entertaining presenter with some choice phrases to compare and contrast developers he admires and frameworks that support development of thick-clients. Tim had a sweet spot for 3 templating frameworks <a href="https://github.com/olado/doT">Dot</a>, <a href="http://jade-lang.com/">Jade</a> and <a href="http://handlebarsjs.com/">Handlebars.js</a> (where Handlebars &gt; Hogan &gt; Mustache )</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/client-side-templates.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/client-side-templates.jpg?w=614&#038;h=395" alt="" title="client side templates" width="614" height="395" class="aligncenter size-full wp-image-1651" /></a></p>
<p><em>Rob Hawkes</em><br />
<strong>HTML5 technologies and game development</strong></p>
<p><a href="http://rawkes.com/">Rob</a> stole the show in terms of general inspiration and being uplifting with his love of games and how it helps build better online experiences in particular in browser technologies. The vision he presented was a world where the browser platform, in particular on mobiles extended the gaming experience from the desktop world instead of only partially emulating it. Rob mentioned a few interesting APIs/concepts/products worth checking out like; WebWorkers and PointerLockAPI and <a href="https://tinkercad.com/home/">TinkerCAD</a>. Rob works for Mozilla the not-for-profit software foundation that gets so much amazing stuff done with only 600 employees only half of which are developers, so if you want to see what&#8217;s coming up check out <a href="http://www.mozilla.org/en-US/firefox/aurora/">Firefox Aurora</a>, or what&#8217;s being worked on right now <a href="http://nightly.mozilla.org/">Firefox Nightly</a> and if you want to get in touch with anyone at Mozilla find them on <a href="https://wiki.mozilla.org/IRC">IRC</a>.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2012/05/games-are-universal.jpg"><img src="http://nickjosevski.files.wordpress.com/2012/05/games-are-universal.jpg?w=614&#038;h=395" alt="" title="games are universal" width="614" height="395" class="aligncenter size-full wp-image-1654" /></a></p>
<p>The conference wrapped up at The Carlton down Bourke Street in an awesome after party where beer fueled discussions could run rampart.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1649/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1649/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&#038;blog=6707260&#038;post=1649&#038;subd=nickjosevski&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/05/24/web-directions-code-melbourne-2012-day-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/web-directions-code-logo.png" medium="image">
			<media:title type="html">web-directions-code-logo</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/enter-the-dragon.jpg" medium="image">
			<media:title type="html">enter the dragon</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/dinkumizer.jpg" medium="image">
			<media:title type="html">dinkumizer</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/jarrad-web-site-perf-tips.jpg" medium="image">
			<media:title type="html">jarrad web site perf tips</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/javascript-oh-my.jpg" medium="image">
			<media:title type="html">javascript oh my</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/javascript-event-magic.jpg" medium="image">
			<media:title type="html">javascript event magic</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/getting-closure.jpg" medium="image">
			<media:title type="html">getting closure</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/bunyip.jpg" medium="image">
			<media:title type="html">bunyip</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/tony-milne-2012-style-js.jpg" medium="image">
			<media:title type="html">Tony Milne 2012 style JS</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/client-side-templates.jpg" medium="image">
			<media:title type="html">client side templates</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2012/05/games-are-universal.jpg" medium="image">
			<media:title type="html">games are universal</media:title>
		</media:content>
	</item>
	</channel>
</rss>
