Well, as I sit here and churn through some legacy code that was placed in my lap - I mutter this mantra over and over:

"Show me your flowcharts and conceal your tables and I will remain mystified; show me your tables, and I won't need your flowcharts, because they will be obvious."
St. Brooks

I think this has a lot to say about maintainability, and what is most important about documentation. Why? Because an understanding of WHAT the program is doing is so much more important in the first stages of handing a program to somebody. After that comes the details - and they should be fairly clear with a complete understanding of what the program is specified to do (barring creature feep).

Most of my comments are based on this - I strive to make my code understandable, but only after I am sure that it is correct and efficient.

"You can do this in fewer lines . . ."
Well, sure - but does it improve the program? Is it faster? Does it use less resources? Is it more modular? Is it more cohesive? Is it loosely coupled enough?

And the number one question: who is going to have to take care of this when you are done with it?

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--

In reply to (jeffa) Re: Code for readablity or fewer lines? by jeffa
in thread Code for readablity or fewer lines? by Tuna

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.