What If We Implemented a State Machine to Help the Little Mouse?
summary
A 45-minute session that builds a state machine from scratch in Java to manage a complex workflow. It uses a concrete use case—the “tooth fairy” process involving collection, cavity checks, ordering and receiving parts from the Bank of France, database saves, callbacks and final delivery under a pillow—to show how a state-machine pattern replaces tangled if-else logic and coordinates internal/external service calls.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 3:27State machines overview
- 7:19Spaghetti code problem
- 8:25Defining machine states
- 10:20Transitions and actions
- 13:50Full process definition
- 17:45Launching via Engine
- 21:41Execution context
- 25:59Final architecture
- 28:07Conditions and async
- 31:36Full process demo
- 34:01Rapid process evolution
- 37:15Process restart
- 39:20Solutions for the mouse
- 40:43Conclusion
related talks
45mWhat if We Implemented a State Machine from Scratch to Help the Little Mouse?
46mState Machines (The Good, The Bad and The Ugly)
37mKnowing your state machines
43m.NET: State Machine in Practice
28mState machines for frontend state management
36mState Machine in Elixir with Machinery
33mHow Not to Shoot Yourself in the Foot with a Finite State Machine
37mState Machine: What It Is and Why
