Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: What makes a comment "obnoxious"?

by snowhare (Friar)
on Sep 08, 2007 at 20:36 UTC ( [id://637863]=note: print w/replies, xml ) Need Help??


in reply to What makes a comment "obnoxious"?

They are by no means 'bad practice'. They are just a way to make subroutine start/end points visually obvious when scanning code. I use them routinely myself. If I were to find a good 'tree collapsing' editor for Perl, I would probably stop using them. But it is just someone's personal preference to declare them 'obnoxious'. It doesn't actually rise to the level of something that should be spit out by Perl::Critic as an issue.

Many programmers are obsessively anal retentive about details. It's a positive skill when applied to 'code correctness'. But it easily turns into pointless rules where simple personal preference is elevated into 'The Way It Is Done (tm)'.

Replies are listed 'Best First'.
Re^2: What makes a comment "obnoxious"?
by chargrill (Parson) on Sep 09, 2007 at 19:14 UTC

    If I were to find a good 'tree collapsing' editor for Perl

    Do you mean to tell me that there are editors that do not have this feature?

    Even little vim has code folding, as soon as you discover how to best use it: install the perl-support plugin, and in it's documentation:

    Syntax based folding can be enabled by adding the following lines to t +he file '~/.vim/syntax/perl.vim': let perl_fold=1 let perl_fold_blocks=1

    But back on topic, if you think the module author's idea of "obnoxious comments" is ridiculous (and you of course like everything else in Perl::Critic) - simply disable that policy in your .perlcriticrc file.


    --chargrill
    s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
      Do you mean to tell me that there are editors that do not have this feature?

      Some of us have been doing this long enough that 'new fangled tools' can be hard to keep up with. I "just looked" for a decent code collapsing editor "a few years ago". ;) At the time, I was disappointed with that new IDE, Eclipse. It was hard to install, was Java-centric, didn't have decent Perl support, and was too much trouble for small scripts. ;) (1)

      I just gave the folding option for vim a try. I'll pass on that particular implementation of folding: It doesn't qualify as 'good' (or at least I couldn't figure out how to collapse/uncollapse stuff any other way than changing the 'foldlevel'). The other features in the Perl-Support plugin look very interesting.

      Looking at SciTe and Geany (neither of which I had seen before today) I am initially impressed with their implementations of folding. Geany looks nice in general. My desktop work tools may be about to change.

      Live and learn.

      * 1 Yes. I know. My point was that it has been a few years since then. See the winking smilelies.

Re^2: What makes a comment "obnoxious"?
by philcrow (Priest) on Sep 10, 2007 at 16:12 UTC
    Have you tried vim with folding? I really like that, but know that some people don't like vi.

    Phil

    The Gantry Web Framework Book is now available.
Re^2: What makes a comment "obnoxious"?
by Anonymous Monk on Sep 09, 2007 at 23:59 UTC
    Even SciTe can do that!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-23 22:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found