<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx</link><description>I'm still struggling away with my book, and was wondering what you thought about this analogy. I am referring to the problem of testing private\public method, and in that regard I refer to the ease of changeability of private vs. public methods and the</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5629400</link><pubDate>Mon, 21 Jan 2008 13:14:41 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5629400</guid><dc:creator>Colin Jack</dc:creator><author>Colin Jack</author><description>&lt;p&gt;Didn&amp;#39;t read all the comments but I agree with Casey Barton in that its about the visibility rather than the size of the change and so the analogy doesn&amp;#39;t work for me.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5629400" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5624421</link><pubDate>Sun, 20 Jan 2008 13:37:09 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5624421</guid><dc:creator>flipdoubt</dc:creator><author>flipdoubt</author><description>&lt;p&gt;Refactoring private methods is like repairing or replacing old, faulty plumbing with new stuff. Refactoring public methods is like getting a new sink and faucet.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5624421" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5608344</link><pubDate>Wed, 16 Jan 2008 09:57:59 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5608344</guid><dc:creator>dotan</dc:creator><author>dotan</author><description>&lt;p&gt;changing a private method is like dealing with YOUR privates: wearing boxers instead of tanga. it makes you feel better (to some) and people can tell only by the look on your face :).&lt;/p&gt;
&lt;p&gt;changing a public method is wearing a different coat, having a different hairstyle.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5608344" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5605557</link><pubDate>Tue, 15 Jan 2008 20:06:05 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5605557</guid><dc:creator>Helen</dc:creator><author>Helen</author><description>&lt;p&gt;Changing a private method is like redecorating your house. Changing a public method is like pulling down the walls. &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5605557" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5601500</link><pubDate>Mon, 14 Jan 2008 09:36:21 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5601500</guid><dc:creator>Alex McMahon</dc:creator><author>Alex McMahon</author><description>&lt;p&gt;I think it is important that the analogy portray the importance of contracts. &lt;/p&gt;
&lt;p&gt;So changing a public method is like changing your contract/SLA with a supplier, e.g. Time from order to delivery must be less than 3 days.&lt;/p&gt;
&lt;p&gt;Whereas changing a private method is like being overly interested in how the supplier meets that contract, e.g. Trying to make the delivery driver go a particular route to the delivery location.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5601500" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5601472</link><pubDate>Mon, 14 Jan 2008 09:16:40 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5601472</guid><dc:creator>Steven Kelly</dc:creator><author>Steven Kelly</author><description>&lt;p&gt;Maybe you&amp;#39;re in danger of seeing things from the perspective of an author not a reader? An analogy tries to explain a situation unfamiliar to the audience by comparing it to a situation they are familiar with. For you, the topic of writing is obviously relevant and familiar, but probably not so much for the readers. They&amp;#39;re already more familiar with refactoring than writing. Actually, your analogy might be turned round to become a great way to explain good writing practices to software developers!&lt;/p&gt;
&lt;p&gt;One way to look at the public/private difference, at least when it involves method name changes, is that refactoring a public method is like changing your phone number, whereas refactoring a private method is like changing your phone. Or then moving house vs. redecorating.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5601472" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5599780</link><pubDate>Sun, 13 Jan 2008 19:28:17 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5599780</guid><dc:creator>Neal Blomfield</dc:creator><author>Neal Blomfield</author><description>&lt;p&gt;Refactoring a public method is like changing your shirt - everyone who can see you can see you have changed your shirt.&lt;/p&gt;
&lt;p&gt;Refactoring a private method is like changing your underwear - you know you have done it, no-one else does (hopefully!).&lt;/p&gt;
&lt;p&gt;=)&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5599780" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5598897</link><pubDate>Sun, 13 Jan 2008 13:46:28 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5598897</guid><dc:creator>Michael Dorfman</dc:creator><author>Michael Dorfman</author><description>&lt;p&gt;I was going to say that refactoring a private method is like redecorating your house, and changing a public method is like repaving the sidewalk in front of your house-- but I think the grocery store analogy suggested by Andy Sherwood above is probably better.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5598897" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5596539</link><pubDate>Sun, 13 Jan 2008 00:59:14 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5596539</guid><dc:creator>Kyralessa</dc:creator><author>Kyralessa</author><description>&lt;p&gt;I like the name analogy above. &amp;nbsp;Refactoring private methods is like telling someone to call you by your nickname; refactoring public methods is like legally changing your name.&lt;/p&gt;
&lt;p&gt;Still, why is an analogy needed? &amp;nbsp;Is it really that difficult a concept?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5596539" width="1" height="1"&gt;</description></item><item><title>re: Refactoring private methods is like...?</title><link>http://weblogs.asp.net/rosherove/archive/2008/01/12/refactoring-private-methods-is-like.aspx#5596460</link><pubDate>Sun, 13 Jan 2008 00:35:56 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:5596460</guid><dc:creator>Addy Santo</dc:creator><author>Addy Santo</author><description>&lt;p&gt;Yeah, the car analogy work better (who cares about chapter titles anyway, other than the author?)&lt;/p&gt;
&lt;p&gt;Changing a private method is like rearranging something in the engine or the chassis; changing a public method is like rearranging the dashboard or pedals.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=5596460" width="1" height="1"&gt;</description></item></channel></rss>