Open
Conversation
kchia
commented
Oct 26, 2020
| @@ -337,6 +346,7 @@ If more than five genres are present, only the top five should be returned. | |||
| ```javascript | |||
| mostCommonGenres(books); | |||
Author
There was a problem hiding this comment.
To be consistent with how we are naming the other functions (i.e., starting with a verb), maybe we can call this function getMostCommonGenres()?
kchia
commented
Oct 26, 2020
| @@ -366,6 +376,7 @@ If more than five books are present, only the top five should be returned. | |||
| ```javascript | |||
| mostPopularBooks(books); | |||
Author
There was a problem hiding this comment.
To be consistent with how we are naming the other functions (i.e., starting with a verb), maybe we can call this function getMostPopularBooks()?
kchia
commented
Oct 26, 2020
| @@ -396,6 +407,7 @@ If more than five authors are present, only the top five should be returned. | |||
| ```javascript | |||
| mostPopularAuthors(books, authors); | |||
Author
There was a problem hiding this comment.
To be consistent with how we are naming the other functions (i.e., starting with a verb), maybe we can call this function getMostPopularAuthors()?
kchia
commented
Oct 26, 2020
| @@ -95,6 +99,7 @@ It returns an array of books and authors that represents all books _currently ch | |||
| ```javascript | |||
| booksInPossession(account, books, authors); | |||
Author
There was a problem hiding this comment.
To be consistent with how we are naming the other functions (i.e., starting with a verb), maybe we can call this function getBooksPossessedByAccount()?
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@bwreid another solid exercise! Is there an answer key for this exercise? Should we be uploading the assignment to qualified? (I checked and didn't find it there)
I'm also wondering if the formatting differences between the author id (which is an integer) and the book/account id (which is a string of random characters) could potentially cause students to be confused? Maybe we could also use a random string for the author id for consistency. Otherwise, an explanation for the difference seems to be warranted.
Another thing I noticed is that the author id starts with
0, and I wonder if it's more conventional to start off an id with 1. In the context of a SQL database, I think starting an id at0happens in [very specific circumstances](https://stackoverflow.com/questions/724668/sql-server-identity-column-values-start-at-0-instead-of-1#:~:text=DBCC%20CHECKIDENT%20(SyncSession%2C%20reseed%2C,new%20records%20start%20with%200.).