    <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</title>
        <link>https://members.accu.org/index.php/journals/808</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 17, #3 - Jun 2005 + 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="https://members.accu.org/index.php/journals/">All</a>

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

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

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c96/">173</a>
                    (15)
<br />

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

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

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

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

                    -                        <a href="https://members.accu.org/index.php/journals/c96+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</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 02 June 2005 05:00:00 +01:00 or Thu, 02 June 2005 05:00:00 +01:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e20" id="d0e20"></a></h2>
</div>
<p class="c3"><span class="remark">In the last issue, we published
a piece called &quot;Forgetting the ABC by Orjan Westin&quot;. It seems that
it has sparked something of a conversation on email between Orjan,
Herb Sutter and Andrei Alexandrescu.</span></p>
<p class="c3"><span class="remark">I've set it out chronologically
with to and from set at the start of each email.</span></p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e28" id="d0e28"></a>From Orjan to
Herb</h2>
</div>
<p>Hi,</p>
<p>I know you are both very busy, so I don't really expect a reply
to this (although I might try to corner you at the ACCU conference,
Herb - what's your favourite beverage?) but I thought you might be
interested in the following short article, which was published in
the latest edition of CVu, journal of the ACCU.</p>
<p>I just wonder if you have ever thought of what I call the ABC
principle?</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e37" id="d0e37"></a>From Herb to
Orjan</h2>
</div>
<p>Hi Orjan, and cc'ing CVu's editor since you said your critique
is already published and so he can print this response if he
likes.</p>
<p>Thanks for the kind words about C++ Coding Standards. You also
wrote:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>What did surprise me was an omission. [...] I just wish they
hadn't missed what I have always thought of as the ABC principle -
Always Be Conventional. To be fair, it is covered, albeit in a
couple of specific instances.</p>
<p>Items 26 (Preserve natural semantics for overloaded operators),
27 and 28 (Prefer the canonical form[s of +, +=,++, and the minus
equivalents]) and 55 (Prefer the canonical form of assignment) are
all expressions of ABC.</p>
<p>However, while it is important to follow the principle when
dealing with operators, I was surprised that there was no
generalisation of it, since it is a common problem anywhere an
established convention exists. To be fair, I think you've just
overlooked the very first Item 0. :-) Also Item 6. ABC is basic
wisdom and common sense, just like KISS, and it bears repeating.
While Sutter and Alexandrescu devote four out of one hundred and
one items to special cases, they fail to point out the underlying
general principle. I do not know whether this was through oversight
or because they considered it too obvious, but personally, I feel
it is an important principle that is neglected too often.</p>
</blockquote>
</div>
<p>It is important; that's why we deliberately wrote the opening
Item 0 with the repeated mantra of being &quot;consistent&quot; (FWIW I think
in this context that's a better word than &quot;conventional&quot;). Here are
some specific examples, including seven quotes from that Item where
the word is used explicitly:</p>
<div class="itemizedlist">
<ul type="disc">
<li>
<p>general formatting (&quot;<span class="quote">Do use consistent
formatting</span>&quot;, &quot;<span class="quote">be consistent with the
style already in use</span>&quot;)</p>
</li>
<li>
<p>indenting (&quot;<span class="quote">Use any number of spaces you
like to indent, but be consistent</span>&quot;)</p>
</li>
<li>
<p>naming variables, as in your first example (&quot;<span class=
"quote">do use a consistent naming convention</span>&quot; and
&quot;<span class="quote">do use consistent and meaningful names and
follow a file's or module's convention</span>&quot;)</p>
</li>
<li>
<p>brace placement (&quot;<span class="quote">be consistent: Don't just
place braces randomly or in a way that obscures scope nesting, and
try to follow the style already in use in each file</span>&quot;)</p>
</li>
<li>
<p>spaces/tabs (&quot;<span class="quote">be consistent: If you do allow
tabs, ensure it is never at the cost of code clarity and
readability and readability as team members maintain each other's
code (see Item 6)</span>&quot;)</p>
</li>
</ul>
</div>
<p>That's all in the first two pages. Note also that this overlaps
with the important theme of Item 6, which covers your other
examples. Your article's summary said:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>It's just a matter of following conventions where they exist,
fulfilling expectations and avoiding putting in surprises for other
developers (or oneself, in six months time).</p>
</blockquote>
</div>
<p>That sure sounds a lot like our Item 6's opening Discussion
paragraph:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>&quot;Your code's maintainer will thank you for making it
understandable - and often that will be your future self, trying to
remember what you were thinking six months ago.&quot;</p>
</blockquote>
</div>
<p>Hmm. :-)</p>
<p>If you look again, I think you'll find we're in violent
agreement that consistency is important. Thanks for writing, and
best wishes,</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e104" id="d0e104"></a>From Andrei
to Herb</h2>
</div>
<p>I concur with Herb, and I'd like to add a paradox that I find
funny: Orjan's statement is not congruent with itself.</p>
<p>That is, throughout his discussion he implies &quot;Always Be
Conventional&quot; aka ABC as a universal, valid, known, beaten-to-death
principle (&quot;ABC is basic wisdom and common sense, just like KISS,
and it bears repeating&quot;).</p>
<p>Yet, a google search for the phrase &quot;Always be Conventional&quot;
yields 68 results, zero of which have anything to do with
programming. A search for &quot;Always be Conventional&quot; and &quot;ABC&quot; yields
two results, none of which are related to programming, and none of
which even mentions ABC as an abbreviation of &quot;Always be
Conventional&quot; (or &quot;Always be Consistent&quot; for that matter).</p>
<p>So why is the statement not congruent with itself? Because if
the statement were conventional, it would obey to whatever
established conventions are out there, and &quot;Always be
Conventional&quot;/ABC is simply not out there.</p>
<p>As such, some statements in the short article are simply untrue
representing author's thinking and not generally accepted views, as
the writing however states quite explicitly. Nothing personal, but
I suggest CVu changes the article, pulls it off, or publishes a
correction in a future issue.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e117" id="d0e117"></a>From Orjan to
Andrei</h2>
</div>
<div class="blockquote">
<blockquote class="blockquote">
<p>I concur with Herb, and I'd like to add a paradox that I find
funny: Orjan's statement is not congruent with itself.</p>
</blockquote>
</div>
<p>I, too, am sometimes amused by displays of incongruency. For
instance, here you agree with Herb who said, if I may paraphrase,
&quot;It is important and you are saying the same thing as we do&quot;, and
then you ask for the article to be pulled. I chose to be amused,
rather than offended, since you do say it's not meant
personally.</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>That is, throughout his discussion he implies &quot;Always Be
Conventional&quot; aka ABC as a universal, valid, known, beaten-to-death
principle (&quot;ABC is basic wisdom and common sense, just like KISS,
and it bears repeating&quot;).</p>
</blockquote>
</div>
<p>There is an expression that goes &quot;the map is not the world&quot;. It
may be worth thinking about this.</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>Yet, a google search for the phrase &quot;Always be Conventional&quot;
yields 68 results, zero of which have anything to do with
programming. A search for &quot;Always be Conventional&quot; and &quot;ABC&quot; yields
two results, none of which are related to programming, and none of
which even mentions ABC as an abbreviation of &quot;Always be
Conventional&quot; (or &quot;Always be Consistent&quot; for that matter).</p>
</blockquote>
</div>
<p>I am not surprised. When presenting what I was going to write
about, I used the phrase &quot;<span class="quote">what I have always
thought of as the ABC principle - Always Be Conventional</span>&quot;. I
say at the beginning of the article that this is MY name for it.
Now, had I been an influential writer who had been hammering this
phrase for years, it might possibly have become a common name, but
I am not, I haven't and and it isn't.</p>
<p>It's my name for a principle, because as far as I am aware it
has no established name. One specific instance of it has been
summarised by Scott Meyers as &quot;When in doubt, do what ints do&quot;, but
that is a specialization and I wanted to talk about it in a wider
scope.</p>
<p>Having introduced my name for it, I then went on to illustrate
what I meant with some examples. Obviously I have failed to
delineate precisely what the seemingly offending phrase meant to
me, but I'll come back to that.</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>So why is the statement not congruent with itself? Because if
the tatement were conventional, it would obey to whatever
established conventions are out there, and &quot;Always be
Conventional&quot;/ABC is simply not out there.</p>
</blockquote>
</div>
<p>I humbly ask that you consider the notion that the principle of
which I wrote may be well established, general, basic, well known,
and important. I doubt that you have any objections to that notion,
since you say you concur with Herb that it is important, and you
did spend four items focusing on specializations of it in your
book.</p>
<p>It is possible that the phrase I used was unclear - English is
not my first language and there might be nuances I am not aware of
that makes it say something different from what I wanted to express
- and I would be happy to write a clarification if asked to do
so.</p>
<p>I imagine that for clarity's sake I should have said that
&quot;<span class="quote">This principle is basic wisdom...</span>&quot;
rather than use MY name for it, but since I had both established
that this name was something that I personally use as a shorthand
for the principle, and (to the best of my ability) illustrated what
I meant with &quot;ABC&quot;, I thought it would be clear what I spoke about.
That it was not is now obvious, and I apologise for my failure.
However...</p>
<div class="blockquote">
<blockquote class="blockquote">
<p>As such, some statements in the short article are simply untrue
representing author's thinking and not generally accepted views, as
the writing however states quite explicitly.</p>
</blockquote>
</div>
<p>What statements are untrue? You imply, it seems to me, that I
have wilfully lied and I can't say I am happy about that. I am
astonished that you have spent a lot of effort disproving something
I have never said, and that you think this warrants pulling the
article.</p>
<p>You may, if you wish, contend that the principle is false,
unknown or not a generally accepted view. That, at least, would be
in reply to something I said. If so, I would happily argue my case,
because I believe it is true whatever label is used to refer to it.
Not knowing any other, I used my own. That I am the only one using
that label has no impact on the validity of the principle to which
it refers.</p>
<p>In honesty, though, I have always thought of the principle using
a phrase in Swedish, which can be literally translated as &quot;Follow
Established Conventions&quot; - something I told the editor in my cover
notes. This is clearer and less ambigious, I admit, but given that
I think it is a basic principle, and that it could be translated to
give the acronym &quot;ABC&quot;, I gave in to the temptation to get a title
that would, I hoped, express the basic nature of the subject.</p>
<p>As for your Items 0 and 6, I have read them, but I do not think
they cover what I was looking for. They are (especially Item 0) at
a higher level of generalisation, while the other items I refer to
are at a lower one.</p>
<p>In the examples I gave, I was concerned with interfaces, and
what established conventions have led programmers assume and
expect. I expect things to work in a way reminiscent of similar
things. In a container with a STL-style interface, I expect the
function &quot;empty&quot; to return a bool and not mess with the data. One
could argue that it should do the same thing as &quot;clear&quot; and one
could win that argument on all points except one: the convention
established by the STL is that is should tell whether the container
is empty or not.</p>
<p>These are the kind of conventions I argue one should be aware of
and adhere to, and while Item 6 touches on it, I, personally, would
have liked an explicit mention of the importance of doing the
expected and assumed. It would certainly have been helpful to me
thirteen years ago, when I first began working with C++. That is
just my personal opinion, though, and I will continue to recommend
the book to all C++ programmers I meet.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e169" id="d0e169"></a>From Andrei
to Orjan</h2>
</div>
<p>Sorry, I choose to stand by my words. Sorry about the stir that
my previous reply has caused. I do think that &quot;Always be
conventional&quot; is applicable because it's overly general, but so is
NDSSATYWNBAOWYD, which is the self-evident advice that my mom
jokingly gives me: &quot;<span class="quote">Never Do Something
Shameful, And Then You Will Never Be Ashamed Of What You
Did</span>&quot;. Does it apply to programming? Sure. Could I find
examples that back it up? Definitely. Could I say &quot;NDSSATYWNBAOWYD
is basic wisdom and common sense, just like KISS, and it bears
repeating&quot;? No way.</p>
<p>That's where my axe to grind is: comparing ABC with KISS implies
that googling for &quot;Keep it Simple, Stupid&quot; would reveal comparable
ubiquity with &quot;Always be conventional&quot;, and &quot;repeating&quot; means it
has been said many times by many people before, which it simply
hasn't.</p>
</div>
<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e179" id="d0e179"></a></h2>
</div>
<p class="c3"><span class="remark">And that's where the discourse
ended. So much said over such a small article.</span></p>
<p class="c3"><span class="remark">As always, if you have anything
to say about the content, please feel free to get in
touch.</span></p>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
