You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection
Question
Answer
What did your data structure look like at first? Did this structure evolve over time? Why?
At first, it was a master array then 2 hashes. I changed it to a master hash > hash > values with arrays because it was easier for me to access any level of the data.
What was your strategy for going through the data structure and gathering information?
Figuring out how to get access to the question then the code to get the info for one single driver.
What was an example of something that was necessary to store in a variable? Why was it necessary, useful, or helpful?
When calculating the highest earner or highly rated, it was necessary to have a variable to iterate through the data. It was useful because creating the code to iterate through the data was easy to do an guided me on how to do it.
What kinds of iteration did you use? Did you use .map? If so, when? If not, why, or when would be a good opportunity to use it?
I used '.each' and '.map' . I used '.map' for the first three questions as it was slightly shorter and more intuitive for me than using '.each'.
Were some calculations easier than others? Why?
Yes, the first and second question was the easiest since it was fairly simple. For 3, it was harder because it involved figuring out multiple operations because it was an average while making sure to correctly access the data.
The reason will be displayed to describe this comment to others. Learn more.
this is pretty big for a standard comment! Can you sum it up in 1-2 lines instead? Comments work best as an in-line tool, snug with the code it's giving info on.
The reason will be displayed to describe this comment to others. Learn more.
You iterate over this hash a lot. Is there a way to keep this code organized while reducing the number of times you loop over rides? Perhaps methods could help.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Assignment Submission: Ride Share
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection
.map? If so, when? If not, why, or when would be a good opportunity to use it?