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

Re: RFC: "Best Practices" code review section

by blazar (Canon)
on Aug 04, 2005 at 17:02 UTC ( #480932=note: print w/replies, xml ) Need Help??

in reply to RFC: "Best Practices" code review section

Yes, it may be a good idea. But fundamentally I think that the Tutorials section may alread be providing the facilities for your hypothetical "place". If you're asking about suggestions regarding best practices, three that spring to mind immediately are:
  • use a simple glob or File::Find (or one of its enhanced brothers) instead of an explicit opendir, readdir, etc.
  • use Perl-style loops instead of C-style ones unless you have particular (good) reasons to do so,
  • either use $_ for what it is, i.e. the topicalizer or use fully qualified variable names. (Do not mix up!)
I've found myself repeating these recommendations quite frequently the last few days.

Replies are listed 'Best First'.
Re^2: RFC: "Best Practices" code review section
by rvosa (Curate) on Aug 04, 2005 at 17:11 UTC
    Thanks for your reply! Yeah, perhaps a "Best Practices" section in the Tutorials department could work too, but I was thinking specifically about a facility where people can submit code blocks for review, and I'm not sure if Tutorials is the appropriate place for that?
      How 'bout Meditations? Then the discussion arisen from a meditation may evolve into a tutorial. I bet this has already happened. Hasn't it?
      Well... If you post in the Snippets Section, you will probably get some comments. Also (knowing a little about monks) they will pick at the code and suggest alternatives for it, which in some cases can spawn a discussion on why something is better/worse...

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2020-05-31 16:48 GMT
Find Nodes?
    Voting Booth?
    If programming languages were movie genres, Perl would be:

    Results (175 votes). Check out past polls.