Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Does PerlMonks do general code reviews?

by hilitai (Monk)
on Jul 29, 2007 at 14:27 UTC ( [id://629406]=monkdiscuss: print w/replies, xml ) Need Help??

I've got a module that I think might be useful to other people, and so I've been thinking of going about submitting it to CPAN. But before I do that, I'd like to know that the thing is worthy, not so much for what it does (I think that part's fine) but for how it does it; I want to know that it's good Perl.

I've been writing Perl modules for years, but always for my own personal use; I've never done one that was intended to be used by the public, and I want to make sure my coding isn't too idiosyncratic and/or stupid.

So, anyway, my question is: is there some part of PerlMonks that is appropriate for posting a small (~500 lines) module and getting general commentary on it?


Thanks for the feedback. I've gone ahead and sent an RFC to Meditations.

Replies are listed 'Best First'.
Re: Does PerlMonks do general code reviews?
by liverpole (Monsignor) on Jul 29, 2007 at 14:59 UTC
    Hi hilitai,

    Absolutely, post your module.  The monks are never shy to give their advice, critique, and opinions.

    As for the appropriate section under which to post -- I've seen arguments made for both Meditations and Seekers of Perl Wisdom being good choices.  For my money, the former (Meditations) is slightly better, because you're not asking a specific question, but rather sharing your work, and seeking feedback on it (ie. "request for comments").

    So by all means, choose a relevant title, create a writeup describing it, and share it with the group!


    s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
Re: Does PerlMonks do general code reviews? (seek)
by tye (Sage) on Jul 29, 2007 at 14:59 UTC

    So you are seeking wisdom regarding how well your Perl code is written? Yeah, we have a section for that.

    For 500 lines of code, be sure to use <readmore> tags around the code. You might even want to put the bulkiest part of the module into a reply to the root node so it doesn't get in the way of people wanting to scan the thread.

    Note that I've seen people using <spoiler> tags to act like <readmore> tags and I find such annoying. However, using <spoiler> tags around such large code in a root node makes more sense. But I think the code in <readmore>s in a reply will work even better, especially if you want to post updated versions for further review.

    - tye        

      You are assuming default behavior for spoiler tags. There are actualy several options that affect how spolier tags are rendered: "(default)", link, div, span, table, and reveal. The table view just puts dark text over a black background (in a table). The code is not collapsed or linked to in table view. That makes spoiler tags entirely inappropriate for large bodies of code, especially in root nodes. This seems like a classic example of misuing a feature without understanding the consequences. The readmore tag was designed to deal with large bodies of code and that is what should be used.

        That actually did cross my mind. I should have mentioned it (I was more concentrating on how best to use READMORE and mentioned my annoyance with misusing SPOILER as an aside). The full implications didn't "click". That is a much better reason to avoid trying to use SPOILER in place of READMORE than the ones that annoyed me. (:

        - tye        

Re: Does PerlMonks do general code reviews?
by wazoox (Prior) on Jul 29, 2007 at 14:57 UTC
    Well, I think depending on its size you may post it to the Snippets Section or Code Catacombs, some stuff first appeared here before to be reborn as a real and proved CPAN module :)
      Well, I think depending on its size you may post it to the Snippets Section or Code Catacombs, some stuff first appeared here before to be reborn as a real and proved CPAN module :)

      Yeah, except that posting code to those sections may make it incur in the risk of going unnoticed. But even without that, he's really asking about a RFC, so Meditations or perhaps SoPW would be better fit anyway.

Re: Does PerlMonks do general code reviews?
by CountZero (Bishop) on Aug 01, 2007 at 09:59 UTC
    Of course, there is no better thing than having your code scanned by the Perlmonks' Mark 1 Eyeballs, but if you are in a hurry or want to have some automated critique, did you think of using Perl::Critic? It applies Damian Conway's Perl Best Practices and although not everyone agrees with all his ideas on the matter, it goes a long way in showing the most obvious (and some not so obvious) dos and don'ts of writing good Perl code.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      I was unaware of Perl::Critic. That looks pretty cool.

      I'll try running it on v0.02 of the module this evening.

Re: Does PerlMonks do general code reviews?
by daxim (Curate) on Aug 11, 2007 at 15:14 UTC
Re: Does PerlMonks do general code reviews?
by belg4mit (Prior) on Sep 11, 2007 at 20:17 UTC
    Generally, not exactly. However there used to be an email list for this, code-review-ladder*lists.netthink.co.uk. It never seemed to get off the ground though. Ditto for the newsgroup lang.perl.code-review-ladder

    UPDATE: See also http://refactormycode.com/

    --
    In Bob We Trust, All Others Bring Data.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: monkdiscuss [id://629406]
Approved by liverpole
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2024-03-28 12:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found