# Dave Thomas - Simplify Logic With State Machines (Highlights) ![rw-book-cover|256](https://substackcdn.com/image/fetch/$s_!Aq0T!,w_1200,h_600,c_fill,f_jpg,q_auto:good,fl_progressive:steep,g_auto/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9636a529-1646-4498-b782-4d74c85e245d_1024x1024.png) ## Metadata **Review**:: [readwise.io](https://readwise.io/bookreview/57087845) **Source**:: #from/readwise #from/reader **Zettel**:: #zettel/fleeting **Status**:: #x **Authors**:: [[Dave Thomas]] **Full Title**:: Simplify Logic With State Machines **Category**:: #articles #readwise/articles **Category Icon**:: 📰 **URL**:: [articles.pragdave.me](https://articles.pragdave.me/p/simplify-logic-with-state-machines) **Host**:: [[articles.pragdave.me]] **Highlighted**:: [[2025-12-26]] **Created**:: [[2025-12-27]] ## Highlights - The actions could return either new state values or an event. If an event is returned, the code will immediately perform another transition using it. ([View Highlight](https://read.readwise.io/read/01kdce0h181ayp63erfvcdm8pa)) ^969898480 - Let’s start with a generous definition: an event occurs when information becomes available to your code. ([View Highlight](https://read.readwise.io/read/01kdce15nw5y6hhrp05fn2xhdr)) ^969899026