Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2022-01-16 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (49 votes). Check out past polls.

    Notices?