by mbanzi · 2w ago · 0 comments
A couple of points: - This is not a beginner's tool, it's stated quite plainly on the front page, so I'm not trying to teach people to program.
- In terms of usabiliy, I can only point to the sucess of Node-RED, on which this is closely modelled, and fits in roughly the same niche.
- The state machine point is interesting and well made, I've a long career in coms and OS work, so I fully appreciate your point and will have to think on it.
Thanks for the comments.
ThingStudio, like Node-RED is built with chains of coroutines.
Coroutines and state machines (which I take to mean table driven state machines) are (mostly) functionally equivalent. I'm prepared to take some flame about this :-).
I think most people find it easier to write the pseudo-linear code of coroutines than define formal state machines.
However, a small anecdote is worth relating. Quite a bit of this code was AI generated, and there is a wire protocol between the front and back ends. After a while I was somewhat uneasy that I didn't know enough about this so I ask the AI for a proper human readable doc on the protocol. After watching it thinking for a while, I realised it was trawling through the code. A couple of questions later revealed that my suspicions were correct and the protocol was just free code. I didn't much care for this and told the AI that I wanted it re-written as a table driven state machine. Interestingly, it took a couple of interations before it could grasp the concept properly. And this was one of the current top models. :-)
I tell this story to illustrate that I fully grasp the value of state machines. My first implementation of one was when I made a DSL to define an implementation of X.25 around 1979, so I have some history with them.
The real point to make event driven programming easier.