<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: The Aggressive Class vs The Laid Back Class</title>
	<atom:link href="http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/</link>
	<description>Thoughts while working and playing as a Software Developer</description>
	<lastBuildDate>Thu, 11 Apr 2013 16:53:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: ...</title>
		<link>http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/#comment-19</link>
		<dc:creator>...</dc:creator>
		<pubDate>Mon, 02 Feb 2009 01:29:03 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2009/01/17/the-aggressive-class-vs-the-laid-back-class.aspx#comment-19</guid>
		<description>Oh, its great!</description>
		<content:encoded><![CDATA[<p>Oh, its great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/#comment-18</link>
		<dc:creator>Trevor</dc:creator>
		<pubDate>Wed, 21 Jan 2009 18:44:22 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2009/01/17/the-aggressive-class-vs-the-laid-back-class.aspx#comment-18</guid>
		<description>Nice post, good example, short and to the point.</description>
		<content:encoded><![CDATA[<p>Nice post, good example, short and to the point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael A. Smith</title>
		<link>http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/#comment-17</link>
		<dc:creator>Michael A. Smith</dc:creator>
		<pubDate>Sun, 18 Jan 2009 00:20:02 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2009/01/17/the-aggressive-class-vs-the-laid-back-class.aspx#comment-17</guid>
		<description>Excellent post Sean.  I imagine you can further refactor it using the dynamic capabilities of C# 4.0:

&lt;code&gt;

IEnumerable&lt;dynamic&gt; GetPartsInPriceRange()
{  
        dynamic price = configuration.GetPrice();  
        dynamic parts = partsRepository.GetParts();  
        return parts.Where(x =&gt; x.IsInPriceRange(price));  
}

&lt;/code&gt;

(assuming of course the IConfiguration, and IPartsRepository interfaces were defined as required).

Did I say it would be &quot;refactoring&quot;?  I meant it would be an egregious effort to make a more reusable but less maintainable component.</description>
		<content:encoded><![CDATA[<p>Excellent post Sean.  I imagine you can further refactor it using the dynamic capabilities of C# 4.0:</p>
<p><code></p>
<p>IEnumerable<dynamic> GetPartsInPriceRange()<br />
{<br />
        dynamic price = configuration.GetPrice();<br />
        dynamic parts = partsRepository.GetParts();<br />
        return parts.Where(x => x.IsInPriceRange(price));<br />
}</p>
<p></dynamic></code></p>
<p>(assuming of course the IConfiguration, and IPartsRepository interfaces were defined as required).</p>
<p>Did I say it would be &#8220;refactoring&#8221;?  I meant it would be an egregious effort to make a more reusable but less maintainable component.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Missal</title>
		<link>http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/#comment-16</link>
		<dc:creator>Chris Missal</dc:creator>
		<pubDate>Sat, 17 Jan 2009 21:44:38 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2009/01/17/the-aggressive-class-vs-the-laid-back-class.aspx#comment-16</guid>
		<description>Thanks for the heads up Sean! I think all the code typos are corrected now.</description>
		<content:encoded><![CDATA[<p>Thanks for the heads up Sean! I think all the code typos are corrected now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Stapleton</title>
		<link>http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/#comment-15</link>
		<dc:creator>Sean Stapleton</dc:creator>
		<pubDate>Sat, 17 Jan 2009 21:29:05 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2009/01/17/the-aggressive-class-vs-the-laid-back-class.aspx#comment-15</guid>
		<description>So here is how i interpret sample 3:

public interface IPart
{
    bool IsInPriceRange(int price);   
}

public interface IConfiguration
{
    int GetPrice&lt;PART&gt;() where PART : IPart;
}

public interface IPartsRepository
{
    List&lt;IPart&gt; GetParts&lt;PART&gt;() where PART : IPart;
}

public class ComputerBuilder
{
    private readonly IConfiguration configuration;  
    private readonly IPartsRepository partsRepository;  
  
    public ComputerBuilder(IConfiguration configuration, IPartsRepository partsRepository)  
    {  
        this.configuration = configuration;  
        this.partsRepository = partsRepository;  
    }

    IEnumerable&lt;IPart&gt; GetPartsInPriceRange&lt;PART&gt;() where PART : IPart  
    {  
        var price = configuration.GetPrice&lt;PART&gt;();  
        var parts = partsRepository.GetParts&lt;PART&gt;();  
        return parts.FindAll(x =&gt; x.IsInPriceRange(price));  
    }  
}  
</description>
		<content:encoded><![CDATA[<p>So here is how i interpret sample 3:</p>
<p>public interface IPart<br />
{<br />
    bool IsInPriceRange(int price);<br />
}</p>
<p>public interface IConfiguration<br />
{<br />
    int GetPrice
<part>() where PART : IPart;<br />
}</p>
<p>public interface IPartsRepository<br />
{<br />
    List<ipart> GetParts
<part>() where PART : IPart;<br />
}</p>
<p>public class ComputerBuilder<br />
{<br />
    private readonly IConfiguration configuration;<br />
    private readonly IPartsRepository partsRepository;  </p>
<p>    public ComputerBuilder(IConfiguration configuration, IPartsRepository partsRepository)<br />
    {<br />
        this.configuration = configuration;<br />
        this.partsRepository = partsRepository;<br />
    }</p>
<p>    IEnumerable<ipart> GetPartsInPriceRange
<part>() where PART : IPart<br />
    {<br />
        var price = configuration.GetPrice</part>
<part>();<br />
        var parts = partsRepository.GetParts</part>
<part>();<br />
        return parts.FindAll(x => x.IsInPriceRange(price));<br />
    }<br />
}
</part></ipart></part></ipart></part>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Stapleton</title>
		<link>http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/#comment-14</link>
		<dc:creator>Sean Stapleton</dc:creator>
		<pubDate>Sat, 17 Jan 2009 21:24:36 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2009/01/17/the-aggressive-class-vs-the-laid-back-class.aspx#comment-14</guid>
		<description>Useful discussion, would be more useful if the code samples didn&#039;t throw brain exceptions...

Sample 1, line 34:
  return new Configuration(filename);  

Sample 3:
  You&#039;ve lost a ton of angle brackets in the translation here.

e.g., line 12 is something like:
  IEnumerable&lt;IPart&gt; GetPartsInPriceRange&lt;PART&gt;() where PART : IPart  

... at least this is what i assume you were trying to convey.</description>
		<content:encoded><![CDATA[<p>Useful discussion, would be more useful if the code samples didn&#8217;t throw brain exceptions&#8230;</p>
<p>Sample 1, line 34:<br />
  return new Configuration(filename);  </p>
<p>Sample 3:<br />
  You&#8217;ve lost a ton of angle brackets in the translation here.</p>
<p>e.g., line 12 is something like:<br />
  IEnumerable<ipart> GetPartsInPriceRange
<part>() where PART : IPart  </p>
<p>&#8230; at least this is what i assume you were trying to convey.</part></ipart></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chrissie1</title>
		<link>http://lostechies.com/chrismissal/2009/01/17/the-aggressive-class-vs-the-laid-back-class/#comment-13</link>
		<dc:creator>chrissie1</dc:creator>
		<pubDate>Sat, 17 Jan 2009 18:12:17 +0000</pubDate>
		<guid isPermaLink="false">/blogs/chrismissal/archive/2009/01/17/the-aggressive-class-vs-the-laid-back-class.aspx#comment-13</guid>
		<description>No, no, a good programmer is by default lazy as a concequence he writes better and faster software so he can do less. And he learns new things to prevent himself from doing to much.

The go-get-em programmer will do first and ask questions later. The lazy programmer thins firsts then chooses the path of least resistance. It was a lazy programmer that invented TDD and the SOLID principle because he was tired of solving the same bugs over and over again. 

That&#039;s my excuse anyway ;-)..</description>
		<content:encoded><![CDATA[<p>No, no, a good programmer is by default lazy as a concequence he writes better and faster software so he can do less. And he learns new things to prevent himself from doing to much.</p>
<p>The go-get-em programmer will do first and ask questions later. The lazy programmer thins firsts then chooses the path of least resistance. It was a lazy programmer that invented TDD and the SOLID principle because he was tired of solving the same bugs over and over again. </p>
<p>That&#8217;s my excuse anyway ;-)..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
