<?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: Refactoring / Design: Composed Method</title>
	<atom:link href="http://andypalmer.com/2008/02/refactoring-design-composed-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://andypalmer.com/2008/02/refactoring-design-composed-method/</link>
	<description>Views on software, technology, consulting and business process</description>
	<lastBuildDate>Sun, 31 Jan 2010 16:31:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andy</title>
		<link>http://andypalmer.com/2008/02/refactoring-design-composed-method/comment-page-1/#comment-17</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 12 Aug 2008 18:58:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.andypalmer.com/blog/?p=6#comment-17</guid>
		<description>That&#039;s looking good :-)&lt;br/&gt;The point of the post was that the first thing we should do is get to a consistent detail level.&lt;br/&gt;I rolled up the &quot;how we wash our hands&quot; into a &quot;what are we doing?&quot; washHands method.&lt;br/&gt;My feeling is that washing hands is nothing to do with the making of the base. The chef should make sure he washes his hands before he starts making the base, but we&#039;ll get there eventually :-)</description>
		<content:encoded><![CDATA[<p>That&#8217;s looking good <img src='http://andypalmer.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <br />The point of the post was that the first thing we should do is get to a consistent detail level.<br />I rolled up the &#8220;how we wash our hands&#8221; into a &#8220;what are we doing?&#8221; washHands method.<br />My feeling is that washing hands is nothing to do with the making of the base. The chef should make sure he washes his hands before he starts making the base, but we&#8217;ll get there eventually <img src='http://andypalmer.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris</title>
		<link>http://andypalmer.com/2008/02/refactoring-design-composed-method/comment-page-1/#comment-7</link>
		<dc:creator>Kris</dc:creator>
		<pubDate>Sun, 10 Aug 2008 23:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.andypalmer.com/blog/?p=6#comment-7</guid>
		<description>I&#039;m not a fan of a CheeseCake taking in a chef and a sink and instructing the chef to wash his hands, but perhaps I&#039;m jumping ahead in your story. Anyway, I think I would rather see an initial refactoring look more like this:&lt;br/&gt;&lt;br/&gt;public makeBase(Ingredients... ingredients) {&lt;br/&gt;    chef.washHandsIn(sink);&lt;br/&gt;    bowl.add(ingredients);&lt;br/&gt;    chef.mixIngredientsOf(bowl);  &lt;br/&gt;    cake.addContents(bowl);&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;I&#039;m not claiming this is perfect, but would be more in-line with a first phase refactoring:&lt;br/&gt;&lt;br/&gt;1. Washing hands is a behaviour between the chef and sink. The details of which should not be exposed to the cheesecake.&lt;br/&gt;&lt;br/&gt;2. The ingredients getting added to a bowl pushes the loop as a single operation into a single method.&lt;br/&gt;&lt;br/&gt;3. Might as well move the construction of all the objects but allow them to be injected.</description>
		<content:encoded><![CDATA[<p>I&#39;m not a fan of a CheeseCake taking in a chef and a sink and instructing the chef to wash his hands, but perhaps I&#39;m jumping ahead in your story. Anyway, I think I would rather see an initial refactoring look more like this:</p>
<p>public makeBase(Ingredients&#8230; ingredients) {<br />    chef.washHandsIn(sink);<br />    bowl.add(ingredients);<br />    chef.mixIngredientsOf(bowl);  <br />    cake.addContents(bowl);<br />}</p>
<p>I&#39;m not claiming this is perfect, but would be more in-line with a first phase refactoring:</p>
<p>1. Washing hands is a behaviour between the chef and sink. The details of which should not be exposed to the cheesecake.</p>
<p>2. The ingredients getting added to a bowl pushes the loop as a single operation into a single method.</p>
<p>3. Might as well move the construction of all the objects but allow them to be injected.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
