3 ms·
State machine diagrams illuminate system semantics without code: “when an API returns 403, go to REQUEST_AUTH state.” The transitions/states can then be observe
by mattgreenrocks 4y ago
State machine diagrams illuminate system semantics without code: “when an API returns 403, go to REQUEST_AUTH state.” The transitions/states can then be observed by outside code to trigger UI/side effects.
Done correctly, you can disentangle the decision-making code from the side effecting code to maximize reasoning ability.
My favorite example of this is the following write up: https://gist.github.com/andymatuschak/d5f0a8730ad601bcccae97e8398e25b2 https://gist.github.com/andymatuschak/d5f0a8730ad601bcccae97...