<?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>let x=x &#187; composition</title>
	<atom:link href="http://www.crazymcphee.net/x/tag/composition/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crazymcphee.net/x</link>
	<description>programming idiom and methodology</description>
	<lastBuildDate>Tue, 13 Jul 2010 21:56:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Inherit this!</title>
		<link>http://www.crazymcphee.net/x/2009/01/18/inherit-this/</link>
		<comments>http://www.crazymcphee.net/x/2009/01/18/inherit-this/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 21:15:26 +0000</pubDate>
		<dc:creator>Scot Mcphee</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[composition]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[oo]]></category>
		<category><![CDATA[polymorphism]]></category>

		<guid isPermaLink="false">http://www.crazymcphee.net/x/?p=57</guid>
		<description><![CDATA[Extends is the most misused keyword in the Java lexicon. In my constant and probably losing battle against poor design, I keep finding systems with a rather rich abundance of implementation inheritance. I&#8217;ve actually recently seen systems with seven or more  levels of inheritance, where just about every object extends some class that (eventually) extends [...]]]></description>
			<content:encoded><![CDATA[<p><em>Extends</em> is the most misused keyword in the Java lexicon.</p>
<p>In my constant and probably losing battle against poor design, I keep finding systems with a rather rich abundance of implementation inheritance. I&#8217;ve actually recently seen systems with seven or more  levels of inheritance, where just about every object extends some class that (eventually) extends <span style="color: #000000;">AbstractBaseObject</span> extends BaseObject. All classes. No interfaces (unless some specification demands them), or sometimes, no interfaces with any methods declared.</p>
<p>I think if I had my way, I&#8217;d remove the extends keyword from Java and only leave implements. I guess it&#8217;s just a polemical fantasy of mine but there&#8217;s plenty or programmers out there still implementing the worst sort of bad juju with extension.</p>
<p>As <a title="Inheritance is not the way to achieve code reuse" href="http://littletutorials.com/2008/06/23/inheritance-not-for-code-reuse/" target="_blank">this post rightly points out</a> &#8211; the <em>purpose</em> (as opposed to a <em>side-effec</em>t) of extension is not to enable re-use. Extension is a declaration of a classification system in your domain. <em>Is-A</em> as opposed to <em>Has-A</em>. A Canine is-a Mammal which has-a Placenta. It&#8217;s not called a <em>type system</em> for nothing, you know. You&#8217;re making a <em>taxonomy.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crazymcphee.net/x/2009/01/18/inherit-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dependency Injection: &#8220;Don&#8217;t look for things!&#8221;</title>
		<link>http://www.crazymcphee.net/x/2009/01/13/dependency-injection-dont-look-for-things/</link>
		<comments>http://www.crazymcphee.net/x/2009/01/13/dependency-injection-dont-look-for-things/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 11:49:48 +0000</pubDate>
		<dc:creator>Scot Mcphee</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[composition]]></category>
		<category><![CDATA[oo]]></category>
		<category><![CDATA[patterns]]></category>

		<guid isPermaLink="false">http://www.crazymcphee.net/x/?p=6</guid>
		<description><![CDATA[Here&#8217;s a piece of advice I definitely can take to heart. From Google testing blog: *Clean Code Talk Series* *Topic: Don&#8217;t Look For Things!* http://googletesting.blogspot.com/2008/11/clean-code-talks-dependency-injection.html Recently I&#8217;ve been doing maintenance work on a system that has a lot of custom-rolled code to do stuff like, look up EJB Home and Remote references. Even though parts [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a piece of advice I definitely can take to heart.</p>
<p><strong><ins>From Google testing blog:</ins></strong></p>
<p>*Clean Code Talk Series*<br />
*Topic: Don&#8217;t Look For Things!*</p>
<p><span class="nobr"><a rel="nofollow" href="http://googletesting.blogspot.com/2008/11/clean-code-talks-dependency-injection.html">http://googletesting.blogspot.com/2008/11/clean-code-talks-dependency-injection.html<sup><img class="rendericon" src="http://modular.autonomous.org/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<p><span class="nobr">Recently I&#8217;ve been doing maintenance work on a system that has a lot of custom-rolled code to do stuff like, look up EJB Home and Remote references. Even though parts of the system are five years old, even then there were a bunch of accepted patterns for getting this sort of work done. However there&#8217;s lots of motion, but very little movement. Even mis-named patterns in places (Delegates that aren&#8217;t, and so on).</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.crazymcphee.net/x/2009/01/13/dependency-injection-dont-look-for-things/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
