    <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  :: C Abuse</title>
        <link>https://members.accu.org/index.php/journals/256</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">Overload Journal #65 - Feb 2005 + Programming Topics</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/c78/">Overload</a>

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c147/">65</a>
                    (9)
<br />

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

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

                     &gt;                         <a href="https://members.accu.org/index.php/journals/c65/">Programming</a>
                    (877)
<br />

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

                    -                        <a href="https://members.accu.org/index.php/journals/c147+65/">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;C Abuse</h1>
<p><strong>Author:</strong>&nbsp;</p>
<p>
<strong>Date:</strong> 12 February 2005 16:35:56 +00:00 or Sat, 12 February 2005 16:35:56 +00:00</p>
<p><strong>Summary:</strong>&nbsp;</p>
<p><strong>Body:</strong>&nbsp;<div class="sect1" lang="en">
<div class="titlepage">
<h2><a name="d0e18" id="d0e18"></a></h2>
</div>
<p class="c2"><span class="remark">[Editorial note: I have often
stated that one must consider the intended audience in any piece of
writing. I've also been known to point out that code is a form of
writing and that the principal audience, in this case, is not the
compiler. This article demonstrates just how much the style of code
can be affected by inverting the usual assumption that the intent
is to communicate what the code does to your audience. -
Alan]</span></p>
<p>Four years ago I collaborated on the THADGAVIN [<a href=
"#thadgavin">thadgavin</a>] entry to the International Obfuscated C
Code Contest [<a href="#ioccc">ioccc</a>]. It won an award (Most
Portable Output), but it was a behemoth, only just scraping inside
the maximum size limit for the contest. Much of its complexity was
inherent in the algorithm, the obfuscation was a straightforward
refactoring, and the reason for the award was mostly due to the use
of a cross platform library. In conclusion, while it was a winner,
in the end I was not happy with the &quot;art&quot; of the code.</p>
<p>The following year I wrote another entry. This time I wanted to
do something functional and minimalist, something with a strong
theme, and something self-referential. I had striven, and in my
opinion failed, to make the 2000 entry a visual as well as an
intellectual appeal. I wanted to do the same again in 2001, but
again I wanted to be minimalist. I wanted to create a piece of code
that could be considered to be &quot;art&quot; on multiple levels. So here,
for your pleasure, I present my short (untitled) program:</p>
<pre class="programlisting">
/*(c) 2001 Thad */
#include&lt;string.h&gt;
#include &lt;stdio.h&gt;
#define abc stdout
int main(int a,ch\
ar*b){char*c=&quot;??=&quot;
&quot;??(??/??/??)??'{&quot;
&quot;??!??&gt;??-&quot;;while(
!((a=fgetc(stdin))
==EOF))fputc((b=s\
trchr(c,a))?fputc(
fputc(077,abc),abc
),&quot;=(/)'&lt;!&gt;&quot;&quot;-&quot;??(
b-c??):a, abc);??&gt;
</pre>
<p>I encourage you to study it. Try to work out what it does
without compiling and running it.</p>
<p>Now, assuming you've worked out what it does, can you work out
how many sins are committed in these 14 short lines of code? How
many good practice guidelines are broken?</p>
</div>
<div class="bibliography">
<div class="titlepage">
<h2><a name="d0e39" id="d0e39"></a>References</h2>
</div>
<div class="bibliomixed"><a name="thadgavin" id="thadgavin"></a>
<p class="bibliomixed">[thadgavin] <span class=
"bibliomisc"><a href="http://thad.notagoth.org/thadgavin/" target=
"_top">http://thad.notagoth.org/thadgavin/</a></span></p>
</div>
<div class="bibliomixed"><a name="ioccc" id="ioccc"></a>
<p class="bibliomixed">[ioccc] <span class="bibliomisc"><a href=
"http://www.ioccc.org/" target=
"_top">http://www.ioccc.org/</a></span></p>
</div>
<div class="bibliomixed"><a name="apple" id="apple"></a>
<p class="bibliomixed">[apple] <span class="bibliomisc"><a href=
"http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/cpp/Initial-processing.html"
target=
"_top">http://developer.apple.com/documentation/DeveloperTools/gcc-3.3/cpp/Initial-processing.html</a></span></p>
</div>
</div>
</p>
<p><strong>Notes:</strong>&nbsp;</p>
<p><em>More fields may be available via dynamicdata ..</em></p>
</div>
</channel>
</rss>
