Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Use Hash? Array? Still confused after all these years.by monarch (Priest) |
on Jul 22, 2005 at 00:55 UTC ( [id://477065]=note: print w/replies, xml ) | Need Help?? |
Programming is incidental to the art of data design.
In any project it is the organisation of your data and the structure in which you keep the data that largely dictates how your program is to be built. Think of the data structure as that invisible foundation under the ground of a sky scraper. It takes the most time to construct, and has almost nothing to show for it. But a good data structure (foundation) allows for an impressive program (tower) to be built upon it. If your data structure (foundation) is weak and not-well understood by the programmer, then the program is bound to be flawed. Badly flawed. It is worth spending a lot of time visualising how to structure your data. Whether it is a hash or an array comes down to how you will want to be accessing your data. But what are the relationships between the data? Spend lots of time in the shower thinking about it, or walks in the park, or listening to your favourite music. Then take good long breaks and rest your mind and come back to it later. It may not feel productive, but in the end you'll have a flash of inspiration and understand your data structure, and be set for writing the best program ever..
In Section
Seekers of Perl Wisdom
|
|