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

Queues - MediaRanker - Ting Wong #32

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

Conversation

tingwong
Copy link

Media Ranker

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a custom model method you wrote. In works, I wrote a vote_count method and a class method for top_work. I used them on the welcome#index page for the Media Spotlight part of the website, so that the Work with the most votes would appear at the top of the homepage.
Describe how you approached testing that model method. What edge cases did you come up with? I'm not sure that I came up with many edge cases, simply that I tested the negative tests for each attribute of the work. For example, I tested if it was invalid without a title, then if it was invalid without a category, then if it was invalid without a creator. I didn't get a chance to test my custom methods in my model, this would have been a great opportunity for edge case testing.
Describe an edge case test you wrote for a controller Hopefully this is an edge case! I wrote a test for if a mandatory field was nil. Beyond that, I simply tested the negative and positive cases for each test.
What are session and flash? What is the difference between them? Sessions and flashes are both hash-like objects. Session keeps track of a user's "session", the time when they're on the site –on MediaRanker, we use login and logout as events to track, or the closing of the browser. Flash displays a one-time message to our view, we used them in MediaRanker to communicate the success or failure of a specific action.
Describe a controller filter you wrote. I had separate methods for my album/movie/book index pages, so for the method, album_index, I wrote a filter to provide a full list of all works with the category: album. @works = Work.where(category: "album")
What was one thing that you gained more clarity on through this assignment? This was the first time I wrote a custom method in my model (beyond Rideshare) and it helped me gain more clarity on how the model, controller and views interact. I also gained a bit more clarity on the implications of separating business logic from the database. For example, while I had a column for vote_count, it was difficult to access this in a simple way when I wanted a list of top 10 albums by vote_count. This would be simpler if it lived in the database rather than having to write queries and loops which would pull and rank information from the database and business logic.
What is the Heroku URL of your deployed application https://agile-coast-86788.herokuapp.com/
Do you have any recommendations on how we could improve this project for the next cohort? I enjoyed it! Though it doesn't look fantastic. :) I think giving a bit more time in between the lesson and the use of the lesson in the project. For example, for those that may not have completed Wave 1 on time, progressing to Wave 2 with all the new information may be overwhelming if they were still working on Wave 1.

@droberts-sea
Copy link

Media Ranker

What We're Looking For

Feature Feedback
Core Requirements
Git hygiene yes
Comprehension questions yes
General
Rails fundamentals (RESTful routing, use of named paths) yes
Semantic HTML There is a little in your application.html.erb, but I would like to see more! Try to use <header> and <footer> to structure your high-level layout, and remember to wrap pieces of your page in <section> tags. One good rule of thumb is to always use a <section> to wrap a view partial.
Errors are reported to the user mostly - for voting errors (user isn't logged in or has voted twice) I got an exception
Business logic lives in the models yes - good work!
Model testing mostly - you do a good job of testing validations and relations, but as you indicated in your PR your custom methods in Work need coverage. For testing vote_count, since you're working with a collection the two interesting cases are "zero" and "many". So I would have one test where I create a fresh Work, and verify that the vote_count is zero, and another where I create a fresh Work and a few associated Votes, and verify that the vote_count is as expected.
Controller testing yes - not having tests for login / logout is OK at this point.
Wave 1 - Media
Splash page shows the three media categories mostly - some of the media doesn't display on the main page, even though it appears in the category list
Basic CRUD operations on media are present and functional yes - needing to type in the category when creating a new work is a little weird, but otherwise this is OK
Wave 2 - Users and Votes
Users can log in and log out mostly - if a user logs in a second time with the same username, a new user is created!
The ID of the current user is stored in the session yes
Individual user pages and the user list are present yes
A user cannot vote for the same media more than once yes
All media lists are ordered by vote count yes
Splash page contains a media spotlight yes
Media pages contain lists of voting users yes
Wave 3 - Styling
Foundation is used appropriately Foundation is used, but page isn't styled in a responsive manner
Look and feel is similar to the original no
Overall

Good work overall! This project was quite big with many moving parts, and it seems like you've hit almost all of the learning goals. The vast majority of functionality is there, and your test coverage is even pretty good. I look forward to seeing the Foundation work you do on the bEtsy project.

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