logoalt Hacker News

zelphirkalt • yesterday at 1:31 PM • 1 reply • view on HN

What do you mean by "outline all of your state transitions"? How do you outline them? Where? Is that something you do in the code? In the documentation? In your debugging setup?


Replies

ch4s3 • yesterday at 2:45 PM

In your call handlers you handle messages e.g.

def handle_cast({:increment, by}, state), do: {:noreply, state + by}

Obviously you can be as loos or rigorous as you want and go all the way up to implementing a finite state machine with aggressive guards.

You can use observer to see what's happening with various processes/actors.