<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for public abstract string[] Blog()</title>
	<atom:link href="http://extractmethod.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://extractmethod.wordpress.com</link>
	<description>Wandering the Internet is search of better code and coding techniques</description>
	<lastBuildDate>Tue, 06 Oct 2009 12:29:49 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Just say No! to C# Regions by Andy</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-96</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 06 Oct 2009 12:29:49 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-96</guid>
		<description>An interesting read, and while some things doe with regions are stupid, there are some uses to them too (like everything really).

I wrote a follow up here about it:
http://www.stormbase.net/region-hate</description>
		<content:encoded><![CDATA[<p>An interesting read, and while some things doe with regions are stupid, there are some uses to them too (like everything really).</p>
<p>I wrote a follow up here about it:<br />
<a href="http://www.stormbase.net/region-hate" rel="nofollow">http://www.stormbase.net/region-hate</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by Michel</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-92</link>
		<dc:creator>Michel</dc:creator>
		<pubDate>Wed, 10 Jun 2009 18:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-92</guid>
		<description>In my experience, despite all philosophy and all wonderful world perfect code talk, when you have lots of developers working on the same code and probably writing not so beautiful code, the regions can help to put some order in the chaos.
Sometimes we need to look at the bad code and live with that for a while or anybody has plenty of time for refactoring?</description>
		<content:encoded><![CDATA[<p>In my experience, despite all philosophy and all wonderful world perfect code talk, when you have lots of developers working on the same code and probably writing not so beautiful code, the regions can help to put some order in the chaos.<br />
Sometimes we need to look at the bad code and live with that for a while or anybody has plenty of time for refactoring?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by Hendrik</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-90</link>
		<dc:creator>Hendrik</dc:creator>
		<pubDate>Tue, 09 Jun 2009 12:08:36 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-90</guid>
		<description>Regions are BAD!!!

For around 5 years I used to enjoy meticulously organising every code file into regions. Even my elborate report methods had regions for &quot;create report&quot;, &quot;create headings&quot;, &quot;create totals&quot; etc.

Then I saw the light...

These days, there is no greater irritant to me than opening a fellow developers code file and see a closed bunch of regions.

I believe that any code group not visible in one screen is generally bad design.

When all my properties, constructors and methods collapsed, is not visible on one page - likely my class is doing more than one thing.

If my method&#039;s longer than 10-15 lines of code, it&#039;s 99% of the time bad design. Time to freshen it up!

There are exceptions to every rule, but the last time I used a region was for a very bad 100 option switch statement. A delegate dictionary built from an embedded resource text file sorted that one into very elegant code.

There is always a solution to keep code short and simple, without resorting to regions.</description>
		<content:encoded><![CDATA[<p>Regions are BAD!!!</p>
<p>For around 5 years I used to enjoy meticulously organising every code file into regions. Even my elborate report methods had regions for &#8220;create report&#8221;, &#8220;create headings&#8221;, &#8220;create totals&#8221; etc.</p>
<p>Then I saw the light&#8230;</p>
<p>These days, there is no greater irritant to me than opening a fellow developers code file and see a closed bunch of regions.</p>
<p>I believe that any code group not visible in one screen is generally bad design.</p>
<p>When all my properties, constructors and methods collapsed, is not visible on one page &#8211; likely my class is doing more than one thing.</p>
<p>If my method&#8217;s longer than 10-15 lines of code, it&#8217;s 99% of the time bad design. Time to freshen it up!</p>
<p>There are exceptions to every rule, but the last time I used a region was for a very bad 100 option switch statement. A delegate dictionary built from an embedded resource text file sorted that one into very elegant code.</p>
<p>There is always a solution to keep code short and simple, without resorting to regions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by Mark</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-87</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Thu, 07 May 2009 14:26:36 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-87</guid>
		<description>Wow...  This dude probably never worked in an enviorment with multiple programmers.  Regions are handy, messy code or not.  Regions are beneficial, use them or don&#039;t. They make code easier to read and troubleshoot.  

This article is somewhat asinine.</description>
		<content:encoded><![CDATA[<p>Wow&#8230;  This dude probably never worked in an enviorment with multiple programmers.  Regions are handy, messy code or not.  Regions are beneficial, use them or don&#8217;t. They make code easier to read and troubleshoot.  </p>
<p>This article is somewhat asinine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by Florian Haag</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-86</link>
		<dc:creator>Florian Haag</dc:creator>
		<pubDate>Wed, 06 May 2009 12:54:39 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-86</guid>
		<description>Hi, I&#039;d like to state that I do consider #region a good way to topically structure your code.

First of all, regions are not despicable because they group code only along one dimension - all of our structures do this. You can put your properties into business-related objects (car, plane) and might thereby lose the grouping by subsystem (images, sounds) or you group them into subsystem objects and thereby lose the connection to business objects.

I would like to remind some of the commenters here that OOP is not only about tearing code apart into tiny rags, but also about grouping things. At some point, you&#039;ll have to connect different parts of your code and 100 classes with two methods each are simply not any better than two classes with 100 methods each. You could even argue that while an oversized class at least gives you a list of all methods you can search through, you are absolutely at a loss once you have to navigate through an unknown 10-leveled object hierarchy because everything had to be broken down into tiniest bits.

The goal should always be a fair balance between modularity and maintaining the class landscape in a way that other developers can still grasp it without memorizing hundreds of interconnected classes. This means, the size and the complexity of the resulting modules always has to be considered, too. Take, for example, the code snippet provided above by Blub:

#region rendering stuff
private void RenderX()
{…}
public void RenderY()
{…}
#endregion
#region sound stuff
private void PlaySoundX()
{…}
public void PlaySoundY()
{…}
#endregion

He or she claims that this is bad code and must be refactored. I tend to disagree. Without knowing what the rest of the class as well as the implementations of these methods look like, I can imagine situations both where a refactoring is badly needed as well as where a refactoring would not be any helpful.
The need or willingness to categorize need not even mean many lines of code. 30 lines can perfectly contain six methods which logically belong directly to the containing class, yet which for another reason - &quot;along another dimension&quot; - can be categorized into two groups.
I would like to ask the author of the comment for a more complete example here.

It has been frequently mentioned that if a class gets too long, it should be broken down into several pieces. Truly, often there is no choice about the length. Once you implement a somewhat bigger interface such as System.Collections.Generic.IList, your class will inevitably have many methods. If you only offer read-only access, half of them will only throw NotSupportedExceptions, so these methods are not needed, but have to be there. While this may still be attributed to bad design of the System.Collections.Generic namespace, where interfaces such as IList should inherit from others that only feature the respective read-only members, you again get many methods once you implement IList more than once (for different Ts).
For your information, I do consider it definitely good practice to add as much support for standard interfaces, wherever possible.

One last issue I found somewhat funny in the above comments is when some commenters stated that &quot;regions are bad because you can do the same thing with partial classes&quot;. If you condemn regions for their capabilities of hiding (too) large blocks of code and leading to huge classes, wouldn&#039;t partial classes be even worse? Not only do they put the &quot;hidden&quot; code completely out of sight of the programmer - as opposed to regions, which are still in the same file (and editor tab) -, they even lead to the creation of seemingly well-structured units (a collection of similarly-sized files) at design time, yet the compiled result will be a huge class again.
In fact, partial classes are just another organizational level which has no further significance for the compiler, right above the region level.

As a conclusion, while regions can of course be misused - as about any other language feature -, I cannot agree with the statement that they are generally the reason or a signal for bad code.</description>
		<content:encoded><![CDATA[<p>Hi, I&#8217;d like to state that I do consider #region a good way to topically structure your code.</p>
<p>First of all, regions are not despicable because they group code only along one dimension &#8211; all of our structures do this. You can put your properties into business-related objects (car, plane) and might thereby lose the grouping by subsystem (images, sounds) or you group them into subsystem objects and thereby lose the connection to business objects.</p>
<p>I would like to remind some of the commenters here that OOP is not only about tearing code apart into tiny rags, but also about grouping things. At some point, you&#8217;ll have to connect different parts of your code and 100 classes with two methods each are simply not any better than two classes with 100 methods each. You could even argue that while an oversized class at least gives you a list of all methods you can search through, you are absolutely at a loss once you have to navigate through an unknown 10-leveled object hierarchy because everything had to be broken down into tiniest bits.</p>
<p>The goal should always be a fair balance between modularity and maintaining the class landscape in a way that other developers can still grasp it without memorizing hundreds of interconnected classes. This means, the size and the complexity of the resulting modules always has to be considered, too. Take, for example, the code snippet provided above by Blub:</p>
<p>#region rendering stuff<br />
private void RenderX()<br />
{…}<br />
public void RenderY()<br />
{…}<br />
#endregion<br />
#region sound stuff<br />
private void PlaySoundX()<br />
{…}<br />
public void PlaySoundY()<br />
{…}<br />
#endregion</p>
<p>He or she claims that this is bad code and must be refactored. I tend to disagree. Without knowing what the rest of the class as well as the implementations of these methods look like, I can imagine situations both where a refactoring is badly needed as well as where a refactoring would not be any helpful.<br />
The need or willingness to categorize need not even mean many lines of code. 30 lines can perfectly contain six methods which logically belong directly to the containing class, yet which for another reason &#8211; &#8220;along another dimension&#8221; &#8211; can be categorized into two groups.<br />
I would like to ask the author of the comment for a more complete example here.</p>
<p>It has been frequently mentioned that if a class gets too long, it should be broken down into several pieces. Truly, often there is no choice about the length. Once you implement a somewhat bigger interface such as System.Collections.Generic.IList, your class will inevitably have many methods. If you only offer read-only access, half of them will only throw NotSupportedExceptions, so these methods are not needed, but have to be there. While this may still be attributed to bad design of the System.Collections.Generic namespace, where interfaces such as IList should inherit from others that only feature the respective read-only members, you again get many methods once you implement IList more than once (for different Ts).<br />
For your information, I do consider it definitely good practice to add as much support for standard interfaces, wherever possible.</p>
<p>One last issue I found somewhat funny in the above comments is when some commenters stated that &#8220;regions are bad because you can do the same thing with partial classes&#8221;. If you condemn regions for their capabilities of hiding (too) large blocks of code and leading to huge classes, wouldn&#8217;t partial classes be even worse? Not only do they put the &#8220;hidden&#8221; code completely out of sight of the programmer &#8211; as opposed to regions, which are still in the same file (and editor tab) -, they even lead to the creation of seemingly well-structured units (a collection of similarly-sized files) at design time, yet the compiled result will be a huge class again.<br />
In fact, partial classes are just another organizational level which has no further significance for the compiler, right above the region level.</p>
<p>As a conclusion, while regions can of course be misused &#8211; as about any other language feature -, I cannot agree with the statement that they are generally the reason or a signal for bad code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by Matt</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-85</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Tue, 05 May 2009 14:57:59 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-85</guid>
		<description>Disagree, completely.</description>
		<content:encoded><![CDATA[<p>Disagree, completely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by Ed</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-84</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Fri, 01 May 2009 16:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-84</guid>
		<description>Wow, what a picky ass article! I agree I have seen a fair use of inappropriate region use but dropping regions all together is just plain stupid when you write huge programs.
I write games in XNA game studio in C# and regions help to group things together in classes. One region contains the methods for loading and drawing the games sprites (graphics) while another contains the code for setting up the game&#039;s interface and loading the appropriate settings.</description>
		<content:encoded><![CDATA[<p>Wow, what a picky ass article! I agree I have seen a fair use of inappropriate region use but dropping regions all together is just plain stupid when you write huge programs.<br />
I write games in XNA game studio in C# and regions help to group things together in classes. One region contains the methods for loading and drawing the games sprites (graphics) while another contains the code for setting up the game&#8217;s interface and loading the appropriate settings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by sth_Weird</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-83</link>
		<dc:creator>sth_Weird</dc:creator>
		<pubDate>Tue, 21 Apr 2009 10:03:10 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-83</guid>
		<description>I love regions, I wish other programming languages had them. Of course they can be used to hide bad code. But that&#039;s not what they are supposed to be used for. In real life you can use boxes to sort your things or you can use them to to just stuff anything in them you quickly want to hide from view. Do you say we should not use boxes, just because some people use them the wrong way? 
They are a great way to organize you code. I love grouping my code with them, I like regions for my declarations, constructors, functions, properties,...of course I could use partial classes, but I do not want to jump from one file to another, or have hundreds of files for one class. And sometimes when you have a complex program you have a lot of code. Yeah you can always try to put parts of it in different classes, but if it all belongs together and you have to share variables you&#039;ll have to put loads of paramters into the external classes, and once again you multiply the number of files (sure, that looks very impressive!). Don&#039;t get me wrong, I hate unstructured code, I do not like it when people put it all in one class when it is crystal clear that parts of the code could be reused.
BUT classes should be used for this and this only and not to make code easier to read. That&#039;s what comments and regions are for!</description>
		<content:encoded><![CDATA[<p>I love regions, I wish other programming languages had them. Of course they can be used to hide bad code. But that&#8217;s not what they are supposed to be used for. In real life you can use boxes to sort your things or you can use them to to just stuff anything in them you quickly want to hide from view. Do you say we should not use boxes, just because some people use them the wrong way?<br />
They are a great way to organize you code. I love grouping my code with them, I like regions for my declarations, constructors, functions, properties,&#8230;of course I could use partial classes, but I do not want to jump from one file to another, or have hundreds of files for one class. And sometimes when you have a complex program you have a lot of code. Yeah you can always try to put parts of it in different classes, but if it all belongs together and you have to share variables you&#8217;ll have to put loads of paramters into the external classes, and once again you multiply the number of files (sure, that looks very impressive!). Don&#8217;t get me wrong, I hate unstructured code, I do not like it when people put it all in one class when it is crystal clear that parts of the code could be reused.<br />
BUT classes should be used for this and this only and not to make code easier to read. That&#8217;s what comments and regions are for!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by Valamas</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-82</link>
		<dc:creator>Valamas</dc:creator>
		<pubDate>Mon, 20 Apr 2009 00:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-82</guid>
		<description>-- REGION REMOVE MACRO IS HERE --
Map this baby as an icon on your visual studio toolbar.

Sub ClearRegions()
    DTE.Find.Action = vsFindAction.vsFindActionReplaceAll
    DTE.Find.FindWhat = &quot;^:b*\#region.*\n&quot;
    DTE.Find.ReplaceWith = &quot;&quot;
    DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
    DTE.Find.MatchCase = False
    DTE.Find.MatchWholeWord = False
    DTE.Find.MatchInHiddenText = True
    DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxRegExpr
    DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone
    DTE.Find.Action = vsFindAction.vsFindActionReplaceAll
    DTE.Find.Execute()

    DTE.Find.FindWhat = &quot;^:b*\#end region.*\n&quot;
    DTE.Find.ReplaceWith = &quot;&quot;
    DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
    DTE.Find.MatchCase = False
    DTE.Find.MatchWholeWord = False
    DTE.Find.MatchInHiddenText = True
    DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxRegExpr
    DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone
    DTE.Find.Action = vsFindAction.vsFindActionReplaceAll
    DTE.Find.Execute()
End Sub</description>
		<content:encoded><![CDATA[<p>&#8211; REGION REMOVE MACRO IS HERE &#8211;<br />
Map this baby as an icon on your visual studio toolbar.</p>
<p>Sub ClearRegions()<br />
    DTE.Find.Action = vsFindAction.vsFindActionReplaceAll<br />
    DTE.Find.FindWhat = &#8220;^:b*\#region.*\n&#8221;<br />
    DTE.Find.ReplaceWith = &#8220;&#8221;<br />
    DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument<br />
    DTE.Find.MatchCase = False<br />
    DTE.Find.MatchWholeWord = False<br />
    DTE.Find.MatchInHiddenText = True<br />
    DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxRegExpr<br />
    DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone<br />
    DTE.Find.Action = vsFindAction.vsFindActionReplaceAll<br />
    DTE.Find.Execute()</p>
<p>    DTE.Find.FindWhat = &#8220;^:b*\#end region.*\n&#8221;<br />
    DTE.Find.ReplaceWith = &#8220;&#8221;<br />
    DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument<br />
    DTE.Find.MatchCase = False<br />
    DTE.Find.MatchWholeWord = False<br />
    DTE.Find.MatchInHiddenText = True<br />
    DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxRegExpr<br />
    DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone<br />
    DTE.Find.Action = vsFindAction.vsFindActionReplaceAll<br />
    DTE.Find.Execute()<br />
End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Just say No! to C# Regions by Gary Woodfine</title>
		<link>http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-81</link>
		<dc:creator>Gary Woodfine</dc:creator>
		<pubDate>Sun, 19 Apr 2009 20:38:58 +0000</pubDate>
		<guid isPermaLink="false">http://extractmethod.wordpress.com/2008/02/29/just-say-no-to-c-regions/#comment-81</guid>
		<description>wow , I would say the you have some real issues with regions. I am pretty ambivalent to them really, if they are there I deal with, if they&#039;re not I deal with it.  I can&#039;t say I have spent much time really worrying about them. 
They&#039;re like eveything in your tool set, they have to purpose and place in life.</description>
		<content:encoded><![CDATA[<p>wow , I would say the you have some real issues with regions. I am pretty ambivalent to them really, if they are there I deal with, if they&#8217;re not I deal with it.  I can&#8217;t say I have spent much time really worrying about them.<br />
They&#8217;re like eveything in your tool set, they have to purpose and place in life.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
