<?xml version="1.0" encoding="windows-1252"?>
<node id="265639" title="Re: IYHO, what do you consider good code?" created="2003-06-13 06:53:26" updated="2005-03-23 15:37:07">
<type id="11">
note</type>
<author id="50095">
helgi</author>
<data>
<field name="doctext">
To me, apart from the various points people have made about using warnings and strictures, structured code, using subroutines and so forth, the most important rule is:&lt;p&gt;
&lt;b&gt;Use meaningful names!&lt;/b&gt;&lt;p&gt;
This applies to variables, subroutines, loops, filehandles, everything.  &lt;p&gt;
Always take a little extra time, 10 seconds or so, to name your variables well.  &lt;p&gt;
Good names can often make comments redundant and unnecessary.&lt;p&gt;
I hope I never ever have to maintain a program again that's full of variables named @tmp, $i, $n, $ldr, %hash or subroutines named process or run and all the other meaningless crap people foist off as names.&lt;p&gt;
&lt;p&gt;
&lt;br&gt;-- &lt;br&gt;
Regards,&lt;br&gt;
Helgi Briem&lt;br&gt;
helgi DOT briem AT decode DOT is
</field>
<field name="root_node">
265561</field>
<field name="parent_node">
265561</field>
</data>
</node>
