50 ms·
A pretty big +1 to this. My team (at Crunchy Data building Crunchy Bridge[1]) and similar teams at prior Citus Data and Heroku did a lot of Ruby and a lot of st
by craigkerstiens 4y ago
A pretty big +1 to this. My team (at Crunchy Data building Crunchy Bridge[1]) and similar teams at prior Citus Data and Heroku did a lot of Ruby and a lot of state machines. In all cases it was actually less Rails, but that may be because the team really prefers sequel as the ORM to ActiveRecord, though Rails does a bunch that doesn't really apply to such a workflow. We wrote about some of how we used state machines to power our database as a service and the full control plane previously[2]. Another big piece of the approach and stack that helps today is leveraging Sorbet[3] and our approach to test coverage, we probably should blog a little more on some of this but it helps quite a bit.
[1] - https://www.crunchydata.com/products/crunchy-bridge https://www.crunchydata.com/products/crunchy-bridge
[2] - https://www.citusdata.com/blog/2016/08/12/state-machines-to-run-databases/ https://www.citusdata.com/blog/2016/08/12/state-machines-to-...
[3] - https://brandur.org/fragments/large-scale-ruby-refactoring https://brandur.org/fragments/large-scale-ruby-refactoring
- fortysixdegrees 4y agoClearly some quite senior developers there. Makes me wonder if the people hating on state machines have been at the mercy of junior devs or people trying it out for the first time, instead of a well planned state machine by someone with experience. Full disclosure, I think I wrote my first state machine in around 1996. So yea... Grey hair etc. Also it was a big part of my computer science degree, studied formally, so perhaps that's why I'm biased in favour of them.