Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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??


in reply to Use Hash? Array? Still confused after all these years.

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..

  • Comment on Re: Use Hash? Array? Still confused after all these years.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-04-23 06:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found