<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Inheritance is Inherently Evil</title>
	<atom:link href="http://simpleprogrammer.com/2010/01/15/inheritance-is-inherently-evil/feed/" rel="self" type="application/rss+xml" />
	<link>http://simpleprogrammer.com/2010/01/15/inheritance-is-inherently-evil/</link>
	<description>Software Development from John Sonmez&#039;s Perspective</description>
	<lastBuildDate>Tue, 07 Feb 2012 17:47:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Jose Ayerdis</title>
		<link>http://simpleprogrammer.com/2010/01/15/inheritance-is-inherently-evil/#comment-998</link>
		<dc:creator><![CDATA[Jose Ayerdis]]></dc:creator>
		<pubDate>Mon, 13 Sep 2010 19:06:42 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=165#comment-998</guid>
		<description><![CDATA[Inheritance is not evil but its overuse is. You&#039;re example lacks of concistency and is not a bold statement sinceit has almost 10 years on the web...

http://beust.com/weblog2/archives/000004.html]]></description>
		<content:encoded><![CDATA[<p>Inheritance is not evil but its overuse is. You&#8217;re example lacks of concistency and is not a bold statement sinceit has almost 10 years on the web&#8230;</p>
<p><a href="http://beust.com/weblog2/archives/000004.html" rel="nofollow">http://beust.com/weblog2/archives/000004.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Book Review: Implementation Patterns &#171; Making the Complex Simple</title>
		<link>http://simpleprogrammer.com/2010/01/15/inheritance-is-inherently-evil/#comment-251</link>
		<dc:creator><![CDATA[Book Review: Implementation Patterns &#171; Making the Complex Simple]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 15:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=165#comment-251</guid>
		<description><![CDATA[[...] Some of the patterns I disagree with, especially the ones involving using inheritance over a different solution.  (I am not a fan of concrete inheritance.) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Some of the patterns I disagree with, especially the ones involving using inheritance over a different solution.  (I am not a fan of concrete inheritance.) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jsonmez</title>
		<link>http://simpleprogrammer.com/2010/01/15/inheritance-is-inherently-evil/#comment-122</link>
		<dc:creator><![CDATA[jsonmez]]></dc:creator>
		<pubDate>Sat, 13 Feb 2010 18:19:46 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=165#comment-122</guid>
		<description><![CDATA[One interesting point that I always make in regards to unit testing with inheritance is that if you can&#039;t mock something, it is because it is tightly coupled.  The problem of not being able to mock a base class leads me to say that a derived class it the base class plus itself, it is nothing on it&#039;s own.  Yet we try to make them different classes and end up having a leaking encapsulation, where we are really trying to treat one thing as two things.]]></description>
		<content:encoded><![CDATA[<p>One interesting point that I always make in regards to unit testing with inheritance is that if you can&#8217;t mock something, it is because it is tightly coupled.  The problem of not being able to mock a base class leads me to say that a derived class it the base class plus itself, it is nothing on it&#8217;s own.  Yet we try to make them different classes and end up having a leaking encapsulation, where we are really trying to treat one thing as two things.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://simpleprogrammer.com/2010/01/15/inheritance-is-inherently-evil/#comment-121</link>
		<dc:creator><![CDATA[Darren]]></dc:creator>
		<pubDate>Sat, 13 Feb 2010 16:20:32 +0000</pubDate>
		<guid isPermaLink="false">http://simpleprogrammer.com/?p=165#comment-121</guid>
		<description><![CDATA[I agree with you, I strongly prefer using interfaces over inheritance.  In fact, when I think back to my last few projects, the only places that I can remember using inheritance is on my generic data repositories, but even that use was always hidden away behind interfaces.  

Just one more idea to throw in, just from personal experience:  I&#039;ve found that testing base classes also doesn&#039;t make sense to the reader of the tests.  With a well-written, SRP-following class, you can read the names of the tests and understand what&#039;s going on.  With tests on base classes, it&#039;s like you&#039;re only getting a partial picture.  Instead of understanding what&#039;s going on, you only get what it&#039;s doing.  And given the fact that it&#039;s probably an abstraction that exists only in the author&#039;s head, that doesn&#039;t help much.  

Vice-versa with the tests that inherit from it.  With the the substance of the functionality hidden away, the tests start to read like they&#039;re from a programmer who was forced against his will to write unit tests instead of a programmer who uses his tests to verify his code works AND to explain the situation for the next programmer.

That is, even if you you can test the inherited class!  How do you mock a base class?]]></description>
		<content:encoded><![CDATA[<p>I agree with you, I strongly prefer using interfaces over inheritance.  In fact, when I think back to my last few projects, the only places that I can remember using inheritance is on my generic data repositories, but even that use was always hidden away behind interfaces.  </p>
<p>Just one more idea to throw in, just from personal experience:  I&#8217;ve found that testing base classes also doesn&#8217;t make sense to the reader of the tests.  With a well-written, SRP-following class, you can read the names of the tests and understand what&#8217;s going on.  With tests on base classes, it&#8217;s like you&#8217;re only getting a partial picture.  Instead of understanding what&#8217;s going on, you only get what it&#8217;s doing.  And given the fact that it&#8217;s probably an abstraction that exists only in the author&#8217;s head, that doesn&#8217;t help much.  </p>
<p>Vice-versa with the tests that inherit from it.  With the the substance of the functionality hidden away, the tests start to read like they&#8217;re from a programmer who was forced against his will to write unit tests instead of a programmer who uses his tests to verify his code works AND to explain the situation for the next programmer.</p>
<p>That is, even if you you can test the inherited class!  How do you mock a base class?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

