News for hackers. Stuff that matters.
Re:Developers should be force-fed state machines (2011) by smallpipe on Thursday April 20, 2023 @07:48AM (#35638639)
You realise you're allowed to use more than one state machine right ?
Re:Developers should be force-fed state machines (2011) by jameshart on Thursday April 20, 2023 @08:28AM (#35638929)
Sure, but as soon as you create linkage between them - if the state of machine A affects what transitions are possible when in machine B and vice versa - then you don’t really have two state machines, you have a single Cartesian state machine combining both. Or you have a pair of metastatemachines which aren’t able to be analyzed in the same way as an independent state machine.

It’s like the difference between solving a maze, and solving a maze with constantly moving walls and traps in it.

Re:Developers should be force-fed state machines (2011) by vemv on Thursday April 20, 2023 @07:57AM (#35638695)
Yes. From intuition I'd say that getting the right granularity is just as hard as getting other granularities right (e.g. how "micro" or "macro" your services should be).

In the end I don't pursue an absolute truth. Things are often gradients, one can pick whatever tone seems more reasonable.

Re:Developers should be force-fed state machines (2011) by worthless-trash on Thursday April 20, 2023 @07:54AM (#35638679)
This was my thought too, I hear most people get a bit jumpy when they see two state machines, like its too many moving parts.