What are state machines? (feat. Ash Framework)

https://www.youtube.com/watch?v=_x6TE7hbE1k @Christian Alexander making another banger of a video. This one is my favorite so far 🔥
Code and Stuff
YouTube
What are state machines? (feat. Ash Framework)
State machines are important data models to be used in situations with a series of known states and well-defined transition rules. From light switches to cars, vim, and even payment processing—these come up more often than you might think. Elixir's Ash Framework has a package that makes managing state machines easy, consistent, and well-docu...
11 Replies
RootCA
RootCA•3mo ago
This one was a snowball of Ash features!
ZachDaniel
ZachDanielOP•3mo ago
Yeah that gallop at the end was hype.
Nefcairon
Nefcairon•3mo ago
productionwise it's great. But what's the purpose of this vid? It's more showing MoneyPit, Ash and Ash Extensions (incl. ash maschine) and does not really explain what state machines are/do. So besides the slightly misleading title it's very nice. Thanks for creating it.
RootCA
RootCA•3mo ago
Pretty sure I explained what state machines are and gave examples, maybe it went too quickly?
ZachDaniel
ZachDanielOP•3mo ago
Yeah, I don't think I agree w/ that assessment. The entire intro is just about state machines irrespective of Ash.
Rebecca Le
Rebecca Le•3mo ago
holy heck that's an awesome vid I can sort of see Nefcairon's point and may have elaborated on the initial traffic light example a bit more to really hammer home what state machines are (eg. showing a state machine diagram for a traffic light with valid transitions) I'm side-eyeing that ValidNextState policy check though (and looking at the source now because how does it know which state is being transferred to 🤔 )
Nefcairon
Nefcairon•3mo ago
as someone who hasn't learned about state machines in university: The intro told me foremost about state and states. Later I somehow got a grisp of "state machine" when you showed how to define transitions with the extension ash state machine. And I think state machines are less about the states and more about the transitions, isn't that the case? Of course someone who knows about state machines can easily follow, but I don't think Zach is the target audience 🤩
RootCA
RootCA•3mo ago
That feedback is super helpful. I actually had a section that I later deleted where I had a livebook and modeled transitions in a clearer way but it didn’t fit into the progression of the video very well. I know it would’ve been easier to just say “cool video, thanks.” I appreciate the honest perspective. Thank you.
RootCA
RootCA•3mo ago
In case you're interested, I posted the traffic signal livebook demo unlisted on my channel: https://youtu.be/_p4yI2Pb6bg
Nefcairon
Nefcairon•3mo ago
Just wanted to clarify: this is nevertheless a georgous vid, surely top 3% in the area of coding. Appreciate the work. yea, I would have let that in.
RootCA
RootCA•3mo ago
Thanks for confirming. I’ll add a summary of this interaction to my script analysis bot for future reference! (Not kidding, I have a bunch of AI video reviewers with personas that leave comments on my scripts while I write)

Did you find this page helpful?