<?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:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-5211228043243414701</atom:id><lastBuildDate>Thu, 24 May 2012 20:50:18 +0000</lastBuildDate><category>Personal</category><category>AOP</category><category>Web dev</category><category>J2ME</category><category>Visual Studio</category><category>GWT</category><category>Microsoft</category><category>MVC</category><category>Antipatterns</category><category>HowTo</category><category>.Net</category><category>ASP.net MVC</category><category>Apple</category><category>Exploring JavaScript</category><category>C++</category><category>Software Design</category><category>Projects</category><category>Mac</category><category>Spring</category><category>iOS</category><category>Clean Code</category><category>Windows OS</category><category>Android</category><category>Unit Testing</category><category>Design Patterns</category><category>jQuery</category><category>Smelly Code</category><category>refactoring</category><category>jFace</category><category>interesting apps</category><category>Software testing</category><category>martial arts</category><category>Java</category><category>Software Architecture</category><category>OSX</category><category>Best Practices</category><category>Google</category><category>Open Source</category><category>Blogging</category><category>C#</category><category>VBA</category><category>Conferences</category><category>RCP</category><category>iPhone</category><category>WCF</category><category>Linux</category><category>mobile dev</category><category>Eclipse</category><category>functional programming</category><category>lessions learned</category><category>annotated</category><category>webclips</category><category>Agile Development</category><category>JavaScript</category><category>Tech vids</category><category>ASP.net</category><category>Entity Framework</category><category>Silverlight</category><title>Juri's TechBlog</title><description>Software Architectures, Web Technologies, Computer Science, Best Practices...</description><link>http://blog.js-development.com/</link><managingEditor>noreply@blogger.com (Juri Strumpflohner)</managingEditor><generator>Blogger</generator><openSearch:totalResults>408</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/juristrumpflohner" /><feedburner:info uri="juristrumpflohner" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-3680122392065800530</guid><pubDate>Thu, 24 May 2012 05:53:00 +0000</pubDate><atom:updated>2012-05-24T07:53:48.616+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Web dev</category><title>Detecting Location Redirects from JavaScript</title><description>&lt;div class="intro"&gt;
A common scenario for using the &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30" target="_blank"&gt;HTTP Location response&lt;/a&gt; header is during an authentication process where some kind of filter redirects to a login page in case when the user is not or no more authenticated. Handling such redirects&amp;nbsp;from JavaScript turned out to be not so simple as it might initially seem. &lt;a href="http://stackoverflow.com/questions/199099/how-to-manage-a-redirect-request-after-a-jquery-ajax-call" target="_blank"&gt;Stackoverflow has already a post&lt;/a&gt; on that and here (&lt;a href="http://stackoverflow.com/a/10717647/50109" target="_blank"&gt;or on SO&lt;/a&gt;) is how I solved it in the end.&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
My scenario is basically the following. I have an ISA server which intercepts all of the requests and verifies the user's authentication. In case when the user isn't logged in it &lt;b&gt;responds with a 302 and adds the location header&lt;/b&gt; to my login page.&lt;br /&gt;
&lt;h2&gt;




The Initial Approach&lt;/h2&gt;
In the case of a rich JavaScript client you would then have something like
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$(document).ajaxComplete(function(e, xhr, settings){
    if(xhr.status === 302){
        //check for location header and redirect...
    }
});
&lt;/pre&gt;
But unfortunately the browser handles location redirects completely himself, wherefore the &lt;code&gt;ajaxComplete&lt;/code&gt; callback won't fire with the &lt;code&gt;302&lt;/code&gt; status code, but instead it will fire on the location redirect target (when that redirect already happened successfully). As a result, the approach before obviously won't work.&lt;br /&gt;
&lt;h2&gt;



The Solution&lt;/h2&gt;
The solution is a bit hacky but it works and I didn't found a better one so far (comment if I'm wrong). Basically what you do is to inject a custom header in your Login page for which you then listen on your client-side. The trick is to inject a header like
&lt;br /&gt;
&lt;pre class="code"&gt;LoginPage: http://www.mydomain.com/Login
&lt;/pre&gt;
where the url is the one of the invoked Login page due to the location redirect.&amp;nbsp;On the client side you can now check for the presence of the header like&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;if(xhr.status === 200){
    var loginPageHeader = xhr.getResponseHeader("LoginPage");
    if(loginPageHeader &amp;amp;&amp;amp; loginPageHeader !== ""){
        window.location.replace(loginPageHeader);
    }
}
&lt;/pre&gt;
You might wonder why I included the url directly in the header value. The problem is that you have no way of detecting the URL of the &lt;strong&gt;redirected request&lt;/strong&gt; in the &lt;code&gt;ajaxComplete&lt;/code&gt; callback. You just get the initial one you started, that is, when you execute a &lt;code&gt;GET /person/1&lt;/code&gt; and you're no more logged in (because the session expired) and the server sends you a &lt;code&gt;302 redirect&lt;/code&gt; to &lt;code&gt;/login&lt;/code&gt;, then you'll see the &lt;code&gt;/person/1&lt;/code&gt; as the url in your &lt;code&gt;ajaxComplete&lt;/code&gt; callback although the content of the response is the one of your login page. That's why I directly included the url in my custom header.&lt;br /&gt;
&lt;br /&gt;
Here's my explanation on SO: &lt;a href="http://stackoverflow.com/a/10717647/50109"&gt;http://stackoverflow.com/a/10717647/50109&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-3680122392065800530?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zLKDJCykD5DnP-QoB8_u25600dU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zLKDJCykD5DnP-QoB8_u25600dU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zLKDJCykD5DnP-QoB8_u25600dU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zLKDJCykD5DnP-QoB8_u25600dU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/xJcYk4zpugo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/xJcYk4zpugo/detecting-location-redirects-from.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/05/detecting-location-redirects-from.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-6183268245587355727</guid><pubDate>Sun, 20 May 2012 16:03:00 +0000</pubDate><atom:updated>2012-05-20T18:03:29.038+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tech vids</category><category domain="http://www.blogger.com/atom/ns#">Software Architecture</category><title>Architecting for Failure at the Guardian</title><description>&lt;div class="intro"&gt;
Architecting for the Failure, a presentation of this year's QCon London 2012. Michael Brunton-Spall gives some insights into how they moved their architecture at the Guardian from a monolith system to a system composed of "microapps".&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.infoq.com/presentations/Architecting-for-Failure-at-the-Guardian" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="236" src="http://2.bp.blogspot.com/-PpJ5qJKrJ7k/T7kU8nPCRkI/AAAAAAAADTo/n2njcp0eudc/s320/architectingForFailure.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Watch it over at InfoQ:&lt;/b&gt;&lt;br /&gt;
&lt;a href="http://www.infoq.com/presentations/Architecting-for-Failure-at-the-Guardian"&gt;http://www.infoq.com/presentations/Architecting-for-Failure-at-the-Guardian&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-6183268245587355727?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/FfoiVw8U8Y83-VlQ3MW5izpABsY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FfoiVw8U8Y83-VlQ3MW5izpABsY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/FfoiVw8U8Y83-VlQ3MW5izpABsY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/FfoiVw8U8Y83-VlQ3MW5izpABsY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/jQnaDptpipI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/jQnaDptpipI/architecting-for-failure-at-guardian.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-PpJ5qJKrJ7k/T7kU8nPCRkI/AAAAAAAADTo/n2njcp0eudc/s72-c/architectingForFailure.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/05/architecting-for-failure-at-guardian.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-7348690264769648837</guid><pubDate>Mon, 14 May 2012 06:54:00 +0000</pubDate><atom:updated>2012-05-14T08:54:42.487+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Visual Studio</category><title>Visual Studio: Set the Build Action for an Entire Folder</title><description>&lt;div class="intro"&gt;
I'm sure you already encountered this problem, right? In my specific case I have a folder called "frontend" with a bunch of JavaScript, CSS and view template (EJS) files; my rich JavaScript client basically. I just need them when starting my app in my local Visual Studio development server but they should not be copied when publishing. Why? Because they walk through a Minifier and Linter before. The solution: set the &lt;code&gt;Build Action&lt;/code&gt; to &lt;code&gt;None&lt;/code&gt;. That won't work on an entire folders however, sigh...&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-qFE9gRNqius/T7CpRg0vmpI/AAAAAAAADOw/CYg7cyPHDUo/s1600/buildActionNone.png" imageanchor="1" rel="zoombox" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="163" src="http://3.bp.blogspot.com/-qFE9gRNqius/T7CpRg0vmpI/AAAAAAAADOw/CYg7cyPHDUo/s400/buildActionNone.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Since Visual Studio doesn't provide us such option, the solution is basically to open your .csproj file with your preferred editor and to replace all&amp;nbsp;occurrences&amp;nbsp;of
&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;Content Include="frontend\snip\snip\somefile.js" /&amp;gt;&lt;/pre&gt;
with
&lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;None Include="frontend\snip\snip\somefile.js" /&amp;gt;&lt;/pre&gt;
I'll leave the regex for you ;).&lt;br /&gt;
&lt;br /&gt;
I just did it with &lt;a href="http://www.sublimetext.com/blog/articles/sublime-text-2-beta" target="_blank"&gt;Sublime Text&lt;/a&gt; and that's just amazing. Basically you do a &lt;code&gt;Ctrl+F&lt;/code&gt; and enter your regex. Then you click the "Find All" button and it will &lt;b&gt;place a cursor automatically on all of the found&amp;nbsp;occurrences&lt;/b&gt;&amp;nbsp;such that you can just edit those lines. Awesome!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-7348690264769648837?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/eMxcgalXFi2zcFVyi736Qfrb3ck/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eMxcgalXFi2zcFVyi736Qfrb3ck/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/eMxcgalXFi2zcFVyi736Qfrb3ck/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/eMxcgalXFi2zcFVyi736Qfrb3ck/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/NwZoJZfgGD4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/NwZoJZfgGD4/visual-studio-set-build-action-for.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-qFE9gRNqius/T7CpRg0vmpI/AAAAAAAADOw/CYg7cyPHDUo/s72-c/buildActionNone.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/05/visual-studio-set-build-action-for.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-8514760036355724935</guid><pubDate>Thu, 03 May 2012 07:17:00 +0000</pubDate><atom:updated>2012-05-03T09:17:07.474+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">mobile dev</category><category domain="http://www.blogger.com/atom/ns#">Android</category><title>Scaling Android Emulator Size: Without using Eclipse</title><description>&lt;div class="intro"&gt;
As you might have &lt;a href="http://blog.js-development.com/2012/04/html5-version-android-apps-or-web-for.html" target="_blank"&gt;read following my previous post&lt;/a&gt;&amp;nbsp;I'm currently experimenting with mobile web solutions. In such a case, having an Android emulator is quite comfortable for quickly testing your solution. Personally though, I hate the default emulator skin, mainly also because it takes up quite a large portion of your screen. Hence, I normally use a custom emulator skin. But there is the problem of the scaling the size properly as the default settings will most probably go out of your screen.&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
A couple of years ago I &lt;a href="http://blog.js-development.com/2010/03/tune-your-emulator-with-pretty-nexus.html" target="_blank"&gt;wrote a blog post on how to tune your Android&lt;/a&gt; emulator with a custom skin. In that post, I also described on how to scale it properly, by adding the &lt;code&gt;-scale&lt;/code&gt; option to the command line arguments from within the Eclipse Run Configuration dialog.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/_tF6XjsUy87k/S5aBOXKncyI/AAAAAAAACjE/-P7spfvFXWo/s640/scaleEmulatorEclipse.png" imageanchor="1" rel="zoombox" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="340" src="http://1.bp.blogspot.com/_tF6XjsUy87k/S5aBOXKncyI/AAAAAAAACjE/-P7spfvFXWo/s400/scaleEmulatorEclipse.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
However, if you're only interested in the emulator itself, you may start it by launching the AVD manager directly. In that case, the scale parameter can be directly set when launching your AVD:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-b8h2NPCCBgU/T6IsjLuMdCI/AAAAAAAADMg/pyuUJZjw1CQ/s1600/scalingEmulatorAVD.png" imageanchor="1" rel="zoombox" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="292" src="http://1.bp.blogspot.com/-b8h2NPCCBgU/T6IsjLuMdCI/AAAAAAAADMg/pyuUJZjw1CQ/s400/scalingEmulatorAVD.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Btw, should you have problems connecting to the Internet from your emulator, it might be due to the proxy settings of your (company) network. &lt;a href="http://www.gitshah.com/2011/02/android-fixing-no-internet-connection.html" rel="" target="_blank"&gt;Have a look at this post then&lt;/a&gt;, it might help you.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-8514760036355724935?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/D1ti1kQHPmWiQPMSl3WXow3LFu0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/D1ti1kQHPmWiQPMSl3WXow3LFu0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/D1ti1kQHPmWiQPMSl3WXow3LFu0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/D1ti1kQHPmWiQPMSl3WXow3LFu0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/j5xiXOb5rWI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/j5xiXOb5rWI/scaling-android-emulator-size-without.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_tF6XjsUy87k/S5aBOXKncyI/AAAAAAAACjE/-P7spfvFXWo/s72-c/scaleEmulatorEclipse.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/05/scaling-android-emulator-size-without.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-8191911112274262090</guid><pubDate>Thu, 26 Apr 2012 06:49:00 +0000</pubDate><atom:updated>2012-04-26T08:49:48.184+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Tech vids</category><category domain="http://www.blogger.com/atom/ns#">mobile dev</category><category domain="http://www.blogger.com/atom/ns#">Android</category><category domain="http://www.blogger.com/atom/ns#">iOS</category><title>HTML5 version Android: Apps or Web for mobile development??</title><description>&lt;div class="intro"&gt;
This is a hotly discussed topic recently. The web is now a fully-capable platform and it's getting better and better as the HTML5 standard advances. And that's actually also the point why we're even here to discuss topics like this. QCon London this year clearly showed the trend which is going into the HTML5 + JavaScript direction rather than for native.&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style="text-align: center;"&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/4f2Zky_YyyQ" width="560"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div style="text-align: left;"&gt;
If it's for me personally, then I'd say you "go and develop a fancy nice Android app". Why? Because you have its full power at hand, a &lt;b&gt;market where to deploy&lt;/b&gt; it and hence a nice potential &lt;b&gt;audience&lt;/b&gt; which is going to consume it. That's the point! Your range of target consumers. I'm saying this, though, because I'm and Android fanboy, I know how to develop Android apps and I love to develop for it!&lt;br /&gt;
&lt;br /&gt;
But if you're in the industry, more specifically, in the web industry, things change immediately. A major fact there are the&lt;b&gt; human&amp;nbsp;resources&lt;/b&gt;&amp;nbsp;and the required knowledge you have to deal with/acquire. That's exactly the scenario where I'm currently in. As an architect in a web development company, I cannot just say "come on, lets open another development branch, hire good mobile devs or train existing ones". Well, I could, but it wouldn't be the most economic way of doing things. Instead, what &lt;b&gt;you aim to do is to reuse existing resources&lt;/b&gt;, in the form of knowledge and devs as much as you can. Because in the end, (at least for now)&amp;nbsp;&lt;b&gt;80-90% of our focus will still be the web platform&lt;/b&gt;, but we &lt;b&gt;have to be ready&lt;/b&gt; also for the remaining 10-20% allocated to the mobile part. And the latter one is growing&amp;nbsp;enormously&amp;nbsp;fast.&lt;br /&gt;
&lt;blockquote&gt;
I predict that this year Apple will announce a new programming model for iOS which will be based on Javascript.
&lt;br /&gt;
&lt;div&gt;
&lt;div style="text-align: right;"&gt;
&lt;a href="http://www.dotnetcodegeeks.com/2012/04/predicting-mobile-future.html#ixzz1t7rKqIsq" rel="nofollow" target="_blank"&gt;&lt;span style="font-size: x-small;"&gt;Read more&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
IMHO that would be great. Consider how many more people would start developing for iOS if they would be granted to develop in a language they know (JavaScript and HTML5) and to publish their "web" mobile apps on the official market.&lt;br /&gt;
&lt;br /&gt;
(More to come possibly on this topic on my blog here)&lt;br /&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-8191911112274262090?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/LHqvLjH5pTr_YYBVo9b61Y7gc30/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LHqvLjH5pTr_YYBVo9b61Y7gc30/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/LHqvLjH5pTr_YYBVo9b61Y7gc30/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/LHqvLjH5pTr_YYBVo9b61Y7gc30/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/oO9QwTGJYqk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/oO9QwTGJYqk/html5-version-android-apps-or-web-for.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/4f2Zky_YyyQ/default.jpg" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://blog.js-development.com/2012/04/html5-version-android-apps-or-web-for.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-714007707663188988</guid><pubDate>Thu, 19 Apr 2012 13:00:00 +0000</pubDate><atom:updated>2012-04-19T15:00:20.358+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.Net</category><title>Using NuGet to Distribute Our Company Internal DLLs</title><description>&lt;div class="intro"&gt;
Releasing new software has to be simple and super fast! That was not the case for our company-internal class libraries till a couple of month ago until I finally decided to take the time to optimize that release process.&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;At the company where I'm working at currently, we have an internal class library which bundles a series of utilities with the scope of helping devs doing their day-to-day job. So far so good, however, there has always been a thing that &amp;nbsp;puzzled me right from the beginning was the cumbersome release process of that library.&amp;nbsp;Creating a release bundle consisted in&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;incrementing the version number in the AssemblyInfo&lt;/li&gt;
&lt;li&gt;building the library project in release mode&lt;/li&gt;
&lt;li&gt;opening the bin folder&lt;/li&gt;
&lt;li&gt;zipping the dlls&lt;/li&gt;
&lt;li&gt;uploading the zip to our company-internal wiki page with a version history of the release&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
That's really tedious, isn't it? &lt;b&gt;It sometimes took longer to create a new release than to fix a bug&lt;/b&gt;. So a couple of months ago I decided to optimize that: &lt;b&gt;using NuGet&lt;/b&gt;. If you're a .Net dev you for sure already heard about it.&lt;/div&gt;
&lt;blockquote&gt;
NuGet is a Visual Studio extension that makes it easy to install and update third-party libraries and tools in Visual Studio.

When you use NuGet to install a package, it copies the library files to your solution and automatically updates your project (add references, change config files, etc.). If you remove a package, NuGet reverses whatever changes it made so that no clutter is left.
&lt;br /&gt;
&lt;div&gt;
&lt;div style="text-align: right;"&gt;
&lt;a href="http://nuget.org/"&gt;&lt;i&gt;&lt;span style="font-size: x-small;"&gt;http://nuget.org/&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
The idea was to create a local, company-internal NuGet repository.
&lt;br /&gt;
&lt;h2&gt;




Setting up a company-internal NuGet Repository&lt;/h2&gt;
That turned out to be simpler than expected. Creating a local NuGet repository is as simple as creating a folder on some network share and to deploy all of your NuGet packages there.
&lt;br /&gt;
&lt;h2&gt;




Configuring Visual Studio&lt;/h2&gt;
In order for NuGet to also search on your private repo you need to add the URL to the repository in your NuGet Package Manager Settings under &lt;code&gt;Tools &amp;gt; Library Package Manager &amp;gt; Package Manager Settings&lt;/code&gt;.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-xO0_TNrL14g/T46_Hbw4nhI/AAAAAAAADIQ/gjBpVvdqry8/s1600/nugetrepo.png" imageanchor="1" rel="zoombox" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="230" src="http://1.bp.blogspot.com/-xO0_TNrL14g/T46_Hbw4nhI/AAAAAAAADIQ/gjBpVvdqry8/s400/nugetrepo.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When you now invoke the Nuget Package Manager on a Visual Studio Project or Solution you should also see your private repo listed as a possible source:&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-XgG2vdTMgy0/T47AKR1rZ2I/AAAAAAAADIY/GHfZTVs2LdA/s1600/nugetrepolisted.png" imageanchor="1" rel="zoombox" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="253" src="http://2.bp.blogspot.com/-XgG2vdTMgy0/T47AKR1rZ2I/AAAAAAAADIY/GHfZTVs2LdA/s400/nugetrepolisted.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You're ready! You can now start packaging your class libraries and dlls as NuGet packages.&lt;br /&gt;
&lt;h2&gt;








Automate to the death?&lt;/h2&gt;
I'm not going to write on how to create NuGet packages as&amp;nbsp;&lt;a href="http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package" rel="nofollow" target="_blank"&gt;NuGet has excellent docs on this&lt;/a&gt;. What I did is to create a &lt;code&gt;.nuspec&lt;/code&gt; file for the class library and then a nice &lt;code&gt;publishRelease.bat&lt;/code&gt; containing something like
&lt;br /&gt;
&lt;pre class="brush:bash"&gt;msbuild Siag.Base.csproj /target:Rebuild /property:Configuration=Release 
nuget pack Siag.Base.csproj -Symbols -Prop Configuration=Release
move *.nupkg \\snip\snip\NuGetRepository&lt;/pre&gt;
&lt;h2&gt;






Releasing today means...&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Incrementing the version number in the AssemblyInfo.cs&lt;/li&gt;
&lt;li&gt;double-clicking on the publishRelease.bat&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Like it! :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-714007707663188988?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oDoWhWEp3UQ_54L6LI3YpwuopWU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oDoWhWEp3UQ_54L6LI3YpwuopWU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oDoWhWEp3UQ_54L6LI3YpwuopWU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oDoWhWEp3UQ_54L6LI3YpwuopWU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/I5GuYbfpAZU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/I5GuYbfpAZU/using-nuget-to-distribute-our-company.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-xO0_TNrL14g/T46_Hbw4nhI/AAAAAAAADIQ/gjBpVvdqry8/s72-c/nugetrepo.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/04/using-nuget-to-distribute-our-company.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-4922779457886880323</guid><pubDate>Thu, 05 Apr 2012 07:34:00 +0000</pubDate><atom:updated>2012-04-05T09:35:19.350+02:00</atom:updated><title>Respecting "the Zone"</title><description>&lt;div class="intro"&gt;
Respect when someone is "in the zone"! Don't disturb him if it's not necessary. The "context switch problem" is a known issue in the software development process. Zach Holman particularly mentioned this during his talk at this year's QCon. So what is it about? What's the "zone"??&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;You're coding, right? Do you know those times when you're extremely productive?? Usually when you're alone in the office or later in the evening when the others already left home?? It feels like you could rewrite the entire product in hours, right? &lt;b&gt;It feels good!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
And then there are those other situations, when you really need to finish that piece of software as other people are already waiting for you and you continuously get interrupted by your mates or by ad-hoc meeting requests, incoming IM messages etc...At the end of the day you mostly wrote a couple of lines and &lt;b&gt;you're frustrated&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://zachholman.com/posts/how-github-works/" target="_blank"&gt;Zach Holman especially highlighted this during his presentation of "How Git Works"&lt;/a&gt; at QCon this year.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
The best solutions happen when you're &lt;b&gt;in the zone&lt;/b&gt;.&lt;br /&gt;
&lt;div style="text-align: right;"&gt;
&lt;a href="http://speakerdeck.com/u/holman/p/how-github-works?slide=24" target="window"&gt;&lt;i&gt;&lt;span style="font-size: x-small;"&gt;Slide 24 (if it doesn't redirect automatically)&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;
Therefore, they want developers &lt;a href="http://speakerdeck.com/u/holman/p/how-github-works?slide=54" target="_blank"&gt;to be in the zone&lt;/a&gt;&amp;nbsp;(slide 54) as long as possible. At GitHub they go even further:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Minimize distractions&lt;/li&gt;
&lt;li&gt;No technical meetings (no standup, daily or planning meetings)&lt;/li&gt;
&lt;li&gt;No in-person distractions (instead, &lt;b&gt;ping&lt;/b&gt; over chat)&lt;/li&gt;
&lt;li&gt;No managers (they just distract ;) )&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;h2&gt;




Show you're in the zone!&lt;/h2&gt;
While some of these concept might be difficult to realize in your day-to-day reality some should really be considered. Therefore, &lt;b&gt;establish some kind of "respect for the zone"&lt;/b&gt;. Clearly show your peers your currently "in the zone" and therefore you wouldn't like to be interrupted. &lt;b&gt;How?&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;Wear a cap?&lt;/li&gt;
&lt;li&gt;Take on your earplugs?&lt;/li&gt;
&lt;li&gt;Add an IM status message?&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
It should be clear and understandable, though.&lt;br /&gt;
&lt;h2&gt;




Respect others&lt;/h2&gt;
And on the other side &lt;b&gt;respect people&lt;/b&gt;&amp;nbsp;being in the zone. Don't distract/interrupt them when it is not really necessary. We have async ways of communicating: email, IM pings...&lt;br /&gt;
&lt;h2&gt;



Make sure you remain in the zone yourself!&lt;/h2&gt;
But you also need to make sure you minimize distractions on your own. Prevent IMs from popping up, switch off all those social tools blinking and presenting you the latest activities of your peers, etc...Put on some music that helps you keeping focused.&lt;br /&gt;
&lt;br /&gt;
Try to consider some of these aspects in your working environment!&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-4922779457886880323?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2ozZ-xGhC4o9bJOXv6N1Pzyl5do/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2ozZ-xGhC4o9bJOXv6N1Pzyl5do/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/2ozZ-xGhC4o9bJOXv6N1Pzyl5do/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2ozZ-xGhC4o9bJOXv6N1Pzyl5do/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/F_zJ2yA7WxY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/F_zJ2yA7WxY/respecting-zone.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/04/respecting-zone.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-6152616066056107747</guid><pubDate>Tue, 03 Apr 2012 12:05:00 +0000</pubDate><atom:updated>2012-04-03T14:05:19.182+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Blogging</category><title>Joining the DZone MVB Program</title><description>&lt;div class="intro"&gt;
A couple of weeks ago I was kindly invited to join &lt;a href="http://www.dzone.com/" rel="nofollow" target="_blank"&gt;DZone&lt;/a&gt; as a &lt;a href="http://www.dzone.com/aboutmvb" target="_blank"&gt;MVB (Most Valuable Blogger)&lt;/a&gt;. If you shouldn't already know, "DZone is a technology publishing company that produces valuable content for software architects and developers worldwide."&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;blockquote class="tr_bq"&gt;
The MVB program builds mutually beneficial partnerships between DZone and community bloggers whose articles are of interest to the developer community. The program simplifies the process of publishing selected blog articles by MVB members onto DZone's network of development-focused editorial websites.  Through this process, our MVBs enjoy substantially increased visibility and our audience enjoys great content.
&lt;/blockquote&gt;
There are a lot of &lt;a href="http://www.dzone.com/page/mvbs" target="_blank"&gt;amazing people participating at the DZone MVB program&lt;/a&gt;&amp;nbsp;wherefore&amp;nbsp;I'm very proud to be able to contribute also a bit of my (not always really so important and interesting) stuff there. This is a huge motivation to continue trying to publishing good quality content on my blog here.&lt;br /&gt;
&lt;br /&gt;
So if you'd like to look by, here's my page ;)&lt;br /&gt;
&lt;a href="http://www.dzone.com/user/999973"&gt;http://www.dzone.com/user/999973&lt;/a&gt;&lt;br /&gt;
&lt;i&gt;(So far there's no content there)&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-6152616066056107747?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/oh_ItofGCIcmC8vC8hO5seTz73I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oh_ItofGCIcmC8vC8hO5seTz73I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/oh_ItofGCIcmC8vC8hO5seTz73I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/oh_ItofGCIcmC8vC8hO5seTz73I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/8HxNbsL4tcI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/8HxNbsL4tcI/joining-dzone-mvb-program.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/04/joining-dzone-mvb-program.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-1993608267688979513</guid><pubDate>Tue, 03 Apr 2012 05:53:00 +0000</pubDate><atom:updated>2012-04-03T07:53:43.891+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Blogging</category><category domain="http://www.blogger.com/atom/ns#">Best Practices</category><category domain="http://www.blogger.com/atom/ns#">Conferences</category><category domain="http://www.blogger.com/atom/ns#">Software Architecture</category><title>QCon London - My Personal Recap</title><description>&lt;div class="intro"&gt;
From the previous posts (or from those on &lt;a href="http://developerlog.tumblr.com/tagged/qconlondon" target="_blank"&gt;my Tumblr stream&lt;/a&gt;) you might have understood my participation at this year's QCon London. Actually it was my 1st QCon conference and I enjoyed it a lot. Here is a quick recap of my personal impressions.&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;img border="0" height="115" src="http://1.bp.blogspot.com/-V9pL2F8lEK8/T1262_1n4JI/AAAAAAAADAc/XZDe6_rTEYE/s640/qconlondon.png" width="640" /&gt;&lt;/div&gt;
First of all, being my 1st QCon, what I really liked was the fact there were no technology evangelists, &amp;nbsp;no one stating that one technology/language is better than the other etc, but everything was a bit more generic, more high-level. There was a bunch of interesting stuff so I'll try to just focus on the ones that particularly caught my attention.&lt;br /&gt;
&lt;h2&gt;





Simplicity&lt;/h2&gt;
Keep things as simple as possible. Simplicity was definitely THE keyword of the conference. &lt;b&gt;Don't create artwork&lt;/b&gt;&amp;nbsp;architectures, create easy and simple ones. &lt;b&gt;Devs need to deliver value&lt;/b&gt; and a good architecture should leverage that and not hinder them.
&lt;br /&gt;
&lt;h3&gt;




It's about trade-offs!&lt;/h3&gt;
Dan North's talk about "Decisions, Decisions,..." highlighted the fact that every taken decision is about trade-offs. As such, while automated deploy is a known best practice, it's still a trade-off in that people (once the deploy is automated) might loose the knowledge of doing it manually. Hence, in certain circumstances you might even prefer a manual over an automated deploy just to keep things simple.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
When you know you are trading off you can make informed decisions.&lt;br /&gt;
&lt;a href="http://qconlondon.com/dl/qcon-london-2012/slides/DanNorth_DecisionsDecisions.pdf" target="_blank"&gt;&lt;i&gt;&lt;span style="font-size: x-small;"&gt;Dan North, QCon London 2012&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;/blockquote&gt;
&lt;h3&gt;











Copy&amp;amp;Paste might be an option as well&lt;/h3&gt;
Yep, you read right. You shouldn't always aim for factoring out logic as much as you can and to then reuse that same piece of logic in every possible place. Because, every time you factor out common logic, you &lt;b&gt;create a new dependency&lt;/b&gt; as well. Obviously that doesn't mean to c&amp;amp;p all the logic around, if you have to fix a bug in 2 places&lt;b&gt; you failed&lt;/b&gt;. Instead, what it means is to not over-reuse things. Often copy&amp;amp;pasting and removing the lines you don't need might work out better than taking in all the other logic (which is not needed in that specific scenario). The rational behind: &lt;b&gt;don't take it to the extreme&lt;/b&gt;!&lt;br /&gt;
&lt;h2&gt;











Feedback...&lt;/h2&gt;
Keep the cycle short. While this might seem a quite obvious concept nowadays, especially when you're doing agile, it was a core concept throughout the whole conference.&amp;nbsp;Integrate mechanisms in your&lt;b&gt; development process&lt;/b&gt; that give you feedback as soon as possible. This starts from writing automated unit tests to setting up a proper build pipeline as outlined in the Continuous delivery training session from the &lt;a href="http://www.thoughtworks.com/" target="_blank"&gt;Thoughtworks&lt;/a&gt; guys to Netflix's impressing metrics system.&lt;br /&gt;
&lt;h2&gt;










Social&lt;/h2&gt;
The social aspect of the whole software development process was another important factor. IMHO the "&lt;a href="http://zachholman.com/posts/how-github-works-hours/" target="_blank"&gt;How&lt;/a&gt; &lt;a href="http://zachholman.com/posts/how-github-works-asynchronous/" target="_blank"&gt;GitHub&lt;/a&gt; &lt;a href="http://zachholman.com/posts/how-github-works-creativity/" target="_blank"&gt;Works&lt;/a&gt;" &lt;a href="http://zachholman.com/posts/how-github-works/" target="_blank"&gt;talk&lt;/a&gt;&amp;nbsp;by &lt;a href="https://twitter.com/#!/holman" target="_blank"&gt;Zach Holman&lt;/a&gt; was a highlight of this part. He highlighted some very important facts about how to create a pleasant working environment and how to properly coordinate a distributed (GitHub) team.&lt;br /&gt;
&lt;br /&gt;
Beside those mentioned &lt;a href="http://zachholman.com/posts/how-github-works/" target="_blank"&gt;on his blog&lt;/a&gt;, some things I personally found interesting and valuable:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Celebrate events (releases, birthdays,...)&lt;/li&gt;
&lt;li&gt;Have informal meetings, sit together, talk about interesting stuff&lt;/li&gt;
&lt;li&gt;Have Tech Talks held by employees&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;






"Leave the ego at the door"&lt;/h3&gt;
When you join meetings or pair coding sessions or whatever discussions, &lt;b&gt;leave your ego at the door&lt;/b&gt;. That's the only way to learn! While this might sound obvious, try it yourself the next meeting.&lt;br /&gt;
&lt;h2&gt;





DevOps&lt;/h2&gt;
DevOps is an often used term these days. In small teams/companies this is not really an issue as there might not be any dedicated staff just doing operation activities like server configurations, DBA work etc.. The larger companies get, the more difficult things become and the more arises the risk of building a gap between the development and operation teams.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
"No way, my servers are fine, it's probably because &lt;b&gt;they&lt;/b&gt; don't know how to code properly!"&lt;/blockquote&gt;
Sounds familiar? Aren't we one team in the end?? This is a major issue! Dan North talked about one of the situations he experienced, where he personally joined the operations staff and worked there for a while, as a fully integrated team member. In this way he learned about the problems there and was able (due to his programming capabilities) to solve quite a bunch of issues by automating stuff. The same works vice-versa. An OP guy joining the dev team might get a better insight into the application architecture and hence be able to more fine-tune the servers. OP guys know how to configure, devs how to automate. The key is that both parts naturally fit each other and should benefit from that.&lt;br /&gt;
&lt;h2&gt;




Architecture&lt;/h2&gt;
&lt;div&gt;
Again, simplicity is the main key here. Don't create masterpiece architectures, but simple, extensible and &lt;b&gt;understandable&lt;/b&gt; ones. That's the only key they'll be properly adopted.&lt;/div&gt;
&lt;div&gt;
Beside that, &lt;b&gt;architects need to code&lt;/b&gt;. They need to use their own systems, see how they perform and optimize accordingly. This way an architecture can evolve. Everything else is bullshit and a waste of time.&lt;/div&gt;
&lt;div&gt;
Without going into detail any further, here are the 3 pics of the session with Simon Brown:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://developerlog.tumblr.com/post/18898131296/are-you-a-software-architect-session" target="_blank"&gt;The role of a software architect&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://developerlog.tumblr.com/post/18898117819/are-you-a-software-architect-session" target="_blank"&gt;Architects should code?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://developerlog.tumblr.com/post/18898111524/are-you-a-software-architect-session" target="_blank"&gt;Soft skills&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;/ul&gt;
&lt;h2&gt;



Technologies&lt;/h2&gt;
From the technology point of view the major discussed topics of the conference were&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Mobile Web apps with HTML5 and JavaScript instead of native ones&lt;/li&gt;
&lt;li&gt;NoSQL and document based databases (like MongoDB)&lt;/li&gt;
&lt;li&gt;JavaScript and HTML5&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Here's the &lt;a href="http://www.infoq.com/news/2012/03/top-technologies-qcon-london" target="_blank"&gt;vote of the QCon attendees&lt;/a&gt;&amp;nbsp;among which &lt;a href="http://www.infoq.com/news/2012/03/top-technologies-qcon-london?decidify_ballot=1127" target="_blank"&gt;my personal one&lt;/a&gt;.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2&gt;


My Notes of the Conference&lt;/h2&gt;
&lt;div&gt;
You can find my personal notes taken during the conference &lt;a href="http://developerlog.tumblr.com/tagged/qconlondon" target="_blank"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-1993608267688979513?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MbBiqER32BSbAiL2YBVCgUnh-rw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MbBiqER32BSbAiL2YBVCgUnh-rw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MbBiqER32BSbAiL2YBVCgUnh-rw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MbBiqER32BSbAiL2YBVCgUnh-rw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/rMenlNvSyNg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/rMenlNvSyNg/qcon-london-my-personal-recap.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-V9pL2F8lEK8/T1262_1n4JI/AAAAAAAADAc/XZDe6_rTEYE/s72-c/qconlondon.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/04/qcon-london-my-personal-recap.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-8827305950666831141</guid><pubDate>Wed, 14 Mar 2012 07:05:00 +0000</pubDate><atom:updated>2012-03-14T08:05:29.075+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tech vids</category><category domain="http://www.blogger.com/atom/ns#">Software Architecture</category><title>Sharpening the Tools</title><description>&lt;div class="intro"&gt;
This is a talk from Dan North about &lt;a href="http://www.infoq.com/presentations/Sharpening-the-Tools" target="_blank"&gt;Sharpening the Tools at QCon 2010&lt;/a&gt;. I had the great pleasure to listen to this guy at this year's QCon (recap is in the drafts already and will be published soon btw). In this talk he picks out some tips on how to keep up with the technological evolvement and with tools.&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.infoq.com/presentations/Sharpening-the-Tools" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="240" src="http://2.bp.blogspot.com/-MZy3sPyH65c/T1-vSjfNnTI/AAAAAAAADAk/_MriFNXPPlY/s400/tools_over_time.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;#1 Practise the basics -&lt;/b&gt; He mentions to practice coding katas, code just for the purpose of fun, learn shortcuts (I'm a huge fan of them) and practice your shell-fu. Actually I'm currently just trying to practice a bit that last point by having installed cygwin on my Windows Work PC. Moreover I bought a Mac years ago, just for the purpose of also knowing the unix-side of the world. Another important point was to &lt;i&gt;learn a new language that you don't need&lt;/i&gt;&amp;nbsp;(at work). My personal one currently: nodejs and document databases (MongoDb).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#2 Learn from other people -&lt;/b&gt; Beside stalking experts, following people on Twitter and reading blogs etc, he also mentions to &lt;i&gt;read code&lt;/i&gt;&amp;nbsp;from others. Just go and clone some GitHup repo and read through the code.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#3 Understand trends -&lt;/b&gt; &lt;i&gt;Build a network of people you listen to&lt;/i&gt;. I'm doing that through RSS and Twitter&amp;nbsp;preferably, an extremely powerful tools for keeping up with technology. Try out new things when there is the possibility to. You have to know just enough to be able to understand when you need a given technology needs further investigation. &lt;i&gt;Do you know what you don't know?&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#4 Share knowledge -&lt;/b&gt; One of my&amp;nbsp;favorite&amp;nbsp;points in this talk. Blog about successes, it's not only that you're able to build a community, but mainly you're actively reflecting about what you were doing, the good and bad parts, doing &lt;u&gt;retrospectives&lt;/u&gt;&amp;nbsp;basically.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#5 Maintain your toolbox -&lt;/b&gt; Some tools might be disposable, being no more useful, or&amp;nbsp;technologically&amp;nbsp;deprecated. &lt;i&gt;Use the "clothing" rule to update your tools&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;#6 Learn how to learn -&lt;/b&gt; Understand how learning works. Luckily I had a good course about that at University. Quite interesting stuff about your head works out behind the scenes :).&lt;br /&gt;
&lt;i&gt;Chunking up:&lt;/i&gt;&amp;nbsp;Asking &lt;b&gt;What for?&lt;/b&gt;&amp;nbsp;to find the real reason behind doing something.&lt;br /&gt;
Example:&lt;br /&gt;
A: I'm cleaning the pot.&lt;br /&gt;
B: What for?&lt;br /&gt;
A: So I fill it with water.&lt;br /&gt;
B: What for?&lt;br /&gt;
A: So that I can have some tee.&lt;br /&gt;
B: What for?&lt;br /&gt;
A: So I can appease my thirst.&lt;br /&gt;
&lt;br /&gt;
...then...chunk down again&lt;br /&gt;
&lt;br /&gt;
A: I'm thirsty.&lt;br /&gt;
B: How?&lt;br /&gt;
A: Drink tea, drink water, go to Starbucks.&lt;br /&gt;
B: How else? &lt;i&gt;(&amp;lt; chunking sideways)&lt;/i&gt;&lt;br /&gt;
A: Drink water.&lt;br /&gt;
B: How else?&lt;br /&gt;
A: Go to Starbucks.&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
Eat your own dogfood&lt;br /&gt;
Actively solicit feedback&lt;br /&gt;
"Listen like you don't know the answer"&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-8827305950666831141?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/CVWG6BOvxx601O7eymGpeWiQL0U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CVWG6BOvxx601O7eymGpeWiQL0U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/CVWG6BOvxx601O7eymGpeWiQL0U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/CVWG6BOvxx601O7eymGpeWiQL0U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/cSOLGYZ4WZ4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/cSOLGYZ4WZ4/sharpening-tools.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-MZy3sPyH65c/T1-vSjfNnTI/AAAAAAAADAk/_MriFNXPPlY/s72-c/tools_over_time.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://blog.js-development.com/2012/03/sharpening-tools.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-2265541242487672417</guid><pubDate>Fri, 02 Mar 2012 22:00:00 +0000</pubDate><atom:updated>2012-03-02T23:00:28.166+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tech vids</category><category domain="http://www.blogger.com/atom/ns#">Software Architecture</category><title>Questions for an Enterprise Architect</title><description>&lt;div class="intro"&gt;
Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://www.infoq.com/presentations/Questions-for-an-Enterprise-Architect" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="322" rel="lightbox" src="http://4.bp.blogspot.com/-n8dGzoGkp4k/T1FBNk_DCnI/AAAAAAAAC9A/Z_Qob7uTCUY/s400/evolutionaryArchitecture.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
A very &lt;a href="http://www.infoq.com/presentations/Questions-for-an-Enterprise-Architect" target="_blank"&gt;nice talk I'd like to share here&lt;/a&gt; on the blog. It's essentially about architecture, especially targeting enterprise architecture, the do's and don'ts etc.&lt;br /&gt;
&lt;br /&gt;
A nice quote regarding the often mismatched metaphor about the "architects" role:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
What I want to call myself but couldn't get it through our departments was...I wanted to call myself a gardener. I'm sowing seats and I'm growing new plants and I am tending to them, making sure they're alright, making sure they have enough water. Some are more easy, some more difficult. [...] The gardener metaphor works much better than the architects metaphor but it doesn't sound as cool.&lt;/blockquote&gt;
It really should be like that. An architect should be one trying to use his competencies to make things easier, to help solve problems at a higher level, but at the same time he should "eat his own dog food" (it is this like you're saying it, right?). &lt;b&gt;Imposing&lt;/b&gt;&amp;nbsp;an architecture at a high level, forcing it to be implemented is completely non-sense. An architect needs to work with the system he designs, basically he needs to experience it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-2265541242487672417?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/MX4QyIS_yjDJVV3V8ZcjXsbXVUU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MX4QyIS_yjDJVV3V8ZcjXsbXVUU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/MX4QyIS_yjDJVV3V8ZcjXsbXVUU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/MX4QyIS_yjDJVV3V8ZcjXsbXVUU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/ZfTjYt6gqfc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/ZfTjYt6gqfc/questions-for-enterprise-architect.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-n8dGzoGkp4k/T1FBNk_DCnI/AAAAAAAAC9A/Z_Qob7uTCUY/s72-c/evolutionaryArchitecture.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/03/questions-for-enterprise-architect.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-5124492410964862704</guid><pubDate>Fri, 17 Feb 2012 06:46:00 +0000</pubDate><atom:updated>2012-05-14T11:06:41.925+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Web dev</category><title>I Want the Cursor to be placed in the 1st empty Textbox!</title><description>&lt;div&gt;
&lt;div class="intro"&gt;
You develop a webapp, you have a couple of input fields and buttons on your page. Then the requirement arrives. The customer wants his data to be auto-filled once he enters some identification number (the italian fiscal code). And then, when the data has been filled correctly, he wants the focus to be placed in the 1st empty text box in order to accelerate any further elaboration on that data. Oh ...man!&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
Well, the customer is the boss, right? If you live in the ASP.net WebForms world, such features immediately scare every developer. To realize them you have to deal with auto-postbacks, page refreshes, viewstate....all in all it ends in a mess to code, and it's a pain for the end-user. Let's not speak about UpdatePanels here, ok? Basically, you have to realize it in JavaScript to get a better user-experience. The problem is that if you have a hybrid situation where you mix JavaScript code with ASPX/ASCX code, it gets a little messy. You have to remember the generated ASP ClientIDs and correctly integrate them in your JavaScript code.&lt;br /&gt;
&lt;br /&gt;
To not completely get lost in this post :), what I wanted to express is how easy it is to implement all this in JavaScript making use of jQuery:&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;$("#divPersonData").find("input:text[value='']:visible").first().focus();
&lt;/pre&gt;
Setting the focus to the first empty field is really just fun, right?&lt;br /&gt;
&lt;br /&gt;
The essence of this post is that the UI experience gets more and more important in nowadays webapps. Just look around, &lt;a href="http://twitter.com/" target="_blank"&gt;Twitter&lt;/a&gt;, &lt;a href="http://trello.com/" target="_blank"&gt;Trello&lt;/a&gt;, &lt;a href="http://www.gmail.com/" target="_blank"&gt;Gmail&lt;/a&gt;,...Think about it if you still live in the somewhat more traditional space of web development.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Update:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
You might want to take a look at the HTML5 &lt;code&gt;autofocus&lt;/code&gt; attribute &lt;a href="http://www.w3schools.com/html5/att_input_autofocus.asp" target="_blank"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-5124492410964862704?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WqJRX_TlZyQAwuaGymfoU2L6wDU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WqJRX_TlZyQAwuaGymfoU2L6wDU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WqJRX_TlZyQAwuaGymfoU2L6wDU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WqJRX_TlZyQAwuaGymfoU2L6wDU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/_TKfTsFke9Y" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/_TKfTsFke9Y/i-want-cursor-to-be-placed-in-1st-empty.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>1</thr:total><feedburner:origLink>http://blog.js-development.com/2012/02/i-want-cursor-to-be-placed-in-1st-empty.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-2162449637133258584</guid><pubDate>Mon, 13 Feb 2012 07:01:00 +0000</pubDate><atom:updated>2012-02-13T08:01:32.166+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">jQuery</category><title>Sequential Asynchronous Processing with jQuery Deferreds</title><description>&lt;div class="intro"&gt;
Asynchronous processing is one of the most difficult things for devs to understand when switching from the more traditional web programming pattern to a more client-server like model when creating rich JavaScript single-page apps. It involves a lot of passing callbacks around which makes the code ugly to ready and more complex. With the introduction of &lt;a href="http://api.jquery.com/category/deferred-object/"&gt;jQuery Deferred&lt;/a&gt; this hasn't to be the case any more!
&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;jQuery Deferreds have been introduced with jQuery v1.5 and are a really nice mechanism for handling such asynchronous processing situations. Such asynch&amp;nbsp;processing&amp;nbsp;does not necessarily have to be an ajax call, but might also involve some operation that waits for an external event, such as a user interaction.&lt;br /&gt;
&lt;br /&gt;
For instance consider the following control flow:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;The user clicks a button.&lt;/b&gt;&lt;br /&gt;A popup should appear asking the user for some information. If he provides the info, step 2 should be called.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;An ajax call is done to the server&lt;/b&gt;, if the call succeeds, step 3 should be called&lt;/li&gt;
&lt;li&gt;The &lt;b&gt;data from the ajax call should be processed&lt;/b&gt; and on success the final state should be invoked.&lt;/li&gt;
&lt;li&gt;The &lt;b&gt;final success state&lt;/b&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
Obviously, if in any of those states the operation fails or the user cancels the operation, the final state should never be reached, but rather some failure state should be called.&lt;br /&gt;
&lt;br /&gt;
How would you implement this? With callbacks? A nightmare...I'm not even going to implement it as the result would be totally unreadable, not to speak about maintainability of the code. Instead, with the jQuery Deferred object, the result might look as shown in this dummy jsfiddle example:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen="allowfullscreen" frameborder="0" src="http://jsfiddle.net/juristr/LrAeW/12/embedded/" style="height: 600px; width: 100%;"&gt;&lt;/iframe&gt;&amp;nbsp;Note, I consciously didn't properly refactor the code in order to not "hide" anything for the purpose of this demonstration here.&lt;br /&gt;
&lt;br /&gt;
This reminds me a bit of the &lt;a href="http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx"&gt;C# Task API &lt;/a&gt;with its &lt;code&gt;ContinueWith&lt;/code&gt; etc methods.
&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;References:&lt;/u&gt;&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/scriptjunkie/gg723713.aspx"&gt;http://msdn.microsoft.com/en-us/scriptjunkie/gg723713.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-2162449637133258584?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/6PBTYzWY4yvHIMMZ9LMiqmnDf2o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6PBTYzWY4yvHIMMZ9LMiqmnDf2o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/6PBTYzWY4yvHIMMZ9LMiqmnDf2o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/6PBTYzWY4yvHIMMZ9LMiqmnDf2o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/D_I8ivHtYvc" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/D_I8ivHtYvc/sequential-asynchronous-processing-with.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/02/sequential-asynchronous-processing-with.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-4902300314787482092</guid><pubDate>Tue, 07 Feb 2012 07:08:00 +0000</pubDate><atom:updated>2012-04-24T08:36:19.421+02:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">ASP.net MVC</category><category domain="http://www.blogger.com/atom/ns#">Web dev</category><category domain="http://www.blogger.com/atom/ns#">.Net</category><title>ASP.net MVC3: Doesn't Deserialize Nullable Properties from Json</title><description>&lt;div class="intro"&gt;
A couple of days ago I noticed that the &lt;code&gt;Nullable&lt;/code&gt; properties of a C# object were not properly deserialized when posting back a Json object to an MVC3 action. It seems like this is a bug in the &lt;code&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx" target="_blank"&gt;JavaScriptSerializer&lt;/a&gt;&lt;/code&gt; used by MVC3 to serialize/deserialize Json data.&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;This behavior is quite nerving as you probably have a lot of nullable properties, often resulting directly from the underlying data structure in the DB (especially in a data-base first case with EF). So one solution might be to create your separate ViewModels and somehow handle the mapping of the nullable properties through those. Extremely smelly!&lt;br /&gt;
&lt;br /&gt;
While browsing for a potential solution I came across &lt;a href="http://syper-blogger.blogspot.com/2011/07/hello-world.html" rel="nofollow" target="_blank"&gt;this blogpost&lt;/a&gt;. According to the author of the post, apparently the &lt;code&gt;DataContractSerializer&lt;/code&gt; doesn't have this problem. So what he does is to create an MVC3 ActionFilter for intercepting the call to the Action method and then to deserialize the arriving Json data using the &lt;code&gt;DataContractSerializer&lt;/code&gt;.&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;public class JsonModelBinder : ActionFilterAttribute
{
    public JsonModelBinder()
    {}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
    public Type ActionParameterType { get; set; }
    public string ActionParameterName { get; set; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
    public override void OnActionExecuting(ActionExecutingContext filterContext)
    {
        HttpRequestBase request = filterContext.HttpContext.Request;
        Stream stream = request.InputStream;
        stream.Position = 0;
        filterContext.ActionParameters[ActionParameterName] =
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;(new DataContractJsonSerializer(ActionParameterType)).ReadObject(stream);
    }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
}&lt;/pre&gt;
The real action method then looks as follows:&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;[HttpPost]
[JsonModelBinder(ActionParameterName="student", ActionParameterType=typeof(Student)]
public ActionResult Save(Student student)
{
    // save the student 
    return View();
}&lt;/pre&gt;
Now, I didn't try "Syper blogger"'s approach, also because I don't really want all of the devs to require to put those attributes on every action method they write. This is a huge &lt;b&gt;overhead&lt;/b&gt; and introduces &lt;b&gt;redundancy &lt;/b&gt;in the type definition etc.&lt;br /&gt;
&lt;br /&gt;
So I aimed for a &lt;b&gt;more clean approach&lt;/b&gt; by implementing a custom &lt;code&gt;IModelBinder&lt;/code&gt; and by using the popular (and even more performant) &lt;a href="http://nuget.org/packages/Newtonsoft.Json"&gt;Json.net&lt;/a&gt; library for deserializing my entities. So the result looked like&lt;br /&gt;
&lt;pre class="brush:csharp;highlight:[12,14,30]"&gt;public class MyCustomModelBinder: IModelBinder
{
    private IModelBinder fallbackModelBinder;

    public MyCustomModelBinder(IModelBinder fallbackModelBinder)
    {
        this.fallbackModelBinder = fallbackModelBinder;
    }

    public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
    {
        if (controllerContext.HttpContext.Request.HttpMethod.Equals("GET", StringComparison.InvariantCultureIgnoreCase))
        {
            return this.fallbackModelBinder.BindModel(controllerContext, bindingContext);
        }
        else
        {
            //ONLY do this for POST,PUT,DELETE requests that transmit application/json
            string bodyText;
            using (var stream = controllerContext.HttpContext.Request.InputStream)
            {
                stream.Seek(0, SeekOrigin.Begin);
                using (var reader = new StreamReader(stream))
                    bodyText = reader.ReadToEnd();
            }

            if (string.IsNullOrEmpty(bodyText))
                return (null);

            return JsonConvert.DeserializeObject(bodyText, bindingContext.ModelType);
        }
    }
}&lt;/pre&gt;
Inside global.asax you have then to register the &lt;code&gt;IModelBinder&lt;/code&gt; as follows:
&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;protected void Application_Start()
{
   ...
   ModelBinders.Binders.DefaultBinder = new MyCustomModelBinder(ModelBinders.Binders.DefaultBinder);
   ...
}&lt;/pre&gt;
&lt;b&gt;Note&lt;/b&gt; that I'm only touching POST,PUT or DELETE requests that post Json data to my MVC3 webapp. All other requests are directly forwarded to the default model binder.&lt;br /&gt;
&lt;br /&gt;
I prefer this solution of the registration of ActionFilter attributes on each action method because in this way the deserialization process is completely transparent. Let me know if any better solution comes to your mind for solving this issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-4902300314787482092?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/aqoHI0Uc2rIWaIvXbYOpnD4f-gQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aqoHI0Uc2rIWaIvXbYOpnD4f-gQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/aqoHI0Uc2rIWaIvXbYOpnD4f-gQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/aqoHI0Uc2rIWaIvXbYOpnD4f-gQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/WpyDRfdc_1w" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/WpyDRfdc_1w/aspnet-mvc3-doesnt-deserialize-nullable.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>7</thr:total><feedburner:origLink>http://blog.js-development.com/2012/02/aspnet-mvc3-doesnt-deserialize-nullable.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-3993762707016624260</guid><pubDate>Wed, 01 Feb 2012 06:52:00 +0000</pubDate><atom:updated>2012-02-01T07:52:49.539+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Open Source</category><title>Don't rant! Become Social and Contribute back!</title><description>&lt;div class="intro"&gt;
Todays web experience has changed a lot and so has done coding as well. Everything is around being social, interacting with people through social networks, blogs or &lt;a href="http://stackoverflow.com/" target="_blank"&gt;online communities.&lt;/a&gt;&amp;nbsp;I love Open Source, mainly because you can learn so much &lt;a href="http://source.android.com/" target="_blank"&gt;from others' code&lt;/a&gt; or even just inspect it when you experience problems. Still, contributing was always a bit cumbersome in my opinion. GitHub changed that!&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;img border="0" src="http://api.ning.com/files/vKABSA7L5uYc4QD1-hZ7l1MRtnhY-oi1s-Bp2m0Oawip4tdJ-e-2tbOMVJTJy4hoSxTpZadeB*irv1TcIUgFwPrK*kHjey9J/githuboctacat.jpg" /&gt;&lt;/div&gt;
The more I dive into using &lt;a href="http://blog.js-development.com/2010/11/juri-goes-git-first-steps.html" target="_blank"&gt;Git&lt;/a&gt;, the more I enjoy the nature of a distributed VCS. Today for instance I found a very simple bug in the &lt;a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" target="_blank"&gt;jQuery Validation plugin&lt;/a&gt;&amp;nbsp;while browsing through its source. It was nothing special, but a grammar error in one of the german localization files. So, what could I have done? Well yes, just ignore it, open an issue in the according issue repository, download the source and fix it for my projects or...just &lt;b&gt;fork the repo, fix it and submit a pull request&lt;/b&gt;!&lt;br /&gt;
&lt;br /&gt;
So did I and so should you! If you're new, just get started with these steps here.&lt;br /&gt;
&lt;h2&gt;







Setup your Git Tools&lt;/h2&gt;
If you haven't yet setup your workstation to be used with Git, just follow the &lt;a href="http://help.github.com/set-up-git-redirect/" target="_blank"&gt;instructions on the official site here&lt;/a&gt;. There is a very nice step by step explanation with screenshots and everything you'd need to have a smooth setup experience.&lt;br /&gt;
&lt;h2&gt;






Fork the Repo&lt;/h2&gt;
Go and fork the repository where you found the bug. In my case it was the one of &lt;a href="https://github.com/jzaefferer/jquery-validation" target="_blank"&gt;jQuery Validation&lt;/a&gt;. Again, if you don't have any experience in that, just follow the &lt;a href="http://help.github.com/fork-a-repo/" target="_blank"&gt;guide&lt;/a&gt;.
&lt;br /&gt;
&lt;h2&gt;






Get your repo and fix the bug&lt;/h2&gt;
Get the source of your (just forked) GitHub repository. In my case it was something like&lt;br /&gt;
&lt;pre class="brush:bash"&gt;git clone git@github.com:juristr/jquery-validation&lt;/pre&gt;
Then just fix the bug, commit the changes and push them back to your repo.&lt;br /&gt;
&lt;pre class="brush:bash"&gt;git commit -a -m "Fixed a grammar error in the german localization"
git push origin master&lt;/pre&gt;
&lt;h2&gt;



Send a Pull Request&lt;/h2&gt;
The last step is to send a pull request to the upstream repository, namely the original repo (jQuery-validation) from which we created the fork before. Again, &lt;a href="http://help.github.com/send-pull-requests/" target="_blank"&gt;here's the doc&lt;/a&gt;.&lt;br /&gt;
&lt;h2&gt;


The Result&lt;/h2&gt;
A &lt;a href="https://github.com/jzaefferer/jquery-validation/pull/311" target="_blank"&gt;nice thanks from the author&lt;/a&gt; and your bugfix has been pulled into the master branch.&lt;br /&gt;
&lt;br /&gt;
Love it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-3993762707016624260?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/xxRAJBR5LgIuZYSETtE77BuJh7o/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xxRAJBR5LgIuZYSETtE77BuJh7o/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/xxRAJBR5LgIuZYSETtE77BuJh7o/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/xxRAJBR5LgIuZYSETtE77BuJh7o/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/UoQGPNenN50" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/UoQGPNenN50/dont-rant-become-social-and-contribute.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/02/dont-rant-become-social-and-contribute.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-5059761824188875200</guid><pubDate>Mon, 23 Jan 2012 07:50:00 +0000</pubDate><atom:updated>2012-01-23T08:50:36.557+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Eclipse</category><title>Eclipse: Importing existing project: "Invalid project description"</title><description>&lt;div class="intro"&gt;
Monday morning, 07:30 AM. Me, starting the computer after the weekend, executing a &lt;code&gt;git pull&lt;/code&gt; from &lt;a href="http://blog.js-development.com/2010/11/juri-goes-git-first-steps.html" target="_blank"&gt;my repository&lt;/a&gt;&amp;nbsp;to fetch the latest src. Then I opened my freshly installed Eclipse JavaScript version followed by a nice "Import existing project" (I pushed the project on my Mac previously) on the just fetched git repository. Fail.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;
&lt;blockquote&gt;
Invalid project description
&lt;/blockquote&gt;
Damn. My first thought was a potential incompatibility, given that the project was created on my Mac previously, and I just tried to import it on Win7.&lt;br /&gt;
So if you should encounter a similar problem try the following. Assume you pulled the repository into &lt;code&gt;C:\gitrepo\mygit&lt;/code&gt;. Then&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;create another directory, for instance &lt;code&gt;C:\eclipsewrkspc\mygit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;start Eclipse to use that directory as its workspace.&lt;/li&gt;
&lt;li&gt;use the "Import existing project" functionality and point to the git directory&lt;/li&gt;
&lt;li&gt;Uncheck the "copy into workspace" flag.&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
That approach should work, at least it did for me.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-5059761824188875200?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/zCk3F51N6NpbGXhJM8-L7N8-Vcs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zCk3F51N6NpbGXhJM8-L7N8-Vcs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/zCk3F51N6NpbGXhJM8-L7N8-Vcs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/zCk3F51N6NpbGXhJM8-L7N8-Vcs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/aZ93CLXaUlQ" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/aZ93CLXaUlQ/eclipse-importing-existing-project.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/01/eclipse-importing-existing-project.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-4599136043687677664</guid><pubDate>Tue, 17 Jan 2012 07:53:00 +0000</pubDate><atom:updated>2012-01-17T08:53:28.009+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">.Net</category><title>Don't Fall into the IEnumerable&lt;T&gt; Trap</title><description>&lt;div class="intro"&gt;
Recently I upgraded some code of our company-internal class library and observed a plausible but still tricky problem. See yourself.
&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;img border="0" height="192" src="http://images.all-free-download.com/images/graphiclarge/question_smiley_clip_art_25272.jpg" width="200" /&gt;&lt;/div&gt;
In a class deep inside the class library ( ;)) there was a method which looked similar to the following:&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;public IEnumerable&amp;lt;SomeObject&amp;gt; GetAllValidations()
{
   foreach...
       yield return new ValidationObject(...);
}
&lt;/pre&gt;
Then, inside another method in some other class there was the following code:
&lt;br /&gt;
&lt;pre class="brush:csharp;highlight:[5,18, 24]"&gt;public void HandleValidationErrors(IEnumerable&amp;lt;ValidationObject&amp;gt; validationObjects)
{
    IDictionary&amp;lt;ValidationObject, IList&amp;lt;ValidationErrors&amp;gt;&amp;gt; cache = new Dictionary&amp;lt;ValidationObject, IList&amp;lt;ValidationErrors&amp;gt;&amp;gt;();

    foreach(var validationObj in validationObjects)
    {
        cache.Add(validationObj, validationObj.ValidationErrors.ToList&lt;validationerror&gt;());
    }

    ActivateValidatorsAccordingToValidationErrors(validationObjects, cache);

    //snip snip: If cache not empty, some validation objects haven't been treated/found
}


public void ActivateValidatorsAccordingToValidationErrors(IEnumerable&amp;lt;ValidationObject&amp;gt; validationObjects, IDictionary&amp;lt;ValidationObject, IList&amp;lt;ValidationErrors&amp;gt;&amp;gt; cache)
{
    foreach(var valObj in validationObjects)
    {
        var validator = GetValidatorByValidationObj(valObj);
        if(validator != null)
        {
            //activate validator
            //remove ValidationObj from cache
        }
    }
}
&lt;/validationerror&gt;&lt;/pre&gt;
Now guess what, &lt;strong&gt;line 24&lt;/strong&gt; gave me an exception when I wanted to access the dictionary with the validationObj as key, telling me that the key was not present. I debugged the code and the obj was present!? My first thought: did someone override the &lt;code&gt;Equals()&lt;/code&gt;??...but that wasn't the case.&lt;br /&gt;
&lt;br /&gt;
Then I immediately saw the problem when looking at the method signature. Did you get it? &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt;. Did you hear about the &lt;strong&gt;"lazy-evaluation"&lt;/strong&gt; of IEnumerables? I did, fortunately. The problem here was that when the code entered the &lt;code&gt;HandleValidationErrors(...)&lt;/code&gt; method, passing in the IEnumerable, that latter has not been evaluated so far. And then I had the situation of a &lt;b&gt;possible multiple enumeration &lt;/b&gt;(&lt;a href="http://confluence.jetbrains.net/display/ReSharper/Possible+multiple+enumeration+of+IEnumerable" target="_blank"&gt;Resharper tells you that&lt;/a&gt;, so don't ignore it!). So what does that mean? When the &lt;code&gt;IEnumerable&lt;/code&gt; was accessed 1st in &lt;strong&gt;line 5&lt;/strong&gt;, the method &lt;code&gt;GetAllValidations()&lt;/code&gt; was called, actually executing the enumeration with &lt;strong&gt;new&lt;/strong&gt; instances of type ValidationObject. So far so good. Then when the loop in &lt;strong&gt;line 18&lt;/strong&gt; was executed, &lt;strong&gt;the same happened&lt;/strong&gt;, returning another, &lt;strong&gt;new&lt;/strong&gt; instance of a ValidationObject, basically another &lt;code&gt;IEnumerable&amp;lt;ValidationObject&amp;gt;&lt;/code&gt; than I previously added to the &lt;code&gt;cache&lt;/code&gt; variable. And here we are, now the exception when accessing the dictionary is quite obvious, isn't it?&lt;br /&gt;
&lt;br /&gt;
Obviously this was a silly mistake and fixing it was quite easy by inserting somewhere (I did it in the first possible place to keep other devs from falling in this trap as well ;)) a line like
&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;var theList = theValidationObjectEnumeration.ToList&amp;lt;ValidationObject&amp;gt;()&lt;/pre&gt;
which "materializes" the list and prevents the multiple enumeration problem.&lt;br /&gt;
&lt;br /&gt;
I'm writing this post because such bugs can become quite nasty to find, especially if you don't know the fact about lazy-loading of &lt;code&gt;IEnumerable&amp;lt;T&amp;gt;&lt;/code&gt;&amp;nbsp;and if the method returning the IEnumerable was written by some other dev. So watch out!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-4599136043687677664?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/PMNMa_jGXqkYYgpWd89zKMQck-Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PMNMa_jGXqkYYgpWd89zKMQck-Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/PMNMa_jGXqkYYgpWd89zKMQck-Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/PMNMa_jGXqkYYgpWd89zKMQck-Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/EtUAYIUX5bA" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/EtUAYIUX5bA/dont-fall-into-ienumerable-trap.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>3</thr:total><feedburner:origLink>http://blog.js-development.com/2012/01/dont-fall-into-ienumerable-trap.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-2980543515843968420</guid><pubDate>Sun, 15 Jan 2012 12:25:00 +0000</pubDate><atom:updated>2012-01-15T13:25:53.014+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Linux</category><title>Help, Ubuntu 11.10 won't boot!!</title><description>&lt;div class="intro"&gt;
Today I tried to start the new Ubuntu 11.10 from the live CD on the old desktop computer of my girlfriend. Her computer is quite slow and the old WinXP installation broken. So why not take the occasion and try Ubuntu :).&lt;/div&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;img border="0" src="http://2.bp.blogspot.com/-ikVmfDdZb8Q/TxG_LOxTCEI/AAAAAAAAC8Q/gqvmp-sJfn8/s1600/ubuntu-11.10-oneiric-ocelot.png" /&gt;&lt;/div&gt;
I was impressed by the new Unity interface presented in the online &lt;a href="http://www.ubuntu.com/tour/" target="_blank"&gt;live Ubuntu tour&lt;/a&gt;. Much cleaner, more modern UI, actually there are many similarities to OSX. Anyway, I created an install CD and booted the computer from that. On the boot option I chose to first just run Ubuntu from the live CD. Everything seemed fine, but then, &lt;b&gt;black screen&lt;/b&gt;.&lt;br /&gt;
As usual when you use a Linux system, ask Google. And look there, a &lt;a href="http://ubuntuforums.org/showthread.php?t=1613132" target="_blank"&gt;nice forum entry&lt;/a&gt; with some helpful instructions (thx to the community).&lt;br /&gt;
&lt;br /&gt;
Basically the problem was to change the kernel boot options from &lt;code&gt;quiet splash&lt;/code&gt; to &lt;code&gt;quiet splash nomodeset&lt;/code&gt;. What is this "nomodeset"?
&lt;br /&gt;
&lt;blockquote&gt;
nomodeset&lt;br /&gt;
The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.
&lt;/blockquote&gt;
So in order to be able to install Ubuntu I booted the system from the live CD. At startup make sure you press the &lt;b&gt;down-key multiple times&lt;/b&gt; to enter the classic live CD menu with the options for either "just run" the system, install it or perform some memory and disk checks. At the same time, when &lt;b&gt;pressing F6&lt;/b&gt;, there is the possibility to check the "nomodeset" boot option. Then try to run the system, it should work.&lt;br /&gt;
&lt;br /&gt;
Then after having installed Ubuntu you have to do a restart. Again, press the &lt;b&gt;down-key or End&lt;/b&gt; key to enter the startup options. Select the desired one (not recovery) and press "e" to edit the boot option as follows:
&lt;br /&gt;
&lt;pre class="brush:bash"&gt;linux /boot/vmlinuz-....generic root=UUID=... ro quite splash nomodeset
&lt;/pre&gt;
Then press F10 and the system should boot.
&lt;br /&gt;
&lt;br /&gt;
So once you've booted the installed version you need to permanently configure the boot mode. The best way is to open a terminal window and type&lt;br /&gt;
sudo gedit /etc/default/grub&lt;br /&gt;
and edit the GRUB_CMDLINE_LINUX_DEFAULT as follows:
&lt;br /&gt;
&lt;pre class="brush:bash"&gt;GRUB_DEFAULT=0
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
&lt;/pre&gt;
Save the file and execute a &lt;code&gt;sudo upgrade-grub&lt;/code&gt;. Then your computer should boot normally next time.

Here's a link I found quite useful of some hints to perform after installing Ubuntu:
&lt;a href="http://www.techdrivein.com/2011/10/15-things-i-did-after-installing-new.html" rel="nofollow"&gt;http://www.techdrivein.com/2011/10/15-things-i-did-after-installing-new.html&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-2980543515843968420?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Z5FDP7xrI4nqO3VNWqrGK8bO0PY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z5FDP7xrI4nqO3VNWqrGK8bO0PY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Z5FDP7xrI4nqO3VNWqrGK8bO0PY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Z5FDP7xrI4nqO3VNWqrGK8bO0PY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/80D-dIRFGJ0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/80D-dIRFGJ0/help-ubuntu-1110-wont-boot.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-ikVmfDdZb8Q/TxG_LOxTCEI/AAAAAAAAC8Q/gqvmp-sJfn8/s72-c/ubuntu-11.10-oneiric-ocelot.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://blog.js-development.com/2012/01/help-ubuntu-1110-wont-boot.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-3726901119619920712</guid><pubDate>Wed, 04 Jan 2012 23:35:00 +0000</pubDate><atom:updated>2012-01-05T00:35:18.163+01:00</atom:updated><title>2011 Retrospective and a New Look</title><description>&lt;p class="intro"&gt;
I know it's a bit late for a 2011 year recap, but I didn't manage to write one earlier. Actually, I just noted that I didn't publish one last year at all. Anyway, here just a couple of lines to 2011, the new look of this blog and maybe some outlook to 2012?&lt;/p&gt;
&lt;a name='more'&gt;&lt;/a&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;img border="0" height="361" width="500" src="http://www.happynewyear2012.net/images/pictures/happy-new-year-2012-picture-05.gif" /&gt;&lt;/div&gt;
&lt;h3&gt;Year 2011 - A Retrospective&lt;/h3&gt;
2011 was a very successful and interesting year. In March I finally concluded my &lt;a href="http://blog.js-development.com/2011/03/concluding-another-chapter.html" target="_blank"&gt;university studies&lt;/a&gt;. It was an interesting, but at the same time very effortful period. After that I returned to work full-time with lots of interesting new challenges to face. Unfortunately my blog didn't (yet) reflect that much about these changes.&lt;br /&gt;
Beside computer science related topics I managed to enter the Italian National team of &lt;a href="http://www.yoseikan.it/" rel="nofollow" target="_blank"&gt;Yoseikan Budo&lt;/a&gt; (&lt;a href="http://www.yoseikan-nals.it/" target="_blank"&gt;my club&lt;/a&gt;) and successfully concluded the exams for the 2. Dan Yoseikan Budo.&lt;br /&gt;
And last but not least, with the start of 2012 I moved in together with my girlfriend in our first common flat.&lt;br /&gt;

&lt;h3&gt;A Facelift to this Blog&lt;/h3&gt;
Yep, once again I decided to give this blog a small facelift. The major changes consist in making the entry page more attractive, while the detail post pages remained mostly the same. The entry page now consists in small snippets of the 6 most recent posts with each posts having a small initial intro part describing its content.&lt;br /&gt;
Basically, the main objective was to just visualize only the most common and most important information while still giving the blog an attractive "face". Now, obviously I'm not a designer, I'm a software dev. But still I like to play around with CSS as IMHO the design of a web page/application is a major important part. Making such changes to my blog is always again a good learning lesson. But I'm open for suggestions and improvements.&lt;br /&gt;
&lt;u&gt;Note&lt;/u&gt; that there are still some fine-tuning improvements coming over the following weeks as I didn't yet manage to include them right now.&lt;br /&gt;

&lt;h3&gt;
And for 2012?&lt;/h3&gt;
More blogging, more about .Net, more Android development, and finally more about web development especially about JavaScript. Let's see whether I manage it :). And obviously I'm looking forward for a &lt;a href="http://www.google.com/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=23.12.2012" target="_blank"&gt;year recap 2012&lt;/a&gt; ;).&lt;br /&gt;
So I wish you all a good start in 2012 and much success.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-3726901119619920712?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uCmTbVF3FgSXBiN2y2M5fut3BY0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uCmTbVF3FgSXBiN2y2M5fut3BY0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uCmTbVF3FgSXBiN2y2M5fut3BY0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uCmTbVF3FgSXBiN2y2M5fut3BY0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/oXlK7CRaRg0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/oXlK7CRaRg0/2011-retrospective-and-new-look.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2012/01/2011-retrospective-and-new-look.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-2718946823677824371</guid><pubDate>Mon, 12 Dec 2011 13:39:00 +0000</pubDate><atom:updated>2011-12-12T14:39:00.501+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Unit Testing</category><category domain="http://www.blogger.com/atom/ns#">Best Practices</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Software testing</category><category domain="http://www.blogger.com/atom/ns#">.Net</category><title>Writing IoC Supported Integration Tests using AutoFac</title><description>Using a dependency injection framework can &lt;a href="http://blog.js-development.com/2010/12/smelly-code-direct-object-instantiation.html" target="_blank"&gt;greatly facilitate&lt;/a&gt; your &lt;a href="http://blog.js-development.com/2010/03/tackle-software-dependencies-with-ioc.html" target="_blank"&gt;code's testability&lt;/a&gt;&amp;nbsp;in that you don't have any "glue" code for managing a classes' dependency that needs to be mocked (if even possible) when writing unit tests. But what about when writing &lt;b&gt;integration tests&lt;/b&gt;? In such case you'd probably want to use your IoC container's configuration for resolving types in order to also verify the proper &lt;i&gt;integration &lt;/i&gt;of your components, frankly your dependency injection configuration, right?&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://code.google.com/p/autofac/logo?cct=1304973969" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://code.google.com/p/autofac/logo?cct=1304973969" /&gt;&lt;/a&gt;&lt;/div&gt;
With AutoFac it is actually quite simple. What your integration test needs to do is to himself create the &lt;code&gt;ContainerBuilder()&lt;/code&gt; and accordingly register the dependencies. What you should do is the following. Assume you have a Visual Studio project that encapsulates your business logic called "BusinessLogic". Then the best strategy is to &lt;b&gt;create a so-called Autofac module per project &lt;/b&gt;(and hence dll) to configure the dependencies within that specific project. This is done by extending the abstract class &lt;code&gt;Autofac.Module&lt;/code&gt; like&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;public class BusinessLogicModule : Module
{
    protected override void Load(ContainerBuilder builder)
    {
        //register other modules/dependencies here
    }
}
&lt;/pre&gt;
&lt;br /&gt;
When you now want to write a test for the BusinessLogic project, you might create a &lt;code&gt;BusinessLogic.IntegrationTests&lt;/code&gt; project, adding the project under test as a reference.&lt;br /&gt;
A possible approach to this could be the following: create ageneric class for instantiating the Autofac IoC container with the BusinessLogicModule created before. Let's call this class&amp;nbsp;&lt;b&gt;"IoCSupportedTest"&lt;/b&gt;:&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;using Autofac;
using Autofac.Core;

namespace BusinessLogic.IntegrationTest.Utils
{
    public class IoCSupportedTest&amp;lt;TModule&amp;gt; where TModule : IModule, new()
    {
        private IContainer container;

        public IoCSupportedTest()
        {
            var builder = new ContainerBuilder();

            builder.RegisterModule(new TModule());

            container = builder.Build();
        }

        protected TEntity Resolve&amp;lt;TEntity&amp;gt;()
        {
            return container.Resolve&amp;lt;TEntity&amp;gt;();
        }

        protected void ShutdownIoC()
        {
            container.Dispose();
        }
    }
}&lt;/pre&gt;
A specific test case might then look as follows:&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;[TestClass]
public class UserRepositoryTest : IoCSupportedTest&amp;lt;BusinessLogicModule&amp;gt;
{
    private IUserRepository userRepo;

    [TestInitialize]
    public void Setup()
    {
        this.userRepo = Resolve&amp;lt;IUserRepository&amp;gt;();
    }

    [TestCleanup]
    public void TearDown()
    {
        userRepo = null;
        ShutdownIoC();
    }

    //the tests
}&lt;/pre&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-2718946823677824371?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HTyqYQQZg3krXAinWnN0FPpKLfE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HTyqYQQZg3krXAinWnN0FPpKLfE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/HTyqYQQZg3krXAinWnN0FPpKLfE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HTyqYQQZg3krXAinWnN0FPpKLfE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/02Ae2u8y4HI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/02Ae2u8y4HI/writing-ioc-supported-integration-tests.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2011/12/writing-ioc-supported-integration-tests.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-2074750179714657507</guid><pubDate>Wed, 07 Dec 2011 10:15:00 +0000</pubDate><atom:updated>2011-12-07T11:15:36.647+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">Exploring JavaScript</category><title>Exploring JavaScript: Scope Pollution when instantiating JavaScript Objects</title><description>John Resig has written a very interesting article (I'm not able to find just now) on how the current scope might get polluted if you're accidentally invoking a function intended as an object constructor function without using the "new" keyword in front. Here's a simple example that illustrates the issue.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;Basically consider you have the following, extremely simple code:&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var Person = function(first, second){
   this.name = first + " " + second;
};

//using it somewhere
var name = "Juri";
var aPerson = new Person("Peter", "Oberhofer"); //invoking the constructor function

document.write(name);
&lt;/pre&gt;
Now as expected you'd assume "Juri" to be printed as you don't do anything else than printing the current variable &lt;code&gt;name&lt;/code&gt;.&lt;br /&gt;
&lt;br /&gt;
Now what happens if you forget to use the "new" keyword like
&lt;br /&gt;
&lt;pre class="brush:javascript"&gt;var name="Juri";
var aPerson = Person("Peter", "Oberhofer"); //attention, no "new" keyword

document.write(name);
&lt;/pre&gt;
What would be the result? Can you guess it? It would be: &lt;code&gt;Peter Oberhofer&lt;/code&gt;. Strange, right? The problem is that given the fact you didn't specify the "new" keyword the function &lt;code&gt;Person&lt;/code&gt; &lt;b&gt;wrote on the global namespace&lt;/b&gt; when executing &lt;code&gt;this.name = ...&lt;/code&gt;. The declaration of &lt;code&gt;var name = "Juri"&lt;/code&gt;&amp;nbsp;is in this case on the global namespace as well, hence without specifying the &lt;code&gt;new&lt;/code&gt; keyword you overwrite the previous declaration, resulting in &lt;code&gt;Peter Oberhofer&lt;/code&gt;&amp;nbsp;to be printed out.&lt;br /&gt;
&lt;br /&gt;
You can check out a live sample here: &lt;a href="http://jsbin.com/ozawep/4/edit#javascript,live"&gt;http://jsbin.com/ozawep/4/edit#javascript,live&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-2074750179714657507?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BnuSTa4FJPaMtWP4qXDj4reRh7I/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BnuSTa4FJPaMtWP4qXDj4reRh7I/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BnuSTa4FJPaMtWP4qXDj4reRh7I/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BnuSTa4FJPaMtWP4qXDj4reRh7I/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/0SeJ7OMCOiw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/0SeJ7OMCOiw/exploring-javascript-scope-pollution.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2011/12/exploring-javascript-scope-pollution.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-5383002569905960369</guid><pubDate>Tue, 06 Dec 2011 21:45:00 +0000</pubDate><atom:updated>2011-12-06T22:45:40.066+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Personal</category><title>Saying Goodbye to University</title><description>&lt;div&gt;
After my thesis presentation in &lt;a href="http://blog.js-development.com/2011/03/concluding-another-chapter.html" target="_blank"&gt;march this year,&lt;/a&gt; my university career now ended officially with the degree ceremony last saturday. I remember when I first inscribed myself about 5 years ago, at the &lt;a href="http://www.unibz.it/en/inf/welcome/default.html" target="_blank"&gt;Free University of Bolzano at the faculty of computer science&lt;/a&gt;. The faculty (same as the university itself) is quite young. It actually celebrated its 10 year birthday a couple of days ago. And this was reflected also on the number of students, 5 years ago, when I first entered the Analysis class with about 70 people in total. Nothing compared to the really big universities. And after the 1st semester the number even diminished until, about a year later, we were a small, constant group of about 20 to 30 people in total.&lt;br /&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Three years later I successfully concluded the Bachelor in Applied Computer Science and decided to start working. I was interested in applying the learned stuff and collect some experiences. But still, there was always the desire to continue and so, after working full-time for a year I was given the opportunity by my employer to switch to part time and to inscribe in the Master of Computer Science..always at the &lt;a href="http://www.unibz.it/" target="_blank"&gt;FUB&lt;/a&gt;. It was though, really tough. When you sit at the university for studying in the morning and then in the afternoon you go at work, doing your job there, then, in the evening, you need to catch up with what your study mates did while you were at work. Thats challenging and most importantly, you need to be well organized. Nevertheless, I never neglected my girlfriend or my hobbies and thats a major important thing. This is what keeps your head above water ;).&lt;br /&gt;
&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-w_me-obEjW4/Tt6JfD-ZmKI/AAAAAAAAC7Y/ku-9yYJih-s/s400/P1070142.JPG" style="margin-left: auto; margin-right: auto;" width="300" /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;I did it!!&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
Now, about 3 years later I'm here, just concluded my MSc studies getting 110/110 points (which I'd never been imagined) and having a good work place offering some interesting challenges.&lt;br /&gt;
Looking back, I would always again inscribe me at the Free University of Bolzano if I'd have to. A lot of people are somehow often looking at the university in a&amp;nbsp;devaluating&amp;nbsp;manner, mainly given its low number of students compared to other, more established universities. But that's not a disadvantage, differently, its an advantage in my eyes as you have direct contact to the professors which gives you the unique possibility to dive into interesting discussions. And the number of students is growing from year to year.&amp;nbsp;Another major important fact is the internationality of the university in terms of its language model. Although being in a region where there are nearly just italian and german native speakers, the official teaching language of the computer science faculty is English. Even if this might sound pretty irrelevant, it is definitely not. English is &lt;b&gt;the&lt;/b&gt;&amp;nbsp;computer science language and it is so extremely useful in your professional career as I just experienced recently when we had a phone conference with a guy in America, reviewing parts of our code base.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-5383002569905960369?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/m597pu4GDYjC2Rg5450EJTf2FiA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/m597pu4GDYjC2Rg5450EJTf2FiA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/m597pu4GDYjC2Rg5450EJTf2FiA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/m597pu4GDYjC2Rg5450EJTf2FiA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/ms8v4IkhEJg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/ms8v4IkhEJg/saying-goodbye-to-university.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-w_me-obEjW4/Tt6JfD-ZmKI/AAAAAAAAC7Y/ku-9yYJih-s/s72-c/P1070142.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2011/12/saying-goodbye-to-university.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-3986316218010391680</guid><pubDate>Mon, 21 Nov 2011 13:03:00 +0000</pubDate><atom:updated>2012-01-05T00:36:50.189+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">JavaScript</category><category domain="http://www.blogger.com/atom/ns#">MVC</category><category domain="http://www.blogger.com/atom/ns#">Web dev</category><category domain="http://www.blogger.com/atom/ns#">Software Architecture</category><title>Large-scale JavaScript Application Architecture</title><description>JavaScript programming has evolved a lot over the past years and has somehow revolutionized the way you develop on the web. While many initially just used it as a scripting language to quickly hack in some dynamic behavior into traditional websites, it starts now to be used much more like a fully capable programming language (mainly also due to many emerging JavaScript libraries and more capable browsers).&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
Despite this, the key to successful JavaScript development - as I've already &lt;a href="http://blog.js-development.com/2011/10/what-model-view-controller-in.html"&gt;written in a prior post&lt;/a&gt; and which you might have been able to read between the lines of some other ones - is &lt;b&gt;structure&lt;/b&gt;. Without structure you're lost.., your code gets messy, a maintenance nightmare, uncontrollable, rigid ... scripting code basically. You might not take care about all this in small projects, but it becomes crucial as your project grows and gets rather big.&lt;br /&gt;
Take a look at the following presentation by &lt;a href="http://addyosmani.com/blog/" target="window"&gt;Addy Osmani&lt;/a&gt; about &lt;i&gt;Large-scale JavaScript Application Architecture&lt;/i&gt; which in my opinion nicely presents the major important points.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="http://speakerdeck.com/embed/4ec3f44095903900510005cf.js"&gt;
&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-3986316218010391680?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-KJ6Pm1O9wf7-N9UlxySEkNN81s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-KJ6Pm1O9wf7-N9UlxySEkNN81s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-KJ6Pm1O9wf7-N9UlxySEkNN81s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-KJ6Pm1O9wf7-N9UlxySEkNN81s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/ipI_KVf7J2s" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/ipI_KVf7J2s/large-scale-javascript-application.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2011/11/large-scale-javascript-application.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-2812062567388139517</guid><pubDate>Fri, 18 Nov 2011 11:16:00 +0000</pubDate><atom:updated>2011-11-18T14:54:20.385+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">Software Design</category><title>Some Usability Thoughts for the Weekend...</title><description>A couple of days ago I got the order to write a very simple program that would take a bunch of XML input files with the task to elaborate them in terms of grouping them according to some identifier and then to output the result (grouped per directory) in a more user friendly and readable way. While the prog is stupidly simple there are still some potential pitfall one might not realize immediately.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The objective was to give the tool to one of our customers in order to facilitate their work, hence:&amp;nbsp;&lt;b&gt;pay attention to usability factors&lt;/b&gt;.&lt;br /&gt;
I started with a simple GUI:&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-UVpFTtFtcwc/TsY_ppK3DqI/AAAAAAAAC6k/C8WWMOXItwg/s1600/avcpGui.png" imageanchor="1" rel="zoombox" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://2.bp.blogspot.com/-UVpFTtFtcwc/TsY_ppK3DqI/AAAAAAAAC6k/C8WWMOXItwg/s400/avcpGui.png" width="400" /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;div&gt;
So far, nothing special. There is a source folder textbox and a destination folder. They're self-explanatory I guess. What the program should do (for comfortability reasons) is to &lt;b&gt;create the destination folder&lt;/b&gt; if it doesn't exist and if it exists already, &lt;b&gt;delete all its content&lt;/b&gt;, as it might originate from a previous elaboration.&lt;br /&gt;
&lt;br /&gt;
A naive approach would be to do&lt;br /&gt;
&lt;pre class="brush:c#"&gt;if(!Directory.Exists(destinationDir))
{
   Directory.CreateDirectory(destinationDir);
}
else
{
   //delete all files and directories in destinationDir
}
&lt;/pre&gt;
But attention! What might a "dummy" user do what an "expert" user might not? Probably enter something like this:&lt;br /&gt;
&lt;i&gt;Source: C:\sourceFileDirectory&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Destination:&amp;nbsp;C:\sourceFileDirectory&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;Bad:&lt;/b&gt; You delete all of the source files.&lt;br /&gt;
&lt;br /&gt;
Or even worse:&lt;br /&gt;
&lt;i&gt;Source: C:\sourceFileDirectory&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;Destination:&amp;nbsp;C:\&lt;/i&gt;&lt;br /&gt;
&lt;b&gt;Bad:&lt;/b&gt;&amp;nbsp;You wipe his C drive :D.&lt;br /&gt;
&lt;br /&gt;
These are exactly the problems that are often overlooked (as they might seem obvious) and which then cause&amp;nbsp;enormous&amp;nbsp;damage.&amp;nbsp;Therefore a possible solution might be..&lt;br /&gt;
&lt;pre class="brush:c#"&gt;if(!Directory.Exists(destinationDir))
{
   Directory.CreateDirectory(destinationDir);
}
else
{
   //create an output directory inside the specified 
   destinationDir = Path.Combine(destinationDir, "Out");

   if(!Directory.Exists(destinationDir))
   {
      //create it
   }
   else
   {
      //Ask the user about wiping the content of the output directory
      //Do it if confirmed
   }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-UPzkbtJyeyw/TsZEkSsCsBI/AAAAAAAAC6s/wikSP-jhl3s/s1600/avcpConfirmation.png" imageanchor="1" rel="zoombox" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="207" src="http://4.bp.blogspot.com/-UPzkbtJyeyw/TsZEkSsCsBI/AAAAAAAAC6s/wikSP-jhl3s/s400/avcpConfirmation.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
Have a nice weekend :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-2812062567388139517?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-y46Nlng9jUVed8SaNxjAtyBUi8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-y46Nlng9jUVed8SaNxjAtyBUi8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-y46Nlng9jUVed8SaNxjAtyBUi8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-y46Nlng9jUVed8SaNxjAtyBUi8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/rlpVlZTU1ys" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/rlpVlZTU1ys/some-usability-thoughts-for-weekend.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-UVpFTtFtcwc/TsY_ppK3DqI/AAAAAAAAC6k/C8WWMOXItwg/s72-c/avcpGui.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2011/11/some-usability-thoughts-for-weekend.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-5211228043243414701.post-4358391560692573192</guid><pubDate>Fri, 18 Nov 2011 07:32:00 +0000</pubDate><atom:updated>2011-11-18T08:32:17.676+01:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Unit Testing</category><category domain="http://www.blogger.com/atom/ns#">C#</category><category domain="http://www.blogger.com/atom/ns#">refactoring</category><category domain="http://www.blogger.com/atom/ns#">.Net</category><title>Use The "var" Keyword to Have More Maintainable Tests!?</title><description>I have to admit that initially when the "var" keyword has been introduced in C# I was quite precautious in using it. It does reduce code readability, I thought. In the end I'd say it's pretty much a matter of style and preferences, but not only, it even might help you in avoiding to break your code when you make changes, thus leading to a more maintainable code base.&lt;br /&gt;
&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;
I recently had the following scenario in a lot of tests where I verified the correct validation of my entities&lt;br /&gt;
&lt;pre class="brush:c#"&gt;public void TestSomething()
{
   //Arrange
   ...

   //Act
   IList&amp;lt;ValidationError&amp;gt; result = validationProvider.Validate(entity);

   //Assert
   Assert.AreEqual(3, result.Count(), "There should be 3 validation errors");
}&lt;/pre&gt;
However, with the new changes to our architecture I'm currently working on, I try to adapt the validation to the one proposed by ASP.net MVC and Entity Framework, still allowing to write validation rules in the same way we were accustomed so far. This led to a couple of &lt;b&gt;breaking changes&lt;/b&gt; however, as I took the opportunity to make some improvements. As a result the return type of the validation adapter wasn't an &lt;code&gt;IList&lt;/code&gt; any more, but instead &lt;code&gt;IEnumerable&amp;lt;ValidationResult&amp;gt;&lt;/code&gt;. Note the generic type of the list changed as well. As a consequence the tests didn't compile any more and I had to manually fix them all (although it was just a matter of search&amp;amp;replace ;)).&lt;br /&gt;
&lt;br /&gt;
Instead, if I had written those tests by not explicitly defining the collection type but rather to just declare them using the var keyword, my tests would have continued to work without any problems.&lt;br /&gt;
&lt;pre class="brush:c#"&gt;public void TestSomething()
{
   //Arrange
   ...

   //Act
   var result = validationProvider.Validate(entity);
   ...
}&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5211228043243414701-4358391560692573192?l=blog.js-development.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/WvHyBhb3DO9hj7hvwGl4JLjpmQE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WvHyBhb3DO9hj7hvwGl4JLjpmQE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/WvHyBhb3DO9hj7hvwGl4JLjpmQE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/WvHyBhb3DO9hj7hvwGl4JLjpmQE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/juristrumpflohner/~4/2Q8_2yde7s0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/juristrumpflohner/~3/2Q8_2yde7s0/use-var-keyword-to-have-more.html</link><author>noreply@blogger.com (Juri Strumpflohner)</author><thr:total>0</thr:total><feedburner:origLink>http://blog.js-development.com/2011/11/use-var-keyword-to-have-more.html</feedburner:origLink></item></channel></rss>

