Why you should want a state machine, and how to implement it | Hacker News Reader