<?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: Coding: Why do we extract method?</title>
	<atom:link href="http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/</link>
	<description>Thoughts on Software Development</description>
	<lastBuildDate>Sat, 11 Feb 2012 23:17:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mwanji Ezana</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18374</link>
		<dc:creator>Mwanji Ezana</dc:creator>
		<pubDate>Sun, 07 Jun 2009 15:24:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18374</guid>
		<description>@Mark
&quot;I&#039;ve been wondering recently about the trade off between keeping code consistent with what&#039;s there and taking action which makes the code better in your mind but different to how things are done elsewhere.&quot;

I think you gave the solution in the previous paragraph: communicate with the team, expose the benefits, get the green light to try it in one area of the code and spread it virally from there.</description>
		<content:encoded><![CDATA[<p>@Mark<br />
&#8220;I&#8217;ve been wondering recently about the trade off between keeping code consistent with what&#8217;s there and taking action which makes the code better in your mind but different to how things are done elsewhere.&#8221;</p>
<p>I think you gave the solution in the previous paragraph: communicate with the team, expose the benefits, get the green light to try it in one area of the code and spread it virally from there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mwanji Ezana</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18373</link>
		<dc:creator>Mwanji Ezana</dc:creator>
		<pubDate>Sun, 07 Jun 2009 15:22:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18373</guid>
		<description>@Guoliang I think the same thing. It would be great if IDEs could show you the code of &quot;related methods&quot; without having to jump to it. Like peeking into the internals inline.

The simplest case is when you extract a few lines to a private method, where do you put it? At the end of the class, or next to the method that uses it? And what if a second method starts using the private one?

Source file declaration order doesn&#039;t matter for the compiler, it shouldn&#039;t matter for IDEs, either.</description>
		<content:encoded><![CDATA[<p>@Guoliang I think the same thing. It would be great if IDEs could show you the code of &#8220;related methods&#8221; without having to jump to it. Like peeking into the internals inline.</p>
<p>The simplest case is when you extract a few lines to a private method, where do you put it? At the end of the class, or next to the method that uses it? And what if a second method starts using the private one?</p>
<p>Source file declaration order doesn&#8217;t matter for the compiler, it shouldn&#8217;t matter for IDEs, either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guoliang Cao</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18318</link>
		<dc:creator>Guoliang Cao</dc:creator>
		<pubDate>Fri, 05 Jun 2009 12:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18318</guid>
		<description>Extract method is great. But how about better support of grouping methods in IDE and the language ? It&#039;s a pain to jump between 50 methods in one file.</description>
		<content:encoded><![CDATA[<p>Extract method is great. But how about better support of grouping methods in IDE and the language ? It&#8217;s a pain to jump between 50 methods in one file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18310</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Fri, 05 Jun 2009 06:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18310</guid>
		<description>@mike yeh they were covered by tests already.

@Ryan I guess if you get the chance to work together on some code with the Tech Lead that might be a good chance to try out some of the refactorings that you want to do and see what they think.

I&#039;ve been wondering recently about the trade off between keeping code consistent with what&#039;s there and taking action which makes the code better in your mind but different to how things are done elsewhere.</description>
		<content:encoded><![CDATA[<p>@mike yeh they were covered by tests already.</p>
<p>@Ryan I guess if you get the chance to work together on some code with the Tech Lead that might be a good chance to try out some of the refactorings that you want to do and see what they think.</p>
<p>I&#8217;ve been wondering recently about the trade off between keeping code consistent with what&#8217;s there and taking action which makes the code better in your mind but different to how things are done elsewhere.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Needham</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18309</link>
		<dc:creator>Mark Needham</dc:creator>
		<pubDate>Fri, 05 Jun 2009 06:00:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18309</guid>
		<description>@Kamal - sorry probably not explained too clearly. I meant my colleague noticed the code was in the wrong place due to the fact that us extracting the method had made it more obvious.</description>
		<content:encoded><![CDATA[<p>@Kamal &#8211; sorry probably not explained too clearly. I meant my colleague noticed the code was in the wrong place due to the fact that us extracting the method had made it more obvious.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kamal</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18306</link>
		<dc:creator>Kamal</dc:creator>
		<pubDate>Fri, 05 Jun 2009 04:37:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18306</guid>
		<description>// Later on another colleague passed by and saw us looking at this method and pointed out that it was wrong that we were launching the client from inside this method and had probably been added into that method by mistake!

I&#039;m not quite sure why your friend said that extracting this method was wrong?</description>
		<content:encoded><![CDATA[<p>// Later on another colleague passed by and saw us looking at this method and pointed out that it was wrong that we were launching the client from inside this method and had probably been added into that method by mistake!</p>
<p>I&#8217;m not quite sure why your friend said that extracting this method was wrong?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18299</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 04 Jun 2009 20:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18299</guid>
		<description>I use extract method regularly during refactoring typically to help express intent/make it more readable and keeping everything at the same level of abstraction. I find this greatly helps me understand what a class is doing and keep its responsibility focused. Recently I was told by our tech lead that my code is hard to understand because too many classes and methods. I stated the reasons why I prefer small methods and classes. He seemed unmoved, how would you go about trying to show the benefits of extracting methods?</description>
		<content:encoded><![CDATA[<p>I use extract method regularly during refactoring typically to help express intent/make it more readable and keeping everything at the same level of abstraction. I find this greatly helps me understand what a class is doing and keep its responsibility focused. Recently I was told by our tech lead that my code is hard to understand because too many classes and methods. I stated the reasons why I prefer small methods and classes. He seemed unmoved, how would you go about trying to show the benefits of extracting methods?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18293</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Thu, 04 Jun 2009 16:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18293</guid>
		<description>I wonder how r u test driving those refactors ... or if they r simply refactors already covered by tests

cheers
mike</description>
		<content:encoded><![CDATA[<p>I wonder how r u test driving those refactors &#8230; or if they r simply refactors already covered by tests</p>
<p>cheers<br />
mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mwanji Ezana</title>
		<link>http://www.markhneedham.com/blog/2009/06/04/coding-why-do-we-extract-method/comment-page-1/#comment-18289</link>
		<dc:creator>Mwanji Ezana</dc:creator>
		<pubDate>Thu, 04 Jun 2009 14:40:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.markhneedham.com/blog/?p=1297#comment-18289</guid>
		<description>Yeah, I love SLAP/Composed Method/extract method, too.

Another benefit, extending your last point, is that it makes it easier to identify groups of methods that should be moved into their own class.</description>
		<content:encoded><![CDATA[<p>Yeah, I love SLAP/Composed Method/extract method, too.</p>
<p>Another benefit, extending your last point, is that it makes it easier to identify groups of methods that should be moved into their own class.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

