Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time - Nataliya #31

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Time - Nataliya #31

wants to merge 2 commits into from

Conversation

npogodina
Copy link

Assignment Submission: Ride Share

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? I initially pulled date to be its own layer on top of rides thinking that it might be useful to organize rides by date. Later I realized that there was only one instance of a driver having more than one ride on one day, therefore I chose to remove this layer.
What was your strategy for going through the data structure and gathering information? I wrote an each loop that iterated through drivers array and collected the number of rides, total income and average rating for each driver. This information was added to individual driver hashes for easy access. I wrote two additional methods with each loops to compare drivers' income & rating and return an array of drivers with highest income and array of drivers with highest rating.
What was an example of something that was necessary to store in a variable? Why was it necessary, useful, or helpful? I stored the result of invoking my find_highest_income method in a variable. The method returns an array of drivers. Storing it into a variable allows me to pass it as an argument to another method which is responsible for printing data.
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 didn't use .map because it seemed inefficient to use it or didn't fit. I could have used it to access data to answer individual questions, but then I would have to loop through the data structure multiple times. Instead I chose to use one each loop to accomplish multiple things with one iteration. In addition to each loop, I used an enumerable method .sum.
Were some calculations easier than others? Why? Finding out the drivers with highest income/rating was more difficult because I wanted to account for a tie scenario.

@kaidamasaki
Copy link

Ride Share

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
Correctly creates, reads, and modifies variables ✔️
Correctly creates and accesses arrays ✔️
Correctly creates and accesses hashes ✔️
Reasonably organizes large amounts of related data into nested arrays and hashes ✔️
Correctly iterates through a nested data structure using loops and/or Enumerable methods ✔️
Reasonably organizes small pieces of code into methods, and calls/invokes those methods ✔️

Functional Requirements

Functional Requirement yes/no
To the terminal, the program outputs the correct number of rides each driver has given ✔️
... outputs the total amount of money each driver has made ✔️
... outputs the average rating for each driver ✔️
... outputs which driver made the most money ✔️
... outputs which driver has the highest average rating ✔️

Overall Feedback

Overall Feedback Criteria yes/no
Green (Meets/Exceeds Standards) 4+ in Code Review && 3+ in Functional Requirements ✔️
Yellow (Approaches Standards) 2-3 in Code Review && 2+ in Functional Requirements
Red (Not at Standard) 0,1 in Code Review or 0,1 in Functional Reqs, or assignment is breaking/doesn’t run with less than 5 minutes of debugging

Additional Feedback

Good job! It looks like you made a couple of errors when you copied your data structures into your file but otherwise everything looks good! Your data structures and methods were all well organized and named.

Code Style Bonus Awards

Was the code particularly impressive in code style for any of these reasons (or more...?)

Quality Yes?
Perfect Indentation
Elegant/Clever
Descriptive/Readable
Concise
Logical/Organized

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