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

Addie's Ride Share #25

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

Conversation

add2point71dots
Copy link

Ride Share

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a design decision you had to make when working on this project. What options were you considering? What helped you make your final decision? Figuring out how to send messages between the classes was the biggest thing to consider. I briefly considered having one method in Trips called find_many that would accept an id of either a rider or a driver along with a word to signal whether we were looking for a rider's trips or a driver's trips. But thinking more about it, I figured it was better to split those concepts into two methods (find_driver_trips and find_rider_trips) so that each method was really just sticking to one task.
Describe a concept that you gained more clarity on as you worked on this assignment. I learned about modules as namespaces and how if you define your class within a module in different ways, it may affect how you code. At first I defined my classes with RideShare::ClassName, but apparently then you have to put RideShare in every time you want to use a method from a different class under the same module. When I set up the class wrapped in a module RideShare, that problem went away. Who knew? I also learned about including other classes and what you have access to when you include vs extend.
Describe a nominal test that you wrote for this assignment. In Trip#driver, I tested that it returned a Driver object for a trip with a driver_id that corresponded to a driver that exists in the drivers.csv file
Describe an edge case test that you wrote for this assignment. In Trip#driver, I tested that it outputs a warning and returns nil when called on a trip with a driver_id that doesn't exist in the CSV file.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? Honestly, I didn't write as much pseudocode as I should have. Though I did map everything out beforehand with the method names and how they should interact/what they should do, so I used that as my guide when writing the code. That was helpful! I've actually come to enjoy writing the tests, and I pretty consistently remember to write them before writing my code. Very satisfying to go from red to green. :)

@CheezItMan
Copy link

Ride Share

What We're Looking For

Feature Feedback
Baseline
Used Git Regularly Well done
Answer comprehension questions Great, I do hope you take more chances to try pseudo-coding in future projects.
Driver
Uses the all method in the find method Check & it actually uses an enumerable as well!
Has appropriate edge-case tests for each method in the class Very well done, nice job testing the 1st and last elements of the file.
Created a method that uses a method from the Trip object to retrieve the list of trips Check
Created a method that uses the internal trips list to calculate the average rating Check
Rider
Uses the all method in the find method Check
Has appropriate edge-case tests for each method in the class Check
Created a method that uses a method from the Trip object to retrieve the list of trips Check
Created a method that uses the internal trips method to retrieve the associated drivers Check
Trip
Reads the CSV file in the all method Check
Has appropriate edge-case tests for each method in the class Check
Created a method that uses a method from the Driver to retrieve the associated driver instance Check
Created a method that uses a method from the Rider to retrieve the associated rider instance Check
Created a method to retrieve all trips by driver id Check
Created a method to retrieve all trips by rider id Check

Summary

Very nicely done. This was very polished and easy to read & follow.

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