6 ms·
The problem with state machines that I run into often when using them, is "multi-dimensional" states. When managing to get that right they are great, otherwise
by knsv 3y ago
The problem with state machines that I run into often when using them, is "multi-dimensional" states.
When managing to get that right they are great, otherwise you get loads of edges...
- sidpatil 3y agoI'm not sure what you mean by "multi-dimensional" states. Is it something that statecharts [1] can help with? [1] https://statecharts.dev/ https://statecharts.dev/
- barrkel 3y agoThe cross product of multiple state machines, I expect. If you try and use a single state diagram to encode the product of states, everything multiplies.
- michaelsbradley 3y agoThat’s where statecharts can help.
- RossBencina 3y agoUML Statecharts are Harel Statecharts, which are hierarchical state machines. Described here: Statecharts - A visual formalism for complex systems. David Harel. 1987 https://archive.org/details/7.-statecharts https://archive.org/details/7.-statecharts Looks like you can also freely download the paper from here: https://www.sciencedirect.com/science/article/pii/0167642387900359 https://www.sciencedirect.com/science/article/pii/0167642387...
- tonnydourado 3y agoNot sure what you mean by multidimensional states?
- hwayne 3y agoThe car can be in drive, neutral, or reverse, the light can be red, green, yellow, or broken, the seatbelt can be off or on. That's 24 states.
- tonnydourado 3y agoAh, ok. That's kind of what I meant by upfront design, though. Yeah, mapping this out is gonna suck, but it's better than having it hidden in a bunch of ifs.