{"id":444,"date":"2015-02-04T22:58:09","date_gmt":"2015-02-04T22:58:09","guid":{"rendered":"https:\/\/www.joetannorella.com\/?p=444"},"modified":"2015-02-04T23:00:51","modified_gmt":"2015-02-04T23:00:51","slug":"implementing-hottest-algorithm-laravel-like-reddit-hacker-news","status":"publish","type":"post","link":"https:\/\/www.joetannorella.com\/implementing-hottest-algorithm-laravel-like-reddit-hacker-news\/","title":{"rendered":"Implementing a ‘hottest’ algorithm in Laravel like that of Reddit \/ Hacker News"},"content":{"rendered":"

I’m building a directory of internet marketing products at the moment called imrepo.com<\/a>. It’s a project for me to learn more complex Laravel stuff and toy around with ranking algorithms, though I think there’s actually some serious money to be made if the idea is executed well.<\/p>\n

I had a slight dilemma in that I wasn’t sure whether I should show all posts by day, or use an algorithm like Reddit to rank each post according to a combination of\u00a0post date and number of net upvotes. I’ve decided to go with the latter, pretty much because it sounds cooler and is more of a challenge (like I said, this is a learning curve for me).<\/p>\n

I basically have 3 tables for this:<\/p>\n