3 ms·
Ship with a state machine implementation by default, and a generator for a state machine-backed process model. Be opinionated! I think this is the most compell
by hkarthik 15y ago
Ship with a state machine implementation by default, and a generator for a state machine-backed process model. Be opinionated!
I think this is the most compelling take away. I learned how to use the state_machine gem in my current job, and it's an invaluable tool for going beyond CRUD and building real process models.
- headbiznatch 15y agoState machines are excellent, but this comes up every so often on HN and I've come to respect the observation that state machines become very difficult to change. They particularly rock for games, where the universe is unlikely to suddenly add new interactions or change fundamental laws, but in an evolving business application with requirements that perpetually jag, they can be a source of great pain. EDIT: After thinking about this a bit more, I realize the state machine use is in reference to an API, which probably should be approached with a certain sense of immutability. I still think that in general, using them outside of games should be approached with serious fore-thought to the potential for change in your requirements.