|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Comment on |
| ( #3333=superdoc: print w/ replies, xml ) | Need Help?? |
|
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.
In reply to Re: IYHO, what do you consider good code?
by helgi
|
|