Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Well perltidy takes care of the grunt work of formatting code, I'm not that fussy: I've used perltidy for about a year and haven't yet played with the options for it. I like an early K&R C type formatting.

As for strictness of rules it doesn't really apply to a one man show. But if I were leading a team I'd prefer consensus on coding standards then my standards would not change too much in style.

If the culture would not allow that then I think very clear standards are good. Clear like: Use perltidy with these options. Use strict always. If people aren't on the same page there is no point to statements like: Try to avoid deep indent levels. Avoid complex regexes if possible. The first are clear and enforceable, the latter are not. Piddly little rules like the former may indicate a sick work environment. But a business can't stop just because the work culture is diseased.

If I talk of pointy haired bosses, I am showing that I am infected.

As regards code generation we disagree. But it does seem that we are talking about different things. My generated code is distinguishable from by my hand code only in the header comment that says it is generated and that it may be slightly differently formatted. If I ran it though perltidy you could not tell the difference.

I have fooled with IDE's but have never overcome the initial learning curve. Smalltalk was really tempting me, then java became the hot OO alternative to too-complex C++ and killed off the Smalltalk companies.

I started serious generation with the Jeeves generator described in Advanced Perl Programming by Srinivasan. It is not completely implemented as described, so I found myself descending into Perl to set up stuff for Jeeves. Eventually I decided that Jeeves was unnecessary, that using straight Perl to generate code would be faster, clearer, and more flexible. Just a little uglier in syntax.

This has allowed me to create more code, more consistent code, and less buggy code. By continually finding the differences between the entities in my code and defining them in one place I find that finding one bug and fixing it, fixes many bugs. Or points to further refinement of my meta-data. So my experience with code generation is very different than yours.

Yum, yum meta-data gooood.

Yes it does get to that viseral a level.


In reply to Re: Lifestyle versus coding guidelines ... by rir
in thread A guide to coding Perl by rir

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 making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-03-28 19:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found