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

Re: Code for readablity or fewer lines?

by TheoPetersen (Priest)
on Feb 27, 2001 at 16:46 UTC ( [id://61110]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Code for readablity or fewer lines?

I would have different responses to this, depending on whether the person making the comment knows Perl well or not.

If your boss knows the language, you have something to defend, since you want good recommendations and repeat business. Point out that you are writing code at the level of those most likely to read it, good maintainable code that doesn't require a knowledge of the choicest idioms to understand.

If on the other hand he's somehow suggesting you are padding the job by writing bulky code, tell him the same thing but add that you can tighten up the work in further assignments, now that you understand the coding practices better.

In either case you've done the write thing, as you seem to know already.

The line between efficiency and readability depends on the function of the code and the person who has to read it next. I write example scripts differently than profound object code that only I'm likely to read. Both make me happy, if they serve both function and audience well.

  • Comment on Re: Code for readablity or fewer lines?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://61110]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.