Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: Clarity in parsing fixed length data.

by GrandFather (Saint)
on Aug 11, 2006 at 00:02 UTC ( [id://566727]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Clarity in parsing fixed length data.
in thread Clarity in parsing fixed length data.

In general you should aim to localise the understanding of the code to the current context. By that I mean, the bit of code you are looking at now should be written so its purpose is clear without having to refer to other materials.

Generally that means rewriting something like:

setOptions (1, 0, 'e');

as:

setOptions (send_log => 1, suppress_warnings => 0, max_level => 'e');

A little more verbose, but now (even without the context) it's pretty clear what the parameters do and what setOption is likely to achieve.

Or to paraphrase a great man: make your code as clear as possible, but no clearer :).


DWIM is Perl's answer to Gödel

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found