<?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 C# in Style</title>
	<atom:link href="http://lostechies.com/colinramsay/2007/09/25/coding-in-style/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Wed, 27 May 2009 23:01:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: James Nies</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-11</link>
		<dc:creator>James Nies</dc:creator>
		<pubDate>Sun, 08 Jun 2008 19:17:48 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-11</guid>
		<description>Great post Colin!  I too am very particular about code arrangement and style.

Several years ago I had gone so far as to write a VS macro to help my team and I keep a large C# codebase &quot;clean&quot; (members grouped in regions, sorted, etc.).  For something that had just been thrown together in my spare time, it seemed to have a very positive impact on our productivity.  However, after moving on to a different project, I soon realized that my macro would need a lot of work to match the style conventions of any other team.  

Thus, I set out to create a tool that was configurable and didn&#039;t rely on the Visual Studio FileCodeModel.  I&#039;ve never used ReSharper or it&#039;s Type Members Layout feature, but believe my tool is very similar in concept (i.e. uses an XML configuration to define the code layout).

NArrange is open source and you can check it out at: http://narrange.sourceforge.net

Looking forward to any feedback...</description>
		<content:encoded><![CDATA[<p>Great post Colin!  I too am very particular about code arrangement and style.</p>
<p>Several years ago I had gone so far as to write a VS macro to help my team and I keep a large C# codebase &#8220;clean&#8221; (members grouped in regions, sorted, etc.).  For something that had just been thrown together in my spare time, it seemed to have a very positive impact on our productivity.  However, after moving on to a different project, I soon realized that my macro would need a lot of work to match the style conventions of any other team.  </p>
<p>Thus, I set out to create a tool that was configurable and didn&#8217;t rely on the Visual Studio FileCodeModel.  I&#8217;ve never used ReSharper or it&#8217;s Type Members Layout feature, but believe my tool is very similar in concept (i.e. uses an XML configuration to define the code layout).</p>
<p>NArrange is open source and you can check it out at: <a href="http://narrange.sourceforge.net" rel="nofollow">http://narrange.sourceforge.net</a></p>
<p>Looking forward to any feedback&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ed</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-10</link>
		<dc:creator>Ed</dc:creator>
		<pubDate>Mon, 21 Apr 2008 08:29:45 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-10</guid>
		<description>We follow the Juval Lowy standard, with the exception of not prefixing our fields with the Hungarian notification m_ (just _ )

http://idesign.net/idesign/download/IDesign%20CSharp%20Coding%20Standard.zip</description>
		<content:encoded><![CDATA[<p>We follow the Juval Lowy standard, with the exception of not prefixing our fields with the Hungarian notification m_ (just _ )</p>
<p><a href="http://idesign.net/idesign/download/IDesign%20CSharp%20Coding%20Standard.zip" rel="nofollow">http://idesign.net/idesign/download/IDesign%20CSharp%20Coding%20Standard.zip</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Ocampo</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-9</link>
		<dc:creator>Joe Ocampo</dc:creator>
		<pubDate>Wed, 26 Sep 2007 19:29:18 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-9</guid>
		<description>@Joey

I call.  :-)</description>
		<content:encoded><![CDATA[<p>@Joey</p>
<p>I call.  <img src='http://lostechies.com/colinramsay/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joeyDotNet</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-8</link>
		<dc:creator>joeyDotNet</dc:creator>
		<pubDate>Wed, 26 Sep 2007 10:21:44 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-8</guid>
		<description>I would agree that too many regions generally point to a smell.  I used to be emphatic about regionizing all of my code.  But now I just let ReSharper 3 (defaults) do everything for me.  Less I have to worry about.

Oh, and I dropped the &quot;_&quot;&#039;s from my private variables over a year ago.  With tools like R# that can color code your private variables different from method parameters and local variables, I don&#039;t really see the need in using the extra noise of underscores.  But of course, like most things, it&#039;s all about personal/team preference.

Bottom line, before I had ReSharper I was absolutely obsessed with keeping my code perfectly organized, but now it &quot;just happens&quot; for me, leaving me to worry about more important things.

Thank you JetBrains!!!

(I&#039;ll up the ante and say that&#039;s my .10)  ;)</description>
		<content:encoded><![CDATA[<p>I would agree that too many regions generally point to a smell.  I used to be emphatic about regionizing all of my code.  But now I just let ReSharper 3 (defaults) do everything for me.  Less I have to worry about.</p>
<p>Oh, and I dropped the &#8220;_&#8221;&#8216;s from my private variables over a year ago.  With tools like R# that can color code your private variables different from method parameters and local variables, I don&#8217;t really see the need in using the extra noise of underscores.  But of course, like most things, it&#8217;s all about personal/team preference.</p>
<p>Bottom line, before I had ReSharper I was absolutely obsessed with keeping my code perfectly organized, but now it &#8220;just happens&#8221; for me, leaving me to worry about more important things.</p>
<p>Thank you JetBrains!!!</p>
<p>(I&#8217;ll up the ante and say that&#8217;s my .10)  <img src='http://lostechies.com/colinramsay/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-7</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Wed, 26 Sep 2007 09:08:28 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-7</guid>
		<description>Thanks for the tip on the XML layout -- I wasn&#039;t aware you could do that,.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip on the XML layout &#8212; I wasn&#8217;t aware you could do that,.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cramsay</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-6</link>
		<dc:creator>cramsay</dc:creator>
		<pubDate>Wed, 26 Sep 2007 08:00:15 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-6</guid>
		<description>I know what you&#039;re saying Joe, and I kind of agree. But regions don&#039;t make code bad, it&#039;s just that too many could be a reflection that you&#039;ve got issues somewhere. I tend to just have them there to group my main constructs - fields, methods, etc - together, and no more. On rare occasions I&#039;ve found myself thinking of using nested regions and it&#039;s then I know I&#039;m in trouble.</description>
		<content:encoded><![CDATA[<p>I know what you&#8217;re saying Joe, and I kind of agree. But regions don&#8217;t make code bad, it&#8217;s just that too many could be a reflection that you&#8217;ve got issues somewhere. I tend to just have them there to group my main constructs &#8211; fields, methods, etc &#8211; together, and no more. On rare occasions I&#8217;ve found myself thinking of using nested regions and it&#8217;s then I know I&#8217;m in trouble.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Ocampo</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-5</link>
		<dc:creator>Joe Ocampo</dc:creator>
		<pubDate>Wed, 26 Sep 2007 02:51:51 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-5</guid>
		<description>I have a concern with this statement, 

&quot;...and seeing reams of code is a surefire way to make me dismay.&quot;

Jason eluded that regions tend to hide technical dept. This is occurring because of low cohesion and solubility. This is a code smell.  

Look for orthogonal constructs within the object where behavior can be refactored into other objects.  The will lead to a more supple design.

my two cents.  OK maybe a nickel.  :-)
</description>
		<content:encoded><![CDATA[<p>I have a concern with this statement, </p>
<p>&#8220;&#8230;and seeing reams of code is a surefire way to make me dismay.&#8221;</p>
<p>Jason eluded that regions tend to hide technical dept. This is occurring because of low cohesion and solubility. This is a code smell.  </p>
<p>Look for orthogonal constructs within the object where behavior can be refactored into other objects.  The will lead to a more supple design.</p>
<p>my two cents.  OK maybe a nickel.  <img src='http://lostechies.com/colinramsay/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Meridth</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-4</link>
		<dc:creator>Jason Meridth</dc:creator>
		<pubDate>Wed, 26 Sep 2007 02:12:53 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-4</guid>
		<description>Wow.  Drifting at 10pm.  I need sleep. I meant constants not contacts.</description>
		<content:encoded><![CDATA[<p>Wow.  Drifting at 10pm.  I need sleep. I meant constants not contacts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason Meridth</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-3</link>
		<dc:creator>Jason Meridth</dc:creator>
		<pubDate>Wed, 26 Sep 2007 02:08:49 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-3</guid>
		<description>The only thing I can add guys is that my contacts are all capped and separated by underscores (i.e., MY_CONST_NUMBER)

ReSharper is your friend.

I personally don&#039;t like regions, if you have to use them, your class is probably doing too much.  To avoid a backlash though, it depends (aha...my Ocampo moment) on what the team decides on.

I could code with my variables going backwards, just as long as their are standards agreed upon by the team.

Excellent first post Colin.</description>
		<content:encoded><![CDATA[<p>The only thing I can add guys is that my contacts are all capped and separated by underscores (i.e., MY_CONST_NUMBER)</p>
<p>ReSharper is your friend.</p>
<p>I personally don&#8217;t like regions, if you have to use them, your class is probably doing too much.  To avoid a backlash though, it depends (aha&#8230;my Ocampo moment) on what the team decides on.</p>
<p>I could code with my variables going backwards, just as long as their are standards agreed upon by the team.</p>
<p>Excellent first post Colin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Chambers</title>
		<link>http://lostechies.com/colinramsay/2007/09/25/coding-in-style/#comment-2</link>
		<dc:creator>Sean Chambers</dc:creator>
		<pubDate>Wed, 26 Sep 2007 00:49:47 +0000</pubDate>
		<guid isPermaLink="false">/blogs/colin_ramsay/archive/2007/09/25/coding-in-style.aspx#comment-2</guid>
		<description>Cheers to that Colin!

I know what you mean about being very peticular about how the code is arranged in the files.

A couple of things I follow in my own coding styles are:
- Underscores like you mentioned for class level private variables
- Camel casing on private fields, Pascal casing on public fields
- Private fields go at the top, followed by ctors, then properties and finally methods
- All brackets are on their own line
- using statements at the very top of the file outside the classes namespace decleration

thats all I can think of off the top of my head.

good post! I think it aspires to each of us</description>
		<content:encoded><![CDATA[<p>Cheers to that Colin!</p>
<p>I know what you mean about being very peticular about how the code is arranged in the files.</p>
<p>A couple of things I follow in my own coding styles are:<br />
- Underscores like you mentioned for class level private variables<br />
- Camel casing on private fields, Pascal casing on public fields<br />
- Private fields go at the top, followed by ctors, then properties and finally methods<br />
- All brackets are on their own line<br />
- using statements at the very top of the file outside the classes namespace decleration</p>
<p>thats all I can think of off the top of my head.</p>
<p>good post! I think it aspires to each of us</p>
]]></content:encoded>
	</item>
</channel>
</rss>
