How to safely generate a random number | Hacker News Reader