Skip to content

Comments

Alice D (FiRE 🔥) && ANA P (EARTH 🌎)#38

Open
codeandmorecode wants to merge 74 commits intoAda-C14:masterfrom
codeandmorecode:master
Open

Alice D (FiRE 🔥) && ANA P (EARTH 🌎)#38
codeandmorecode wants to merge 74 commits intoAda-C14:masterfrom
codeandmorecode:master

Conversation

@codeandmorecode
Copy link

Assignment Submission: Video Store API

Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.

If you didn't get to the functionality the question is asking about, reply with what you would have done if you had completed it.

Reflection

Prompt Response
Explain how you came up with the initial design of your ERD, based on the seed data and reading through the API endpoints We decided on the design of the ERD by considering the relationships we were going to need based on the readme file. We decided on the fields for each model using the seeds data.
What would be the Big-O time complexity of your /customers & /videos endpoints? What does the time complexity depend on? Explain your reasoning. It should be O(n) for each of the paths in the question, since the time it takes to load all customers will directly depend on how many customers there are in the database, likewise for videos.
What is the Big-O time complexity of the POST /rentals/check-in endpoint? What does the time complexity depend on? Explain your reasoning. It should be O(1) because we can only apply check-in to a single Rental instance at a time.
Describe a specific set of positive and negative test cases you implemented for a model. For the customer model, we implemented positive test cases (for example when all fields were valid), and negative test cases (for example when the name field was nil.)
Describe a specific set of positive and negative test cases you implemented for a controller. For the rental controller for the checkout action, we implemented positive test cases (for example when it can check_out a rental - returns status ok, and the expected body) and negative test cases (responds with a not found when checking out a rental with non valid video).
Broadly, describe how an API should respond when it handles a request with invalid/erroneous parameters. The API will respond with a "not found".
Describe one of your custom model methods and why you chose to wrap that functionality into a method. One of the model methods for rentals was "check_out" which contained all the business logic about checking out a rental, which is why we wrapped this functionality into a method, to separate it from the API functionality of our rentals controller.

codeandmorecode and others added 30 commits December 2, 2020 18:46
codeandmorecode and others added 29 commits December 3, 2020 15:57
…ogin inside Rental Model and updated our routes. Wave 2 smoke tests are passing
Copy link

@dHelmgren dHelmgren left a comment

Choose a reason for hiding this comment

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

Video Store API

Major Learning Goals/Code Review

Criteria yes/no, and optionally any details/lines of code to reference
Practices git with at least 10 small commits and meaningful commit messages ✔️
Understands the importance of how APIs handle invalid/erroneous data in their reflection questions ✔️
Practices Rails best practices and well-designed separation, and encapsulates business logic around check-out and check-in in models ✔️
Uses controller tests to ensure quality code for every route, and checks for response status and content, with positive cases and negative cases ✔️
Uses controller tests to ensure correctness for check out and check in requirement, and that checked out counts and inventories appropriately change ✔️

Functional Requirements

Functional Requirement yes/no
All provided smoke tests for Wave 1 pass ✔️
All provided smoke tests for Wave 2 pass ✔️

Overall Feedback

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

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