My background is as a EE, and I work in hardware. I can't imagine not knowing about state machine design. Is Zed's statement accurate for those with a pure software focus?
My background is as a EE, and I work in hardware. I can't imagine not knowing about state machine design. Is Zed's statement accurate for those with a pure software focus?
I personally think it's important to know about state machines. at least once in a lifetime you are going to write a DSL or parse specific input, and these are use cases were the application of state machines is pretty useful.
oh and by the way: Zed has written a nice tutorial about finite state machines, called "A Painless Introduction To Finite State Machines" and located at http://lamsonproject.org/docs/introduction_to_finite_state_m... . it's worth reading it if you're interested in the subject!
(a) just because you covered it in a class doesn't mean you remember it five years later
(b) lots of people rise through the ranks of IT without formal CS training
(c) some CS programs are not so reputable
(Granted, the education system might have some responsibility there, but personally I recall examples being made. There's only so hard the profs can make the point that this stuff actually matters.)
If a person reads GoF carefully, they talk about it there. Also, UML has a whole state machine concept segment and Uncle Bob wrote a package years ago to handle state machines.
I wonder if programmers rely too much on RE for problems that would be best handled by FSM.
Excellent article, excellent software.
So, for an un-specious response: FSMs are well suited to stream processing, while REs do well with block processing. (And are generally implemented by compilation into FSMs, anyway.) FSMs also do well as program logic/control structures, often clarifying the underlying system.
Yes, REs are transformed to FSM, but the problem-solving approach provided by skills in writing FSM is different, and according to the article, often better.
Additionally, I find state machines in many business domains. Everything that some kind of "ticket" object (be it customer support or defect tracking) will (or should!) have state machines, with rules of varying complexity, to escalate the status of these tickets.