Question

We're designing a web user control, which does some different things. It gets events from inside it or outside it, and the response to these events depend on the state of this control.

We're thinking of modeling as a state machine, but we think it might be too geeky or hard for someone else to understand. Do you think this is true?

Was it helpful?

Solution

I don't think so, state machines are extremely easy to draw as flow charts. And many non-technical people can read flow chart even if they've never heard of a "state machine."

OTHER TIPS

If you can model your app's control flow as a state machine, then IMO you should. As others have said, state machines are quite easy to visualise in flowchart form. More importantly, however, having a state machine as your model makes validating the correctness of your code much, much simpler, because you can confirm that the code covers every state and every transition between states.

Code written for microcontrollers is often designed and implemented using this approach for exactly this reason.

At risk of provoking a flamewar, I'll also state for the record that anyone who finds a state machine "too geeky or hard to understand" has no business programming. A regular expression is a finite state machine, after all.

Maybe to ask non technical users about this, for me it can go on.

At Uni we're actively encouraged to do this... and I tend to agree with John D. that they are easy to follow even if you have never seen them before.

See lecture 10 of the class I attended last year on HCI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top