Skip to content

Katrina - Edges - Ride Share#26

Open
kaganon wants to merge 2 commits into
Ada-C10:masterfrom
kaganon:master
Open

Katrina - Edges - Ride Share#26
kaganon wants to merge 2 commits into
Ada-C10:masterfrom
kaganon:master

Conversation

@kaganon

@kaganon kaganon commented Aug 13, 2018

Copy link
Copy Markdown

ride share

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
What did your data structure look like at first? Did this structure evolve over time? Why? The first data structure that I created had too many nested loops/arrays. I changed this after realizing that too many nested arrays/hashes was really difficult to keep track of and loop through.
What was your strategy for going through the data structure and gathering information? I looked at the data first, and figured out how I needed to organize my data to solve the problems as if I were just answering the questions like a math problem. Then, I organized a possible structure, looked over the questions again and went through the structure to create a road map of how to arrive at the answers. If I could not arrive at the answer via my data structure, I restructured my data and tried again until I found a structure that worked. I did this before doing any actual coding.
What was an example of something that was necessary to store in a variable? What was the scope of each of that variables? Why? Most of the methods that I used needed to return a value, so that value was assigned to a variable. The scope of the variable that needed to be returned was within the scope of the method, but outside of my loops inside the method. If that variable was inside one of my loops I would not be able to return that value.
What kinds of iteration did you use? Did you use .map? I mostly used .each method, but I did use .map and also .reduce for one of my methods.
Were some calculations easier than others? Why? Yes, the total ride count was easier to calculate than the average rating. The average rating required more iterations to get access the data, which made it challenging to keep track of scope and the data needed.

@droberts-sea

Copy link
Copy Markdown

Good work overall! I really appreciate the way you've used methods to break up your code.

One nitpick: your calculations for average rating are off. It looks like you're only using the rating for the most recent day the driver drove. However, it's clear to me that the big learning goals for this lesson around working with data and using iteration to solve problems were met. Keep up the hard work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants