Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: IYHO, what do you consider good code?

by helgi (Hermit)
on Jun 13, 2003 at 10:53 UTC ( #265639=note: print w/replies, xml ) Need Help??


in reply to IYHO, what do you consider good code?

To me, apart from the various points people have made about using warnings and strictures, structured code, using subroutines and so forth, the most important rule is:

Use meaningful names!

This applies to variables, subroutines, loops, filehandles, everything.

Always take a little extra time, 10 seconds or so, to name your variables well.

Good names can often make comments redundant and unnecessary.

I hope I never ever have to maintain a program again that's full of variables named @tmp, $i, $n, $ldr, %hash or subroutines named process or run and all the other meaningless crap people foist off as names.


--
Regards,
Helgi Briem
helgi DOT briem AT decode DOT is

  • Comment on Re: IYHO, what do you consider good code?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://265639]
help
Chatterbox?
[ambrus]: Corion: exactly. by pre-forking you avoid that, because you spawn processes from a smaller process that never uses threads and is kept only to spawn things
[ambrus]: (and to wait for the spawned stuff)

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2017-10-19 15:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (255 votes). Check out past polls.

    Notices?