How Hacker News ranking algorithm works
medium.com
medium.com
A previous similar article was written by kens in June 2009: "Inside the news.yc ranking formula" http://www.righto.com/2009/06/how-does-newsyc-ranking-work.h... (I can't find the HN discussion.)
I think it's more relevant to see another article of kens that tries to reconstruct a more recent version of the algorithm, from November 2013: "How Hacker News ranking really works: scoring, controversy, and penalties" How Hacker News ranking really works: scoring, controversy, and penalties (HN discussion: https://news.ycombinator.com/item?id=6799854 (920 points, 788 days ago, 190 comments))
But take all these articles as an approximation, because the current algorithm probably have more tweaks.