Secondly, if his creations are going to be relied upon, it will be the programmer's primary task to design his artifacts so understandable, that he can take the responsibility for them, and, regardless of the answer to the question how much of his current activity may ultimately be delegated to machines, we should always remember that neither "understanding" nor "being responsible" can properly be classified as activities: they are more like "states of mind" and are intrinsically incapable of being delegated.
I once saw a spider amputate its own leg. It was severely crippled, only able to move in small circles. Then it suspended itself from a small shelf and started biting off the one leg that was immobile. After it was done it lowered itself on the ground and walked away totally fine.
Since the behaviour seemed very innate I figured that it must be something that happens frequently and is a known phenomenon.
Or maybe ant scientist just don't read spider papers :)
I asked it to generate something similar for golang with a snippet of the list section, and the results look pretty similar. So I don't think it's relying too heavily on a direct example.
I've used state machines twice, both times for GUIs.
It took more time to program than a bunch of messy if-else logic would, but it was well worth it. The knowledge that your GUI can't find itself in an invalid state is realy reasuring, and also it's preety easy to add new states/logic after you get over the initial hump.
Two times I can recall using them in real life were for parsers to identify MIME and CSV files. I thought it was pretty elegant, but zoom forward a few years, and I got to listen to the new guy tell everyone in scrum how he had to fix a bug in there and it was all, ugh, *weird*.
EWD 540 - https://www.cs.utexas.edu/~EWD/transcriptions/EWD05xx/EWD540...