Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^2: Code Maintainability

by James Board (Beadle)
on Dec 06, 2008 at 03:09 UTC ( #728476=note: print w/replies, xml ) Need Help??

in reply to Re: Code Maintainability
in thread Code Maintainability

I agree. You will probably spend twice as much time debugging, and later maintaining, your code then you will writing it (stolen from Perl Best Practices, or some book like that). So, it makes much more sense to optimize your code for later readability and ease of understanding (two or three months later when you don't have the whole thing in memory) then it does to optimize it for the initial ease of writing.

Of course, one line is always quicker to read then five, so if you're sure you'll be able to quickly understand that one line instantly, at a glance, months later, then that one line will be the way to go.

And that's the tradeoff, which will always evaluate differently for beginning, mid-level, and advanced Perl programmers.


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (11)
As of 2016-10-20 19:49 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (280 votes). Check out past polls.