State machines are wonderful tools

learnbyexample@programming.dev to Programming@programming.dev – 65 points –
nullprogram.com
9

You are viewing a single comment

While I agree with the premise of the article, the code is completely unreadable to me. I took a look at the first snippet and just thought "Nah."

That’s because it’s not the source. It’s not the preferred way of modifying the program. The state diagram is the preferred way of modifying the program.

You really need to know C to be able to read that code - If I only knew Python or Java I'd be hella lost too.

It's not even that. I can generally read a C-like language, but when the first line I see is a long-ass array of bytes with zero documentation it just makes me not want to even try.