Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I guess I'm the only one who has had the joy of significant headaches from over-use of perltidy. But I'm even more shocked at how popular it appears to be to subject yourself to mindless enforcers of standards. I feel like Will Smith in the I Robot movie.

I can certainly see the value in using perltidy for one-time conversion of some code from "their ugly (extreme) style" to "something much better".

But I just don't have a huge problem dealing with code written using any of a large number of reasonable, popular, similar, conservative styles.

And I much prefer allowing programmers to innovate and come up with even better ways of coding than happen to be already coded into perltidy. Setting your coding standards in stone is one of the things that I find is the wrong way to do coding standards. Nobody learns. Nobody grows.

I also actually have to deal with merges and code reviews. And I'm pretty sure perltidy can't reformat a diff or a merge conflict to the personal style of whoever, especially integrated into my review tool or any of my merge tools.

If perltidy were fully powerful and error-free, then I could almost tolerate using it as a must-always-be-used translation layer. For example, if we were talking about converting between utf-8 and utf-16, then converting back and forth all of the time, even without review by a human, could be a reasonable work flow.

But I have innovated coding constructs and seen others do it where perltidy just couldn't correctly cope with the result. And I've seen people using perltidy and deciding to just "never do $technique because that sucks with perltidy". Heck, I've even developed just innovations in indentation that finally made a huge improvement in clarity that perltidy can't help but just destroy.

If you can't deal with some 'else's or braces being cuddled and some not to the point of endlessly arguing and trying to enforce some "one true style", then I think you should work on your personal problems instead of looking for a tool.

- tye        


In reply to Re: CPAN's perltidy to the rescue! (not for 'standards') by tye
in thread CPAN's perltidy to the rescue! by tfredett

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 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?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-03-19 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found