State Machine in Real Life
solipsys.co.uk
solipsys.co.uk
Instead of taking table numbers, they would bring toothpicks when coming to ask if everything is Ok.
The way I upset the system was to hide the toothpicks. The waiter passed by a few minutes later, scanned the table as they walked, then suddenly stopped, took a good look at the table, seemed to be thinking and trying to remember, "didn't I already give them toothpicks? I guess not" they must have thought to themselves as they rushed off. Not a minute later they came back, put toothpicks on the table and asked if everything was OK, still with a somewhat confused expression on their face.
But then* they went home that night, already decided that they can't make such a mistake again. For the next two decades they researched memory, neurology, AI, computer vision, machine-human interfaces, and everything else they needed - in order to install a chip in their head that will always know if they had already put the toothpicks or not. After 23 years of work, they went back to weighting on tables, with the chip in their head, satisfied that they had done alright, at least as much as the customers with the service.
* the asterisk divides the comment into two halfs: true and untrue.
Interestingly, just as in technical systems, problems arise from trying to keep the state consistent between two separate systems (the table and the kitchen, in this case). At the table, the 'Waiting for Food' state is indicated by the presence of the table number, but in the kitchen, this state is indicated by the presence of a slip of paper with your order on it.
In my experience, it's quite common for the kitchen to misplace your order slip, so the two states get out of sync. To the kitchen, it looks like you've got your food (or you don't exist), but at the table, there's no food so no one checks on you.
Huh. That's not what I meant. What I meant was that the process was intended to flow through a particular sequence, and that I made it flow through a different and unintended sequence. In a sense I stopped it from working as it was intended, so in a sense I "broke" it.
I don't know how else to say that, and certainly I didn't intend to imply what you seem to have inferred.
Language is weird.
<fx: shrug />
That was never the intent. Seriously, I'm honestly find it hard (for which read impossible) to read it that way.
I'll re-think it.
I'm genuinely baffled, but if that's what you feel, I'm there will be others who that way too, so I'll see if I can express what I mean more clearly.
Edit: I've changed it somewhat, so the comments here are not necessarily relevant any more. Maybe it's no better ... don't know.
> It was apparent on the faces of the staff that this was most unexpected ... members of the public weren't supposed to know how the system worked ... how could I possibly have known ?!?
Implies that you know more (about the system) than the public. The problem is you are assuming you know why the waiters were shocked. You also don't need the last sentence, it's implied by the first two. Here's an alternative version:
> it seemed like the waiters were shocked. I'd wager that the general public wasn't supposed to know how the system worked
At least leave the original in place but struck out.
For reference, at the end the original read:
It was apparent on the faces of the staff that this was most unexpected ... members of the public weren't supposed to know how the system worked ... how could I possibly have known ?!?
But it was a real-life example of a finite-state machine, beautifully designed, and extremely effective.
Until I did something unexpected, of course. But they didn't seem to mind too much.
================
Edit: I wish people didn't down-vote you, I think your comment is perfectly reasonable.
How did you "stop it from working"? You even admit "they didn't mind".
If anything, what you really showed is that your analogy, while interesting and amusing, has limited accuracy. The concept of a state machines is precisely that, about machines. Not humans. The human staff took notice of the unexpected flow, externally manifest their on-the-fly adaptive mental processing of it on their faces, and then adapted. The restaurant didn't devolve into chaos.
The staff didn't freeze and lie down on the floor like driverless cars are doing on the streets[2]. The fact that automation of anything complex and unpredictable as driving isn't built on anything even vaguely akin to a state machine is telling. That would lead to disaster.
In other words, you didn't break anything at all. It was your analogy that got broken.
---
[1]: You display this smugness even in your reply, "Language is weird. <fx: shrug />". Just sayin. As an writer who posted his work on HN himself looking for feedback should humbly listen to negative reactions as much as if not more so than seek to bask in admiration and success.
[2]: https://www.nytimes.com/2022/09/28/technology/driverless-car...
I read it as an expression of a sense of wonder.
It sounds "cool" when you say that the transitions between states can be handled by anyone on staff with this type of system but it would also feel impersonal if you have 4 different people handling each state: take order, pay, bring food, ask feedback.
What did the hotel have to do with the restaurant?
Just start with the workings of the restaurant. I don't care about you and your wife's travel plans.
Inconsequential details can be fun in stories but they're not always appreciated, especially not in non-fiction.
Also, you're complaining about two short sentences. Just to put things into perspective.