- Screenshots of scores will be posted in comments
- Screenshots of completed sections will be posted in comments
This exercise is intended to help you assess your progress with the concepts and techniques we've covered during the week.
For these questions, write a short snippet of code that meets
the requirement. In cases where the question mentions a "given"
data value, use the variable given to refer to it (instead of re-writing
the information).
Define CRUD.
There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for.
Why do we use set method_override: true?
Explain the difference between value and name in this line: <input type='text' name='task[title]' value="<%= @task.title %>"/>.
What are params? Where do they come from?
GET /api/v1/items/:id/best_dayGET /api/v1/items/most_revenue?quantity=xx items ranked by total revenue generated.GET /api/v1/items/most_items?quantity=xx item instances ranked by total number sold.GET /api/v1/customers/:id/favorite_merchantWe will be using the NREL API. Sign up for a key here: https://developer.nrel.gov/signup/
As a user
When I visit "/"
And I fill in the search form with 80203
And I click "Locate"
Then I should be on page "/search" with parameters visible in the url
A web app that automatically generates a Spotify playlist based on a band or artist's previous show(s).
Every band/artist plays different songs at every concert, ranging from the well-known hits to the lesser-known deep cuts. Sometimes you're not sure what the song was that you liked so much at the concert, but you want to listen to it again. Other times you may have enjoyed the entire show so much that you want to re-live it by listening to every song they played again. But remembering every song they played is nearly impossible, and if you manage to find the set list for the show, searching for each song can be frustrating and tedious.
Goal: Eliminate all targets in the level in as few shots as possible.
##Hello World
Responder #1 - This responder took largely the same approach as me but used the "if/return true" approach rather than the single line return method. In this case I feel the one-line method is sufficiently clear and therefore would probably be preferred over using if/return.
Responder #2 - This user employed an even more broken-out approach than the first responder, creating a three part "if - else if - else" conditional. For the same reason as #1 I feel that the one-line approach would be preferred in this case.
Responder #3 - This user decided to build the logic out with a nested conditional, nesting the %100 and %400 checks within the %4 conditional. It appears cleaner at first glance and the nested structure does mirror the logic of the problem, though I know in a more complex situation a nested conditional could prove to be a real can of worms.
(500+ words, in-depth blog post)