Designing Logic Systems Using State Machines by Christopher R. Clare
archive.org
archive.org
Because I hate the viewer, even though I understand why it exists.
On mobile, if the Archive does not fetch more results, swipe up to return to desktop and then launch browser again. Then more results get fetched.
This changed the site from completely unusable to something browsable.
I wish the viewer would page files. So far, a single file just opens a larger version of itself, and the arrows don't work.
and this real-world example of implementing a FSM with XState to great effect: https://swizec.com/blog/when-your-brain-is-breaking-try-xsta...
For desktop applications, Qt has been offering for ages support for state machines driving GUI states, including using SCXML to generate it's state machine code.
https://doc.qt.io/qt-6/qtstatemachine-overview.html
Ultimately though I found that like most graphical programming it wasn't especially worth the effort.
Having each state as a function, with a descriptive name is nice, but you really have to dig through the whole code to see which transitions are possible and which are not.
I also tends to have state machine calling other machine or being composed of 2-3 smaller ones.
I save the state in some serialized form in DB if needed.
It’s great for customer flow : like; tracking where they are in the KYC process or onboarding and deciding what to do next.
Without having 50 nested switch statement.
[1] https://en.wikipedia.org/wiki/Finite-state_machine#Mathemati...
I've seen enough state machines in the wild that are just a dispatcher with a bunch of functions mutating a single state variable. Whether we call these contraptions state machines or not is just quibbling.
As others have pointed out, there are better ways to implement them; yet, I rarely come across those.
There are techniques to keep those large state machines manageable, such as structuring them with sub-state machines.
At first glance, I find the explicit modelling of these systems as state machines to be interesting. We used state machines when I learned about it as well, but didn’t call as much attention to it. The extra attention — I like that
https://news.ycombinator.com/newsguidelines.html
"Please don't complain about tangential annoyances—things like article or website formats, name collisions, or back-button breakage. They're too common to be interesting."
I definitely agree with the others that the tone and content of this comment is a net negative and should be avoided.