
Hacker News Quote Machine - soneca
http://www.perfil.med.br/hnqm
======
soneca
I did this as the first intermediate project at freecodecamp.com (where I'm
learning to code). I found it rather interesting to keep reading the stand
alone comments so I decided to share it here. Someone else might enjoy it.

~~~
andrelaszlo
Nice work :) Did you post the code somewhere?

Does it always start with this quote?

"You can stand on the shoulders of giants or a big enough pile of dwarfs,
works either way."

~~~
soneca
Thanks, yes, always starts with the same quote. I put it as placeholder while
creating the div, but then I thought it had some relevant meaning to the final
work :)

The code is here:
[http://codepen.io/deltasoneca/pen/aBJLpW](http://codepen.io/deltasoneca/pen/aBJLpW)

The logic: it filters comments of all time with more than 120 points (around
800 IIRC). Than randomly select one of them and show when you refresh the
quote.

It uses the HN Algolia API. When I started, the idea was to create the most
upvoted comments of the last few hours, but for some reason the API is not
showing comment points anymore for recent comments (or I missed something
reading the JSON).

