<?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: Microsoft Source Analysis</title>
	<atom:link href="http://elegantcode.com/2008/05/25/microsoft-source-analysis/feed/" rel="self" type="application/rss+xml" />
	<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=microsoft-source-analysis</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 23:42:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
	<item>
		<title>By: trasa</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-22345</link>
		<dc:creator>trasa</dc:creator>
		<pubDate>Fri, 30 May 2008 20:46:10 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-22345</guid>
		<description>@chris:  I&#039;m mostly trolling at this point, name your private fields whatever you want ;)  

[troll]with R# it&#039;s also trivial to rename &#039;em later muhuhahaha[/troll]  

OK i&#039;ll stop now promise :)</description>
		<content:encoded><![CDATA[<p>@chris:  I&#8217;m mostly trolling at this point, name your private fields whatever you want <img src='http://elegantcode.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   </p>
<p>[troll]with R# it&#8217;s also trivial to rename &#8216;em later muhuhahaha[/troll]  </p>
<p>OK i&#8217;ll stop now promise <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Brandsma</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-22343</link>
		<dc:creator>Chris Brandsma</dc:creator>
		<pubDate>Fri, 30 May 2008 20:06:40 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-22343</guid>
		<description>@trasa:

I agree with you about the &#039;m&#039;, I got rid of those a while back as well (at the request of my manager...who shall not be named...and who also blogs on elegant code.

The problem with your variable name is that it breaks another rule, you can&#039;t have underscores INSIDE variable names.

And auto properties help...as long as your properties don&#039;t need to do anything interesting (default values, raise event when changed, etc).</description>
		<content:encoded><![CDATA[<p>@trasa:</p>
<p>I agree with you about the &#8216;m&#8217;, I got rid of those a while back as well (at the request of my manager&#8230;who shall not be named&#8230;and who also blogs on elegant code.</p>
<p>The problem with your variable name is that it breaks another rule, you can&#8217;t have underscores INSIDE variable names.</p>
<p>And auto properties help&#8230;as long as your properties don&#8217;t need to do anything interesting (default values, raise event when changed, etc).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trasa</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-22339</link>
		<dc:creator>trasa</dc:creator>
		<pubDate>Fri, 30 May 2008 19:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-22339</guid>
		<description>@chris, I just use R# to identify that sort of scoping issue for me :)  

why stop at _?  m_module_level_variable_type_string_firstName  (i&#039;m kidding..)

I suppose with autogenerated properties, 90% of your _variables go away now anyhow.</description>
		<content:encoded><![CDATA[<p>@chris, I just use R# to identify that sort of scoping issue for me <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   </p>
<p>why stop at _?  m_module_level_variable_type_string_firstName  (i&#8217;m kidding..)</p>
<p>I suppose with autogenerated properties, 90% of your _variables go away now anyhow.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Brandsma</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-22323</link>
		<dc:creator>Chris Brandsma</dc:creator>
		<pubDate>Fri, 30 May 2008 17:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-22323</guid>
		<description>@trasa, I like knowing where my variables are declared, plus it keeps me from having to worry about variable scoping.  Otherwise I&#039;d end up declaring my local variables like this: string localName;

Sorry, I had a prior horror of working on a delphi project with a slightly incompetent developer.  Delphi allowed global values.  So in his globals section he declared:
CHB: char;

Then in his procedures, he declared:
CHB: int;

All over the blasted place.  The global version of CHB was a &#039;C&#039;, &#039;H&#039;, or a &#039;B&#039;, the local version was a 1,2, or 3.  I could have killed him (if he didn&#039;t live in another state).  Sorry, after dealing with that, I will scope my variables.

As for curly braces, I&#039;m having that discussion every hour right now with a guy I&#039;m working with.</description>
		<content:encoded><![CDATA[<p>@trasa, I like knowing where my variables are declared, plus it keeps me from having to worry about variable scoping.  Otherwise I&#8217;d end up declaring my local variables like this: string localName;</p>
<p>Sorry, I had a prior horror of working on a delphi project with a slightly incompetent developer.  Delphi allowed global values.  So in his globals section he declared:<br />
CHB: char;</p>
<p>Then in his procedures, he declared:<br />
CHB: int;</p>
<p>All over the blasted place.  The global version of CHB was a &#8216;C&#8217;, &#8216;H&#8217;, or a &#8216;B&#8217;, the local version was a 1,2, or 3.  I could have killed him (if he didn&#8217;t live in another state).  Sorry, after dealing with that, I will scope my variables.</p>
<p>As for curly braces, I&#8217;m having that discussion every hour right now with a guy I&#8217;m working with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: trasa</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-22322</link>
		<dc:creator>trasa</dc:creator>
		<pubDate>Fri, 30 May 2008 17:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-22322</guid>
		<description>Boo, underscores!  They are the last remnant of the discredited Hungarian notation.  

Now, lets argue about where to put the curly braces!  :)</description>
		<content:encoded><![CDATA[<p>Boo, underscores!  They are the last remnant of the discredited Hungarian notation.  </p>
<p>Now, lets argue about where to put the curly braces!  <img src='http://elegantcode.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Jackson</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-22299</link>
		<dc:creator>Paul Jackson</dc:creator>
		<pubDate>Fri, 30 May 2008 12:40:24 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-22299</guid>
		<description>I had the same issue with underscores in field names.  Though I&#039;m in the opposite camp, personally, I can&#039;t convince co-workers to get rid of them ... can I trade a few of mine for your cranky, old Dutchman?

The first thing I did was investigate writing a custom rule to do this: http://lovethedot.blogspot.com/2008/05/creating-custom-rules-for-microsoft_6976.html

I&#039;ll probably find some &quot;gotchas&quot; as time goes on, but for now it&#039;s working well on our code.</description>
		<content:encoded><![CDATA[<p>I had the same issue with underscores in field names.  Though I&#8217;m in the opposite camp, personally, I can&#8217;t convince co-workers to get rid of them &#8230; can I trade a few of mine for your cranky, old Dutchman?</p>
<p>The first thing I did was investigate writing a custom rule to do this: <a href="http://lovethedot.blogspot.com/2008/05/creating-custom-rules-for-microsoft_6976.html" rel="nofollow">http://lovethedot.blogspot.com/2008/05/creating-custom-rules-for-microsoft_6976.html</a></p>
<p>I&#8217;ll probably find some &#8220;gotchas&#8221; as time goes on, but for now it&#8217;s working well on our code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reflective Perspective - Chris Alcock &#187; The Morning Brew #101</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-21882</link>
		<dc:creator>Reflective Perspective - Chris Alcock &#187; The Morning Brew #101</dc:creator>
		<pubDate>Tue, 27 May 2008 07:13:34 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-21882</guid>
		<description>[...] Microsoft Source Analysis - Chris Brandsma looks at some of the rules in the Microsoft Source Analysis tool, and consider the possibility of conflicts in rules between similar tools. [...]</description>
		<content:encoded><![CDATA[<p>[...] Microsoft Source Analysis &#8211; Chris Brandsma looks at some of the rules in the Microsoft Source Analysis tool, and consider the possibility of conflicts in rules between similar tools. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Brandsma</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-21760</link>
		<dc:creator>Chris Brandsma</dc:creator>
		<pubDate>Mon, 26 May 2008 14:39:44 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-21760</guid>
		<description>@Tobias:  OK, here is what I have found so far on writing add-ins.

First: there are three important files: 
Microsoft.SourceAnalysis.dll
Microsoft.SourceAnalysis.CSharp.dll  &lt;- parses C# document
Microsoft.SourceAnalysis.CSharp.Rules.dll

If you look at SpacingRules, here is your inheritance tree:

SpacingRules, Microsoft.SourceAnalysis.CSharp.Rules
SourceAnalyzer, Microsoft.SourceAnalysis
SourceAnalysisAddIn, Microsoft.SourceAnalysis

SourceAnalyzer has several virtual functions that you will have to implement: AnalyzeDocument and DelayAnalysis.  Via both of them you get a CodeDocument object.  CodeDocument is actually another abstract class, the real class is CsDocument.

Interesting, it looks like everything is implemented in such a way that adding VB support is actually possible (just not currently done).</description>
		<content:encoded><![CDATA[<p>@Tobias:  OK, here is what I have found so far on writing add-ins.</p>
<p>First: there are three important files:<br />
Microsoft.SourceAnalysis.dll<br />
Microsoft.SourceAnalysis.CSharp.dll  <- parses C# document<br />
Microsoft.SourceAnalysis.CSharp.Rules.dll</p>
<p>If you look at SpacingRules, here is your inheritance tree:</p>
<p>SpacingRules, Microsoft.SourceAnalysis.CSharp.Rules<br />
SourceAnalyzer, Microsoft.SourceAnalysis<br />
SourceAnalysisAddIn, Microsoft.SourceAnalysis</p>
<p>SourceAnalyzer has several virtual functions that you will have to implement: AnalyzeDocument and DelayAnalysis.  Via both of them you get a CodeDocument object.  CodeDocument is actually another abstract class, the real class is CsDocument.</p>
<p>Interesting, it looks like everything is implemented in such a way that adding VB support is actually possible (just not currently done).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop - May 26, 2008 &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-21754</link>
		<dc:creator>Dew Drop - May 26, 2008 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Mon, 26 May 2008 13:58:10 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-21754</guid>
		<description>[...] Microsoft Source Analysis (Chris Brandsma) [...]</description>
		<content:encoded><![CDATA[<p>[...] Microsoft Source Analysis (Chris Brandsma) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tobias Hertkorn</title>
		<link>http://elegantcode.com/2008/05/25/microsoft-source-analysis/comment-page-1/#comment-21704</link>
		<dc:creator>Tobias Hertkorn</dc:creator>
		<pubDate>Mon, 26 May 2008 07:13:41 +0000</pubDate>
		<guid isPermaLink="false">http://elegantcode.com/2008/05/25/microsoft-source-analysis/#comment-21704</guid>
		<description>If you want a first hint at how to write your own rules - I was curious as well about that and put together a small post:
http://saftsack.fs.uni-bayreuth.de/~dun3/archives/writing-your-own-rules-for-microsoft-source-analysis-for-c/153.html

I know it is not much - but it might get you started in the right direction.

On regards to Source Analysis: I found it quite funny that the default Console Application shipping with VS would not even pass the tests. ;-)

Cheers,
Tobi</description>
		<content:encoded><![CDATA[<p>If you want a first hint at how to write your own rules &#8211; I was curious as well about that and put together a small post:<br />
<a href="http://saftsack.fs.uni-bayreuth.de/~dun3/archives/writing-your-own-rules-for-microsoft-source-analysis-for-c/153.html" rel="nofollow">http://saftsack.fs.uni-bayreuth.de/~dun3/archives/writing-your-own-rules-for-microsoft-source-analysis-for-c/153.html</a></p>
<p>I know it is not much &#8211; but it might get you started in the right direction.</p>
<p>On regards to Source Analysis: I found it quite funny that the default Console Application shipping with VS would not even pass the tests. <img src='http://elegantcode.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Cheers,<br />
Tobi</p>
]]></content:encoded>
	</item>
</channel>
</rss>

