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

Re^5: CPAN's perltidy to the rescue! (exacting)

by tye (Sage)
on Jul 14, 2012 at 17:11 UTC ( [id://981829]=note: print w/replies, xml ) Need Help??


in reply to Re^4: CPAN's perltidy to the rescue! (value)
in thread CPAN's perltidy to the rescue!

Why should I spend hours to learn yet another set of coding standards to submit a 10 line patch just to satisfy some stupid robot?

Well I, of course, agree with that. I'm actually against putting robots in the way. And nobody said their coding standard takes hours to look up. Having an enforced coding standard that takes hours to learn is just creating a big barrier to entry (to contribution). And I don't think it would have any benefit.

Well, unless you decide to just give up on convincing people that trying to regularize very minor points of style is actually a waste of time. And that means that you waste a lot of effort on bowing to an arbitrary and expensive-to-comply-with standard. Yes, you can end each new round of the frequent nit picking by just pointing at rule 47b... well, sometimes.

But you quickly realize that there is still way too much work being wasted on just serving "the standard". So you start trying to pull in tools to help with that workload. And you probably don't notice how the joy in coding for that project has slipped away. The satisfaction of creation has been overshadowed by the constant need to bow to the exacting robot.

A much better idea is to call out nit-pickers as just that.

Or the other route advocated in this thread: Replace the rejection robot with the homogenizing robot. Yes, between those two choices, the homogenizing robot is much better (well, only in some ways).

And I agree that having no patience with half-assed patches is lame.

But my point was that I'm rather surprised that I so often see people making minor patches to a larger set of code and seeming to relatively ignore the style in the code.

When I make small changes to larger code, I follow the style already apparent in the code. And how closely I follow that style is pretty much proportional to how closely the code seems to be following one specific style.

So, if I need to add an "elsif" to the code and there aren't any "elsif"s nearby, then I'll do a quick search for "elsif"s elsewhere in the code. If they are all styled the same, then I'll be sure to style my new "elsif" like those. If they seem to all be styled very exactly the same, then I'll take a moment to pay even more attention to details.

Usually I find that there is already some variability in the style so I don't have to watch minute details.

I also see a lot of evolution of style on most long-lived projects. I've found that to usually be a very good thing.

- tye        

  • Comment on Re^5: CPAN's perltidy to the rescue! (exacting)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://981829]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-26 01:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found