<?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>Elegant Code &#187; Linq</title>
	<atom:link href="http://elegantcode.com/tag/linq/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com</link>
	<description></description>
	<lastBuildDate>Sun, 12 Feb 2012 04:40:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Data Programmability Advisory Council</title>
		<link>http://elegantcode.com/2008/06/03/data-programmability-advisory-council/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=data-programmability-advisory-council</link>
		<comments>http://elegantcode.com/2008/06/03/data-programmability-advisory-council/#comments</comments>
		<pubDate>Tue, 03 Jun 2008 07:41:55 +0000</pubDate>
		<dc:creator>Jarod Ferguson</dc:creator>
				<category><![CDATA[Entity Framework]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/06/03/data-programmability-advisory-council/</guid>
		<description><![CDATA[Danny Simmons posted some exciting news about the advisory council for future DP releases (Entity Framework, LINQ to SQL, ADO.Net Data Services, etc). Check this out: One recurring theme in that feedback has been around domain driven design, so among our other criteria we’ve put together an advisory council which includes some members with notable [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.msdn.com/dsimmons/archive/2008/06/03/dp-advisory-council.aspx">Danny Simmons posted</a> some exciting news about the advisory council for future DP releases (Entity Framework, LINQ to SQL, ADO.Net Data Services, etc). Check this out:</p>
<p><span id="more-1198"></span></p>
<blockquote><p>One recurring theme in that feedback has been around domain driven design, so among our other criteria we’ve put together an advisory council which includes some members with notable credentials in that area. </p>
<p>Eric Evans &#8211; <a href="http://www.domainlanguage.com/about/ericevans.html">http://www.domainlanguage.com/about/ericevans.html</a><br />Stephen Forte &#8211; <a href="http://www.stephenforte.net/">http://www.stephenforte.net/</a><br />Martin Fowler &#8211; <a href="http://martinfowler.com/">http://martinfowler.com/</a><br />Pavel Hruby &#8211; <a href="http://www.phruby.com/">http://www.phruby.com/</a><br />Jimmy Nilsson &#8211; <a href="http://jimmynilsson.com/">http://jimmynilsson.com/</a></p>
</blockquote>
<p>Yes&#8230; I had to take a second look myself. That&#8217;s an impressive list I say!
<p>Its just words on a web page at this point, but I think this speaks loud and clear that MS is listening to all the valuable constructive criticism that has been given from the community. I commend the Data Programmability team for making such a great move, but mostly all those who have stepped up to provide their insight.
<p>Along with this announcement, Danny is also requesting that folks continue to <a href="http://blogs.msdn.com/dsimmons/archive/2008/06/03/dp-advisory-council.aspx">keep providing feedback.</a>
<p>Frickin&#8217; <em>sweet!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/06/03/data-programmability-advisory-council/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic LINQ</title>
		<link>http://elegantcode.com/2008/04/15/dynamic-linq/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dynamic-linq</link>
		<comments>http://elegantcode.com/2008/04/15/dynamic-linq/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 01:23:13 +0000</pubDate>
		<dc:creator>Chris Brandsma</dc:creator>
				<category><![CDATA[.Net 3.5]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/04/15/dynamic-linq/</guid>
		<description><![CDATA[Something I just saw for the first time is a Microsoft C# sample application called DynamicQuery.&#160; This allows you to enter part of a LINQ query as a string. If you have Visual Studio 2008 installed, you can find the samples in this directory: C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033.&#160; Then extract the file CSharpSamples.zip.&#160; The [...]]]></description>
			<content:encoded><![CDATA[<p>Something I just saw for the first time is a Microsoft C# sample application called DynamicQuery.&nbsp; This allows you to enter part of a LINQ query as a string.</p>
<p>If you have Visual Studio 2008 installed, you can find the samples in this directory: C:\Program Files\Microsoft Visual Studio 9.0\Samples\1033.&nbsp; Then extract the file CSharpSamples.zip.&nbsp; The sample will be found at CSharpSamples\LinqSamples\DynamicQuery.</p>
<p>From the sample you will see that you can do perform things like this:</p>
<pre class="csharpcode">var query =&nbsp;&nbsp;&nbsp; db.Customers.Where(&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span class="str">"City == @0 and Orders.Count &gt;= @1"</span>, <span class="str">"London"</span>, 10).
   OrderBy(<span class="str">"CompanyName"</span>).
   Select(<span class="str">"New(CompanyName as Name, Phone)"</span>);
</pre>
<p><style type="text/css">.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }
</style>
<p>All of the heavy lifting happens in the Dynamic.cs file that has 11 classes.&nbsp; The interface happens through DynamicQuery static class, which extends the IQueriable interface with new Where, OrderBy, and Select methods.&nbsp; To use these extensions you have to include this line in your code: <strong>using System.Linq.Dynamic;</strong> along with the Dynamic file in your project.</p>
<p>I don&#8217;t have a use for this quite yet, but I think its time will come.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/04/15/dynamic-linq/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Replace your Collections with IEnumerable&lt;T&gt;</title>
		<link>http://elegantcode.com/2008/04/07/replace-your-collections-with-ienumerablet/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=replace-your-collections-with-ienumerablet</link>
		<comments>http://elegantcode.com/2008/04/07/replace-your-collections-with-ienumerablet/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 20:16:38 +0000</pubDate>
		<dc:creator>Tony Rasa</dc:creator>
				<category><![CDATA[.Net 3.5]]></category>
		<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/04/07/replace-your-collections-with-ienumerablet/</guid>
		<description><![CDATA[The other day I was remarking on the differences between List&#60;T&#62; and Collection&#60;T&#62;, and how it seemed that List&#60;T&#62; was so much more useful, but officially it shouldn&#8217;t be used in public API&#8217;s. And what a drag that was, because List&#60;T&#62; has so much good stuff in it. So, a fellow coworker called me out [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was remarking on the differences between List&lt;T&gt; and Collection&lt;T&gt;, and how it seemed that List&lt;T&gt; was so much more useful, but officially <a href="http://blogs.msdn.com/kcwalina/archive/2005/09/26/474010.aspx">it shouldn&#8217;t be used in public API&#8217;s</a>.  And what a drag that was, because List&lt;T&gt; has so much good stuff in it.</p>
<p>So, a fellow coworker called me out on this: why am I returning collections other than IEnumerable&lt;T&gt; anyway?  What conditions actually require the extensibility of Collection&lt;T&gt;, or the extra utility of List&lt;T&gt;?  I didn&#8217;t have an answer for this off the top of my head, so over the weekend I created a new experimental branch of a project and started hacking interface signatures.  What follows are some conclusions from the experiment.</p>
<h4>Setting Up the Experiment</h4>
<p>I replaced all the public signatures of IList, Collection, List, etc. with IEnumerable&lt;T&gt;.  If it was a public API input or output, its now IEnumerable.  Each signature change was followed by re-running all unit tests to make sure that nothing critical broke.</p>
<h4>Conclusion: System.Linq makes IEnumerable&lt;T&gt; Useable</h4>
<p>There were two major &#8220;breaking&#8221; changes found in this experiment.  The first is that IEnumerable&lt;T&gt; doesn&#8217;t expose a Count property, but there are places where we need to know if the list is empty, has one item, has N items, etc.</p>
<p>Fortunately, this codebase was upgraded to Visual Studio 2008 and a .NET 3.5 target a while back.  This gave me an opportunity to use the Count() extension method from the System.Linq namespace. First problem: Solved.</p>
<p>Next, there are cases where I&#8217;d need to access items in a collection by index.  The native IEnumerable doesn&#8217;t provide this, but System.Linq does with extensions like First(), and ElementAt().</p>
<p>So, there&#8217;s two big reasons for not using IEnumerable&lt;T&gt; taken care of.  These changes handled almost all of the collection issues I ran into.</p>
<p>Note: now I&#8217;m &#8220;stuck&#8221; with the .NET 3.5 target.  Not a problem for me, YMMV.</p>
<pre class="csharpcode">[Test]
<span class="kwrd">public</span> <span class="kwrd">void</span> GetControls()
{
    <span class="rem">// SetUp code omitted for brevity...</span>
    var cat = <span class="kwrd">new</span> BrowsableUserControlCatalog();
    var controls = cat.GetRegisteredUserControls(); <span class="rem">// IEnumerable</span>
    Assert.AreEqual(1, controls.Count());
    Assert.AreEqual(<span class="str">"virtualPath"</span>, controls.First().VirtualPath);
}</pre>
<h4>Conclusion: Sometimes you have to extend Collections</h4>
<p>One of the reasons that the Framework Guidlines encourage Collection&lt;T&gt; vs. List&lt;T&gt; is that Collection is easily extended.  I ran into one case where a class had been extended from Collection&lt;T&gt; in order to change the behavior of the InsertItem() and SetItem()  methods.  So we have a collection that requires the ability to add items to it.  Even worse, we have methods added to this collection to provide additional required functionality: swap to items in the collection, reset the sorting index of the items, move an item up or down, that sort of thing.</p>
<p>So, that&#8217;s <strong>one</strong> collection that remained as-is.  I can live with that.  Perhaps on some other weekend, I could split the additional functionality out from that collection and into &#8220;something else,&#8221; which might have additional advantages.  Something for next time..</p>
<h4>Conclusion: Sometimes you have to Sort() [for now...]</h4>
<p>One List&lt;T&gt; that I haven&#8217;t gotten rid of (yet) relies on a Collection&lt;T&gt; supplied by another component.  We are getting a list of files, and putting them into a sort order based on what the user interface wants.  The library has no idea what kinds of sorting options are available, the calling implementation can do pretty much whatever it wants.  The element that varies is the sorting routine passed into List&lt;T&gt;.Sort().</p>
<p>System.Linq provides an .OrderBy() extension, but its signature doesn&#8217;t match up with List&lt;T&gt;.Sort()&#8230;which turned into more of a change than I wanted to deal with for this current experiment.  Saved for next time&#8230;</p>
<h4>So what have we learned?</h4>
<p>Extension methods are fun. I look forward to abusing them heavily in all my new work.  Because of them, its now possible to change 99% of this API to use the most general collection types possible.</p>
<p>But does it make sense to do so?   I&#8217;m not totally convinced.  It does simplify things.  The semantics of what you can do with a given collection is much clearer.  Most of the time, we only needed the abilities of IEnumerable&lt;T&gt;, and it makes sense to use the most generic interface you can get away with &#8211; especially for a platform where you can&#8217;t predict how these things are going to be used.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/04/07/replace-your-collections-with-ienumerablet/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Exploring Extension Methods in .Net 3.5</title>
		<link>http://elegantcode.com/2008/04/03/exploring-extension-methods-in-net-35/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=exploring-extension-methods-in-net-35</link>
		<comments>http://elegantcode.com/2008/04/03/exploring-extension-methods-in-net-35/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 16:26:11 +0000</pubDate>
		<dc:creator>Jarod Ferguson</dc:creator>
				<category><![CDATA[.Net 3.5]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/04/03/exploring-extension-methods-in-net-35/</guid>
		<description><![CDATA[Finding extension methods in C# 3.5 is not as intuitive as it should be. Just walking the inheritance chain will not show you all the goodies. There are a few steps using object browser that will make this easier. Pull up object browser, set Browse to only show 3.5. (Will not work if you set [...]]]></description>
			<content:encoded><![CDATA[<p>Finding extension methods in C# 3.5 is not as intuitive as it should be. Just walking the inheritance chain will not show you all the goodies. There are a few steps using object browser that will make this easier.</p>
<p><span id="more-1014"></span></p>
<ul>
<li>Pull up object browser, <strong>set Browse to only show 3.5</strong>. (Will not work if you set to all components)
<li>Set the filter to <strong>&#8216;Show Extension Members&#8217;</strong></li>
</ul>
<p><a href="http://elegantcode.com/wp-content/uploads/2008/04/image.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="114" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/04/image-thumb.png" width="244" border="0"></a> </p>
<ul>
<li>Select a type in the browser
<li>In the right pane you will see an <strong>&#8216;Extension Members&#8217;</strong> folder
<li>Now you can browse the public type extensions</li>
</ul>
<p><a href="http://elegantcode.com/wp-content/uploads/2008/04/image1.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="118" alt="image" src="http://elegantcode.com/wp-content/uploads/2008/04/image-thumb1.png" width="244" border="0"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/04/03/exploring-extension-methods-in-net-35/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How have the new features of C# changed your code?</title>
		<link>http://elegantcode.com/2008/03/31/how-have-the-new-features-of-c-changed-your-code/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-have-the-new-features-of-c-changed-your-code</link>
		<comments>http://elegantcode.com/2008/03/31/how-have-the-new-features-of-c-changed-your-code/#comments</comments>
		<pubDate>Mon, 31 Mar 2008 08:04:02 +0000</pubDate>
		<dc:creator>Jarod Ferguson</dc:creator>
				<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<category><![CDATA[Linq]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/03/31/how-have-the-new-features-of-c-changed-your-code/</guid>
		<description><![CDATA[Here is a simplified example of how the functional programming style of Linq has impacted the way I would do a DDD service implementation. Before: IEnumerable&#60;TDomainEntity&#62; domainEntities = Repository.Find(criteria); IEnumerable&#60;TDto&#62; dtos = Assembler.DomainToService(domainEntities); return new List&#60;TDto&#62;(dtos); After: return Repository .Find(criteria) .ToList() .ConvertAll&#60;TDto&#62;(Assembler.DomainToService); Thoughts? Samples? WTF’s?]]></description>
			<content:encoded><![CDATA[<p>Here is a simplified example of how the functional programming style of Linq has impacted the way I would do a DDD service implementation. </p>
<p><span id="more-978"></span></p>
<p>Before:
<div>
<pre class="csharpcode">IEnumerable&lt;TDomainEntity&gt; domainEntities = Repository.Find(criteria);
IEnumerable&lt;TDto&gt; dtos = Assembler.DomainToService(domainEntities);
<span class="kwrd">return</span> <span class="kwrd">new</span> List&lt;TDto&gt;(dtos);
</pre>
</div>
<div>After:</div>
<div>
<pre class="csharpcode"><span class="kwrd">return</span> Repository
           .Find(criteria)
           .ToList()
           .ConvertAll&lt;TDto&gt;(Assembler.DomainToService);
</pre>
</div>
<div>Thoughts? Samples? WTF’s?</div>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/03/31/how-have-the-new-features-of-c-changed-your-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>LINQ Framework Design Guidelines</title>
		<link>http://elegantcode.com/2008/03/18/linq-framework-design-guidelines-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=linq-framework-design-guidelines-2</link>
		<comments>http://elegantcode.com/2008/03/18/linq-framework-design-guidelines-2/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 01:53:22 +0000</pubDate>
		<dc:creator>Jarod Ferguson</dc:creator>
				<category><![CDATA[Design Patterns]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/03/18/linq-framework-design-guidelines-2/</guid>
		<description><![CDATA[Excellent article on design considerations for LINQ. Looks like these concepts will be incorporated into the 2nd Edition of Framework Design Guidelines: Conventions, Idioms, and Patterns for Reuseable .NET Libraries. Cant wait to get my hands on a copy of that!]]></description>
			<content:encoded><![CDATA[<p>Excellent article on <a href="http://blogs.msdn.com/mirceat/archive/2008/03/13/linq-framework-design-guidelines.aspx" target="_blank">design considerations for LINQ</a>. Looks like these concepts will be incorporated into the 2nd Edition of <a href="http://www.amazon.com/Framework-Design-Guidelines-Conventions-Development/dp/0321545613/ref=pd_bbs_sr_2?ie=UTF8&amp;s=books&amp;qid=1200508590&amp;sr=1-2" target="_blank">Framework Design Guidelines: Conventions, Idioms, and Patterns for Reuseable .NET Libraries</a>. Cant wait to get my hands on a copy of that!</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/03/18/linq-framework-design-guidelines-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New tool: LINQPad</title>
		<link>http://elegantcode.com/2008/02/29/new-tool-linqpad/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-tool-linqpad</link>
		<comments>http://elegantcode.com/2008/02/29/new-tool-linqpad/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 04:45:38 +0000</pubDate>
		<dc:creator>Chris Brandsma</dc:creator>
				<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Tools and Utilities]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/02/29/new-tool-linqpad/</guid>
		<description><![CDATA[I&#8217;m boning up on my LINQ to SQL skills again for a presentation I&#8217;m giving for Boise Code Camp.&#160; One cool little tool I&#8217;ve been exposed to recently is LINQPad.&#160; LINQPad is a great little tool for messing around with LINQ to SQL queries and testing ideas. Point LINQPad at a SQL Server database and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m boning up on my LINQ to SQL skills again for a presentation I&#8217;m giving for <a href="http://www.BoiseCodeCamp.com">Boise Code Camp</a>.&nbsp; One cool little tool I&#8217;ve been exposed to recently is <a href="http://www.linqpad.net/">LINQPad</a>.&nbsp; LINQPad is a great little tool for messing around with LINQ to SQL queries and testing ideas.</p>
<p>Point LINQPad at a SQL Server database and then you can write your LINQ queries right in the tool.&nbsp; No having to deal with DataContext objects or any messy stuff like that.&nbsp; It also works with LINQ to Objects and LINQ to XML; plus it comes with about 200 samples.&nbsp;&nbsp; It reminds me a bit of the HQL Query Analyzer of Ayende&#8217;s &#8212; just a lot simpler to use.&nbsp; The main point is that you can get nearly instant results from your query, which defiantly helps in that critical &#8220;getting to know you&#8221; stage with a new technology.</p>
<p>The only gripe I have with it right now is that intellesense isn&#8217;t implemented yet.&nbsp; That is kind of like flying blind these days.&nbsp; But who is to complain over a free tool like this.</p>
<p>Note:LINQPad&nbsp; was written in conjunction with the book <a href="http://www.albahari.com/nutshell/">C# 3.0 in a Nutshell.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/02/29/new-tool-linqpad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Code Cast 3 &#8211; Chris Brandsma</title>
		<link>http://elegantcode.com/2008/02/18/elegant-code-cast-episode-3-is-online/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=elegant-code-cast-episode-3-is-online</link>
		<comments>http://elegantcode.com/2008/02/18/elegant-code-cast-episode-3-is-online/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 19:33:30 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[CodeCast]]></category>
		<category><![CDATA[Architecture and Design]]></category>
		<category><![CDATA[C# 3.0]]></category>
		<category><![CDATA[Code Cast]]></category>
		<category><![CDATA[Linq]]></category>
		<category><![CDATA[Patterns and Practices]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2008/02/18/elegant-code-cast-episode-3-is-online/</guid>
		<description><![CDATA[In this episode of the Elegant Code Cast, we visit with Elegant Coder Chris Brandsma. Chris is a senior developer at Mobile Data Force in Boise, Idaho. Chris provides some great details on subjects ranging from AJAX and RIA separation of concerns to LINQ and Lambda expressions. He also gives us a glimpse of what [...]]]></description>
			<content:encoded><![CDATA[<p>In this episode of the Elegant Code Cast, we visit with Elegant Coder Chris Brandsma. Chris is a senior developer at Mobile Data Force in Boise, Idaho. Chris provides some great details on subjects ranging from AJAX and RIA separation of concerns to LINQ and Lambda expressions.</p>
<p>He also gives us a glimpse of what it is like to live your life visiting other people&#8217;s development shops. Did you know source control is stil optional in some organizations?</p>
<p>Chris is a true code craftsman and this shows in his clear explanations of some very advanced programming concepts. If you haven&#8217;t played with Lambda expressions, anonymous delegates, or LINQ, start with this podcast.</p>
<p><a href="http://pluralsight-free.s3.amazonaws.com/david-starr/ecc/ECC_03_ChrisBrandsma.mp3">Download the episode MP3</a></p>
<p><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=271207118"><img src="http://elegantcode.com/cast/files/images/itunes_button.gif" border="0" alt="View in iTunes" /></a> <a href="http://feeds.feedburner.com/elegantcodecast"><img src="http://elegantcode.com/cast/files/images/rss_podcast.jpg" border="0" alt="Any Podcatcher" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2008/02/18/elegant-code-cast-episode-3-is-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://pluralsight-free.s3.amazonaws.com/david-starr/ecc/ECC_03_ChrisBrandsma.mp3" length="38813673" type="audio/mpeg" />
		</item>
		<item>
		<title>Visual Studio 2008 First Looks</title>
		<link>http://elegantcode.com/2007/11/19/visual-studio-2008-first-looks/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-2008-first-looks</link>
		<comments>http://elegantcode.com/2007/11/19/visual-studio-2008-first-looks/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 05:28:02 +0000</pubDate>
		<dc:creator>David Starr</dc:creator>
				<category><![CDATA[Linq]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://elegantcode.com/2007/11/19/visual-studio-2008-first-looks/</guid>
		<description><![CDATA[I just opened my first project in Visual Studio 2008. I just started a console application to play around with. The UI has received a little attention. You can see by the gradient colors on this properties dialog menu that someone on the Visual Studio team finally called someone over from the User Experience Group. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://elegantcode.com/wp-content/uploads/2007/11/image8.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="image" src="http://elegantcode.com/wp-content/uploads/2007/11/image-thumb8.png" width="81" align="left" border="0" /></a>I just opened my first project in Visual Studio 2008. I just started a console application to play around with. </p>
<p>The UI has received a little attention. You can see by the gradient colors on this properties dialog menu that someone on the Visual Studio team finally called someone over from the User Experience Group. Now, if those menus are so awesome, then I have a single window utility for working with unit tests, right?</p>
<p>Not so fast, Homer.</p>
<p>All kidding aside, there are some things to look forward to in Visual Studio. First of all, this is first version of Visual Studio to provide support for multiple frameworks out of the box. Here is a screen shot of the drop down on the Project Properties dialog that lets me target a specific framework.</p>
<p><a href="http://elegantcode.com/wp-content/uploads/2007/11/image9.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="71" alt="image" src="http://elegantcode.com/wp-content/uploads/2007/11/image-thumb9.png" width="298" border="0" /></a> </p>
<p>Overall, Microsoft claims more than 250 new or improved features and I for one am content with the fact that this is a v.Next and not a v.NewThingCompletely. </p>
<p>I may be up all night playing with LINQ. Look what I can do:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4">
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> Console.WriteLine(<span style="color: #006080">&quot;Unioning sets&quot;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> <span style="color: #0000ff">int</span>[] numbers1 = { 1, 3, 5, 7, 9 };</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span> <span style="color: #0000ff">int</span>[] numbers2 = { 2, 4, 6, 8, 10 };</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> IEnumerable&lt;<span style="color: #0000ff">int</span>&gt; allNums = from n <span style="color: #0000ff">in</span> numbers1.Union&lt;<span style="color: #0000ff">int</span>&gt;(numbers2)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   7:</span>                            <span style="color: #0000ff">where</span> n &gt; 3</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   8:</span>                            orderby n</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   9:</span>                            select n;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  10:</span>&#160; </pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  11:</span> <span style="color: #0000ff">foreach</span> (<span style="color: #0000ff">int</span> i <span style="color: #0000ff">in</span> allNums)</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  12:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">  13:</span>     Console.Write(i + <span style="color: #006080">&quot;, &quot;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">  14:</span> }</pre>
</p></div>
</div>
<p>And it gives me this result.</p>
<table border="1">
<tbody>
<tr>
<td>
<pre>Unioning sets
4, 5, 6, 7, 8, 9, 10,</pre>
</td>
</tr>
</tbody>
</table>
<p>This is fun, I have to admit. It&#8217;s so new and shiny that the syntax <a href="http://gallery.live.com/liveItemDetail.aspx?li=d4409446-af7f-42ec-aa20-78aa5bac4748&amp;bt=9" target="_blank">high lighter</a> in <a href="http://gallery.live.com/default.aspx?pl=8" target="_blank">Live Writer</a> doesn&#8217;t see all the keywords. You want to really go to bed late, work your way through this page of <a href="http://msdn2.microsoft.com/en-us/vcsharp/aa336746.aspx" target="_blank">101 LINQ samples</a>. That&#8217;s what I&#8217;m doing.</p>
]]></content:encoded>
			<wfw:commentRss>http://elegantcode.com/2007/11/19/visual-studio-2008-first-looks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

