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

Sockets- Chantal #48

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

Conversation

ChantalDemissie
Copy link

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? my data structure stayed the same throughout because it looked the most logical to me. i went with a list of hashmaps or the "array of rides" method.
What was your strategy for going through the data structure and gathering information? my strategy was to structure it like the csv file which was table-like. I utilized each and hashes to gather my information
What was an example of something that was necessary to store in a variable? Why was it necessary, useful, or helpful?
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". i am not comfortable with using .map yet
Were some calculations easier than others? Why? the deeper nested the information the harder to work with it. I also had to do additional research to find a method that worked for my averages. because i found three ways to calculate averages in ruby

@ChantalDemissie ChantalDemissie changed the title Adding solution to rideshare chantal-sockets Feb 19, 2019
@ChantalDemissie ChantalDemissie changed the title chantal-sockets Chantal-Sockets Feb 19, 2019
@ChantalDemissie ChantalDemissie changed the title Chantal-Sockets Sockets- Chantal Feb 19, 2019
@droberts-sea
Copy link

Ride Share

What We're Looking For

Feature Feedback
Answers the comprehension questions yes
Readable code with consistent indentation and reasonable code style yes
Outputs the correct number of rides each driver has given yes
Outputs the total amount of money each driver has made yes
Outputs the average rating for each driver yes
Outputs which driver made the most money yes
Outputs which driver has the highest average rating yes

This code looks great - you methodically work through each of the questions, and your style is clean, readable and consistent. It's clear to me that the learning goals around working with enumerables and complex data structures were met. Keep up the hard work!

rides.each do |ride|
driver_id = ride[:driver_id]
if driver_rides.key?(driver_id)
driver_rides[driver_id] += 1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may have already talked about this in person, but it looks like your editor is set up to use 4 spaces for indentation. Our style guide at Ada is to use 2, which will be important once we start collaborating on group projects across multiple computers using git. If you haven't already, please change this setting.

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