<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Damian Brady&#039;s Blog &#187; Development</title>
	<atom:link href="http://blog.damianbrady.com.au/category/technology/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.damianbrady.com.au</link>
	<description>ramblings of an early-30s IT professional / volleyball junkie / semi-professional drinker</description>
	<lastBuildDate>Fri, 03 Feb 2012 02:44:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Horses for Courses (and Jockeys)</title>
		<link>http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/</link>
		<comments>http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 22:40:43 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=481</guid>
		<description><![CDATA[I&#8217;ve stumbled across a few blog posts lately that talk about why everyone should use one technology over another, or why someone is leaving a particular language for another. Obviously there&#8217;s no shortage of evangelical blog posts pushing the merits of one technology and lamenting the poor state of whatever-you-plebs-use.  But this latest spate got [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve stumbled across a few blog posts lately that talk about why <a title="Never in Doubt: Build business apps in .NET - not HTML &amp; JavaScript" href="http://neverindoubtnet.blogspot.com/2011/11/build-business-apps-in-net-not-html-or.html">everyone should use one technology over another</a>, or why <a title="My reasons for leaving .Net" href="http://hkarthik.me/blog/2011/11/11/my-reasons-for-leaving-net/">someone is leaving a particular language for another</a>. Obviously there&#8217;s no shortage of evangelical blog posts pushing the merits of one technology and lamenting the poor state of whatever-you-plebs-use.  But this latest spate got me thinking.</p>
<p>Most (good) developers talk about using the most appropriate technology for the job.  At its most basic level that means choosing Objective-C for a resource-hungry iPhone app, or writing your latest facebook-killer application for the web rather than the desktop.  That stuff&#8217;s obvious.  The more idealist polyglot programmers will take it further and push Ruby on Rails for web apps with a small budget, or they&#8217;ll suggest using RavenDB and deploying to AWS because all you need to do is store and retrieve documents across the web. If you&#8217;re in a Windows environment with a team running Scrum, choose TFS, C#, and SQL Server.</p>
<p>So &#8220;Horses for Courses&#8221; right?</p>
<p>The aim is valid and noble, and it&#8217;s certainly one I strive for.  But one thing frequently gets overlooked, and that&#8217;s the people on the team (or to stretch the metaphor &#8211; the jockeys).</p>
<p>If you have a team of programmers who are very used to writing software using certain technologies, think very carefully about advising them to move to something else. I&#8217;m not saying don&#8217;t do it (in some cases you really should), but there comes a point where the benefits to be gained by using language X on platform Y with source control Z just aren&#8217;t worth the trouble.</p>
<p>Unfortunately, most programmers write code in one way. They use one language, they know one data storage mechanism, and they&#8217;ve only ever written applications for one environment.  Maybe in a past life they tried out some other language, and maybe they dabble in HTML occasionally, but they&#8217;re only experts at one thing.</p>
<p>You, on the other hand, might look at a set of requirements and decide a NoSQL data store running behind RoR is the &#8220;best&#8221; solution for this project. Similarly, you recommend using git as the &#8220;best&#8221; source control system to use. Great. Unless you&#8217;re the only one who knows this stuff &#8211; then you&#8217;re dreaming.  If you have a team of C# developers, you&#8217;d want to have a pretty good reason for suggesting they program in a different language. If every other project they&#8217;re working on uses TFS, learning git is going to introduce a lot of overhead (initially).  Sometimes, the current way of doing things is the &#8220;best&#8221; way, even if the idealist in you disagrees.</p>
<p>Now, that&#8217;s not to say it&#8217;s never a good idea to force a shift within a team.  Consider a team of VB 6 developers who, for the last 15 years, have been dutifully writing VB windows applications with an Access back-end. At what point do you tell them it&#8217;s time to move on? (Ideally it would have been at least 5 years ago, but that&#8217;s clearly not an option). Assuming you don&#8217;t outsource or &#8220;refresh&#8221; the team, you should strongly suggest they change, but acknowledge that the extra effort they&#8217;ll have to put in will increase the work. Also be aware that you&#8217;re unlikely to get a quality solution from them if they don&#8217;t yet know what they&#8217;re doing.</p>
<p>My point is, when choosing the right technology for the job, consider <em>everything</em>, and that includes the skillset of the developers.</p>
<p>With that in mind, blog posts encouraging everybody to stop using .Net because it sucks, or telling them they should never use pure HTML and JS for business apps are just ridiculous. Yes, you might have had an overnight change of heart and now realise language X is the worst thing in the world, but you&#8217;re thinking about the specific situations you&#8217;ve been in, and developers with specific skills (usually just the individual author). If your whole team can just up and move to Ruby, then fantastic! Say hi to the rainbow coloured unicorns for me!</p>
<p>It&#8217;s <em>always</em> good to <em>encourage</em> teams to learn new technologies. It&#8217;s <em>occasionally</em> good to <em>force</em> a team to move on, but sometimes the <em>&#8220;best&#8221;</em> way isn&#8217;t the <em>&#8220;ideal&#8221;</em> way.</p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Horses+for+Courses+%28and+Jockeys%29&amp;link=http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/&amp;notes=I%27ve%20stumbled%20across%20a%20few%20blog%20posts%20lately%20that%20talk%20about%20why%20everyone%20should%20use%20one%20technology%20over%20another%2C%20or%20why%20someone%20is%20leaving%20a%20particular%20language%20for%20another.%20Obviously%20there%27s%20no%20shortage%20of%20evangelical%20blog%20posts%20pushing%20the%20merits%20of%20one%20technology%20and%20lamenting%20the%20poor%20state%20of%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Horses+for+Courses+%28and+Jockeys%29&amp;link=http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/&amp;notes=I%27ve%20stumbled%20across%20a%20few%20blog%20posts%20lately%20that%20talk%20about%20why%20everyone%20should%20use%20one%20technology%20over%20another%2C%20or%20why%20someone%20is%20leaving%20a%20particular%20language%20for%20another.%20Obviously%20there%27s%20no%20shortage%20of%20evangelical%20blog%20posts%20pushing%20the%20merits%20of%20one%20technology%20and%20lamenting%20the%20poor%20state%20of%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Horses+for+Courses+%28and+Jockeys%29&amp;link=http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/&amp;notes=I%27ve%20stumbled%20across%20a%20few%20blog%20posts%20lately%20that%20talk%20about%20why%20everyone%20should%20use%20one%20technology%20over%20another%2C%20or%20why%20someone%20is%20leaving%20a%20particular%20language%20for%20another.%20Obviously%20there%27s%20no%20shortage%20of%20evangelical%20blog%20posts%20pushing%20the%20merits%20of%20one%20technology%20and%20lamenting%20the%20poor%20state%20of%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Horses+for+Courses+%28and+Jockeys%29&amp;link=http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/&amp;notes=I%27ve%20stumbled%20across%20a%20few%20blog%20posts%20lately%20that%20talk%20about%20why%20everyone%20should%20use%20one%20technology%20over%20another%2C%20or%20why%20someone%20is%20leaving%20a%20particular%20language%20for%20another.%20Obviously%20there%27s%20no%20shortage%20of%20evangelical%20blog%20posts%20pushing%20the%20merits%20of%20one%20technology%20and%20lamenting%20the%20poor%20state%20of%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=Horses+for+Courses+%28and+Jockeys%29&amp;link=http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/&amp;notes=I%27ve%20stumbled%20across%20a%20few%20blog%20posts%20lately%20that%20talk%20about%20why%20everyone%20should%20use%20one%20technology%20over%20another%2C%20or%20why%20someone%20is%20leaving%20a%20particular%20language%20for%20another.%20Obviously%20there%27s%20no%20shortage%20of%20evangelical%20blog%20posts%20pushing%20the%20merits%20of%20one%20technology%20and%20lamenting%20the%20poor%20state%20of%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Horses+for+Courses+%28and+Jockeys%29&amp;link=http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/&amp;notes=I%27ve%20stumbled%20across%20a%20few%20blog%20posts%20lately%20that%20talk%20about%20why%20everyone%20should%20use%20one%20technology%20over%20another%2C%20or%20why%20someone%20is%20leaving%20a%20particular%20language%20for%20another.%20Obviously%20there%27s%20no%20shortage%20of%20evangelical%20blog%20posts%20pushing%20the%20merits%20of%20one%20technology%20and%20lamenting%20the%20poor%20state%20of%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2011/11/16/horses-for-courses-and-jockeys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to be a Good TFS Master</title>
		<link>http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/</link>
		<comments>http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/#comments</comments>
		<pubDate>Sat, 05 Nov 2011 01:37:02 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Scrum]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=460</guid>
		<description><![CDATA[I recently gave a talk at the Qld ALM User Group on the topic of &#8220;How to be a good TFS Master&#8221;. Hopefully those who turned up got some great tips on how to use TFS more fully, but the main points I hoped people left with were: Most people only use about 20-30% of the [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_483" class="wp-caption alignright" style="width: 274px"><a href="http://www.slideshare.net/damovisa/how-to-be-a-good-tfs-master" target="_blank"><img class="size-full wp-image-483  " title="How to be a Good TFS Master" src="http://blog.damianbrady.com.au/wp-content/uploads/2011/11/how-to-be-a-good-tfs-master.png" alt="How to be a Good TFS Master" width="264" height="197" /></a><p class="wp-caption-text">How to be a Good TFS Master</p></div></p>
<p>I recently gave a talk at the <a title="Qld ALM User Group" href="http://www.qalmug.org" target="_blank">Qld ALM User Group</a> on the topic of &#8220;How to be a good TFS Master&#8221;.</p>
<p>Hopefully those who turned up got some great tips on how to use TFS more fully, but the main points I hoped people left with were:</p>
<h3 style="padding-left: 30px;">Most people only use about 20-30% of the capabilities of TFS</h3>
<p style="padding-left: 30px;">In our experience, the majority of companies using TFS are using it for source control only.  SSW helps teams get closer to using 80 or 90% of TFS where the real advantages can be felt. There are some fairly significant infrastructure costs associated with getting to 100%, and we find most organisations don&#8217;t want to go that far.</p>
<h3 style="padding-left: 30px;">TFS is much more than source control</h3>
<p style="padding-left: 30px;">In fact, if you&#8217;re using TFS purely for source control, you&#8217;re doing it wrong! You might even be better off using Git or Mercurial.  The best option (of course) is to start using TFS more fully to help you get the best out of your team.</p>
<h3 style="padding-left: 30px;">TFS supports your Scrum process beautifully</h3>
<p style="padding-left: 30px;">TFS has some awesome capabilities that allow you to manage and support your entire scrum process. The integration story is compelling; allowing you to tie code changes directly to user stories, produce genuinely useful reports for your managers, and enforce your policies and coding standards allowing you to tick items off your <a title="SSW - Done - Do you go beyond Done and define a Done Criteria?" href="http://rules.ssw.com.au/Management/RulesToSuccessfulProjects/Pages/DoYouGoBeyondDoneAndFollowADoneCriteria.aspx" target="_blank">Definition of Done</a> without any effort.</p>
<p>For more information or some reminders of what I spoke about, have a look at the slides on Slideshare - <a href="http://www.slideshare.net/damovisa/how-to-be-a-good-tfs-master">http://www.slideshare.net/damovisa/how-to-be-a-good-tfs-master</a></p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+be+a+Good+TFS+Master&amp;link=http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/&amp;notes=%0D%0A%0D%0AI%20recently%20gave%20a%20talk%20at%20the%20Qld%20ALM%20User%20Group%C2%A0on%20the%20topic%20of%20%22How%20to%20be%20a%20good%20TFS%20Master%22.%0D%0A%0D%0AHopefully%20those%20who%20turned%20up%20got%20some%20great%20tips%20on%20how%20to%20use%20TFS%20more%20fully%2C%20but%20the%20main%20points%20I%20hoped%20people%20left%20with%20were%3A%0D%0AMost%20people%20only%20use%20about%2020-30%25%20of%20the%20capabilities%20of%20TFS%0D%0AIn&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+be+a+Good+TFS+Master&amp;link=http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/&amp;notes=%0D%0A%0D%0AI%20recently%20gave%20a%20talk%20at%20the%20Qld%20ALM%20User%20Group%C2%A0on%20the%20topic%20of%20%22How%20to%20be%20a%20good%20TFS%20Master%22.%0D%0A%0D%0AHopefully%20those%20who%20turned%20up%20got%20some%20great%20tips%20on%20how%20to%20use%20TFS%20more%20fully%2C%20but%20the%20main%20points%20I%20hoped%20people%20left%20with%20were%3A%0D%0AMost%20people%20only%20use%20about%2020-30%25%20of%20the%20capabilities%20of%20TFS%0D%0AIn&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+be+a+Good+TFS+Master&amp;link=http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/&amp;notes=%0D%0A%0D%0AI%20recently%20gave%20a%20talk%20at%20the%20Qld%20ALM%20User%20Group%C2%A0on%20the%20topic%20of%20%22How%20to%20be%20a%20good%20TFS%20Master%22.%0D%0A%0D%0AHopefully%20those%20who%20turned%20up%20got%20some%20great%20tips%20on%20how%20to%20use%20TFS%20more%20fully%2C%20but%20the%20main%20points%20I%20hoped%20people%20left%20with%20were%3A%0D%0AMost%20people%20only%20use%20about%2020-30%25%20of%20the%20capabilities%20of%20TFS%0D%0AIn&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+be+a+Good+TFS+Master&amp;link=http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/&amp;notes=%0D%0A%0D%0AI%20recently%20gave%20a%20talk%20at%20the%20Qld%20ALM%20User%20Group%C2%A0on%20the%20topic%20of%20%22How%20to%20be%20a%20good%20TFS%20Master%22.%0D%0A%0D%0AHopefully%20those%20who%20turned%20up%20got%20some%20great%20tips%20on%20how%20to%20use%20TFS%20more%20fully%2C%20but%20the%20main%20points%20I%20hoped%20people%20left%20with%20were%3A%0D%0AMost%20people%20only%20use%20about%2020-30%25%20of%20the%20capabilities%20of%20TFS%0D%0AIn&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+be+a+Good+TFS+Master&amp;link=http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/&amp;notes=%0D%0A%0D%0AI%20recently%20gave%20a%20talk%20at%20the%20Qld%20ALM%20User%20Group%C2%A0on%20the%20topic%20of%20%22How%20to%20be%20a%20good%20TFS%20Master%22.%0D%0A%0D%0AHopefully%20those%20who%20turned%20up%20got%20some%20great%20tips%20on%20how%20to%20use%20TFS%20more%20fully%2C%20but%20the%20main%20points%20I%20hoped%20people%20left%20with%20were%3A%0D%0AMost%20people%20only%20use%20about%2020-30%25%20of%20the%20capabilities%20of%20TFS%0D%0AIn&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=How+to+be+a+Good+TFS+Master&amp;link=http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/&amp;notes=%0D%0A%0D%0AI%20recently%20gave%20a%20talk%20at%20the%20Qld%20ALM%20User%20Group%C2%A0on%20the%20topic%20of%20%22How%20to%20be%20a%20good%20TFS%20Master%22.%0D%0A%0D%0AHopefully%20those%20who%20turned%20up%20got%20some%20great%20tips%20on%20how%20to%20use%20TFS%20more%20fully%2C%20but%20the%20main%20points%20I%20hoped%20people%20left%20with%20were%3A%0D%0AMost%20people%20only%20use%20about%2020-30%25%20of%20the%20capabilities%20of%20TFS%0D%0AIn&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2011/11/05/how-to-be-a-good-tfs-master/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Generics for Lookup Tables in Entity Framework</title>
		<link>http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/</link>
		<comments>http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 12:56:24 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=458</guid>
		<description><![CDATA[I&#8217;m working with a client at the moment on a system using legacy database with (wait for it) about 50 lookup tables in their database.  We&#8217;re using Entity Framework to access the database, so it&#8217;s fairly easy to get the data out of these lookup tables. However, I really don&#8217;t want to write 50 methods [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working with a client at the moment on a system using legacy database with (wait for it) about 50 lookup tables in their database.  We&#8217;re using <a href="http://msdn.microsoft.com/en-us/library/bb399572.aspx" title="ADO.NET Entity Framework" target="_blank">Entity Framework</a> to access the database, so it&#8217;s fairly easy to get the data out of these lookup tables.</p>
<p>However, I really don&#8217;t want to write 50 methods to return lists for each of these objects.  Thankfully, the solution is relatively simple &#8211; write a generic method to return the appropriate data.</p>
<p>Implementing this wasn&#8217;t quite as easy as I thought, but I got there after a bit of experimentation and, I&#8217;ll be honest, a fair bit of googling.</p>
<p>To demonstrate, let&#8217;s look at an Entity Model with a subset of the <a href="http://msftdbprodsamples.codeplex.com/" title="Microsoft Database Samples" target="_blank">AdventureWorks</a> database.</p>
<p><div id="attachment_466" class="wp-caption aligncenter" style="width: 610px"><a href="http://blog.damianbrady.com.au/wp-content/uploads/2011/08/EF_AdventureWorks.png" rel="lightbox[458]" title="An Adventure Works Entity Model"><img class="size-full wp-image-466 " title="An Adventure Works Entity Model" src="http://blog.damianbrady.com.au/wp-content/uploads/2011/08/EF_AdventureWorks.png" alt="An Adventure Works Entity Model" width="600" /></a><p class="wp-caption-text">An Adventure Works Entity Model</p></div></p>
<p>In particular, look at the red outlined objects.  These are likely to be referred to frequently throughout the application as simple lookup tables.</p>
<p>We want to write a single generic method that will return an IEnumerable of these objects so we can use them quite simply as lookup tables.</p>
<p>Here&#8217;s what I ended up with:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">AdventureWorksEntities adventureWorksEntities <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> AdventureWorksEntities<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> IEnumerable<span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span> GetLookup<span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">where</span> T <span style="color: #008000;">:</span> <span style="color: #000000;">System.<span style="color: #0000FF;">Data</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Objects</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DataClasses</span><span style="color: #008000;">.</span><span style="color: #0000FF;">EntityObject</span>
<span style="color: #008000;">&#123;</span>
    <span style="color: #0600FF; font-weight: bold;">try</span>
    <span style="color: #008000;">&#123;</span>
        var key <span style="color: #008000;">=</span> <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Name</span><span style="color: #008000;">;</span>
        <span style="color: #008080; font-style: italic;">// 1. we need the container for the conceptual model</span>
        var container <span style="color: #008000;">=</span> adventureWorksEntities<span style="color: #008000;">.</span><span style="color: #0000FF;">MetadataWorkspace</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetEntityContainer</span><span style="color: #008000;">&#40;</span>
            adventureWorksEntities<span style="color: #008000;">.</span><span style="color: #0000FF;">DefaultContainerName</span>, <span style="color: #000000;">System.<span style="color: #0000FF;">Data</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">Metadata</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Edm</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DataSpace</span><span style="color: #008000;">.</span><span style="color: #0000FF;">CSpace</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008080; font-style: italic;">// 2. we need the name given to the element set in that conceptual model</span>
        var name <span style="color: #008000;">=</span> container<span style="color: #008000;">.</span><span style="color: #0000FF;">BaseEntitySets</span><span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Where</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span>s<span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&gt;</span> s<span style="color: #008000;">.</span><span style="color: #0000FF;">ElementType</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Name</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Equals</span><span style="color: #008000;">&#40;</span>key<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">FirstOrDefault</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Name</span><span style="color: #008000;">;</span>
        <span style="color: #008080; font-style: italic;">// 3. finally, we can create a basic query for this set</span>
        var query <span style="color: #008000;">=</span> adventureWorksEntities<span style="color: #008000;">.</span><span style="color: #0000FF;">CreateQuery</span><span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;[&quot;</span> <span style="color: #008000;">+</span> name <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;]&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
        <span style="color: #0600FF; font-weight: bold;">return</span> query<span style="color: #008000;">.</span><span style="color: #0000FF;">ToList</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
    <span style="color: #0600FF; font-weight: bold;">catch</span> <span style="color: #008000;">&#40;</span><span style="color: #000000;">System.<span style="color: #0000FF;">Data</span></span><span style="color: #008000;">.</span><span style="color: #0000FF;">EntityException</span> ex<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">throw</span> <span style="color: #008000;">new</span> ArgumentException<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Invalid Entity Type supplied for Lookup&quot;</span>, ex<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>Now we can use the following code to return a set of all items of the appropriate type:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">AdventureWorksRepository repository <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> AdventureWorksRepository<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
var states <span style="color: #008000;">=</span> repository<span style="color: #008000;">.</span><span style="color: #0000FF;">GetLookup</span><span style="color: #008000;">&lt;</span>StateProvince<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
var addressTypes <span style="color: #008000;">=</span> repository<span style="color: #008000;">.</span><span style="color: #0000FF;">GetLookup</span><span style="color: #008000;">&lt;</span>AddressType<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
var territories <span style="color: #008000;">=</span> repository<span style="color: #008000;">.</span><span style="color: #0000FF;">GetLookup</span><span style="color: #008000;">&lt;</span>SalesTerritory<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>This has saved me countless hours of writing boring plumbing code.</p>
<p>Hopefully, some of you are already looking at this thinking, &#8220;couldn&#8217;t I take this a lot further and provide a set of generic data access methods for everything?&#8221;. The answer of course is yes.  I haven&#8217;t gone quite that far yet, but I wouldn&#8217;t be surprised if it was down the track.</p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Using+Generics+for+Lookup+Tables+in+Entity+Framework&amp;link=http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/&amp;notes=I%27m%20working%20with%20a%20client%20at%20the%20moment%20on%20a%20system%20using%20legacy%20database%20with%20%28wait%20for%20it%29%20about%2050%20lookup%20tables%20in%20their%20database.%20%C2%A0We%27re%20using%20Entity%20Framework%20to%20access%20the%20database%2C%20so%20it%27s%20fairly%20easy%20to%20get%20the%20data%20out%20of%20these%20lookup%20tables.%0D%0A%0D%0AHowever%2C%20I%20really%20don%27t%20want%20to%20write%2050%20me&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Using+Generics+for+Lookup+Tables+in+Entity+Framework&amp;link=http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/&amp;notes=I%27m%20working%20with%20a%20client%20at%20the%20moment%20on%20a%20system%20using%20legacy%20database%20with%20%28wait%20for%20it%29%20about%2050%20lookup%20tables%20in%20their%20database.%20%C2%A0We%27re%20using%20Entity%20Framework%20to%20access%20the%20database%2C%20so%20it%27s%20fairly%20easy%20to%20get%20the%20data%20out%20of%20these%20lookup%20tables.%0D%0A%0D%0AHowever%2C%20I%20really%20don%27t%20want%20to%20write%2050%20me&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Using+Generics+for+Lookup+Tables+in+Entity+Framework&amp;link=http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/&amp;notes=I%27m%20working%20with%20a%20client%20at%20the%20moment%20on%20a%20system%20using%20legacy%20database%20with%20%28wait%20for%20it%29%20about%2050%20lookup%20tables%20in%20their%20database.%20%C2%A0We%27re%20using%20Entity%20Framework%20to%20access%20the%20database%2C%20so%20it%27s%20fairly%20easy%20to%20get%20the%20data%20out%20of%20these%20lookup%20tables.%0D%0A%0D%0AHowever%2C%20I%20really%20don%27t%20want%20to%20write%2050%20me&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Using+Generics+for+Lookup+Tables+in+Entity+Framework&amp;link=http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/&amp;notes=I%27m%20working%20with%20a%20client%20at%20the%20moment%20on%20a%20system%20using%20legacy%20database%20with%20%28wait%20for%20it%29%20about%2050%20lookup%20tables%20in%20their%20database.%20%C2%A0We%27re%20using%20Entity%20Framework%20to%20access%20the%20database%2C%20so%20it%27s%20fairly%20easy%20to%20get%20the%20data%20out%20of%20these%20lookup%20tables.%0D%0A%0D%0AHowever%2C%20I%20really%20don%27t%20want%20to%20write%2050%20me&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=Using+Generics+for+Lookup+Tables+in+Entity+Framework&amp;link=http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/&amp;notes=I%27m%20working%20with%20a%20client%20at%20the%20moment%20on%20a%20system%20using%20legacy%20database%20with%20%28wait%20for%20it%29%20about%2050%20lookup%20tables%20in%20their%20database.%20%C2%A0We%27re%20using%20Entity%20Framework%20to%20access%20the%20database%2C%20so%20it%27s%20fairly%20easy%20to%20get%20the%20data%20out%20of%20these%20lookup%20tables.%0D%0A%0D%0AHowever%2C%20I%20really%20don%27t%20want%20to%20write%2050%20me&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Using+Generics+for+Lookup+Tables+in+Entity+Framework&amp;link=http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/&amp;notes=I%27m%20working%20with%20a%20client%20at%20the%20moment%20on%20a%20system%20using%20legacy%20database%20with%20%28wait%20for%20it%29%20about%2050%20lookup%20tables%20in%20their%20database.%20%C2%A0We%27re%20using%20Entity%20Framework%20to%20access%20the%20database%2C%20so%20it%27s%20fairly%20easy%20to%20get%20the%20data%20out%20of%20these%20lookup%20tables.%0D%0A%0D%0AHowever%2C%20I%20really%20don%27t%20want%20to%20write%2050%20me&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2011/08/16/using-generics-for-lookup-tables-in-entity-framework/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>The Rise of Participative Software</title>
		<link>http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/</link>
		<comments>http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/#comments</comments>
		<pubDate>Sat, 18 Jun 2011 00:18:10 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=168</guid>
		<description><![CDATA[Recently I gave a presentation at Ignite Brisbane where I spoke about &#8220;The Rise of Participative Software&#8221;. You may remember me briefly talking about this topic in an earlier post, as it&#8217;s something that I&#8217;m fairly excited about.  The general idea is that most software just does exactly what the user asks.  You give it [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I gave a presentation at <a title="Ignite Brisbane" href="http://www.ignitebrisbane.net/">Ignite Brisbane</a> where I spoke about &#8220;The Rise of Participative Software&#8221;.</p>
<p>You may remember me briefly talking about this topic in <a title="Using the data you generate" href="http://blog.damianbrady.com.au/2010/12/23/using-the-data-you-generate/">an earlier post</a>, as it&#8217;s something that I&#8217;m fairly excited about.  The general idea is that most software just does exactly what the user asks.  You give it some explicit input, it gives you some output.  Participative Software is my name for software that makes suggestions and &#8220;participates&#8221; without explicit input.</p>
<p><a title="Ignite Brisbane - The Rise of Participative Software" href="http://igniteshow.com/videos/rise-participative-software">Watch the video for more details.</a></p>
<p>The five minute time limit meant that I didn&#8217;t quite get my point across as well as I&#8217;d hoped.  I&#8217;d like to present the topic over 20 or 30 minutes so I can really drill down on the subject and include a bit more of a call-to-action.</p>
<p>As always, feedback is more than welcome &#8211; especially if you&#8217;d like to hear a 30min version!</p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=The+Rise+of+Participative+Software&amp;link=http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/&amp;notes=Recently%20I%20gave%20a%20presentation%20at%20Ignite%20Brisbane%20where%20I%20spoke%20about%20%22The%20Rise%20of%20Participative%20Software%22.%0D%0A%0D%0AYou%20may%20remember%20me%20briefly%20talking%20about%20this%20topic%20in%20an%20earlier%20post%2C%20as%20it%27s%20something%20that%20I%27m%20fairly%20excited%20about.%20%C2%A0The%20general%20idea%20is%20that%20most%20software%20just%20does%20exactly%20what%20the&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=The+Rise+of+Participative+Software&amp;link=http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/&amp;notes=Recently%20I%20gave%20a%20presentation%20at%20Ignite%20Brisbane%20where%20I%20spoke%20about%20%22The%20Rise%20of%20Participative%20Software%22.%0D%0A%0D%0AYou%20may%20remember%20me%20briefly%20talking%20about%20this%20topic%20in%20an%20earlier%20post%2C%20as%20it%27s%20something%20that%20I%27m%20fairly%20excited%20about.%20%C2%A0The%20general%20idea%20is%20that%20most%20software%20just%20does%20exactly%20what%20the&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=The+Rise+of+Participative+Software&amp;link=http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/&amp;notes=Recently%20I%20gave%20a%20presentation%20at%20Ignite%20Brisbane%20where%20I%20spoke%20about%20%22The%20Rise%20of%20Participative%20Software%22.%0D%0A%0D%0AYou%20may%20remember%20me%20briefly%20talking%20about%20this%20topic%20in%20an%20earlier%20post%2C%20as%20it%27s%20something%20that%20I%27m%20fairly%20excited%20about.%20%C2%A0The%20general%20idea%20is%20that%20most%20software%20just%20does%20exactly%20what%20the&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=The+Rise+of+Participative+Software&amp;link=http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/&amp;notes=Recently%20I%20gave%20a%20presentation%20at%20Ignite%20Brisbane%20where%20I%20spoke%20about%20%22The%20Rise%20of%20Participative%20Software%22.%0D%0A%0D%0AYou%20may%20remember%20me%20briefly%20talking%20about%20this%20topic%20in%20an%20earlier%20post%2C%20as%20it%27s%20something%20that%20I%27m%20fairly%20excited%20about.%20%C2%A0The%20general%20idea%20is%20that%20most%20software%20just%20does%20exactly%20what%20the&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=The+Rise+of+Participative+Software&amp;link=http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/&amp;notes=Recently%20I%20gave%20a%20presentation%20at%20Ignite%20Brisbane%20where%20I%20spoke%20about%20%22The%20Rise%20of%20Participative%20Software%22.%0D%0A%0D%0AYou%20may%20remember%20me%20briefly%20talking%20about%20this%20topic%20in%20an%20earlier%20post%2C%20as%20it%27s%20something%20that%20I%27m%20fairly%20excited%20about.%20%C2%A0The%20general%20idea%20is%20that%20most%20software%20just%20does%20exactly%20what%20the&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=The+Rise+of+Participative+Software&amp;link=http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/&amp;notes=Recently%20I%20gave%20a%20presentation%20at%20Ignite%20Brisbane%20where%20I%20spoke%20about%20%22The%20Rise%20of%20Participative%20Software%22.%0D%0A%0D%0AYou%20may%20remember%20me%20briefly%20talking%20about%20this%20topic%20in%20an%20earlier%20post%2C%20as%20it%27s%20something%20that%20I%27m%20fairly%20excited%20about.%20%C2%A0The%20general%20idea%20is%20that%20most%20software%20just%20does%20exactly%20what%20the&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2011/06/18/the-rise-of-participative-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.4 released!</title>
		<link>http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/</link>
		<comments>http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 01:11:06 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=144</guid>
		<description><![CDATA[Yep, jQuery 1.4 has been released. Here&#8217;s a great post from nettuts outlining some key differences and new features. I don&#8217;t really have much to add on this, but just a few thoughts: Speed improvements are good and all, but when you can get ten times better javascript performance by changing browsers, nearly doubling the [...]]]></description>
			<content:encoded><![CDATA[<p><a title="jQuery 1.4" href="http://jquery14.com/day-01/jquery-14" target="_blank">Yep, jQuery 1.4 has been released</a>.</p>
<p><a title="jQuery 1.4 - 15 features you wust know" href="http://net.tutsplus.com/tutorials/javascript-ajax/jquery-1-4-released-the-15-new-features-you-must-know/" target="_blank">Here&#8217;s </a>a great post from nettuts outlining some key differences and new features.</p>
<p>I don&#8217;t really have much to add on this, but just a few thoughts:</p>
<ol>
<li>Speed improvements are good and all, but when you can get <a title="Six Revisions - Browser Performance" href="http://sixrevisions.com/infographs/browser-performance/" target="_blank">ten times better javascript performance by changing browsers</a>, nearly <a title="John Resig - Flickr" href="http://www.flickr.com/photos/jeresig/4271691147/">doubling the speed of your .css() method</a> not the most important thing. Still, I can&#8217;t expect the jQuery team to be able to retire browsers for people I guess&#8230;</li>
<li>A lot of changes seem to deal with allowing functions to be passed into methods.  Being a .Net 3.5 guy, I&#8217;m love this anonymous delegate stuff, so it&#8217;s good to see!</li>
</ol>
<p>Yeah, that&#8217;s all the comments I have right now. Told you I didn&#8217;t have much to add!</p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=jQuery+1.4+released%21&amp;link=http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/&amp;notes=Yep%2C%20jQuery%201.4%20has%20been%20released.%0D%0A%0D%0AHere%27s%20a%20great%20post%20from%20nettuts%20outlining%20some%20key%20differences%20and%20new%20features.%0D%0A%0D%0AI%20don%27t%20really%20have%20much%20to%20add%20on%20this%2C%20but%20just%20a%20few%20thoughts%3A%0D%0A%0D%0A%09Speed%20improvements%20are%20good%20and%20all%2C%20but%20when%20you%20can%20get%20ten%20times%20better%20javascript%20performance%20by%20changi&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=jQuery+1.4+released%21&amp;link=http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/&amp;notes=Yep%2C%20jQuery%201.4%20has%20been%20released.%0D%0A%0D%0AHere%27s%20a%20great%20post%20from%20nettuts%20outlining%20some%20key%20differences%20and%20new%20features.%0D%0A%0D%0AI%20don%27t%20really%20have%20much%20to%20add%20on%20this%2C%20but%20just%20a%20few%20thoughts%3A%0D%0A%0D%0A%09Speed%20improvements%20are%20good%20and%20all%2C%20but%20when%20you%20can%20get%20ten%20times%20better%20javascript%20performance%20by%20changi&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=jQuery+1.4+released%21&amp;link=http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/&amp;notes=Yep%2C%20jQuery%201.4%20has%20been%20released.%0D%0A%0D%0AHere%27s%20a%20great%20post%20from%20nettuts%20outlining%20some%20key%20differences%20and%20new%20features.%0D%0A%0D%0AI%20don%27t%20really%20have%20much%20to%20add%20on%20this%2C%20but%20just%20a%20few%20thoughts%3A%0D%0A%0D%0A%09Speed%20improvements%20are%20good%20and%20all%2C%20but%20when%20you%20can%20get%20ten%20times%20better%20javascript%20performance%20by%20changi&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=jQuery+1.4+released%21&amp;link=http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/&amp;notes=Yep%2C%20jQuery%201.4%20has%20been%20released.%0D%0A%0D%0AHere%27s%20a%20great%20post%20from%20nettuts%20outlining%20some%20key%20differences%20and%20new%20features.%0D%0A%0D%0AI%20don%27t%20really%20have%20much%20to%20add%20on%20this%2C%20but%20just%20a%20few%20thoughts%3A%0D%0A%0D%0A%09Speed%20improvements%20are%20good%20and%20all%2C%20but%20when%20you%20can%20get%20ten%20times%20better%20javascript%20performance%20by%20changi&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=jQuery+1.4+released%21&amp;link=http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/&amp;notes=Yep%2C%20jQuery%201.4%20has%20been%20released.%0D%0A%0D%0AHere%27s%20a%20great%20post%20from%20nettuts%20outlining%20some%20key%20differences%20and%20new%20features.%0D%0A%0D%0AI%20don%27t%20really%20have%20much%20to%20add%20on%20this%2C%20but%20just%20a%20few%20thoughts%3A%0D%0A%0D%0A%09Speed%20improvements%20are%20good%20and%20all%2C%20but%20when%20you%20can%20get%20ten%20times%20better%20javascript%20performance%20by%20changi&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=jQuery+1.4+released%21&amp;link=http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/&amp;notes=Yep%2C%20jQuery%201.4%20has%20been%20released.%0D%0A%0D%0AHere%27s%20a%20great%20post%20from%20nettuts%20outlining%20some%20key%20differences%20and%20new%20features.%0D%0A%0D%0AI%20don%27t%20really%20have%20much%20to%20add%20on%20this%2C%20but%20just%20a%20few%20thoughts%3A%0D%0A%0D%0A%09Speed%20improvements%20are%20good%20and%20all%2C%20but%20when%20you%20can%20get%20ten%20times%20better%20javascript%20performance%20by%20changi&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2010/01/15/jquery-1-4-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting into ASP.NET MVC</title>
		<link>http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/</link>
		<comments>http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:05:33 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech.Ed]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=142</guid>
		<description><![CDATA[It all started when I decided that I&#8217;d rewrite a partially-aborted PHP web app of mine in .Net. The PHP version was relatively functional, but PHP is not my strongest skill, so updating and improving it was hard. Combined with a lack of good quality free time, it meant that I didn&#8217;t have the inclination [...]]]></description>
			<content:encoded><![CDATA[<p>It all started when I decided that I&#8217;d rewrite a partially-aborted PHP web app of mine in .Net.  The PHP version was relatively functional, but PHP is not my strongest skill, so updating and improving it was hard.  Combined with a lack of good quality free time, it meant that I didn&#8217;t have the inclination to update it much.</p>
<p>Much of the design work is already done.  The database schema is solid and it isn&#8217;t trivial &#8211; it took me a number of iterations to get right.  The UI flow has been decided, and at this point, I&#8217;m happy to reuse most of the layout, css and images.</p>
<p>At <a href="http://www.msteched.com/australia/Public/default.aspx">Tech.Ed</a> this year, I heard a lot of great things about <a title="ASP.NET MVC" href="http://www.asp.net/mVC/">ASP.NET MVC</a>.  The Hands-On-Lab I did gave me just enough of it to get me interested, so when I decided I was going to rewrite this thing in .Net, MVC seemed like the way to go.</p>
<p>So I&#8217;m now attempting to learn how it all works, and it&#8217;s going really well.  The secret?  The <a title="NerdDinner Tutorial" href="http://nerddinnerbook.s3.amazonaws.com/Intro.htm">NerdDinner tutorial</a> courtesy of Rob Conery, Scott Guthrie, Scott Hanselman, and Phil Haack (actually I get the impression that <a title="Scott Guthrie's Blog" href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> wrote the tutorial, but the originating book is authored by all of them).</p>
<p>Seriously, if you&#8217;re looking at playing with ASP.NET MVC, run through this tutorial from start to finish.  I guarantee by the end of it you&#8217;ll be all over the basics, and loving the way ASP.NET MVC is put together.</p>
<p>I&#8217;m looking forward to getting into some real development with this project.</p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Getting+into+ASP.NET+MVC&amp;link=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;notes=It%20all%20started%20when%20I%20decided%20that%20I%27d%20rewrite%20a%20partially-aborted%20PHP%20web%20app%20of%20mine%20in%20.Net.%20%20The%20PHP%20version%20was%20relatively%20functional%2C%20but%20PHP%20is%20not%20my%20strongest%20skill%2C%20so%20updating%20and%20improving%20it%20was%20hard.%20%20Combined%20with%20a%20lack%20of%20good%20quality%20free%20time%2C%20it%20meant%20that%20I%20didn%27t%20have%20the%20incli&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Getting+into+ASP.NET+MVC&amp;link=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;notes=It%20all%20started%20when%20I%20decided%20that%20I%27d%20rewrite%20a%20partially-aborted%20PHP%20web%20app%20of%20mine%20in%20.Net.%20%20The%20PHP%20version%20was%20relatively%20functional%2C%20but%20PHP%20is%20not%20my%20strongest%20skill%2C%20so%20updating%20and%20improving%20it%20was%20hard.%20%20Combined%20with%20a%20lack%20of%20good%20quality%20free%20time%2C%20it%20meant%20that%20I%20didn%27t%20have%20the%20incli&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Getting+into+ASP.NET+MVC&amp;link=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;notes=It%20all%20started%20when%20I%20decided%20that%20I%27d%20rewrite%20a%20partially-aborted%20PHP%20web%20app%20of%20mine%20in%20.Net.%20%20The%20PHP%20version%20was%20relatively%20functional%2C%20but%20PHP%20is%20not%20my%20strongest%20skill%2C%20so%20updating%20and%20improving%20it%20was%20hard.%20%20Combined%20with%20a%20lack%20of%20good%20quality%20free%20time%2C%20it%20meant%20that%20I%20didn%27t%20have%20the%20incli&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Getting+into+ASP.NET+MVC&amp;link=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;notes=It%20all%20started%20when%20I%20decided%20that%20I%27d%20rewrite%20a%20partially-aborted%20PHP%20web%20app%20of%20mine%20in%20.Net.%20%20The%20PHP%20version%20was%20relatively%20functional%2C%20but%20PHP%20is%20not%20my%20strongest%20skill%2C%20so%20updating%20and%20improving%20it%20was%20hard.%20%20Combined%20with%20a%20lack%20of%20good%20quality%20free%20time%2C%20it%20meant%20that%20I%20didn%27t%20have%20the%20incli&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=Getting+into+ASP.NET+MVC&amp;link=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;notes=It%20all%20started%20when%20I%20decided%20that%20I%27d%20rewrite%20a%20partially-aborted%20PHP%20web%20app%20of%20mine%20in%20.Net.%20%20The%20PHP%20version%20was%20relatively%20functional%2C%20but%20PHP%20is%20not%20my%20strongest%20skill%2C%20so%20updating%20and%20improving%20it%20was%20hard.%20%20Combined%20with%20a%20lack%20of%20good%20quality%20free%20time%2C%20it%20meant%20that%20I%20didn%27t%20have%20the%20incli&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Getting+into+ASP.NET+MVC&amp;link=http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/&amp;notes=It%20all%20started%20when%20I%20decided%20that%20I%27d%20rewrite%20a%20partially-aborted%20PHP%20web%20app%20of%20mine%20in%20.Net.%20%20The%20PHP%20version%20was%20relatively%20functional%2C%20but%20PHP%20is%20not%20my%20strongest%20skill%2C%20so%20updating%20and%20improving%20it%20was%20hard.%20%20Combined%20with%20a%20lack%20of%20good%20quality%20free%20time%2C%20it%20meant%20that%20I%20didn%27t%20have%20the%20incli&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/11/19/getting-into-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Probably the best response on Stack Overflow ever</title>
		<link>http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/</link>
		<comments>http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 10:18:45 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Amusing]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/</guid>
		<description><![CDATA[You&#8217;d probably be aware that I&#8217;m a fan of Stack Overflow. I mean, I have my SO profile over there on the right of the page. This is just a quick post to provide a link to the best response I&#8217;ve seen on Stack Overflow. And just to clarify, I mean best in terms of [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;d probably be aware that I&#8217;m a fan of <a href="http://www.stackoverflow.com">Stack Overflow</a>.  I mean, I have my SO profile over there on the right of the page.</p>
<p>This is just a quick post to provide a link to the best response I&#8217;ve seen on Stack Overflow.  And just to clarify, I mean best in terms of amusement.  It gets a point across I guess, but wow is it creative.</p>
<p>So here you go:  <a href="http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454">http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454</a></p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Probably+the+best+response+on+Stack+Overflow+ever&amp;link=http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/&amp;notes=You%27d%20probably%20be%20aware%20that%20I%27m%20a%20fan%20of%20Stack%20Overflow.%20%20I%20mean%2C%20I%20have%20my%20SO%20profile%20over%20there%20on%20the%20right%20of%20the%20page.%0D%0A%0D%0AThis%20is%20just%20a%20quick%20post%20to%20provide%20a%20link%20to%20the%20best%20response%20I%27ve%20seen%20on%20Stack%20Overflow.%20%20And%20just%20to%20clarify%2C%20I%20mean%20best%20in%20terms%20of%20amusement.%20%20It%20gets%20a%20point%20acro&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Probably+the+best+response+on+Stack+Overflow+ever&amp;link=http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/&amp;notes=You%27d%20probably%20be%20aware%20that%20I%27m%20a%20fan%20of%20Stack%20Overflow.%20%20I%20mean%2C%20I%20have%20my%20SO%20profile%20over%20there%20on%20the%20right%20of%20the%20page.%0D%0A%0D%0AThis%20is%20just%20a%20quick%20post%20to%20provide%20a%20link%20to%20the%20best%20response%20I%27ve%20seen%20on%20Stack%20Overflow.%20%20And%20just%20to%20clarify%2C%20I%20mean%20best%20in%20terms%20of%20amusement.%20%20It%20gets%20a%20point%20acro&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Probably+the+best+response+on+Stack+Overflow+ever&amp;link=http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/&amp;notes=You%27d%20probably%20be%20aware%20that%20I%27m%20a%20fan%20of%20Stack%20Overflow.%20%20I%20mean%2C%20I%20have%20my%20SO%20profile%20over%20there%20on%20the%20right%20of%20the%20page.%0D%0A%0D%0AThis%20is%20just%20a%20quick%20post%20to%20provide%20a%20link%20to%20the%20best%20response%20I%27ve%20seen%20on%20Stack%20Overflow.%20%20And%20just%20to%20clarify%2C%20I%20mean%20best%20in%20terms%20of%20amusement.%20%20It%20gets%20a%20point%20acro&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Probably+the+best+response+on+Stack+Overflow+ever&amp;link=http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/&amp;notes=You%27d%20probably%20be%20aware%20that%20I%27m%20a%20fan%20of%20Stack%20Overflow.%20%20I%20mean%2C%20I%20have%20my%20SO%20profile%20over%20there%20on%20the%20right%20of%20the%20page.%0D%0A%0D%0AThis%20is%20just%20a%20quick%20post%20to%20provide%20a%20link%20to%20the%20best%20response%20I%27ve%20seen%20on%20Stack%20Overflow.%20%20And%20just%20to%20clarify%2C%20I%20mean%20best%20in%20terms%20of%20amusement.%20%20It%20gets%20a%20point%20acro&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=Probably+the+best+response+on+Stack+Overflow+ever&amp;link=http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/&amp;notes=You%27d%20probably%20be%20aware%20that%20I%27m%20a%20fan%20of%20Stack%20Overflow.%20%20I%20mean%2C%20I%20have%20my%20SO%20profile%20over%20there%20on%20the%20right%20of%20the%20page.%0D%0A%0D%0AThis%20is%20just%20a%20quick%20post%20to%20provide%20a%20link%20to%20the%20best%20response%20I%27ve%20seen%20on%20Stack%20Overflow.%20%20And%20just%20to%20clarify%2C%20I%20mean%20best%20in%20terms%20of%20amusement.%20%20It%20gets%20a%20point%20acro&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Probably+the+best+response+on+Stack+Overflow+ever&amp;link=http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/&amp;notes=You%27d%20probably%20be%20aware%20that%20I%27m%20a%20fan%20of%20Stack%20Overflow.%20%20I%20mean%2C%20I%20have%20my%20SO%20profile%20over%20there%20on%20the%20right%20of%20the%20page.%0D%0A%0D%0AThis%20is%20just%20a%20quick%20post%20to%20provide%20a%20link%20to%20the%20best%20response%20I%27ve%20seen%20on%20Stack%20Overflow.%20%20And%20just%20to%20clarify%2C%20I%20mean%20best%20in%20terms%20of%20amusement.%20%20It%20gets%20a%20point%20acro&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/11/16/probably-the-best-response-on-stack-overflow-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coding Tests in Interviews</title>
		<link>http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/</link>
		<comments>http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 15:29:02 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=136</guid>
		<description><![CDATA[In my travels, I stumbled across a blog post from Brandon Savage titled, &#8220;Why Coding Tests Are A Bad Interview Technique&#8221;.  While there are some points I think are fair enough, for the most part I disagree.  I&#8217;ll break down the major points so it&#8217;s easier to read. Sending out Resumes to all available companies [...]]]></description>
			<content:encoded><![CDATA[<p>In my travels, I stumbled across a blog post from Brandon Savage titled, <a title="Brandon Savage: Why Coding Tests Are A Bad Interview Technique" href="http://www.brandonsavage.net/why-coding-tests-are-a-bad-interview-technique/">&#8220;Why Coding Tests Are A Bad Interview Technique&#8221;</a>.  While there are some points I think are fair enough, for the most part I disagree.  I&#8217;ll break down the major points so it&#8217;s easier to read.</p>
<p><strong>Sending out Resumes to all available companies</strong></p>
<p>Brandon mentions quite early on that his major gripe with these programming tests is that he doesn&#8217;t have time to do one for every company out there.  <em>Every </em>company. He&#8217;s applying <em>everywhere</em>.  A good developer shouldn&#8217;t need to flood the market with resumes.  If you&#8217;re any good, you should be able to be a bit more selective about where you apply.  Is the market really that bad that you need to go door-to-door begging for a job?</p>
<p><strong>Writing a complete application as a coding test</strong></p>
<p>In the comments, Brandon elaborates on this a bit further, saying that he&#8217;s actually had a company ask him to develop a complete database-driven, input-validating, emailing application.  Yes, that&#8217;s ridiculous and if it&#8217;s occurring more than once in a blue moon, then there&#8217;s a problem.  If a company is asking you to write an app like that just to get an interview, I view that as over the top and unrealistic.  Asking you to code up <a title="Coding Horror: FizzBuzz" href="http://www.codinghorror.com/blog/archives/000804.html">Fizzbuzz</a> or a function to recursively search a <a title="Wikipedia: Directed Graph" href="http://en.wikipedia.org/wiki/Directed_graph">directed graph</a>? Not so much.</p>
<p>Look, as long as the code I&#8217;m writing doesn&#8217;t take me more than a few hours, and I really want to work at the company, then I&#8217;m willing to put the effort in.  If I&#8217;m flooding the market with resumes hoping for any kind of bite, then I&#8217;m probably not going to want to spend much time demonstrating my abilities to&#8230; who was it&#8230;? One of those places&#8230;</p>
<p><strong>Asking for a code test is disingeneous and disrespectful</strong></p>
<p>You know what? I totally disagree.  Brandon suggests that a few phone calls might be enough to determine whether someone is qualified.  Qualified? Yes, probably.  Does that mean anything? Not necessarily.</p>
<p>Let me digress for a bit.  I&#8217;m not sure whether the same thing exists in the US, but in Australia, we have a <a title="Express IT" href="http://www.expressit.edu.au/eContent4.aspx">small training organisation</a> that advertises late at night and <em>promise</em> a career in IT within a few weeks of graduating their four month course.  Four months, and they&#8217;re considered an IT professional.  These offers boil my blood &#8211; particularly because for many, many people, their qualification means the same thing as mine and my bachelor&#8217;s degree is therefore diluted.  By the way, I&#8217;m not talking about IT recruiters here; one would presume they&#8217;d know the difference.  My point is that an IT qualification by itself means nothing, and I&#8217;m not just talking about a participation certificate from Bob&#8217;s Discount IT Training.  I graduated from my degree with a scarily large number of budding programmers who couldn&#8217;t write code to save their lives.</p>
<p>Even experience on paper means nothing.  I&#8217;ve worked with plenty of highly qualified and very experienced people whose code just makes you cringe.  Sure, they&#8217;ve been involved in several major projects and have been an integral part of so-and-so really-important-deployment, but when you get down to it, they wrote crap code and nobody really knew any better.  You can look great on paper and still not have a clue.  I&#8217;m sure we&#8217;ve all known people like that.</p>
<p>Brandon suggests that as an alternative, asking for an already-written sample of code would be acceptable.  If it&#8217;s available, then sure, but I don&#8217;t think requiring one is fair for two reasons:</p>
<p>Firstly, the code the person writes during the day at their current job is not likely to be public.  As an employer, how would you feel about an employee showing the inner workings of your proprietary software to a rival so they can up and leave?  There&#8217;s almost certainly something in the developer&#8217;s current contract that explicitly prevents them from doing that anyway.  So what about code they&#8217;ve written in their spare time I hear you ask?  Unfortunately, not everyone writes code in their spare time and I think it&#8217;s rude to assume they do.  I do, and I&#8217;m sure a lot of developers do, but they might not for whatever reason.  You shouldn&#8217;t hold this against them.  Even if the person does write code on their own time, why should it be any more public than their company&#8217;s code?</p>
<p>Secondly, I&#8217;m not sure I&#8217;d be happy showing much of my own (old) code.  I look at stuff I wrote a year ago and wonder what I was thinking.  Does this mean I&#8217;m a crap developer?  No, I think it&#8217;s healthy to be able to appreciate that you&#8217;re continuing to learn.  If you can&#8217;t compare your current work to your previous work and see some improvement, then are you still learning?  <a title="Coding Horror: What did you write five years ago?" href="http://www.codinghorror.com/blog/archives/000716.html">I&#8217;m not alone on this line of thought either</a>.  From a hiring point of view, I want to know how good the person is <em>now</em>, not how good they were the last time they wrote code that they&#8217;re allowed to show you.</p>
<p><strong>It&#8217;s not all bad &#8211; what I agree with</strong></p>
<p>I agree that it is very important to be able to see whether a developer is capable of learning.  However, I&#8217;m not looking for the coding test to evaluate someone&#8217;s learning ability.  A piece of code is a snapshot, and you&#8217;re not going to get any idea of learning and adaptability from a test like that unless you ask them to do it every six months for several years.  You can evaluate whether someone learns well by asking them questions in the interview, and looking at how they keep up to date in the industry.  You could even ask the default predictable question about a particular challenge they faced and how they overcame it.  But nobody&#8217;s going to look at a slab of code and marvel at how well this person adapts to change.  That said, if someone proudly hands you a bit of code written in VB.Net for version 1.1 of the framework using untyped DataSets, it&#8217;s probably safe to assume they&#8217;re not the learning-and-adapting type.</p>
<p>Brandon also suggests that if someone has a body of code samples ready to give out, then they shouldn&#8217;t have to do the test.  If those samples are appropriate and relevant, then I agree to an extent.  Why ask someone to redo something they&#8217;ve already done?  Really, though, if you want to see how well someone can think through a problem and turn it into code, then the best way to test that is to actually ask them to do it.</p>
<p><strong>Summary (and tl;dr version)</strong></p>
<p>If someone is applying for a job as a developer, I don&#8217;t think it&#8217;s unreasonable to ask them to write some code.  If it&#8217;s a fully-fledged application, or something that takes more than a few hours, then we&#8217;re not talking about a code test, we&#8217;re talking about free software.  Sadly, qualifications and experience don&#8217;t necessarily equal capability so you can&#8217;t just rely on that.  It&#8217;s entirely possible to have an awesome resume and loads of experience, and just be crap at writing decent code.  Being asked to show off your skills shouldn&#8217;t be taken as an insult, but an opportunity.</p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Coding+Tests+in+Interviews&amp;link=http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/&amp;notes=In%20my%20travels%2C%20I%20stumbled%20across%20a%20blog%20post%20from%20Brandon%20Savage%20titled%2C%20%22Why%20Coding%20Tests%20Are%20A%20Bad%20Interview%20Technique%22.%C2%A0%20While%20there%20are%20some%20points%20I%20think%20are%20fair%20enough%2C%20for%20the%20most%20part%20I%20disagree.%C2%A0%20I%27ll%20break%20down%20the%20major%20points%20so%20it%27s%20easier%20to%20read.%0D%0A%0D%0ASending%20out%20Resumes%20to%20all%20ava&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Coding+Tests+in+Interviews&amp;link=http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/&amp;notes=In%20my%20travels%2C%20I%20stumbled%20across%20a%20blog%20post%20from%20Brandon%20Savage%20titled%2C%20%22Why%20Coding%20Tests%20Are%20A%20Bad%20Interview%20Technique%22.%C2%A0%20While%20there%20are%20some%20points%20I%20think%20are%20fair%20enough%2C%20for%20the%20most%20part%20I%20disagree.%C2%A0%20I%27ll%20break%20down%20the%20major%20points%20so%20it%27s%20easier%20to%20read.%0D%0A%0D%0ASending%20out%20Resumes%20to%20all%20ava&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Coding+Tests+in+Interviews&amp;link=http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/&amp;notes=In%20my%20travels%2C%20I%20stumbled%20across%20a%20blog%20post%20from%20Brandon%20Savage%20titled%2C%20%22Why%20Coding%20Tests%20Are%20A%20Bad%20Interview%20Technique%22.%C2%A0%20While%20there%20are%20some%20points%20I%20think%20are%20fair%20enough%2C%20for%20the%20most%20part%20I%20disagree.%C2%A0%20I%27ll%20break%20down%20the%20major%20points%20so%20it%27s%20easier%20to%20read.%0D%0A%0D%0ASending%20out%20Resumes%20to%20all%20ava&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Coding+Tests+in+Interviews&amp;link=http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/&amp;notes=In%20my%20travels%2C%20I%20stumbled%20across%20a%20blog%20post%20from%20Brandon%20Savage%20titled%2C%20%22Why%20Coding%20Tests%20Are%20A%20Bad%20Interview%20Technique%22.%C2%A0%20While%20there%20are%20some%20points%20I%20think%20are%20fair%20enough%2C%20for%20the%20most%20part%20I%20disagree.%C2%A0%20I%27ll%20break%20down%20the%20major%20points%20so%20it%27s%20easier%20to%20read.%0D%0A%0D%0ASending%20out%20Resumes%20to%20all%20ava&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=Coding+Tests+in+Interviews&amp;link=http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/&amp;notes=In%20my%20travels%2C%20I%20stumbled%20across%20a%20blog%20post%20from%20Brandon%20Savage%20titled%2C%20%22Why%20Coding%20Tests%20Are%20A%20Bad%20Interview%20Technique%22.%C2%A0%20While%20there%20are%20some%20points%20I%20think%20are%20fair%20enough%2C%20for%20the%20most%20part%20I%20disagree.%C2%A0%20I%27ll%20break%20down%20the%20major%20points%20so%20it%27s%20easier%20to%20read.%0D%0A%0D%0ASending%20out%20Resumes%20to%20all%20ava&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Coding+Tests+in+Interviews&amp;link=http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/&amp;notes=In%20my%20travels%2C%20I%20stumbled%20across%20a%20blog%20post%20from%20Brandon%20Savage%20titled%2C%20%22Why%20Coding%20Tests%20Are%20A%20Bad%20Interview%20Technique%22.%C2%A0%20While%20there%20are%20some%20points%20I%20think%20are%20fair%20enough%2C%20for%20the%20most%20part%20I%20disagree.%C2%A0%20I%27ll%20break%20down%20the%20major%20points%20so%20it%27s%20easier%20to%20read.%0D%0A%0D%0ASending%20out%20Resumes%20to%20all%20ava&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/11/03/coding-tests-in-interviews/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using jQuery for evil</title>
		<link>http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/</link>
		<comments>http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/#comments</comments>
		<pubDate>Mon, 05 Oct 2009 07:13:19 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=116</guid>
		<description><![CDATA[Sometimes you find a tool that&#8217;s not just good for run-of-the-mill, intended-purpose work, but also for fixing up some bad situations.  jQuery is one such tool. Some work I&#8217;m currently doing involves presenting nicely styled pages to the user of a web site.  The html I have to work with is not always ideal and [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you find a tool that&#8217;s not just good for run-of-the-mill, intended-purpose work, but also for fixing up some bad situations.  jQuery is one such tool.</p>
<p>Some work I&#8217;m currently doing involves presenting nicely styled pages to the user of a web site.  The html I have to work with is not always ideal and needs to be massaged.  Because I&#8217;m dealing with templates, it&#8217;s often simply impossible for me to change the html &#8211; I can only try to modify the framework around the bits of html I&#8217;m given.</p>
<p>Enter jQuery.</p>
<p>Provided the html I get is more or less xhtml compliant, I&#8217;ve got a Document Object Model (DOM) I can work with.  Using jQuery, I&#8217;ve found that I can manipulate this to my heart&#8217;s desire.</p>
<p>Let&#8217;s say I end up with an table which has an extra row between the header row and the first actual row of data.  No problem!</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mytable tr:nth-child(2)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">remove</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And that&#8217;s it!  Of course you may get a flicker of the incorrect display because we&#8217;re making the change only when the DOM is completely built, but we&#8217;re not really choosy in this situation.</p>
<p>Let&#8217;s try something a bit harder.  How about reformatting a table which contains a single column for debits and credits; the debits formatted with a red &lt;FONT&gt; tag.  And before you ask, yes, I&#8217;m serious.</p>
<p>We want this table to have a separate column for debits and credits.  Again, enter jQuery.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span>document<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #006600; font-style: italic;">// first, deal with the headers</span>
	<span style="color: #003366; font-weight: bold;">var</span> cell <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mytable tr:eq(0) td:eq(2)'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">// look at the second cell (contains debits/credits)</span>
	<span style="color: #003366; font-weight: bold;">var</span> w <span style="color: #339933;">=</span> cell.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'width'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> cell.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'width'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">length</span><span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  <span style="color: #006600; font-style: italic;">// I know width is a percentage</span>
	cell.<span style="color: #660066;">attr</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'width'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">''</span><span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>w<span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'%'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	<span style="color: #006600; font-style: italic;">// half the width</span>
	cell.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'Credits'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">before</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;td align=&quot;right&quot; width=&quot;'</span><span style="color: #339933;">+</span>w<span style="color: #339933;">/</span><span style="color: #CC0000;">2</span><span style="color: #339933;">+</span><span style="color: #3366CC;">'%&quot;&gt;Debits&lt;/td&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// split Debits and Credits header</span>
&nbsp;
	<span style="color: #006600; font-style: italic;">// now deal with each non-header row</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'#mytable tr:not(:first)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'td:eq(2)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">before</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;td align=&quot;right&quot;&gt;&amp;nbsp;&lt;/td&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// insert the new column</span>
		<span style="color: #003366; font-weight: bold;">var</span> redVal <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'td:eq(3)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// get current column value</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>redVal <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>redVal.<span style="color: #660066;">toUpperCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'COLOR=RED'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span> <span style="color: #339933;">||</span> redVal.<span style="color: #660066;">toUpperCase</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'COLOR=&quot;RED&quot;'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #339933;">-</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">// if it's red</span>
		<span style="color: #009900;">&#123;</span>
			redVal <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'td:eq(3)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'font'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// get the actual value to write</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'td:eq(2)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;span style=&quot;color: red;&quot;&gt; '</span><span style="color: #339933;">+</span>redVal<span style="color: #339933;">+</span><span style="color: #3366CC;">'&lt;/span&gt;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// write to the debit column</span>
			$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'td:eq(3)'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'nbsp;'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// erase the credit column</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now this doesn&#8217;t give me beautiful xhtml, and I&#8217;m never going to feel happy about how this works, but it does the job.</p>
<p>Fun stuff.</p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Using+jQuery+for+evil&amp;link=http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/&amp;notes=Sometimes%20you%20find%20a%20tool%20that%27s%20not%20just%20good%20for%20run-of-the-mill%2C%20intended-purpose%20work%2C%20but%20also%20for%20fixing%20up%20some%20bad%20situations.%20%C2%A0jQuery%20is%20one%20such%20tool.%0D%0A%0D%0ASome%20work%20I%27m%20currently%20doing%20involves%20presenting%20nicely%20styled%20pages%20to%20the%20user%20of%20a%20web%20site.%20%C2%A0The%20html%20I%20have%20to%20work%20with%20is%20not%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Using+jQuery+for+evil&amp;link=http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/&amp;notes=Sometimes%20you%20find%20a%20tool%20that%27s%20not%20just%20good%20for%20run-of-the-mill%2C%20intended-purpose%20work%2C%20but%20also%20for%20fixing%20up%20some%20bad%20situations.%20%C2%A0jQuery%20is%20one%20such%20tool.%0D%0A%0D%0ASome%20work%20I%27m%20currently%20doing%20involves%20presenting%20nicely%20styled%20pages%20to%20the%20user%20of%20a%20web%20site.%20%C2%A0The%20html%20I%20have%20to%20work%20with%20is%20not%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Using+jQuery+for+evil&amp;link=http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/&amp;notes=Sometimes%20you%20find%20a%20tool%20that%27s%20not%20just%20good%20for%20run-of-the-mill%2C%20intended-purpose%20work%2C%20but%20also%20for%20fixing%20up%20some%20bad%20situations.%20%C2%A0jQuery%20is%20one%20such%20tool.%0D%0A%0D%0ASome%20work%20I%27m%20currently%20doing%20involves%20presenting%20nicely%20styled%20pages%20to%20the%20user%20of%20a%20web%20site.%20%C2%A0The%20html%20I%20have%20to%20work%20with%20is%20not%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Using+jQuery+for+evil&amp;link=http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/&amp;notes=Sometimes%20you%20find%20a%20tool%20that%27s%20not%20just%20good%20for%20run-of-the-mill%2C%20intended-purpose%20work%2C%20but%20also%20for%20fixing%20up%20some%20bad%20situations.%20%C2%A0jQuery%20is%20one%20such%20tool.%0D%0A%0D%0ASome%20work%20I%27m%20currently%20doing%20involves%20presenting%20nicely%20styled%20pages%20to%20the%20user%20of%20a%20web%20site.%20%C2%A0The%20html%20I%20have%20to%20work%20with%20is%20not%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=Using+jQuery+for+evil&amp;link=http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/&amp;notes=Sometimes%20you%20find%20a%20tool%20that%27s%20not%20just%20good%20for%20run-of-the-mill%2C%20intended-purpose%20work%2C%20but%20also%20for%20fixing%20up%20some%20bad%20situations.%20%C2%A0jQuery%20is%20one%20such%20tool.%0D%0A%0D%0ASome%20work%20I%27m%20currently%20doing%20involves%20presenting%20nicely%20styled%20pages%20to%20the%20user%20of%20a%20web%20site.%20%C2%A0The%20html%20I%20have%20to%20work%20with%20is%20not%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Using+jQuery+for+evil&amp;link=http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/&amp;notes=Sometimes%20you%20find%20a%20tool%20that%27s%20not%20just%20good%20for%20run-of-the-mill%2C%20intended-purpose%20work%2C%20but%20also%20for%20fixing%20up%20some%20bad%20situations.%20%C2%A0jQuery%20is%20one%20such%20tool.%0D%0A%0D%0ASome%20work%20I%27m%20currently%20doing%20involves%20presenting%20nicely%20styled%20pages%20to%20the%20user%20of%20a%20web%20site.%20%C2%A0The%20html%20I%20have%20to%20work%20with%20is%20not%20&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/10/05/using-jquery-for-evil/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t say random when you mean unique!</title>
		<link>http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/</link>
		<comments>http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 11:47:00 +0000</pubDate>
		<dc:creator>Damian Brady</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.damianbrady.com.au/?p=114</guid>
		<description><![CDATA[I made a mistake the other day.  It seems that I used a random number when I really wanted a unique number. Let me explain. A service I wrote needed to send a message to an older process every 30 seconds or so.  To do this, it put a file in a particular folder and [...]]]></description>
			<content:encoded><![CDATA[<p>I made a mistake the other day.  It seems that <strong>I used a random number when I really wanted a unique number</strong>.</p>
<p>Let me explain.</p>
<p>A service I wrote needed to send a message to an older process every 30 seconds or so.  To do this, it put a file in a particular folder and gave it an 18-digit filename.  Something like <em>541238740514861189.input</em>.  The older process picked up this file, did what it needed to do, and put a corresponding response file back in the folder for my process.  Something like <em>541238740514861189.output</em>.  My process picked up the response and continued doing its thing.  Fairly simple in theory.</p>
<p>I figured that seeing as this is a single-threaded process and it only runs every 30 seconds, <strong>seeding a random number with a time value would work</strong>.  I was even using the Ticks property of the DateTime which measures time in 10-millionths of a second.  It didn&#8217;t occur to me at the time that <strong>even though there was only one thread, there might be multiple copies of this service running</strong>.  Being a server with a multicore processor, that means that it&#8217;s possible for the same line of code to be executed at <em>exactly </em>the same time.</p>
<p>Still, <strong>it&#8217;d have to be phenomenal bad luck for the same line of code to execute in two processes within the same 10-millionth of a second, right?</strong> The odds would have to be miniscule!  Well, it turns out that while the Ticks property of the .Net DateTime might measure the number of 100 nanosecond blocks since the first of January 0001, that doesn&#8217;t say anthing about its resolution.  <strong>The resolution of DateTime is not 100 nanoseconds, it&#8217;s about 15ms</strong>.  Suddenly the chances aren&#8217;t so slim.  <strong>There are now only 2,000 blocks of time in that 30 seconds</strong>.</p>
<p>So yes, it was very, very unlucky for two of these service to generate the same &#8220;random&#8221; filename, but it was possible.  <strong>It was stupid of me to use a random number when I really needed a number that was unique</strong>.  They&#8217;re different things.  Solving the problem was as simple as making sure the first x characters of the filename represent the process Id.  That can&#8217;t be shared between processes so there&#8217;ll be no collisions.</p>
<p>Lesson learned.  Also, I should probably stop publishing my mistakes&#8230;</p>
<div class="shr-bookmarks shr-bookmarks-expand shr-bookmarks-center">
<ul class="socials">
<li class="shr-comfeed">
			<a href="http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/feed" rel="nofollow" class="external" title="Subscribe to the comments for this post?">Subscribe to the comments for this post?</a>
		</li>
<li class="shr-twitter">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+say+random+when+you+mean+unique%21&amp;link=http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/&amp;notes=I%20made%20a%20mistake%20the%20other%20day.%C2%A0%20It%20seems%20that%20I%20used%20a%20random%20number%20when%20I%20really%20wanted%20a%20unique%20number.%0D%0A%0D%0ALet%20me%20explain.%0D%0A%0D%0AA%20service%20I%20wrote%20needed%20to%20send%20a%20message%20to%20an%20older%20process%20every%2030%20seconds%20or%20so.%C2%A0%20To%20do%20this%2C%20it%20put%20a%20file%20in%20a%20particular%20folder%20and%20gave%20it%20an%2018-digit%20filenam&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=%2524%257Btitle%257D%2B-%2B%2524%257Bshort_link%257D&amp;service=7&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
<li class="shr-facebook">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+say+random+when+you+mean+unique%21&amp;link=http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/&amp;notes=I%20made%20a%20mistake%20the%20other%20day.%C2%A0%20It%20seems%20that%20I%20used%20a%20random%20number%20when%20I%20really%20wanted%20a%20unique%20number.%0D%0A%0D%0ALet%20me%20explain.%0D%0A%0D%0AA%20service%20I%20wrote%20needed%20to%20send%20a%20message%20to%20an%20older%20process%20every%2030%20seconds%20or%20so.%C2%A0%20To%20do%20this%2C%20it%20put%20a%20file%20in%20a%20particular%20folder%20and%20gave%20it%20an%2018-digit%20filenam&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=5&amp;tags=&amp;ctype=" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
<li class="shr-linkedin">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+say+random+when+you+mean+unique%21&amp;link=http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/&amp;notes=I%20made%20a%20mistake%20the%20other%20day.%C2%A0%20It%20seems%20that%20I%20used%20a%20random%20number%20when%20I%20really%20wanted%20a%20unique%20number.%0D%0A%0D%0ALet%20me%20explain.%0D%0A%0D%0AA%20service%20I%20wrote%20needed%20to%20send%20a%20message%20to%20an%20older%20process%20every%2030%20seconds%20or%20so.%C2%A0%20To%20do%20this%2C%20it%20put%20a%20file%20in%20a%20particular%20folder%20and%20gave%20it%20an%2018-digit%20filenam&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=88&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
<li class="shr-reddit">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+say+random+when+you+mean+unique%21&amp;link=http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/&amp;notes=I%20made%20a%20mistake%20the%20other%20day.%C2%A0%20It%20seems%20that%20I%20used%20a%20random%20number%20when%20I%20really%20wanted%20a%20unique%20number.%0D%0A%0D%0ALet%20me%20explain.%0D%0A%0D%0AA%20service%20I%20wrote%20needed%20to%20send%20a%20message%20to%20an%20older%20process%20every%2030%20seconds%20or%20so.%C2%A0%20To%20do%20this%2C%20it%20put%20a%20file%20in%20a%20particular%20folder%20and%20gave%20it%20an%2018-digit%20filenam&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=40&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
<li class="shr-hackernews">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+say+random+when+you+mean+unique%21&amp;link=http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/&amp;notes=I%20made%20a%20mistake%20the%20other%20day.%C2%A0%20It%20seems%20that%20I%20used%20a%20random%20number%20when%20I%20really%20wanted%20a%20unique%20number.%0D%0A%0D%0ALet%20me%20explain.%0D%0A%0D%0AA%20service%20I%20wrote%20needed%20to%20send%20a%20message%20to%20an%20older%20process%20every%2030%20seconds%20or%20so.%C2%A0%20To%20do%20this%2C%20it%20put%20a%20file%20in%20a%20particular%20folder%20and%20gave%20it%20an%2018-digit%20filenam&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=202&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
<li class="shr-gmail">
			<a href="http://www.shareaholic.com/api/share/?title=Don%27t+say+random+when+you+mean+unique%21&amp;link=http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/&amp;notes=I%20made%20a%20mistake%20the%20other%20day.%C2%A0%20It%20seems%20that%20I%20used%20a%20random%20number%20when%20I%20really%20wanted%20a%20unique%20number.%0D%0A%0D%0ALet%20me%20explain.%0D%0A%0D%0AA%20service%20I%20wrote%20needed%20to%20send%20a%20message%20to%20an%20older%20process%20every%2030%20seconds%20or%20so.%C2%A0%20To%20do%20this%2C%20it%20put%20a%20file%20in%20a%20particular%20folder%20and%20gave%20it%20an%2018-digit%20filenam&amp;short_link=&amp;shortener=bitly&amp;shortener_key=damovisa|R_9bd5086c82e396ddea755c2667073a1f&amp;v=1&amp;apitype=1&amp;apikey=8afa39428933be41f8afdb8ea21a495c&amp;source=Shareaholic&amp;template=&amp;service=52&amp;tags=&amp;ctype=" rel="nofollow" class="external" title="Email this via Gmail">Email this via Gmail</a>
		</li>
</ul>
<div style="clear: both;"></div>
<div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic</a></div>
<div style="clear: both;"></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.damianbrady.com.au/2009/07/16/dont-say-random-when-you-mean-unique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

