Hi Alex. Thanks for the great article. I am a great state machine enthusiast as well and used it as inspiration for this video on state machines: https://www.youtube.com/watch?v=8Cvd6PsCPAY


This is the next in a series of articles about Finite State Machines (FSMs) and a new notation called Frame to specify and code them.

Early in my career as a developer, I built a feature for a product that received a patent for Microsoft. The process of working with lawyers to document the system in a way that would be defensible in court was arcane but interesting. This article will tease apart that experience and explain how the system was documented for the patent using state machines in a very natural and accurate way.

At the time I was…

Time Lord vs Timex

On one end of the spectrum, British time machines can travel the universe and traverse epochs.


On the other end, American time machines can, well, let you know you need to flip a burger.

(Update — check out the updated Frame site and try the new Framepiler tool!)

According to the website statista.com the global video game market was worth $104.57 billion (US) in 2017 and will be worth $131.23 billion in 2020. Needless to say — video games are a massive business.


One of the most famous and successful video games ever is Pac-Man. Introduced to the world in 1980, it had earned $2.5 billion by the end of the 1990s. Key to its success was the maddening behavior of the ghosts that chased Pac-Man. …


State machines originally caught my interest as an easy to understand approach to designing communication protocols. I remember seeing an article in Dr. Dobbs Journal (RIP) that showed a graphical model of a communication protocol (like the one above) and then the code to implement it.

I was fascinated by the ease with which I could understand both the big idea from the picture and the nitty-gritty details from the code and that they aligned so clearly.

This article will explore a machine that implements the state machine above for the client-side protocol of an HTTP connection. Although almost ancient…

Frame Machine Notation (FMN) is a notation for designing state machines or, more generally, automata. Previous articles have explored the basics of the -machine- block (or section) where the machine is defined in FMN. This article will delve into the -interface- block and show how these two blocks work together through the FrameEvent.

Basic Interface Block

The Frame -interface- block defines the public interface of the controller. The simplest interface method takes no parameters and returns no values:

#Controller    -interface-        start

The interface above declares two methods — start and stop. Here is their implementation:

class Controller {    //…

The wisdom of Buckaroo Banzai

Unless you are in Oakland — or writing spaghetti code. See

for graphic details about indeterminism with traditional coding techniques.

State machines, however, are marvelous at making it obvious exactly where you are and how you can get somewhere else.

“Spaghetti code” is a perfect phrase for software that essentially is a cognitive and esthetic hot mess. This article will reveal a 3 point plan to kill spaghetti code:

  • Discuss why spaghetti code isn’t very tasty, al dente or not
  • Introduce a new way to look at what code actually does
  • Discuss Frame Machine Notation (FMN) that helps disentangle developers from their dinner

Mark Truluck

A professional software developer and manager. I believe Agile planning is a real thing.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store