<?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: C# regions sure can be useless</title>
	<atom:link href="http://www.jeff.wilcox.name/2009/12/useless-cs-regions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/</link>
	<description>Silverlight, rich client apps and web development</description>
	<lastBuildDate>Fri, 30 Jul 2010 19:17:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Steve Crane</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2178</link>
		<dc:creator>Steve Crane</dc:creator>
		<pubDate>Tue, 05 Jan 2010 18:27:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2178</guid>
		<description>I&#039;ve come to feel the same way but sadly I&#039;m the lone voice on this in our company. My colleagues seem to feel that code is somehow less readable if not grouped in this way.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve come to feel the same way but sadly I&#8217;m the lone voice on this in our company. My colleagues seem to feel that code is somehow less readable if not grouped in this way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: federico corban</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2173</link>
		<dc:creator>federico corban</dc:creator>
		<pubDate>Tue, 05 Jan 2010 05:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2173</guid>
		<description>If you have enough different functionality in your classes that you can say you prefer &#039;grouping by functionality&#039; over regions, you are likely doing it wrong (unless you&#039;re _trying to do things procedurally).</description>
		<content:encoded><![CDATA[<p>If you have enough different functionality in your classes that you can say you prefer &#8216;grouping by functionality&#8217; over regions, you are likely doing it wrong (unless you&#8217;re _trying to do things procedurally).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tristan</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2165</link>
		<dc:creator>Tristan</dc:creator>
		<pubDate>Mon, 04 Jan 2010 17:26:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2165</guid>
		<description>I&#039;m a region lover, in the minority in my company, but I don&#039;t use them quite like this.

Having an ASCII comment then following with a named region violates the DRY principle. Regions are handy for improving readability around large or infrequently read code segments. Property getters, setters etc.

All personal style and little substantial difference either way.</description>
		<content:encoded><![CDATA[<p>I&#8217;m a region lover, in the minority in my company, but I don&#8217;t use them quite like this.</p>
<p>Having an ASCII comment then following with a named region violates the DRY principle. Regions are handy for improving readability around large or infrequently read code segments. Property getters, setters etc.</p>
<p>All personal style and little substantial difference either way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2159</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sat, 02 Jan 2010 18:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2159</guid>
		<description>Jeff,
Grid.cs sure looks bad with those regions there - no point in having them, in my opinion. (IDE should handle filtering members by visibility.)

I myself never use regions, unless the coding standard of my current employer says I must. That said, I am lucky enough to not be working on any UI components. All my classes are 300 lines max (that includes comments), and if they aren&#039;t at some point, I revisit the object model. (That obsession of mine does not always serve me well. It leads to overengineering sometimes.)</description>
		<content:encoded><![CDATA[<p>Jeff,<br />
Grid.cs sure looks bad with those regions there &#8211; no point in having them, in my opinion. (IDE should handle filtering members by visibility.)</p>
<p>I myself never use regions, unless the coding standard of my current employer says I must. That said, I am lucky enough to not be working on any UI components. All my classes are 300 lines max (that includes comments), and if they aren&#8217;t at some point, I revisit the object model. (That obsession of mine does not always serve me well. It leads to overengineering sometimes.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Marlowe</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2133</link>
		<dc:creator>Scott Marlowe</dc:creator>
		<pubDate>Sun, 27 Dec 2009 14:02:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2133</guid>
		<description>With you 100% on this. More often than not the first thing I have to do with a file like the one you showed is expand all the regions. Yeah, I know there&#039;s a keyboard shortcut to do that, but it&#039;s still a repetitive task I have to perform every time I open a source file. Just give me the code, I say. I don&#039;t need or want it hidden from me.</description>
		<content:encoded><![CDATA[<p>With you 100% on this. More often than not the first thing I have to do with a file like the one you showed is expand all the regions. Yeah, I know there&#8217;s a keyboard shortcut to do that, but it&#8217;s still a repetitive task I have to perform every time I open a source file. Just give me the code, I say. I don&#8217;t need or want it hidden from me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sync</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2127</link>
		<dc:creator>Michael Sync</dc:creator>
		<pubDate>Wed, 23 Dec 2009 02:42:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2127</guid>
		<description>NO. They are so useful for me (at least)..</description>
		<content:encoded><![CDATA[<p>NO. They are so useful for me (at least)..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jobi</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2126</link>
		<dc:creator>jobi</dc:creator>
		<pubDate>Wed, 23 Dec 2009 02:06:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2126</guid>
		<description>You said it.. 
    Yes it is completely useless way. What we want is a logical grouping instead of the most obvious grouping.</description>
		<content:encoded><![CDATA[<p>You said it..<br />
    Yes it is completely useless way. What we want is a logical grouping instead of the most obvious grouping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Brien</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2125</link>
		<dc:creator>Anthony Brien</dc:creator>
		<pubDate>Tue, 22 Dec 2009 19:45:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2125</guid>
		<description>I avoid regions as much as possible, and I also cringe each time I see them used to group by member type. They don&#039;t help me understand a class better, I use the navigation bar or Resharper for that. In fact, I think such organization actually make it harder to maintain a class, because related elements, like the fields, properties and methods that work together are guaranteed to be far apart in the code.

When a class becomes monstrous, it&#039;s usually a sign that its got too many responsibilities and needs to be split up. I do use regions to start splitting these huge classes into functionality groupings to help see how to eventually break up into multiple classes. I also like using regions to &quot;hide&quot; code that doesn&#039;t belong (patches), or generated code.</description>
		<content:encoded><![CDATA[<p>I avoid regions as much as possible, and I also cringe each time I see them used to group by member type. They don&#8217;t help me understand a class better, I use the navigation bar or Resharper for that. In fact, I think such organization actually make it harder to maintain a class, because related elements, like the fields, properties and methods that work together are guaranteed to be far apart in the code.</p>
<p>When a class becomes monstrous, it&#8217;s usually a sign that its got too many responsibilities and needs to be split up. I do use regions to start splitting these huge classes into functionality groupings to help see how to eventually break up into multiple classes. I also like using regions to &#8220;hide&#8221; code that doesn&#8217;t belong (patches), or generated code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Hare</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2070</link>
		<dc:creator>Jim Hare</dc:creator>
		<pubDate>Tue, 15 Dec 2009 22:29:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2070</guid>
		<description>I agree that regions are overused.  Do they have a point when used correctly?  Possibly, but they also add bloat to the code proper and can possibly drift out-of-sync with what they&#039;re supposed to &quot;compress&quot; visually.

I especially don&#039;t like it when regions are used to hide parts of a big method.  If he method is that big it should really get a refactoring.</description>
		<content:encoded><![CDATA[<p>I agree that regions are overused.  Do they have a point when used correctly?  Possibly, but they also add bloat to the code proper and can possibly drift out-of-sync with what they&#8217;re supposed to &#8220;compress&#8221; visually.</p>
<p>I especially don&#8217;t like it when regions are used to hide parts of a big method.  If he method is that big it should really get a refactoring.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shayla</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2068</link>
		<dc:creator>shayla</dc:creator>
		<pubDate>Tue, 15 Dec 2009 16:02:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2068</guid>
		<description>In the beginning I used regions completely incorrectly as well; I thought they were neat in concept, but I used them much like in your example.  I&#039;ve long since switched from that mentality, and I believe I now only have them in a few files [wrapping up long, operator overload functionality for example].

I do, however, split my code into private/public functionality sections.  I did this so that it&#039;s easy for me to just scroll through and see what I&#039;ve made publicly available from my control, instead of having to dig through the entire page through private functionality.</description>
		<content:encoded><![CDATA[<p>In the beginning I used regions completely incorrectly as well; I thought they were neat in concept, but I used them much like in your example.  I&#8217;ve long since switched from that mentality, and I believe I now only have them in a few files [wrapping up long, operator overload functionality for example].</p>
<p>I do, however, split my code into private/public functionality sections.  I did this so that it&#8217;s easy for me to just scroll through and see what I&#8217;ve made publicly available from my control, instead of having to dig through the entire page through private functionality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Bubriski</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2055</link>
		<dc:creator>John Bubriski</dc:creator>
		<pubDate>Sun, 13 Dec 2009 05:07:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2055</guid>
		<description>Like most optional things in programming, regions can be great as long as you keep them under control.  I use them frequently.  After I set up a bunch of properties, I usually don&#039;t need to see them again, so I wrap them in a region.  Then for the rest of the code, I usually group by functionality, like someone else said.  Then you don&#039;t have to kill your brain trying to remember what order things are in.  And no, my classes are not bloated, and do not need to be refactored :)

Tip: use the ctrl + m, ctrl o shortcut to minimize everything to regions/stubs.</description>
		<content:encoded><![CDATA[<p>Like most optional things in programming, regions can be great as long as you keep them under control.  I use them frequently.  After I set up a bunch of properties, I usually don&#8217;t need to see them again, so I wrap them in a region.  Then for the rest of the code, I usually group by functionality, like someone else said.  Then you don&#8217;t have to kill your brain trying to remember what order things are in.  And no, my classes are not bloated, and do not need to be refactored <img src='http://www.jeff.wilcox.name/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Tip: use the ctrl + m, ctrl o shortcut to minimize everything to regions/stubs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Sonmez</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2044</link>
		<dc:creator>John Sonmez</dc:creator>
		<pubDate>Sat, 12 Dec 2009 01:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2044</guid>
		<description>It comes down to this simple fact for me.  If your class is so large you are using regions and they are actually serving a useful purpose.  You are probably violating Single Responsibility Principle.</description>
		<content:encoded><![CDATA[<p>It comes down to this simple fact for me.  If your class is so large you are using regions and they are actually serving a useful purpose.  You are probably violating Single Responsibility Principle.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Echilon</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2042</link>
		<dc:creator>Echilon</dc:creator>
		<pubDate>Fri, 11 Dec 2009 20:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2042</guid>
		<description>I generally group by function performed - code to launch dialogs, code to do database stuff etc.</description>
		<content:encoded><![CDATA[<p>I generally group by function performed &#8211; code to launch dialogs, code to do database stuff etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2040</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Fri, 11 Dec 2009 16:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2040</guid>
		<description>I always love the debate around regions.  They do not affect performance.  They do not affect compiled file sizes (exe, dll).  You have the flexibility to arrange them any way you want (within the coding standards of your organization).  You even have the flexibility to not use them at all.  You are not going to convince people to use/not use/arrange region.  People who like them will use them. People whose organization requires them will use them.  People who don’t like them won’t use them.  I can’t believe that people can’t find real coding issues to debate….Irony I wasting time on a useless debate….I guess I had a few minutes to kill.</description>
		<content:encoded><![CDATA[<p>I always love the debate around regions.  They do not affect performance.  They do not affect compiled file sizes (exe, dll).  You have the flexibility to arrange them any way you want (within the coding standards of your organization).  You even have the flexibility to not use them at all.  You are not going to convince people to use/not use/arrange region.  People who like them will use them. People whose organization requires them will use them.  People who don’t like them won’t use them.  I can’t believe that people can’t find real coding issues to debate….Irony I wasting time on a useless debate….I guess I had a few minutes to kill.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sotto</title>
		<link>http://www.jeff.wilcox.name/2009/12/useless-cs-regions/comment-page-1/#comment-2037</link>
		<dc:creator>sotto</dc:creator>
		<pubDate>Fri, 11 Dec 2009 10:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeff.wilcox.name/2009/12/useless-cs-regions/#comment-2037</guid>
		<description>Let grouping like this be a feature of the IDE.

it doesn&#039;t matter what the file looks like, the ide can show it the way you like.

The only thing regions are usefull for now in VS, is that hey support collapsing the content.
I&#039;d much prefer indentation based collapsing.</description>
		<content:encoded><![CDATA[<p>Let grouping like this be a feature of the IDE.</p>
<p>it doesn&#8217;t matter what the file looks like, the ide can show it the way you like.</p>
<p>The only thing regions are usefull for now in VS, is that hey support collapsing the content.<br />
I&#8217;d much prefer indentation based collapsing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
