Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by adrianh (Chancellor)
on Jun 15, 2003 at 00:08 UTC ( #265973=note: print w/replies, xml ) Need Help??


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

if the sub runs to 20-30 lines, I'd rather have the header

Obviously if it works for you...

However, if it were me and the sub ran to 20-30 lines that I couldn't understand without half a dozen lines of comments I'd refactor it into a larger number of smaller subs - each of which I could understand without half a dozen lines of comments.

I doing code maintenance I tend to ignore comments, since I find that they're out-of-sync with the code half of the time.

  • Comment on Re: Re: Re: 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://265973]
help
Chatterbox?
LanX reigned by the Duke of Normandy
[davies]: LanX: Politicians making jobs for each other, really. Results in unnecessary complications and tax bills with up to 5 levels of Govt busily inventing new crimes for people to commit.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (9)
As of 2017-12-15 18:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (441 votes). Check out past polls.

    Notices?