State machines – Why and how to use them in web development | Hacker News Reader