<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 28, 2013 at 2:01 PM, Michael B. Trausch <span dir="ltr">&lt;<a href="mailto:mbt@naunetcorp.com" target="_blank">mbt@naunetcorp.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div>
    <div>On 10/28/2013 01:41 PM, JD wrote:<br>
    </div>
    <blockquote type="cite">
      <pre>It is possible to create crap code in any language, of that I am certain.  Some
of my recent perl stuff is just a gorgeous as the highly reviewed code that
introduced those catastrophic bugs. Being pretty does not guaranty bug-free. I&#39;d
submit that pretty code makes finding bugs harder ... sometimes.</pre>
    </blockquote>
    <br></div>
    I suppose that depends on how we define &quot;pretty&quot;.<br>
    <br>
    I define &quot;pretty&quot; as:<br>
    <ul>
      <li>Following a consistent code style throughout an entire source
        file.</li>
      <li>Using proper visual cues to indicate program flow; in
        languages where brackets are used, indentation must follow the
        flow as indicated by the brackets.</li>
      <li>Functions do One Thing and Do It Well™.</li>
      <li>With some exceptions (e.g., state machine implementations are
        a prominent example), functions should be limited to less than
        about 20–30 lines of code, and no more than three or so levels
        of indentation.  If you&#39;re doing more than that, break it
        apart.  This makes it a lot more testable anyway.  Put another
        way, functions must be short enough to be &quot;obviously
        correct&quot;—and should not be &quot;clever&quot; unless a previously
        obviously-correct and tested implementation is being optimized.<br>
      </li>
      <li>Speaking of testing, test, test, test.  I think that testing
        is so important that I think on future projects I&#39;m going to
        consider writing the tests themselves to be non-billable time,
        so that there is no objection to them being done.  If not every
        line and every branch is tested both for success and failure
        cases, it&#39;s <i>broken</i>.</li>
    </ul>
        — Mike<span><font color="#888888"><br></font></span></div></blockquote><div><br></div><div>OK. Mike clearly defines &quot;pretty&quot; from a German perspective wheres JD does it from an Italian perspective :-) <br>

</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><span><font color="#888888">
    <br>
    </font></span><div><span><font color="#888888">-- <br></font></span><div>
      <table border="0">
        <tbody>
          <tr>
            <td> <br>
            </td>
            <td> Michael B. Trausch<br>
              <br>
              President, <b>Naunet Corporation</b><br>
              ☎ <a href="tel:%28678%29%20287-0693%20x130" value="+16782870693" target="_blank">(678) 287-0693 x130</a> or (855) NAUNET-1 x130<br>
              FAX: <a href="tel:%28678%29%20783-7843" value="+16787837843" target="_blank">(678) 783-7843</a><br>
            </td>
          </tr>
        </tbody>
      </table>
    </div></div>
  </div>

<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">-- <br>James P. Kinney III<br><i><i><i><i><br></i></i></i></i>Every time you stop a school, you will have to build a jail. What you 
        gain at one end you lose at the other. It&#39;s like feeding a dog on his 
        own tail. It won&#39;t fatten the dog.<br>

        - Speech 11/23/1900 Mark Twain<br><i><i><i><i><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br></i></i></i></i></div>
</div></div>