<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Andy Palmer - Latest Comments in Refactoring / Design: Composed Method</title><link>http://andypalmer.disqus.com/</link><description></description><atom:link href="https://andypalmer.disqus.com/refactoring_design_composed_method/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Fri, 11 Nov 2011 17:30:05 -0000</lastBuildDate><item><title>Re: Refactoring / Design: Composed Method</title><link>http://andypalmer.com/2008/02/refactoring-design-composed-method/#comment-6415940370</link><description>&lt;p&gt;The stand itself is composed of two recycled plastic clips that are designed to connect to each other when not in use. The clips themselves come in either ...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lovegra</dc:creator><pubDate>Fri, 11 Nov 2011 17:30:05 -0000</pubDate></item><item><title>Re: Refactoring / Design: Composed Method</title><link>http://andypalmer.com/2008/02/refactoring-design-composed-method/#comment-9117632</link><description>&lt;p&gt;That'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;&lt;br&gt;I rolled up the "how we wash our hands" into a "what are we doing?" washHands method.&lt;br&gt;&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'll get there eventually :-)&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andy</dc:creator><pubDate>Tue, 12 Aug 2008 14:58:00 -0000</pubDate></item><item><title>Re: Refactoring / Design: Composed Method</title><link>http://andypalmer.com/2008/02/refactoring-design-composed-method/#comment-9117631</link><description>&lt;p&gt;I'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'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;&lt;br&gt;public makeBase(Ingredients... ingredients) {&lt;br&gt;&lt;br&gt;    chef.washHandsIn(sink);&lt;br&gt;&lt;br&gt;    bowl.add(ingredients);&lt;br&gt;&lt;br&gt;    chef.mixIngredientsOf(bowl);  &lt;br&gt;&lt;br&gt;    cake.addContents(bowl);&lt;br&gt;&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;I'm not claiming this is perfect, but would be more in-line with a first phase refactoring:&lt;br&gt;&lt;br&gt;&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;&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;&lt;br&gt;&lt;br&gt;3. Might as well move the construction of all the objects but allow them to be injected.&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kris</dc:creator><pubDate>Sun, 10 Aug 2008 19:10:00 -0000</pubDate></item></channel></rss>