Problems? Is your data what you think it is? | |
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 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:
as:
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
In Section
Seekers of Perl Wisdom
|
|