Arrays
Arrays seems to be a simple list to most. Arrays have a simple list of items with in it. It could be a mix of number or even strings within an array. Or even array inside an array. Arrays are more complx then just a list. Array could be used for so many things beside a list. I have seen arrays such as point1=[23,23,23,23]
and point2=[32, 32, 32, 32]
used with a program called Sketchup (a 3D program) to mark points on a 3D model. After watching a few videos of how arrays are used they are more powerful then just a list. It could be used within other programs to make points, keep data, collect data, and many more.
Hashes
One of my favorite things in ruby is Hashes. One of the best tools to keep a value with a key pair. I started to work on the array challenge using hashes. I used the hash to keep track of how many time each number pass through a method. Then It cold return the range of values I specify. An example of using a hash is you can ask everyone person that pass through the door that is seeing a R rated, PG rated, PG 13 rated movie. Then the data is collected and you can see how many people watched a PG 13 movie that day. Hashes can keep and update data very easily.
Arrays VS Hashes
The clash of using an array or hash. The reason I favor using hashes more is they have a key value pair. I can look up their value pair to find the key. For example I want to compare my grocery list with to stores. I can crate a hash to keep track of it. Such as if I had a rug doctor rental business. Each device has a ID tag. Each time someone returns it for rents one out I scan the ID tag. With a hash I can keep track of every odd value in the ID tag to see which machine I lend out and which machine I have in my inventory by the even value pair for the ID tags.
I also like using arrays but not as much. One really good thing about array is that its just a set of data. You can use a set number of numbers or character to test out your code. For example of you just finish making a program asking people for their age. You want to see text it out over and over again and make minor changes. You won't have time to ask 50 of your friends to test it for you everytime you make a minor change. You can make a set of answer that you might anticipate people will type in. If you're asking for someone's age they might type in 40, for forty, or fortie (anticipate typos). One of the greatest use of arrays is for testing in my opinion.