Determining the current state of an entity can be difficult. For many, determining state is always implicit — typically taking the form of booleans and timestamps littered throughout database columns and the codebase. The ever growing list of rules used to determine state are rarely documented and even less often tested. What can we do?

Simple state machines, allow us to make our state explicit and provide clear instructions on when and how that state should change, as well as what side effects should occur. By making our state explicit, we can eliminate edge cases, write less code, and confidently test our implementations. The great news is that you don’t need to make large changes to benefit from this simple pattern!

During this talk, participants will learn:

- The event-state-action paradigm
- How to create a state chart / diagram
- How to implement a simple state machine
- How to refactor to, and test, a simple state machine from existing code


Please login to leave a comment

I can't WAIT to implement this!

Pauline Vos at 17:08 on 23 Apr 2024

Well delivered and good simplified examples. I always think that's very helpful as new concepts are already difficult to take in as it is, so having a simple abstraction for it (like the turnstile state diagram) helps avoid information overload.

Greg Fox at 14:39 on 24 Apr 2024

My favorite talk so far, clear and concise speaker with great examples, communicated the point very well.

Myles Hyson at 10:25 on 25 Apr 2024

This was great. Super practical.

Jake is a great teacher! I was sucked in and I learned so much. It was very concise and to the point. Will be bringing it to work and working on implementing it on multiple parts of our application.

Andrew Woods at 11:42 on 26 Apr 2024

I enjoyed Jake's talk. The story of the pinball machine helped make the content relatable. Jake does a great job explaining how state machines work, which was reinforced by how he designed the slides. I look forward to trying out state machine code in a project. Improving the color contrast in the slides, would make it even better.