<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Nick Harrison</title>
        <link>http://geekswithblogs.net/nharrison/Default.aspx</link>
        <description>Thoughts on Design and Architecture</description>
        <language>en-US</language>
        <copyright>Nick Harrison</copyright>
        <managingEditor>neh123us@yahoo.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Nick Harrison</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/nharrison/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>Show – Off always Shown up in Showdown</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/10/28/126326.aspx</link>
            <description>&lt;br /&gt;
&lt;font face="Calibri" color="#104160" size="4"&gt;&lt;strong&gt;Show – Off always Shown up in Showdown&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;This was my fortune cookie the other day.   It was attributed to &lt;span class="yshortcuts" id="lw_1225243662_0" style="BACKGROUND: none transparent scroll repeat 0% 0%; CURSOR: hand; BORDER-BOTTOM: medium none"&gt;Confucius&lt;/span&gt;.   Now, I doubt that Confucius actually said it.   The humor shines through only in English, I think.   For the sake of not plagiarizing, let’s continue attributing it to Confucius.   It reminds me of another quote that I heard a while back.   This one attributed to a Buddhist monk “What I am I am and say not.   Being is the great explainer”.    We will get to this quote in a moment.   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;But first …&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;If you are a job candidate hoping to make it past the screening process, you may well feel like a show-off.   Regardless of your personality, the &lt;span class="yshortcuts" id="lw_1225243662_1"&gt;job interview&lt;/span&gt; is not the time for modesty.   The job interview is the time to say and with a straight face “Hey look at me.   Aren’t I wonderful?   Wouldn’t you like to have me working for you?”   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;If you are &lt;span class="yshortcuts" id="lw_1225243662_2"&gt;looking for a job&lt;/span&gt;, depending on how you find yourself looking, this can be tough.    If you got fired (laid off, downsized, cost reduced, name your euphemism) such confidence will feel alien and fake.   If you are miserable in your current job and casually looking around, you aren’t really motivated to put it all out there, and you can’t maintain the strong self confident image that you need to present.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Fake or uncomfortable, awkward or contrived, however it makes you feel, this is the façade that you have to put on to get the job.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Most of us technology geeks will more easily tend towards the Buddhist quote listed earlier.    We would rather not have to toot our own horn.   We would rather be modest and casual keeping a low profile and avoiding the spotlight.   We try to live by the second quote mentioned earlier.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;“What I am I am and say not.   Being is the great explainer”.    If you are a great programmer, it should be obvious if you are doing your job right.   As a general rule, if you have to walk around saying, “I am great at this” or “I am great at that” you usually are not.   More likely than not, you are an insufferable jerk.   If you really are great, it should be obvious and you should not have to point it out all the time.    This is a great philosophy for the daily grind.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Unfortunately, it doesn’t work so well for job searching.   In a short interview, you flat out don’t have the time for “being to explain” what you are, must shine through quickly, usually in 30 minutes or less.   If not, you may not get the rest of the time needed for being to explain.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;So, if you are on the &lt;span class="yshortcuts" id="lw_1225243662_3" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;job hunt&lt;/span&gt;, let loose your inner braggart.   Just me sure to be him back in the cage after you land your next great opportunity.   If you are the screener, realize that the people you are dealing with are probably acting against their character and venturing outside their comfort zone.   Be patient. &lt;/font&gt;&lt;/p&gt;
&lt;div id="highlighterDivCG" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;
&lt;div class="module overlay yui-module yui-overlay" id="lwPreview" style="LEFT: -5000px; VISIBILITY: hidden; POSITION: absolute; TOP: -5000px"&gt;
&lt;div class="hd"&gt;&lt;/div&gt;
&lt;div class="bd"&gt; &lt;/div&gt;
&lt;div class="ft"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=126326"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=126326" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/126326.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/10/28/126326.aspx</guid>
            <pubDate>Wed, 29 Oct 2008 01:29:16 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/126326.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/10/28/126326.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/126326.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/126326.aspx</trackback:ping>
        </item>
        <item>
            <title>Thoughts on a Data Dictionary</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/10/16/125897.aspx</link>
            <description>&lt;br /&gt;
&lt;font face="sans-serif" color="#104160" size="4"&gt;&lt;strong&gt;Thoughts on a &lt;span class="yshortcuts" id="lw_1224206194_0" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;Data Dictionary&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;I have often thought about what would make a good &lt;span class="yshortcuts" id="lw_1224206194_1"&gt;data dictionary&lt;/span&gt;.   Usually I have lamented the absence of any &lt;span class="yshortcuts" id="lw_1224206194_2"&gt;meaningful data dictionary&lt;/span&gt; beyond what the &lt;span class="yshortcuts" id="lw_1224206194_3"&gt;DBMS&lt;/span&gt; itself keeps on its own.   If everyone would simply add comments everywhere that the database natively allows, we would all be oh so much better off.   But alas we don’t.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;As is so often the case, if we don’t have to do something, we probably won’t.    Often times, it’s a matter of meeting deadlines, sometimes it’s a matter of shear laziness, but sometimes, it may just be a case of not understanding the need or not knowing what is intrinsically available.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Let’s tackle the need first…&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Database objects rarely have meaningful names.   Database objects with meaningful names to one group may not be meaningful to another group.   When you are trying to learn a &lt;span class="yshortcuts" id="lw_1224206194_4"&gt;new data model&lt;/span&gt;, the history of this &lt;span class="yshortcuts" id="lw_1224206194_5" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;data model&lt;/span&gt; is useful to understand the conventions adopted or ignored.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;In its simplest form, I have several goals for a data dictionary:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Define the &lt;span class="yshortcuts" id="lw_1224206194_6"&gt;naming conventions&lt;/span&gt; followed&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Identify known exceptions to these conventions&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Provide an English description for each database object (table, column, stored proc, trigger, etc)&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Document the accepted data types and their purposes&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Identify known exceptions to the data type rules&lt;/font&gt; &lt;br /&gt;
&lt;font face="sans-serif" size="2"&gt;In Oracle or &lt;span class="yshortcuts" id="lw_1224206194_7" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;SQL Server&lt;/span&gt;, this can all be accomplished with a relatively small word document and the &lt;span class="yshortcuts" id="lw_1224206194_8"&gt;native data dictionary&lt;/span&gt;.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;I think though that to actually enforce these conventions, we need a little extra support:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;A Data Thesaurus &lt;/font&gt;&lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;A rule validator similar to fxCop&lt;/font&gt; &lt;br /&gt;
&lt;font face="sans-serif" size="2"&gt;The data thesaurus would be used to ensure that appropriate naming conventions are used.   Proposed object names would be split on a case change and run through the thesaurus.   If the individual words are found in main line entries, you are good to go.   If an individual word is found as an alternate, replace it with the main line entry and proceed.   If an individual word is not found in the thesaurus, flag it for review.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Such a process would eliminate such confusing names as:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;ProcessDate&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;ProcessDte&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Process_Date&lt;/font&gt; &lt;br /&gt;
&lt;font face="sans-serif" size="2"&gt;The first name would work as entered.   The second one would be converted to the first one, and the third entry would be rejected since Process_ was not found in the thesaurus.   The key thing here is that it tracks and enforces the convention at the time of object creation not at the end of the process.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;The above is one rule based on the data thesaurus.   Other rules that may be useful might include:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Insure that object names are not plural.   Each record in the “Members” table is a Member&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Insure that each table name is a noun&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Ensure that every column is either a noun or an adjective.   Columns should not be verbs&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Ensure that every table has an associated comment&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Ensure that every column has an associated comment&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Ensure that every &lt;span class="yshortcuts" id="lw_1224206194_9" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;stored procedure&lt;/span&gt; has an associated comment&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Ensure that &lt;span class="yshortcuts" id="lw_1224206194_10"&gt;stored procedures&lt;/span&gt; pass the thesaurus test&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Ensure that stored procedures have the form ActionObject, such as InsertMember or SelectMembersByGroupID&lt;/font&gt; &lt;br /&gt;
&lt;font face="sans-serif" size="2"&gt;Or&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Ensure that stored procedures have the form NounAction such as MemberInsert or MemberSelectByGroupID&lt;/font&gt; &lt;br /&gt;
&lt;/p&gt;
&lt;div id="highlighterDivCG" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;
&lt;div class="module overlay yui-module yui-overlay" id="lwPreview" style="LEFT: -400px; POSITION: absolute; TOP: -400px"&gt;
&lt;div class="hd"&gt;&lt;/div&gt;
&lt;div class="bd"&gt; &lt;/div&gt;
&lt;div class="ft"&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;What are your thoughts on a data dictionary?   Has anyone incorporated similar ideas into one?   How did it work out?   Have you thought about and decided against?&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125897"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125897" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/125897.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/10/16/125897.aspx</guid>
            <pubDate>Fri, 17 Oct 2008 01:21:41 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/125897.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/10/16/125897.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/125897.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/125897.aspx</trackback:ping>
        </item>
        <item>
            <title>What Can We Do For Meaningful Variable Names?</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/09/22/125372.aspx</link>
            <description>&lt;br /&gt;
&lt;font face="Calibri" color="#104160" size="4"&gt;&lt;strong&gt;&lt;br /&gt;
&lt;font face="Calibri" color="#104160" size="4"&gt;&lt;strong&gt;What can we do for meaningful variable names?&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;You hear much about &lt;span class="yshortcuts" id="lw_1222126797_0" style="BACKGROUND: none transparent scroll repeat 0% 0%; CURSOR: hand; BORDER-BOTTOM: medium none"&gt;naming conventions&lt;/span&gt; and some shops still have some arcane rules in place.   Fortunately most of us have stepped beyond &lt;span class="yshortcuts" id="lw_1222126797_1"&gt;Hungarian notation&lt;/span&gt;.   I have seen some shops define rules that the &lt;span class="yshortcuts" id="lw_1222126797_2" style="BACKGROUND: none transparent scroll repeat 0% 0%; CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;method name&lt;/span&gt; should include the number of parameters.   I have seen shops define rules that would ban overloading and insist on a sequence number for  methods that should be overloads.   I have seen shops that wanted the Requirement Number embedded in &lt;span class="yshortcuts" id="lw_1222126797_3" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;method names&lt;/span&gt;, and I have seen shops put maximum character size limits to simplify reading.   This unfortunately led to awkward abbreviations.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;None of these standards have led to more meaning variable names.   The fact that a variable is an integer or a string does nothing for me.   Having a &lt;span class="yshortcuts" id="lw_1222126797_4" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;method signature&lt;/span&gt; come like:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;        Public void int  DoSomething (string strParam, int intParam) &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;does nothing for us.    Having one like:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;        Public void int  ProcessIncomingClaims (string branchCode, int transactionID) &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Can be very enlightening.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Like legislating morality, none of these rules will guarantee that the names are good.   At the same time, almost any set of “good” rules could still be applied and end up with “bad” variable names.  We may not always know when a name is “good” but we usually know when the name is “bad”.   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Enter &lt;/font&gt;&lt;font face="Calibri" color="#0000ff" size="2"&gt;&lt;u&gt;GhostDoc&lt;/u&gt;&lt;/font&gt;&lt;font face="Calibri" size="2"&gt;.   GhostDoc is a wonderful tool designed to help automate your comments.   Caution it works best for C#, but they are building support for VB.   The intention here is that GhostDoc takes your method, properties, parameters, etc. and splits them to come up with the documentation for that item.   There are several thinks that seem to be happening here.   First it splits the words at a case change.   Second, it interprets methods as being in the form verb – object and will attempt to structure the comment like that.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;For instance, if you have a method called DataBind (), GhostDoc will come up with the comment:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// Datas the bind.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;This is clearly not what we want for a comment.   Note that the &lt;span class="yshortcuts" id="lw_1222126797_5"&gt;naming convention&lt;/span&gt; was not followed.   We would want to have methods following the pattern of Vern Object.   Here it is following the convention of Object Verb.   Ghost Doc ends up with a comment that does not make sense grammatically.   Now consider the comment generated for the method   BindData ():&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// Binds the data.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Our method name follows the naming conventions that we have setup and now the generated comment makes sense as well.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Try it and you will find that whenever GhostDoc does not come up with a boiler plate comment, your variable names or &lt;span class="yshortcuts" id="lw_1222126797_6"&gt;method names&lt;/span&gt; or property names are probably not named well.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Not a bad litmus test for good names!&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Just like Ghost Writers in the publishing world, there is only so much that GhostDoc can do.  It does a good job of structuring your comments.  It does a good job of mapping out the details needed for comprehensive XML documentation.   It also does a good job brining in ancestor details when overriding from a base class.   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;It does not explain how logic works or why logic is needed.   This you still need to add yourself, but at least you will know where it goes to produce in comprehensive documentation.     The better you name your methods and parameters, the less you should have to write.    The more highly cohesive your methods, the less you should have to write.    The less you have have to write manually, the better your code can be understand without your comments.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Has anyone else used &lt;/font&gt;&lt;font face="Calibri" color="#0000ff" size="2"&gt;&lt;u&gt;GhostDoc&lt;/u&gt;&lt;/font&gt;&lt;font face="Calibri" size="2"&gt; to help ensure naming conventions or help ensure that code is readable?&lt;/font&gt;&lt;/p&gt;
&lt;div id="highlighterDivCG" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;
&lt;div class="module overlay yui-module yui-overlay" id="lwPreview" style="LEFT: -5000px; VISIBILITY: hidden; POSITION: absolute; TOP: -5000px"&gt;
&lt;div class="hd"&gt;&lt;/div&gt;
&lt;div class="bd"&gt; &lt;/div&gt;
&lt;div class="ft"&gt;&lt;/div&gt;
&lt;/div&gt;
?&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;You hear much about &lt;span class="yshortcuts" id="lw_1222126797_0" style="BACKGROUND: none transparent scroll repeat 0% 0%; CURSOR: hand; BORDER-BOTTOM: medium none"&gt;naming conventions&lt;/span&gt; and some shops still have some arcane rules in place.   Fortunately most of us have stepped beyond &lt;span class="yshortcuts" id="lw_1222126797_1"&gt;Hungarian notation&lt;/span&gt;.   I have seen some shops define rules that the &lt;span class="yshortcuts" id="lw_1222126797_2" style="BACKGROUND: none transparent scroll repeat 0% 0%; CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;method name&lt;/span&gt; should include the number of parameters.   I have seen shops define rules that would ban overloading and insist on a sequence number for  methods that should be overloads.   I have seen shops that wanted the Requirement Number embedded in &lt;span class="yshortcuts" id="lw_1222126797_3" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;method names&lt;/span&gt;, and I have seen shops put maximum character size limits to simplify reading.   This unfortunately led to awkward abbreviations.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;None of these standards have led to more meaning variable names.   The fact that a variable is an integer or a string does nothing for me.   Having a &lt;span class="yshortcuts" id="lw_1222126797_4" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;method signature&lt;/span&gt; come like:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;        Public void int  DoSomething (string strParam, int intParam) &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;does nothing for us.    Having one like:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;        Public void int  ProcessIncomingClaims (string branchCode, int transactionID) &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Can be very enlightening.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Like legislating morality, none of these rules will guarantee that the names are good.   At the same time, almost any set of “good” rules could still be applied and end up with “bad” variable names.  We may not always know when a name is “good” but we usually know when the name is “bad”.   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Enter &lt;/font&gt;&lt;font face="Calibri" color="#0000ff" size="2"&gt;&lt;u&gt;GhostDoc&lt;/u&gt;&lt;/font&gt;&lt;font face="Calibri" size="2"&gt;.   GhostDoc is a wonderful tool designed to help automate your comments.   Caution it works best for C#, but they are building support for VB.   The intention here is that GhostDoc takes your method, properties, parameters, etc. and splits them to come up with the documentation for that item.   There are several thinks that seem to be happening here.   First it splits the words at a case change.   Second, it interprets methods as being in the form verb – object and will attempt to structure the comment like that.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;For instance, if you have a method called DataBind (), GhostDoc will come up with the comment:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// Datas the bind.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;This is clearly not what we want for a comment.   Note that the &lt;span class="yshortcuts" id="lw_1222126797_5"&gt;naming convention&lt;/span&gt; was not followed.   We would want to have methods following the pattern of Vern Object.   Here it is following the convention of Object Verb.   Ghost Doc ends up with a comment that does not make sense grammatically.   Now consider the comment generated for the method   BindData ():&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// &amp;lt;summary&amp;gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// Binds the data.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Lucida Console" size="2"&gt;/// &amp;lt;/summary&amp;gt;&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Our method name follows the naming conventions that we have setup and now the generated comment makes sense as well.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Try it and you will find that whenever GhostDoc does not come up with a boiler plate comment, your variable names or &lt;span class="yshortcuts" id="lw_1222126797_6"&gt;method names&lt;/span&gt; or property names are probably not named well.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Not a bad litmus test for good names!&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Just like Ghost Writers in the publishing world, there is only so much that GhostDoc can do.  It does a good job of structuring your comments.  It does a good job of mapping out the details needed for comprehensive XML documentation.   It also does a good job brining in ancestor details when overriding from a base class.   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;It does not explain how logic works or why logic is needed.   This you still need to add yourself, but at least you will know where it goes to produce in comprehensive documentation.     The better you name your methods and parameters, the less you should have to write.    The more highly cohesive your methods, the less you should have to write.    The less you have have to write manually, the better your code can be understand without your comments.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Has anyone else used &lt;/font&gt;&lt;font face="Calibri" color="#0000ff" size="2"&gt;&lt;u&gt;GhostDoc&lt;/u&gt;&lt;/font&gt;&lt;font face="Calibri" size="2"&gt; to help ensure naming conventions or help ensure that code is readable?&lt;/font&gt;&lt;/p&gt;
&lt;div id="highlighterDivCG" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;
&lt;div class="module overlay yui-module yui-overlay" id="lwPreview" style="LEFT: -5000px; VISIBILITY: hidden; POSITION: absolute; TOP: -5000px"&gt;
&lt;div class="hd"&gt;&lt;/div&gt;
&lt;div class="bd"&gt; &lt;/div&gt;
&lt;div class="ft"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125372"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125372" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/125372.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/09/22/125372.aspx</guid>
            <pubDate>Mon, 22 Sep 2008 23:43:42 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/125372.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/09/22/125372.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/125372.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/125372.aspx</trackback:ping>
        </item>
        <item>
            <title>Passive View and Cyclomatic Complexity</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/09/20/125334.aspx</link>
            <description>&lt;br /&gt;
&lt;font face="Calibri" color="#104160" size="4"&gt;&lt;strong&gt;Passive View and Cyclomatic &lt;span class="yshortcuts" id="lw_1221966233_0"&gt;Complexity&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;We have previously talked about cyclomatic complexity and set forth the goal of keeping the complexity for our methods down below 10.   We have also talked about the goal of systematically refactoring any methods that we find to lower complexities whenever we make code changes.  These are good and admirable goals for &lt;span class="yshortcuts" id="lw_1221966233_1" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;business logic&lt;/span&gt;.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;But what about Passive View?   Passive View is a slight variation on the Model View Presenter pattern designed to drive home the fact that the view should do very little processing.   The view should be passive.  Quiet literally the only code found in the view should be the implementation of the properties and the event handlers for the UI components.  The properties should do the absolute minimal to interact with the user, and the event handlers should simply forward calls on to the presenter.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;I cannot stress this enough, there should be no actual logic in the view.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;The driving force behind the Passive View pattern is to simplify testing.   Since it is harder to test the UI and the UI does not lend itself to automated testing, we want to move as much logic as possible to locations that are easier to test, class libraries.   Testing aside, logic housed in class libraries is more reusable and can be shared across multiple &lt;span class="yshortcuts" id="lw_1221966233_2" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;UIs&lt;/span&gt;.   In fact, the automated tests simply become a new UI.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;All that being said, any method in the UI should have a cyclomatic complexity of 1!&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Yep!   You heard me correctly.  One!   If you find yourself writing a method, event handler or property in the UI with a complexity greater than one, stop and ask yourself why whatever logic you are implemented is in the UI.   Chances are you will find that there is functionality that should be moved to the Presenter or a shared UI component.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;I challenge everyone to identify UI code with a complexity greater than 1 that cannot be moved out of the View.   Note that I said out of the View and not out of the UI layer.   There are times when true UI processing may require some logical processing, but these are not so specialized that they cannot be removed from the View.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div id="highlighterDivCG" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;
&lt;div class="module overlay yui-module yui-overlay" id="lwPreview" style="LEFT: -400px; POSITION: absolute; TOP: -400px"&gt;
&lt;div class="hd"&gt;&lt;/div&gt;
&lt;div class="bd"&gt; &lt;/div&gt;
&lt;div class="ft"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125334"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125334" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/125334.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/09/20/125334.aspx</guid>
            <pubDate>Sun, 21 Sep 2008 03:04:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/125334.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/09/20/125334.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/125334.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/125334.aspx</trackback:ping>
        </item>
        <item>
            <title>Pronouns</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/09/20/125333.aspx</link>
            <description>&lt;br /&gt;
&lt;font face="sans-serif" color="#104160" size="4"&gt;&lt;strong&gt;Using &lt;span class="yshortcuts" id="lw_1221966036_0"&gt;Pronouns&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;This may not be very technical, but hopefully it may generate some discussion and provide some insight.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Pronouns can be very enlightening about our attitudes towards work.   How long do you work for a company before you start thinking of the company as “we” instead of “they?”   Consider:   We are the number 1 producer of product X.   Vs.   They are the number 1 producer of X.   Do you ever make that pronoun switch?   What does it mean if you switch back from “we” to “they?”    What does it mean if you never make the switch?   Are you even aware of which one you use?&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;The dynamics with interpersonal relationships are also interesting.   Have you ever noticed that a single co –worker will probably say “I” or “my”, or “me” a lot.    A co- worker married or at least in a committed relationship will be much more likely to say “we” even if their partner is not with them.   What should we make of this?  : )&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Of course you also get this with &lt;span class="yshortcuts" id="lw_1221966036_1"&gt;team dynamics&lt;/span&gt; as well.  A strong team player will frequently refer to “we.”    In this case, “we” probably refers to the team.   We are falling behind and need to catch up.   In a strong team, “I” rarely makes an appearance.    Hopefully, “you” is scarce as well.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;I have also noticed something interesting with my wife that I thing is somewhat common.   &lt;span class="yshortcuts" id="lw_1221966036_2"&gt;The switch&lt;/span&gt; from “our” or even “mine” to “your” when we get upset about something.   I notice “our” dog becoming “your” dog when the dog does something bad.    Is this common?   Does it show up in other areas of life?    Do “our” processes become “your” processes when we feel like the processes don’t work?   Would such switches be a &lt;span class="yshortcuts" id="lw_1221966036_3"&gt;Freudian slip&lt;/span&gt;, malicious behavior, or a harmless word game?   Are we even of it when we make such switches?&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;So your use of pronouns can be used gauge the ties you feel towards your employer, your team, and your partner.    Here are some of my thoughts:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;When your employer becomes “we” as in “We have a good work environment” instead of “They have a good work environment”, you finally feel like you are part of the corporate culture.&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Should you go back to thinking of your employer as “they”, you may be feeling a little disenfranchised or disconnected.   Consider, “They have a strong business model” instead of “We have a strong business model”&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If you never think of the company as “we,” are you perpetually disconnected looking in on your co-workers from the outside?&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;When you meet someone and they keep referring to “We went to the movies over the weekend”, chances are that person is married.    If your new friend states that “I went to the movies over the weekend,” you may have a new single friend.&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;When your team mates start referring to “we” as in “We have a good sense of the project timelines”, you probably have a strong team.   As long as you are still thinking in terms of “I think I know what needs to be done”, your team probably hasn’t truly formed yet.  Or maybe it is still “storming”&lt;/font&gt; &lt;br /&gt;
&lt;font face="sans-serif" size="2"&gt;These are not hard and fast rules.   These are probably not even generally guidelines.   These are simple observations that I have made that seem to be true often.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Without a doubt there are many exceptions.   Most of us choose our pronouns without even thinking about it.   If we start thinking about it too much, we will probably throw the whole system out of balance, but a little self reflection is a good thing. &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125333"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=125333" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/125333.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/09/20/125333.aspx</guid>
            <pubDate>Sun, 21 Sep 2008 03:03:16 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/125333.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/09/20/125333.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/125333.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/125333.aspx</trackback:ping>
        </item>
        <item>
            <title>Why we Blog!</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/03/05/120226.aspx</link>
            <description>&lt;p&gt;I was recently challenged by a very good friend that the contnet of my blog was only really clear to people who did not need to read it.   His comments challenged me on several fronts.    &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Why do I post blogs?    &lt;/li&gt;
    &lt;li&gt;Who do I believe my target audience is?   &lt;/li&gt;
    &lt;li&gt;What do I hope this audience gets from the blogs that I post?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are several reasons why I post blogs.   Sometimes I post a blog so that I can quickly find something that I struggled to figure out in the first place.    In this case, the target audience is myself, and I hope to make it easier for me the next time that I do something similiar.   If others find something useful there, that is great, but they are not necessarily the target audience.   I admit that these blogs are rare, or atleast I hope that they are rare.   Probably more blogs are written with me as the target audience than I intend.&lt;/p&gt;
&lt;p&gt;Sometimes I post blogs with the intention of giving back to the community and helping others have an easier transition in learning something new, or encouraging someone to venture into new technologies that they may otherwise be intimidated by.   In such cases, the target audience is someone new to DotNet or someone who has not really explored much beyond what was needed to get specific jobs done.    This is where I probably have failed my audience the most in the past.  The content may not always be as readily accessible as I would intend.&lt;/p&gt;
&lt;p&gt;Sometimes I post blogs with more of a "Look at me, ain't I smart" attitude.   I am ashamed to admit that this is more common than I wish and probably leads to the problems with many posts not being easily accessible to who I believe my target audience is.   I challenge anyone reading my blogs to help keep me inline.   Just be nice about it.&lt;/p&gt;
&lt;p&gt;My friend recommended a format that he thought would make the content more accessible to a broader audience by focusing on:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;font face="Calibri" size="2"&gt;What does this mean&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Calibri" size="2"&gt;How will this help me&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font face="Calibri" size="2"&gt;How do I get started&lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;/font&gt;&lt;font face="Calibri" size="2"&gt;&lt;br /&gt;
    &lt;/font&gt;&lt;font face="Times New Roman" size="3"&gt; &lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This sounds like sound criticism and good advice.   I challenge all of you who do post blogs to think about the three questions that I struggled with at the begining.   &lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Why do I post blogs?    &lt;/li&gt;
    &lt;li&gt;Who do I believe my target audience is?   &lt;/li&gt;
    &lt;li&gt;What do I hope this audience gets from the blogs that I post?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;How would you have to answer these questions?   What do you think of my firend's suggested format?&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120226"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=120226" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/120226.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/03/05/120226.aspx</guid>
            <pubDate>Wed, 05 Mar 2008 15:23:11 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/120226.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/03/05/120226.aspx#feedback</comments>
            <slash:comments>10</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/120226.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/120226.aspx</trackback:ping>
        </item>
        <item>
            <title>Debugging Attributes</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/02/19/119787.aspx</link>
            <description>&lt;br /&gt;
&lt;font face="Calibri" color="#104160" size="4"&gt;&lt;strong&gt;Debugging Attributes&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Have you ever been debugging code and examined the properties of an object? You get both the public properties and the private member variables!   Why is that?   Can this be avoided?&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;This seems to violate the principles of encapsulation.  It also complicates the process of examining the contents of an object at run time.   You don’t really want to have to look at all of the private member variables which by definition should be irrelevant to the task of debugging.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Fortunately the violations to encapsulation pose limited risk.   Even though the debugger will reveal hidden member variables, you still cannot access them in your code.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;The confusing part is when you view an object’s detail and you have to filter through potentially twice as many variables as there are properties.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;How do you remove this potential confusion in the objects that you create?   Enter the System.Diagnostics.DebugBrowsable attribute:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt; Add a DebuggerBrowsable attribute to private member variables.&lt;/font&gt;&lt;font face="Courier New" size="2"&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;[System.Diagnostics.&lt;/font&gt;&lt;font face="Courier New" color="#4181c0" size="2"&gt;DebuggerBrowsable &lt;/font&gt;&lt;font face="Courier New" size="2"&gt;(System.Diagnostics.&lt;/font&gt;&lt;font face="Courier New" color="#4181c0" size="2"&gt;DebuggerBrowsableState&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;.Never)] &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Now these variables will not show up when you do a Quick Watch.   This will clean out the entries from the Quick Watch that you did not intend to be visible.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Another debugging frustration is stepping into methods or properties that you are no longer interested in.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Before c# 3.0 introduced implied properties, business entities could be particularly frustrating since they often included several very simple properties that you never had any need to step into.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;I would often try to step into a method and have to step into several properties’ get accessors to pass their values as parameters.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Not only is this annoying, it is also potentially confusing and time consuming as the debug bounces around in irrelevant code as you are trying to figure out why an errant method is not behaving as you expect.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;If only there was a way to instruct the debuger to ignore certain pieces of code …&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Turns out that there is!&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;[System.Diagnostics.&lt;/font&gt;&lt;font face="Courier New" color="#008080" size="2"&gt;DebuggerHidden&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;]  &lt;/font&gt;&lt;font face="Calibri" size="2"&gt;Causes the debugger to completely ignore the method.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;[System.Diagnostics.&lt;/font&gt;&lt;font face="Courier New" color="#008080" size="2"&gt;DebuggerStepThrough&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;] &lt;/font&gt;&lt;font face="Calibri" size="2"&gt;The debugger will not step into the method but will honor breakpoints in the method.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;[System.Diagnostics.&lt;/font&gt;&lt;font face="Courier New" color="#008080" size="2"&gt;DebuggerNonUserCode] &lt;/font&gt;&lt;font face="Calibri" size="2"&gt;This attribute is similar to combining the first two attributes.   This is intended for generated code or designer code.  &lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Since these are attributes, you have to pay attention to the AttributeUsageAttribute.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;DebuggerHidden and DebuggerNonUserCode can be tied to properties.    DebuggerStepThrough cannot.   It can be applied to methods though.   This means that it would have to be applied to the get and set individually for a property and not to the property as a whole.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;The DebuggerStepThrough attribute causes some problems for CodeDom since there is no way to associate attributes with the individual methods that make up a property.  Use the DebuggerNonUserCodeAttribute instead.&lt;/font&gt;&lt;/p&gt;
&lt;div id="highlighterDivCG" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;
&lt;div class="module overlay yui-module yui-overlay" id="lwPreview" style="LEFT: -400px; POSITION: absolute; TOP: -400px"&gt;
&lt;div class="hd"&gt;&lt;/div&gt;
&lt;div class="bd"&gt; &lt;/div&gt;
&lt;div class="ft"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119787"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119787" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/119787.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/02/19/119787.aspx</guid>
            <pubDate>Wed, 20 Feb 2008 02:58:51 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/119787.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/02/19/119787.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/119787.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/119787.aspx</trackback:ping>
        </item>
        <item>
            <title>Conditional Attribute</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/02/19/119786.aspx</link>
            <description>&lt;br /&gt;
&lt;font face="Calibri" color="#104160" size="4"&gt;&lt;strong&gt;ConditionalAttribute&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Certain methods especially in the System.Diagnostics namespace are decorated with ConditionalAttributes similar to this:&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font face="Lucida Console" size="3"&gt;[&lt;/font&gt;&lt;font face="Lucida Console" color="#006000" size="3"&gt;Conditional&lt;/font&gt;&lt;font face="Lucida Console" size="3"&gt;(&lt;/font&gt;&lt;font face="Lucida Console" color="#800000" size="3"&gt;"DEBUG"&lt;/font&gt;&lt;font face="Lucida Console" size="3"&gt;)]&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font face="Calibri" size="2"&gt;What is this all about?  The conditional attribute provides a nice way to have code be conditionally ignored.  Methods decorated with this attribute will not have their calls compiled to IL unless the condition is true.&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font face="Calibri" size="2"&gt;In the attribute shown above, any calls to the method will not be made unless the symbol DEBUG is defined.&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font face="Calibri" size="2"&gt;This creates some very intriguing possibilities.  Some of which might be nice and some of which might be pure evil.&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font face="Calibri" size="2"&gt;Code like this:&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;#define TEST&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;using System;&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;public class MyClass &lt;/font&gt;&lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;{                &lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;   public static void Main() &lt;/font&gt;&lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;   {&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;      #if (TEST)&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;         Console.WriteLine("TEST is defined");      &lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;      #endif&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;   }&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;}&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;font face="Calibri" size="2"&gt;Can be rewritten to code like this:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;    #define TEST&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;    public class MyClass&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;    {&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;        public static void Main()&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;        {&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;            TestWriteLine("Test is defined");&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;        }&lt;/font&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;        [System.Diagnostics.Conditional("TEST")]&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;        public static void TestWriteLine(string message)&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;        {&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;            Console.WriteLine(message);&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;        }&lt;/font&gt; &lt;br /&gt;
&lt;font face="Courier New" size="2"&gt;   }&lt;/font&gt; &lt;br /&gt;
&lt;font face="Calibri" size="2"&gt;Is this better?   Consider this, you would have to wrap every method call the “if test compiler directives” to achieve the same effect of adding the attribute to one place.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;If you are only calling the method from one place, this probably doesn’t matter, but if you are potentially calling this method from throughout multiple enterprise applications, this is unrealistic.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;The compiler directives can cause confusion by interrupt the logic flow.  &lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Here are some examples where this might be very useful and practical&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Suppose you wanted to be able to support a build that could be used for code coverage testing without having to change code for a production build.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Suppose you wanted to have a build to support performance metrics without having to change any code.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Suppose you wanted to have a build to support debugging information without having to change production code.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Turns out, this last example is the whole reason this attribute was created.   This is how Debug.WriteLine works.    &lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;Try this, sprinkle your code with calls System.Diagnostics.Debug.WriteLine(),  compile in debug mode, and examine the assembly with Reflector.   You will notice that all of your calls to WriteLine are there.   Now compile in release mode and examine the assembly with Reflector.   You didn’t change any code, but now none of the WriteLine statements are there.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;We could create a method decorated with a conditional attribute requiring that the symbol CodeCoverage must be defined and then call this method at the start of every function.   Compile the code defining this symbol.   Now when we run through a round of testing, we will get a list of every method that was called.    Recompile the code without defining this symbol and the overhead of logging function calls goes away.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;As is often the case, there are a couple of caveats.  This is not documented on MSDN anywhere that I have seen.   Any method decorated with this attribute must return void and cannot have output parameters.  This is intended to prevent the removal of this code from causing any unintended side effects.  You would not want to rely on a variable being initialized by a function that may or may not be called.   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri" size="2"&gt;How could you envision using such attributes?  &lt;/font&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;div id="highlighterDivCG" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;
&lt;div class="module overlay yui-module yui-overlay" id="lwPreview" style="LEFT: -400px; POSITION: absolute; TOP: -400px"&gt;
&lt;div class="hd"&gt;&lt;/div&gt;
&lt;div class="bd"&gt; &lt;/div&gt;
&lt;div class="ft"&gt;&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119786"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=119786" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/119786.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/02/19/119786.aspx</guid>
            <pubDate>Wed, 20 Feb 2008 02:56:02 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/119786.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/02/19/119786.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/119786.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/119786.aspx</trackback:ping>
        </item>
        <item>
            <title>Your project might be in trouble if … </title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/01/09/118422.aspx</link>
            <description>&lt;br /&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;I recently worked on a project that failed.   There is no other way to put it.   The project failed!    It’s a hard thing to admit.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;There are many reasons why bad things happen to good projects.   There are many reasons why despite our best intentions, not every project is successful.    There is always plenty of blame to go around.   The business market changed.    The technology changed.   We could not find the right resources.   Critical resources left.   The project lost funding.    The business lost interest…&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Many of these reasons can be boiled down to, IT didn’t know what the business needed and the business didn’t know what IT was doing.   In other words requirements were not well documented.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;From my recent experiences, I have come up with the following red flags to help you identify when your project might be in trouble&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Red flags&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If you have never met your subject matter  experts, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If there are no subject matter experts, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If new requirements are deemed critical but ignored for the sake of the schedule, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If a user that you have never heard of claims to be a project sponsor, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If the requirements change so much from one week to the next that you feel like it’s a different project, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If new people join the team and its weeks before you even meet them, the project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If you look around and there is no one to QA your code, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If you spend more time deploying than you do coding, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If the same project has failed over three times already, your project might in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If no one can succinctly state the business needs being solved, your project might be in trouble &lt;/font&gt;&lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If you have already deployed once, but still second guessing the platform, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If you can submit last month’s status report for this month and no one notices, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If you can’t tell last month’s status report from this month’s, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;If you have worked on the project for over a month and still don’t know where the database is, your project might be in trouble&lt;/font&gt; &lt;br /&gt;
&lt;font face="sans-serif" size="2"&gt;Guidelines:&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Write requirements down&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Don’t get bogged down in format or structure just content&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Get consensus that what you are working on is what needs working on&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Talk to as many users are you can.   They rarely will agree with each other&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Deploy new functionality as often as you can so that the users don’t worry that you have forgotten about them&lt;/font&gt; &lt;br /&gt;
&lt;font face="Symbol" size="2"&gt;·        &lt;/font&gt;&lt;font face="sans-serif" size="2"&gt;Keep deployment schedules spread out enough so that you don’t get bogged down in deployment overhead&lt;/font&gt; &lt;br /&gt;
&lt;font face="sans-serif" size="2"&gt;What red flags have you seen?   What are some guidelines that you have seen work?&lt;/font&gt;&lt;/p&gt;
&lt;div id="highlighterDiv" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118422"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118422" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/118422.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/01/09/118422.aspx</guid>
            <pubDate>Thu, 10 Jan 2008 03:02:52 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/118422.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/01/09/118422.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/118422.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/118422.aspx</trackback:ping>
        </item>
        <item>
            <title>Scared of Complex Technologies?     Embrace Them! </title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/01/09/118421.aspx</link>
            <description>&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Many people seem to be intimidated by some of the most exciting programming features in DotNet.   Reflection comes to mind.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;I once did a little client training and on the first day was lectured about this “Reflection Crap.”   We often fear what we don’t understand.  We often avoid technologies that we don’t have to use and cling to more familiar technologies and techniques.  It’s no fun admitting what we don’t know, and it is often faster to do something the old familiar way than it is to use new unfamiliar techniques, even when the new technique is better.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;The result is that many people never use reflection or regular expressions, or design patterns or threads, or … until there is no other way to accomplish whatever task they are working on.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;The result is that their first exposure to the new technique is pretty complicated and scary.   If the first time you use a regular expression is to handle data validation where nothing else would work, then your first regular expression will be a pretty tough one.   If the first time that you try to understand a piece of reflective logic is while production is down and you are tasked with untangling a failed reflective call, without a doubt you will be tempted to rip out the “reflection crap”.   If your first foray into multi-threaded program is when production is reporting concurrency issues that are costing the company money, you will hate threads.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;If on the other hand, you play with regular expressions between projects and start with simple pattern matches and work your way up to more complex patterns, you will have no problem using a 20 character expression to parse a string instead of 40 lines of string manipulation logic code.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;If you play with Reflection during design and see how easy it is to interrogate the metadata when you don’t have a business manager breathing down your neck, you will not be afraid to use reflection to loop through the properties of an object at runtime to initialize them to known safe values or loop through the methods of an object searching for new methods to run at.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Playing with these technologies when it is safe, gives you more confidence to be able to pull them out and show them off confidently when it may not be so safe, but when they are most useful.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;What are you afraid of?   What were you afraid of that you know use with confidence?   What have you been putting off learning?&lt;/font&gt;&lt;/p&gt;
&lt;div id="highlighterDiv" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118421"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118421" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/118421.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/01/09/118421.aspx</guid>
            <pubDate>Thu, 10 Jan 2008 03:01:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/118421.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/01/09/118421.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/118421.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/118421.aspx</trackback:ping>
        </item>
        <item>
            <title>Reflecting on Software Metrics</title>
            <link>http://geekswithblogs.net/nharrison/archive/2008/01/09/118420.aspx</link>
            <description>&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;At the risk of sounding pedantic, I like software metrics.   They can prove to be invaluable in analyzing source code.   To be clear, I am not proposing that developers be bonused based on metrics and their use in estimating and scheduling should be limited at best.  I am however a fan of software metrics as benchmarks for evaluating design and understanding how software works.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;There is an add-in for reflector called CodeMetrics that allows you to easily calculate a wide range of code metrics from within Reflector.   We are most interested in one metric, Cyclomatic Complexity&lt;/font&gt;&lt;font face="Times New Roman" size="2"&gt;.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Cyclomatic Complexity or CC is the number of logical paths through a piece of code.   This can be used to define a lower bound for the number of test cases needed to ensure proper coverage in unit testing.   This can also be used to predict ongoing maintenance costs and be scaled to predict the likelihood of actually resolving a particular defect or introducing additional defects.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Tables similar to this are common:&lt;/font&gt;
&lt;/p&gt;&lt;table border="1"&gt;
    &lt;tbody&gt;
        &lt;tr valign="top"&gt;
            &lt;td&gt;
            &lt;div align="center"&gt;&lt;font face="sans-serif" size="2"&gt;&lt;strong&gt;CC&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
            &lt;/td&gt;
            &lt;td&gt;
            &lt;div align="center"&gt;&lt;font face="sans-serif" size="2"&gt;&lt;strong&gt;Testing Requirements&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
            &lt;/td&gt;
            &lt;td&gt;
            &lt;div align="center"&gt;&lt;font face="sans-serif" size="2"&gt;&lt;strong&gt;Ongoing Maintenance Costs&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
            &lt;/td&gt;
            &lt;td&gt;
            &lt;div align="center"&gt;&lt;font face="sans-serif" size="2"&gt;&lt;strong&gt;Resolution Likelihood &lt;/strong&gt;&lt;/font&gt;&lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td bgcolor="#c0c0c0"&gt;&lt;font face="sans-serif" size="2"&gt;1-0&lt;/font&gt; &lt;/td&gt;
            &lt;td bgcolor="#c0c0c0"&gt;&lt;font face="sans-serif" size="2"&gt;A simple procedure&lt;/font&gt; &lt;/td&gt;
            &lt;td bgcolor="#c0c0c0"&gt;&lt;font face="sans-serif" size="2"&gt;Low&lt;/font&gt; &lt;/td&gt;
            &lt;td bgcolor="#c0c0c0"&gt;&lt;font face="sans-serif" size="2"&gt;High&lt;/font&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td&gt;&lt;font face="sans-serif" size="2"&gt;11-50 &lt;/font&gt;&lt;/td&gt;
            &lt;td&gt;&lt;font face="sans-serif" size="2"&gt;Complex&lt;/font&gt; &lt;/td&gt;
            &lt;td&gt;&lt;font face="sans-serif" size="2"&gt;Moderate to High&lt;/font&gt; &lt;/td&gt;
            &lt;td&gt;&lt;font face="sans-serif" size="2"&gt;Medium to low&lt;/font&gt; &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr valign="top"&gt;
            &lt;td bgcolor="#c0c0c0"&gt;&lt;font face="sans-serif" size="2"&gt;&amp;gt;50&lt;/font&gt; &lt;/td&gt;
            &lt;td bgcolor="#c0c0c0"&gt;&lt;font face="sans-serif" size="2"&gt;Very Difficult&lt;/font&gt; &lt;/td&gt;
            &lt;td bgcolor="#c0c0c0"&gt;&lt;font face="sans-serif" size="2"&gt;High Risk&lt;/font&gt; &lt;/td&gt;
            &lt;td bgcolor="#c0c0c0"&gt;&lt;font face="sans-serif" size="2"&gt;Low&lt;/font&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;The actual bands may vary depending on the line of business and skills of the developers involved, but these are generally good benchmarks.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;A CC of 10 would indicate that 10 test cases are needed to fully test all of the functionality.  Depending on what you are working on, that may be more complex than you want to consider or that may still be fairly trivial.   As a general rule, I try to keep methods below 10.   &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;When I am working on existing functionality, I try to review the code and refactor the code in the same module with the highest complexity, systematically reducing the overall complexity.  Sometimes the best you can do is to review the more complex functions and add comments on how they may be refactored.   Often times, the actual refactoring may be out of scope for the change that got you involved in the first place.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;It is important to review the complexity of any code before making code changes.   If you are about to change code that already has a high complexity, you want to make sure that your changes do not add more complexity.   You need to be aware that with higher complexities comes a higher chance of introducing new defects and you are also less likely to resolve the underlying defect if it is embedded in complex code.   &lt;span class="yshortcuts" id="lw_1199933777_0" style="CURSOR: hand; BORDER-BOTTOM: #0066cc 1px dashed"&gt;This may&lt;/span&gt; change your estimates and should change your testing strategy.&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Sometimes, complex code masks cohesion problems.  If the code is very complex, there is a good chance that the particular method is trying to do more than one thing.   If it is doing more than one thing, than simplifying the code may be nothing more than separating all of the different tasks that the method is trying to do.   For example, code is often complex because data validation logic is blended with business logic or data mapping logic is blended with business logic.    Simply pulling all of the data validation logic to a separate method and all of the data mapping logic to a separate method and isolating all of the business logic to a single method, you end up with several methods each of which is less complex than the original.   Each of these methods will be much more cohesive.   With cohesive methods, it is easier to know where to add new functionality or where to go when reviewing existing functionality. &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="sans-serif" size="2"&gt;Future blogs will explore some ways to reduce complexity.&lt;/font&gt;&lt;/p&gt;
&lt;div id="highlighterDiv" style="DISPLAY: none; Z-INDEX: -1; POSITION: absolute; BACKGROUND-COLOR: yellow"&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118420"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=118420" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/118420.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2008/01/09/118420.aspx</guid>
            <pubDate>Thu, 10 Jan 2008 03:00:07 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/118420.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2008/01/09/118420.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/118420.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/118420.aspx</trackback:ping>
        </item>
        <item>
            <title>Much has changed in the land of Nick</title>
            <category>Family Life</category>
            <link>http://geekswithblogs.net/nharrison/archive/2007/11/23/117074.aspx</link>
            <description>&lt;p&gt;As is most likely quiet obvious, it has been a long time since I have posted anything.   There are a couple of reasons for that.&lt;/p&gt;
&lt;p&gt;Most importantly, I met the love of my life, got married and have a new family that dominates all of my priorities.   Meeting Tracy and falling in love has changed my life in so many ways and definitely for the better.&lt;/p&gt;
&lt;p&gt;In the past, I worked simply out of sheer arrogance.   The only thing that matter was what others thought of me.  No real purpose.    Now,  I work as a means to an end.   Taking care of my family.&lt;/p&gt;
&lt;p&gt;In the past, no one really cared how long I worked.    When you live alone, there is no one concerned if you come home late and there is no real motivation to keep your work and personal life in balance.   If you don't have a life, it is eay to fall into a trap that keeps you from ever getting a life.   Now, I have a lovely wife and adorable daughter waiting for me at home.   They are a great joy to come home to.&lt;/p&gt;
&lt;p&gt;I find myself filled with a new sense of purpose beyond the next deadline.   Don't get me wrong.   I still love a good challenge.   I still love facing a challenge that others said could not be met and solving the problems.   I still love learning new technologies, and I still love using leading technology to solve real problems.  I just have a new love in my life.   My family.&lt;/p&gt;
&lt;p&gt;Keeping my work and family life in balance is not always easy.   I would love to hear how some of you manage such a balancing act.   I will also post about how I manage this balance or manage to throw the balance out of whack from time to time.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117074"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=117074" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/117074.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2007/11/23/117074.aspx</guid>
            <pubDate>Sat, 24 Nov 2007 02:43:19 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/117074.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2007/11/23/117074.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/117074.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/117074.aspx</trackback:ping>
        </item>
        <item>
            <title>BCL Team posting on the CodeDom</title>
            <category>Code Generation</category>
            <link>http://geekswithblogs.net/nharrison/archive/2006/04/21/75812.aspx</link>
            <description>&lt;P&gt;&lt;A href="http://blogs.msdn.com/bclteam/archive/2006/04/10/571096.aspx"&gt;http://blogs.msdn.com/bclteam/archive/2006/04/10/571096.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;They talk about how CodeDom is used in the designers for 2.0&lt;/P&gt;
&lt;P&gt;There are also several comments and responces complaining about some of the short comings people have with the CodeDom.&amp;nbsp;&amp;nbsp; Some of these short comings are refuted with work arounds.&amp;nbsp;&amp;nbsp; Including a short coming that I have often complained about.&amp;nbsp; :)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=75812"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=75812" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/75812.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2006/04/21/75812.aspx</guid>
            <pubDate>Fri, 21 Apr 2006 13:40:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/75812.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2006/04/21/75812.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/75812.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/75812.aspx</trackback:ping>
        </item>
        <item>
            <title>View State not Tracking on Dynamic Controls until after the second post back</title>
            <category>Stylish musings</category>
            <link>http://geekswithblogs.net/nharrison/archive/2005/11/28/61497.aspx</link>
            <description>&lt;P&gt;For several days,&amp;nbsp; I have struggled with a problem with the view state on dynamically loaded controls.&amp;nbsp;&amp;nbsp; I am using a&amp;nbsp;fair number of&amp;nbsp;dynamic controls on a little project that I have been working.&amp;nbsp;&amp;nbsp; Everything was working fine except in one section.&amp;nbsp;&amp;nbsp;&amp;nbsp; In this one section,&amp;nbsp; view state was not being tracked until after the first post back.&amp;nbsp;&amp;nbsp; Events were not responding until after the first post back.&amp;nbsp;&amp;nbsp;&amp;nbsp; Everything seemed to be setup&amp;nbsp;properly and it was working everywhere else.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Very perplexing.&amp;nbsp;&amp;nbsp;&amp;nbsp; Who ever heard of a problem fixing itself like that?&amp;nbsp;&amp;nbsp;&amp;nbsp; I have heard of dynamic controls NOT working after the second post back.&amp;nbsp;&amp;nbsp;&amp;nbsp; This was really strange.&amp;nbsp;&amp;nbsp; Here I had obviously made some mistake in wiring up the dynamic controls that fixes itself after one post back.&lt;/P&gt;
&lt;P&gt;I tried every thing I could think of to track this down.&amp;nbsp;&amp;nbsp;&amp;nbsp; I overrode the LoadViewState method, PreRender, SaveViewState, UnLoad, etc.&amp;nbsp;&amp;nbsp;&amp;nbsp; Everything looked good.&amp;nbsp;&amp;nbsp; Everything was behaving as expected after the initial post back.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; As hard as I looked,&amp;nbsp; I couldn't see anything different between the sections that worked and the area that was misbehaving.&amp;nbsp;&amp;nbsp;&amp;nbsp; A fresh set of eyes was needed.&lt;/P&gt;
&lt;P&gt;Sometimes you can be too close to a situation to see what is in front of you.&lt;/P&gt;
&lt;P&gt;I knew that it was important that the dynamic controls get the same ID when they are reloaded as they had when initially added.&amp;nbsp;&amp;nbsp; I took great pains to reload each control in the same order.&amp;nbsp;&amp;nbsp;&amp;nbsp; I took great pains to unload controls that were no longer needed before adding any additional controls.&amp;nbsp;&amp;nbsp;&amp;nbsp; What I failed to notice and only a fresh set of eyes could see was that&amp;nbsp; in one place, coincidently the place having problems,&amp;nbsp; I incremented the control count, &amp;nbsp;added the control to the containing control's control array, and finally set its ID, using the control count.&amp;nbsp;&amp;nbsp; Everywhere else,&amp;nbsp; I incremented the control count as the last step.&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This means that for the problematic section, there would be no control 0 when the controls are originally loaded.&amp;nbsp;&amp;nbsp; Because I was incrementing the control count before using it, the first control would always have an ID of 1.&amp;nbsp;&amp;nbsp; On post back when I reloaded the dynamic controls, the control would load but be given an ID of 0 because I was using the control count and then setting it.&amp;nbsp;&amp;nbsp; There was no viewstate for Control 0 and there was no longer a control for the viewstate data associated with the control with ID of 1.&amp;nbsp;&amp;nbsp;&amp;nbsp; After the first post back, the gap in the control ids was removed and from then on everything worked properly.&lt;/P&gt;
&lt;P&gt;I hope that my struggles help someone else.&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=61497"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=61497" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/61497.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2005/11/28/61497.aspx</guid>
            <pubDate>Tue, 29 Nov 2005 01:14:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/61497.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2005/11/28/61497.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/61497.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/61497.aspx</trackback:ping>
        </item>
        <item>
            <title>The joy of solving a problem</title>
            <link>http://geekswithblogs.net/nharrison/archive/2005/11/28/61494.aspx</link>
            <description>&lt;P&gt;There is no greater joy, no finer ecstasy than solving a perplexing problem.&amp;nbsp;&amp;nbsp;&amp;nbsp; The more perplexing, the greater the euphoria.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In many ways, I live for this rush.&lt;/P&gt;
&lt;P&gt;Often the release that comes from the resolution of such problems makes up for the embarrassment when the root of the problem turns out to be a simple mistake.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=61494"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=61494" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/nharrison/aggbug/61494.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Nick Harrison</dc:creator>
            <guid>http://geekswithblogs.net/nharrison/archive/2005/11/28/61494.aspx</guid>
            <pubDate>Tue, 29 Nov 2005 01:05:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/nharrison/comments/61494.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/nharrison/archive/2005/11/28/61494.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/nharrison/comments/commentRss/61494.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/nharrison/services/trackbacks/61494.aspx</trackback:ping>
        </item>
    </channel>
</rss>