<?xml version="1.0" encoding="windows-1252"?>
<node id="960389" title="Re: An irrational coding choice found" created="2012-03-19 06:29:48" updated="2012-03-19 06:29:48">
<type id="11">
note</type>
<author id="785425">
Ratazong</author>
<data>
<field name="doctext">
&lt;p&gt;Coming back to your general question (and not the specific array vs. hashes-topic):&lt;/p&gt;
&lt;p&gt;
&lt;em&gt;Have you ever made a coding choice that later you can not rationalize?&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
That is a common effect. In most SW-development-process-models this is addressed 
by documentation of your SW-design. By documenting all (important) design 
choices, you can find out later why you have choosen which way.
However programmers tend to like coding and to dislike documentation ... thus the
reasons for a decision are often forgotten. So in the &lt;em&gt;real world&lt;/em&gt; 
this approach is less usefull than in theory.
&lt;/p&gt;
&lt;p&gt;When I code, I often just "try if things work", without thinking too much which
is the best way (unless I estimate that performance (runtime, memory) will
be critical). Then later I often encounter the situation that I wonder why I didn't
use another approach. The only rationalization is "it seemed to work that way before".
However there is nothing wrong with that approach. Modern SW-development-methodology
even encourages it: if the old decision is not good (enough), just do a  
&lt;a href="http://en.wikipedia.org/wiki/Refactoring"&gt;refactoring&lt;/a&gt; .
&lt;/p&gt;
&lt;p&gt;
So the answer to your question is: Yes. However that is nothing uncommon, and nothing
to worry too much.
&lt;/p&gt;
Rata</field>
<field name="root_node">
960334</field>
<field name="parent_node">
960334</field>
</data>
</node>
