<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Hungarian Notation Again</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:42:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39817</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 12 Jun 2009 20:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39817</guid>
		<description>&lt;p&gt;I don&#039;t care what they say, I find Select Case to much more readable than If/ElseIf/Else/EndIf.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I don&#8217;t care what they say, I find Select Case to much more readable than If/ElseIf/Else/EndIf.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39784</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Thu, 11 Jun 2009 12:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39784</guid>
		<description>&lt;p&gt;I read somewhere that If ElseIf ElseIf etc was a speed improvement on Select Case.&lt;br&gt;
For me, this was the final push I needed to avoid Select Case whereever possible.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I read somewhere that If ElseIf ElseIf etc was a speed improvement on Select Case.<br />
For me, this was the final push I needed to avoid Select Case whereever possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Phillips</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39758</link>
		<dc:creator>Bob Phillips</dc:creator>
		<pubDate>Tue, 09 Jun 2009 21:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39758</guid>
		<description>&lt;p&gt;Intellisense will not autocomplete variable names (In actuality, it doesn&#039;t autocomplete anything, it just shows you what is available with your so-far typed characters), and ctrl-spacebar does that for variables.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Intellisense will not autocomplete variable names (In actuality, it doesn&#8217;t autocomplete anything, it just shows you what is available with your so-far typed characters), and ctrl-spacebar does that for variables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39644</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Tue, 02 Jun 2009 19:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39644</guid>
		<description>&lt;p&gt;&lt;b&gt;BP&lt;/b&gt;: Don&#039;t tell me you can tell the difference between Greek and Hungarian women.&lt;/p&gt;
&lt;p&gt;I wish I could have come up with a better example than lFile.  I guess I don&#039;t run into that &#039;problem&#039; enough, because if I did I would have good examples aplenty.  It&#039;s one of those &#039;problems&#039; that I see rarely, and I&#039;m glad I have a &#039;solution&#039; for, but the cost of all that prefixing isn&#039;t really justified.  Oh, I know the example I was trying to think of: keywords as variables.  Try naming a variable &#039;Replace&#039;.  I know, bad examples everywhere. :)&lt;/p&gt;
&lt;p&gt;Does intellisense autocomplete variable names as you type them?  If so, mine is broke and I need to get it fixed, because that would be great.&lt;/p&gt;
&lt;p&gt;The prefixes vs suffixes don&#039;t bother me.  First, no non-alpha characters in my variable names.  Characters like shift+underscore are too prone to typos for me.  I read the prefixes with the variable name, so it&#039;s not particularly cumbersome for me, e.g. &#039;bee found&#039; or &#039;ell file&#039;.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><b>BP</b>: Don&#8217;t tell me you can tell the difference between Greek and Hungarian women.</p>
<p>I wish I could have come up with a better example than lFile.  I guess I don&#8217;t run into that &#8216;problem&#8217; enough, because if I did I would have good examples aplenty.  It&#8217;s one of those &#8216;problems&#8217; that I see rarely, and I&#8217;m glad I have a &#8216;solution&#8217; for, but the cost of all that prefixing isn&#8217;t really justified.  Oh, I know the example I was trying to think of: keywords as variables.  Try naming a variable &#8216;Replace&#8217;.  I know, bad examples everywhere. <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Does intellisense autocomplete variable names as you type them?  If so, mine is broke and I need to get it fixed, because that would be great.</p>
<p>The prefixes vs suffixes don&#8217;t bother me.  First, no non-alpha characters in my variable names.  Characters like shift+underscore are too prone to typos for me.  I read the prefixes with the variable name, so it&#8217;s not particularly cumbersome for me, e.g. &#8216;bee found&#8217; or &#8216;ell file&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cyril Z.</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39638</link>
		<dc:creator>Cyril Z.</dc:creator>
		<pubDate>Tue, 02 Jun 2009 10:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39638</guid>
		<description>&lt;p&gt;About setting variables to Nothing, there are not so useless.&lt;br&gt;
You have to set them to Nothing when you deal with copy/paste Macros code in Macros, especially for VBComponent objects, otherwise, the execution crashes Excel when you run your macro twice.&lt;/p&gt;
&lt;p&gt;Excel is not good at memory management, thus setting Object to Nothing helps it a lot when using extensively macros !&lt;/p&gt;
&lt;p&gt; Cyril.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>About setting variables to Nothing, there are not so useless.<br />
You have to set them to Nothing when you deal with copy/paste Macros code in Macros, especially for VBComponent objects, otherwise, the execution crashes Excel when you run your macro twice.</p>
<p>Excel is not good at memory management, thus setting Object to Nothing helps it a lot when using extensively macros !</p>
<p> Cyril.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie Hall</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39627</link>
		<dc:creator>Charlie Hall</dc:creator>
		<pubDate>Mon, 01 Jun 2009 17:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39627</guid>
		<description>&lt;p&gt;My coding techniques have certainly evolved as have others, such that I do not use a type-based notation all the time since in many instances that variable name makes it obvious.&lt;/p&gt;
&lt;p&gt;But what I never understood, and never followed, was the concept of using prefixes instead of suffixes (eg. bFound vs found_b).  Why is the type more important than the variable name itself - if you use suffixes, then starting the variable name allows intellisence to find the variable name with fewer keystrokes - and reminds you once you see the full name, what the type is - which is all I need to ensure I am using the right type.  I guess for me, the efficiency of less keystrokes was a deciding factor, but I also find (and this it appears is very personal) it hard to read variable names when there are a few characters in front that have little to do with the english understanding of the variable name.  Even though they are lower case, it still gets in the way of me quickly understanding what the variable is meant to be.  Plus suffixes allow me to use lower case variables for local and uppercase first letter in each word, to be module or global variables - certainly redundant with the suffix, but it still adds clarity to me.&lt;/p&gt;
&lt;p&gt;Does anyone know of a prefix/suffix interchange addin - when one has to take over someone esle&#039;s code.&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>My coding techniques have certainly evolved as have others, such that I do not use a type-based notation all the time since in many instances that variable name makes it obvious.</p>
<p>But what I never understood, and never followed, was the concept of using prefixes instead of suffixes (eg. bFound vs found_b).  Why is the type more important than the variable name itself &#8211; if you use suffixes, then starting the variable name allows intellisence to find the variable name with fewer keystrokes &#8211; and reminds you once you see the full name, what the type is &#8211; which is all I need to ensure I am using the right type.  I guess for me, the efficiency of less keystrokes was a deciding factor, but I also find (and this it appears is very personal) it hard to read variable names when there are a few characters in front that have little to do with the english understanding of the variable name.  Even though they are lower case, it still gets in the way of me quickly understanding what the variable is meant to be.  Plus suffixes allow me to use lower case variables for local and uppercase first letter in each word, to be module or global variables &#8211; certainly redundant with the suffix, but it still adds clarity to me.</p>
<p>Does anyone know of a prefix/suffix interchange addin &#8211; when one has to take over someone esle&#8217;s code.</p>
<p>Charlie</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39623</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Mon, 01 Jun 2009 06:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39623</guid>
		<description>&lt;p&gt;I find real Hungarian notation very useful as a link between datatype and semantics (obviously, stating the datatype as part of the name is useless).&lt;/p&gt;
&lt;p&gt;One Excel-relevant example I use every day is column and row numbers. They are both integers. I use the prefixes &#039;col&#039; and &#039;row&#039;, for example rowSomething and colSomething. I use the same prefix in functions.&lt;/p&gt;
&lt;p&gt;In my systems I have the Excel interface located in a few classes that use Excel&#039;s 1-indexed col- and row-numbers. In the rest of my code, I use 0-indexed col- and row-numbers. In this case, Hungarian prefixes are even more useful: &#039;xr&#039; and &#039;xc&#039; are 1-indexed, &#039;row&#039; and &#039;col&#039; are 0-indexed. Clearly, these shouldn&#039;t be mixed, and the prefixes help spot problems.&lt;/p&gt;
&lt;p&gt;Another example is the C# DateTime structure, which can be used for either a date-only value or at date-and-time value. I use &#039;date&#039; as prefix when the value is a date-only and &#039;dti&#039; when the value is date-and-time. You can calculate a timespan by subtracting two &#039;date&#039; values or by subtracting two &#039;dti&#039; values, but you shouldn&#039;t calculate a timespan from a &#039;date&#039; and a &#039;dti&#039;.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I find real Hungarian notation very useful as a link between datatype and semantics (obviously, stating the datatype as part of the name is useless).</p>
<p>One Excel-relevant example I use every day is column and row numbers. They are both integers. I use the prefixes &#8216;col&#8217; and &#8216;row&#8217;, for example rowSomething and colSomething. I use the same prefix in functions.</p>
<p>In my systems I have the Excel interface located in a few classes that use Excel&#8217;s 1-indexed col- and row-numbers. In the rest of my code, I use 0-indexed col- and row-numbers. In this case, Hungarian prefixes are even more useful: &#8216;xr&#8217; and &#8216;xc&#8217; are 1-indexed, &#8216;row&#8217; and &#8216;col&#8217; are 0-indexed. Clearly, these shouldn&#8217;t be mixed, and the prefixes help spot problems.</p>
<p>Another example is the C# DateTime structure, which can be used for either a date-only value or at date-and-time value. I use &#8216;date&#8217; as prefix when the value is a date-only and &#8216;dti&#8217; when the value is date-and-time. You can calculate a timespan by subtracting two &#8216;date&#8217; values or by subtracting two &#8216;dti&#8217; values, but you shouldn&#8217;t calculate a timespan from a &#8216;date&#8217; and a &#8216;dti&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fzz</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39622</link>
		<dc:creator>fzz</dc:creator>
		<pubDate>Mon, 01 Jun 2009 03:56:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39622</guid>
		<description>&lt;p&gt;Comments are occasionally necessary in numeric programming, in particular handling truncation error can vary between languages and/or compilers. The code needed to trap and remedy such pathologies is usually not straightforward.&lt;/p&gt;
&lt;p&gt;I&#039;d also make the argument that trapping exceptions due to external processes benefits from comments explaining the nature and causes of such exceptions and the reasons why the exception handler does what it does. E.g., handling results from SQL queries that return no records. Whether that&#039;s an &#039;impossible&#039; or possible but (presumably) rare, some explanation of why it&#039;s handled as it&#039;s handled is a good thing.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Comments are occasionally necessary in numeric programming, in particular handling truncation error can vary between languages and/or compilers. The code needed to trap and remedy such pathologies is usually not straightforward.</p>
<p>I&#8217;d also make the argument that trapping exceptions due to external processes benefits from comments explaining the nature and causes of such exceptions and the reasons why the exception handler does what it does. E.g., handling results from SQL queries that return no records. Whether that&#8217;s an &#8216;impossible&#8217; or possible but (presumably) rare, some explanation of why it&#8217;s handled as it&#8217;s handled is a good thing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: simon</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39599</link>
		<dc:creator>simon</dc:creator>
		<pubDate>Sat, 30 May 2009 18:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39599</guid>
		<description>&lt;p&gt;I agree with Bob (on the code side) dunno about the national dress, but I bet he&#039;s right on that too.&lt;br&gt;
I have rarely read a useful comment in Excel VBA code, apart from the essential module header:&lt;br&gt;
&#039;They made me do it this way, I wanted to do it right but they made me do it quick instead.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I agree with Bob (on the code side) dunno about the national dress, but I bet he&#8217;s right on that too.<br />
I have rarely read a useful comment in Excel VBA code, apart from the essential module header:<br />
&#8216;They made me do it this way, I wanted to do it right but they made me do it quick instead.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Phillips</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/29/hungarian-notation-again/#comment-39598</link>
		<dc:creator>Bob Phillips</dc:creator>
		<pubDate>Sat, 30 May 2009 18:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2515#comment-39598</guid>
		<description>&lt;p&gt;Hey Dick, we&#039;ve already had this discussion at LinkedIn, and I repeat what Linus Torvalds says ... Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged, the compiler knows the types anyway and can check those, and it only confuses the programmer.&lt;/p&gt;
&lt;p&gt;Remember Shift-F2!&lt;/p&gt;
&lt;p&gt;Even your unique variable name is totally spurious, to me. Neither is a file, so sFile, lFile is bad naming, it should be Filename and FileIndex, or whatever they really are.&lt;/p&gt;
&lt;p&gt;The imporatnt thing is a naming convention, and stick to it, a decent coder will soon get into the swing.&lt;/p&gt;
&lt;p&gt;And you are right, comments are pointless (except the copyright notice ). As the great Smurf says, if you need comments to explain the code, it is badly written. Whenever I add comments because I think something is tricky, I invariably don&#039;t understand it myself in 3 months. If I read someone else&#039;s comments, I either cringe at the banality of it, e.g.&lt;/p&gt;
&lt;p&gt;&#039;Close Recordset&lt;br&gt;
RS.Close&lt;/p&gt;
&lt;p&gt;or I don&#039;t understand what they are saying. And who ever updates comments? The code never lies, comments often do.&lt;/p&gt;
&lt;p&gt;And why have you got a picture of 2 Greek ladies on a topic about Hungarian notation?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hey Dick, we&#8217;ve already had this discussion at LinkedIn, and I repeat what Linus Torvalds says &#8230; Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged, the compiler knows the types anyway and can check those, and it only confuses the programmer.</p>
<p>Remember Shift-F2!</p>
<p>Even your unique variable name is totally spurious, to me. Neither is a file, so sFile, lFile is bad naming, it should be Filename and FileIndex, or whatever they really are.</p>
<p>The imporatnt thing is a naming convention, and stick to it, a decent coder will soon get into the swing.</p>
<p>And you are right, comments are pointless (except the copyright notice ). As the great Smurf says, if you need comments to explain the code, it is badly written. Whenever I add comments because I think something is tricky, I invariably don&#8217;t understand it myself in 3 months. If I read someone else&#8217;s comments, I either cringe at the banality of it, e.g.</p>
<p>&#8216;Close Recordset<br />
RS.Close</p>
<p>or I don&#8217;t understand what they are saying. And who ever updates comments? The code never lies, comments often do.</p>
<p>And why have you got a picture of 2 Greek ladies on a topic about Hungarian notation?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

