Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: RFC: "Best Practices" code review section

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 13: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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.