Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: RFC: "Best Practices" code review section

by blazar (Canon)
on Aug 04, 2005 at 17:02 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-20 03:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found