Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Re: Re: IYHO, what do you consider good code?

by DrHyde (Prior)
on Jun 13, 2003 at 11:07 UTC ( [id://265642]=note: print w/replies, xml ) Need Help??


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

I'd say always use strict and warnings. Only turn it off for the sections of code where you need to. If you do think that you need to, consider whether there's a better way of doing the job - there almost always is. You generally only need to turn them off when you're expecting something magical to happen or are doing something Just Plain Weird. Magic and Weirdness are hard to read and so hard to maintain. Even with sufficient comments, someone who has to maintain your code later might just have to rip it out and start again if you try to be too clever. And, as well as commenting the input and output of your subroutines, COMMENT YOUR ALGORITHMS. (added shouty bit later)
  • Comment on Re: Re: Re: IYHO, what do you consider good code?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2024-04-20 09:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found