Finite State Machine

The first lecture I attended in computer science was about finite state machines.

finite-state machine (FSM) or finite-state automaton (FSA, plural: automata), or simply a state machine, is a mathematical model of computation used to design both computer programs and sequential logic circuits. It is conceived as an abstract machine that can be in one of a finite number of states. The machine is in only one state at a time; the state it is in at any given time is called thecurrent state. It can change from one state to another when initiated by a triggering event or condition; this is called a transition. – Wikipedia

I met someone who is building a new app. The app is supposed to have different states depending on which action the user has taken. It is not a typical funnel overview although you can still see it as a funnel.

Looking at the screenshots I asked him, did you ever hear of FSM? Do you have a diagram for the different states of the app and the transitions between them?

I tried to draw an Uber FSM. Uber simplifies the experience by making the system on one state at a time, giving user the ability to take one action/trigger at a time to transition the system from one state to another.

This is what I came up with. It is not accurate as some of the states should be triggers like set location which after you do, you are still on the initial state.

You get the idea.

That’s the beauty of computational thinking. It is this ability to abstract concepts to the bare minimum, paving the way for clear thinking.

Sometimes I miss being an engineer.