Skip to content

Conversation

@kayxn23
Copy link

@kayxn23 kayxn23 commented Nov 9, 2018

Video Store API

Congratulations! You're submitting your assignment!
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.

Comprehension Questions

Question Answer
Explain how you came up with the design of your ERD, based on the seed data. We looked at the end-points listed in the assignment to determine what the structure of our program would look like. It helped shape our design idea as well. We also looked at the seed data to know that our ERD had to include certain models.
What would be the Big-O time complexity of your /customers & /movies endpoints? What does the time complexity depend on? Explain your reasoning. Index for customers and movies would would return n number of customers and movies. The time complexity is O(n). Customer and movie show page time complexity is 0(1) because it retrieves a single movie by it's hash key which is the id.
What is the Big-O time complexity of the POST /rentals/check-in endpoint? What does the time complexity depend on? Explain your reasoning. The method is finding two elements at O(1) time complexity. The time complexity is based on how many times the method needs to access a key in a hash, and it needs to do it twice because it's finding a customer and a movie in order to perform the method.
Describe a set of positive and negative test cases you implemented for a model. In order for a movie to be valid, it has to have a title. We ran a test with all required fields filled in for the positive case and a test where the title was set to nil for the negative case.
Describe a set of positive and negative test cases you implemented for a controller. For the movie controller, we tested if you could look up a movie with a valid ID and then ran a test with an id of -1 to test if the appropriate error message would render in json.
How does your API respond when bad data is sent to it? It responds with bad request status code and an explicit error message for the user.
Describe one of your custom model methods and why you chose to wrap that functionality into a method. We did not write any custom model methods.
Do you have any recommendations on how we could improve this project for the next cohort? Maybe have the project be a four-day project and have the last day be for java script intro.
Link to Trello https://trello.com/b/qOX04IwC/hollywood-video
Link to ERD https://www.lucidchart.com/documents/edit/c0c135be-0875-420e-abbd-d1f78a3ce624/0
Summary

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.

3 participants