Fortunately, I am the only programmer in my area (sometimes application, sometimes sysadmin). Although I can do as I please, I try to make my code as readable and maintainable as possible. There has been only one project (in 13 years) that I've had to work with another programmer, and believe me, the visual appearance of the code was the least of my worries. If you have enough time to focus on this level of detail, you've obviously done an excellent job of training your programmers on the less aesthetic aspects of programming (maybe you could cut them a little slack :).

I loathe the idea of including tab characters in code and so choose editors that allow me to specify the default tab spacing, indent size, and the option to convert all tab characters to spaces. This is probably due to the fact that I am partially brain damaged from prolonged exposure to Fortran.

Curlies and code blocks? I generally prefer saving vertical space when using openning curlies, but am A.R. about keeping closing curlies on a line to themselves. I rarely forget an openning/closing curly and find that if I have trouble locating one, then I am probably neglecting modularization.

Curlies and complex data structures? To me, this is an area where flexibility is a necessity. I try to keep a good balance between vertical/horizontal whitespace and readability. I definitely prefer version #3 of your %page_control, but would've done it a bit differently:

my %page_control = ( Add => { EmploymentListing => { page => 'em-main-add-employment.tmpl', function => \&add_employment } }, Edit => { EmploymentListing => { page => 'em-main-update-del-employment.tmpl', function => \&update_delete_employment } }, Delete => { EmploymentListing => { page => 'em-main-update-del-employment.tmpl', function => \&update_delete_employment } } );

--Jim


In reply to Re: (OT) Editor-neutral code formatting by jlongino
in thread (OT) Editor-neutral code formatting by Ovid

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.