    <rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
     <channel>
        <title>ACCU  :: Comments on Hungarian Type Notations</title>
        <link>http://accu.org/index.php/journals/766</link>
        <description>Professionalism in Programming</description>
        <dc:language>en-us</dc:language> 
        <dc:creator>Administrator</dc:creator> 
        <admin:generatorAgent rdf:resource="http://www.xaraya.org" /> 
        <admin:errorReportsTo rdf:resource="mailto:webeditor@accu.org" />
       <sy:updatePeriod>hourly</sy:updatePeriod>
       <sy:updateFrequency>1</sy:updateFrequency>
       <docs>http://backend.userland.com/rss</docs>


        <h2>Journal Articles</h2>


<div class="xar-mod-head"><span class="xar-mod-title">CVu Journal Vol 11, #2 - Feb 1999 + Letters to the Editor</span></div>

<table border="0" cellpadding="1" cellspacing="0">
    <tbody>
    <tr>
        <td valign="top">
            Browse in :
       </td>
       <td valign="top">

                                            <a href="http://accu.org/index.php/journals/">All</a>

                     &gt;                         <a href="http://accu.org/index.php/journals/c76/">Journals</a>

                     &gt;                         <a href="http://accu.org/index.php/journals/c77/">CVu</a>

                     &gt;                         <a href="http://accu.org/index.php/journals/c133/">112</a>
                    (20)
<br />

                                            <a href="http://accu.org/index.php/journals/">All</a>

                     &gt;                         <a href="http://accu.org/index.php/journals/c184/">Journal Columns</a>

                     &gt;                         <a href="http://accu.org/index.php/journals/c186/">LettersEditor</a>
                    (123)
<br />

                                            <a href="http://accu.org/index.php/journals/c133-186/">Any of these categories</a>

                    -                        <a href="http://accu.org/index.php/journals/c133+186/">All of these categories</a>
<br />
</td>
   </tr>
   </tbody>
</table>




<div class="xar-error">
   <p>
 <strong>Note:</strong> when you create a new publication type,
the articles module will automatically use the templates
<em>user-display-[publicationtype].xt</em>
and <em>user-summary-[publicationtype].xt</em>.
If those templates do not exist when you try to preview or display a new article,
you'll get this warning :-)  Please place your own templates in themes/<em>yourtheme</em>/modules/articles . The templates will get the extension .xt there. </p>
</div>
<div class="xar-norm xar-standard-box-padding">
   <h1><strong>Title:</strong>&nbsp;Comments on Hungarian Type Notations</h1>
<p><strong>Author:</strong>&nbsp;Administrator</p>
<p>
<strong>Date:</strong> 03 February 1999 13:15:29 +00:00 or Wed, 03 February 1999 13:15:29 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="section" lang="en">
<div class="titlepage">
<h2><a name="d0e20" id="d0e20"></a></h2>
</div>
<p>I feel impelled to comment on debate between the Harpist and
others about Hungarian Notation (and indeed other conventions of
this nature).</p>
<p>There are a number of points to note. The first is that this
controversy is not accidental, trivial, or incidental. It goes to
the very heart of program debugging technique. That is why it
raises so many passions and refuses to go away.</p>
<p>Programming is a purely intellectual exercise. When a program is
broken, you don't go down to the program shop and buy a spare part
(<i><span class="remark">well sometimes you have to obtain a
'fixed' component. Francis</span></i>), you sit down and use your
intellectual abilities to figure out what is wrong and fix the
problem. This means that anything that interferes with or aids that
mental concentration is important.</p>
<p>Above everything else the human brain is a pattern-matching
machine. If the code you are looking at is a regular pattern (in
content as well as layout) then things that break that pattern will
stand out. If on the other hand the code layout and logic is a
shambles then there is no way you can spot something out of the
ordinary.</p>
<p>Make no mistake - bugs are fixed by looking at code. Debuggers
and other tools may tell you <span class=
"emphasis"><em>which</em></span> section of code to look at, but
the bug itself is always found by looking at the code!</p>
<p>It is this pattern matching ability - both logic patterns and
syntax patterns - that underlies all the strictures about coding
standards - even if the authors don't realise why they are
advocating such things.</p>
<p>For instance, there is nothing intrinsically wrong with GOTOs -
all the founding fathers of computer programming not withstanding -
the compiler uses them all the time in the machine code it
generates. The reason we don't use them has nothing to do with
their intrinsic worth, it is because they break up the logic of the
program making it impossible to spot logic pattern defects.</p>
<p>All of the proposed 'notations' have one thing in common. They
are designed to make the underlying pattern more visible. This is a
laudable objective, so why then do they come in for so much
vilification? And why do they have such fervent admirers?</p>
<p>The problem is that one man's meat is another man's poison.
Different people see the same pattern differently and use different
visual cues to decompose patterns. For one person, code written in
Hungarian Notation may make all the difference between being able
to see a pattern and not being able to see it. For another, the
same notation may completely obscure the pattern.</p>
<p>Neither of these people are 'right' or 'wrong', they are simply
different - which is not unusual! The real problem here is that one
person's pattern analysis cues are being embedded in the program,
obfuscating it for those who use a different set of pattern
cues.</p>
<p>The solution is not to embed visual cues in the code but to have
editors that will embed your own set of cues in the code when they
display it to you. Of course the problem is that none of the
present generation of code editors have these facilities.</p>
<p>When I load code into an editor I don't need to be identify
keywords by having them in green; 'C' and 'C++' have a very small
set of keywords which are easy to remember - I want to be able to
tell the editor to put all class member data in green. And
furthermore, I want to turn this on and off without leaving the
screen with the code on it!</p>
<p>I want to put the cursor on the variable and have the bubble
help tell me that it is an integer, or whatever, if I need the
information. (If only life came with bubble help!)</p>
<p>The point is that I want to add my visual cues, I don't want to
be burdened with other people's cues. Debugging is a difficult
enough activity without other people clogging up my pattern space
with their aide-memories!</p>
<p>Yes - I want it all, and I want it now - Microsoft, Borland,
Symantic et al take note!</p>
<p class="c2"><span class="remark">One of the problems with the
notations (Hungarian etc.) that Alan is referring to is that, like
comments, they go out of date and we are matching erroneous
patterns.</span></p>
<p class="c2"><span class="remark">I think his suggestion on the
use of colour and bubble help (with a spoken option for those with
sight problems) is exactly what we need. Now that C++ has
stabilised (I know C is about to change, but the changes are much
smaller than for C++) any company focussing on this aspect of
editors must be on to a winner.</span></p>
<p class="c2"><span class="remark">I hope it will not be long
before someone does this. Actually CodeWarrior is getting close on
the colour side. Francis</span></p>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
