Skip to content

Added superlikes to heat score#254

Merged
Seluj78 merged 3 commits intodevfrom
243-superlikes-heat-score
Sep 19, 2020
Merged

Added superlikes to heat score#254
Seluj78 merged 3 commits intodevfrom
243-superlikes-heat-score

Conversation

@Seluj78
Copy link
Owner

@Seluj78 Seluj78 commented Sep 18, 2020

Closes #243

@Seluj78 Seluj78 added the Backend Anything that touches the backend part of the app label Sep 18, 2020
@Seluj78 Seluj78 requested a review from supalarry September 18, 2020 16:28
@Seluj78 Seluj78 self-assigned this Sep 18, 2020
@Seluj78
Copy link
Owner Author

Seluj78 commented Sep 18, 2020

@supalarry can you take a look at the heat score function and tell me if you want to change something to how the score is calculated ?

@supalarry
Copy link
Collaborator

All good, except using constants would be recommended in cases like

score += likes_received * 2

The 2 can be defined as constant. That should give autocompletion and when writing tests you just use constants. If you had unit test and you were to change this 2 to 3 in code, then your unit test also would need to be updated manually.

Copy link
Collaborator

@supalarry supalarry left a comment

Choose a reason for hiding this comment

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

Looks good to me now! I think the constants now tell more about what the multipliers are in the first place.

@Seluj78 Seluj78 merged commit c0fcd14 into dev Sep 19, 2020
@Seluj78 Seluj78 deleted the 243-superlikes-heat-score branch September 19, 2020 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backend Anything that touches the backend part of the app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add superlikes to heat score

2 participants