Fakultas Ilmu Komputer UI

Skip to content

[#55] Homepage: Hottest Material List

Reyhan Alhafizal Hamidi requested to merge 1706040082-55 into master

In this MR, I add new sorting option: Hottest (Terhangat). This option sort material by "Hot Score" which prefer newer and more viewed material.

The formula of Hot Score:

earliest_material = 1577811600
one_week = 604800

seconds = date_created_in_epoch - earliest_material
view_score = log(view_count, 10)
time_score = seconds_since_project_created
hot_score = log(view_count, 10) + (seconds / one_week)

This formula inspired from Reddit Ranking Algorithm.

Closes #55 (closed)

Edited by Reyhan Alhafizal Hamidi

Merge request reports