Did you ever play the game “Simon Says” when you were a child? One designated person tells the rest of the players to perform some act, but they are only supposed to comply if the command was prefaced by the words “Simon says”. It can be entertaining, in a laughing-at-your-neighbor’s-frustration kind of way. The game plays on the distinction between what sounds like a valid command versus what has been agreed to comprise the requirements for a valid command within the context of the game.
A computer would be very good at playing Simon says. They’re notorious for following instructions to the letter, within the context of the current instruction set. They always “do what you said, not what you meant.” Humans, on the other hand, almost always try to bring knowledge from other contexts into the interpretation of any request — so context-specific requirements for success can be elusive. I often wonder whether the development of human-like artificial intelligence could compromise a computer’s abilities in the same way.
When designing human interfaces, it’s good to keep this difference in mind. When the user has to remember to do things in a specific, non-intuitive sequence or combination in order to achieve a desired result, I call that a Simon Says Rule. Simon says, don’t put Simon Says Rules into your products. This applies to a wide variety of human interface domains — all of them, in fact.
A good example of a Simon Says Rule in programming language design is PHP’s test for failure on strpos. You have to remember that you can’t say in effect, “is the result true?” You have to use the “Simon says, is it really, really equal to true?” operation (=== true) to avoid converting a zero result to false. In my opinion, any language in which you can say the equivalent of ”if (strpos(…))” and get a false result when the string was found has created a Simon Says Rule on that statement. No matter how consistent it is with the rest of the language, no matter how well-documented it may be, it will trip up programmers because it runs against their wider language experience.
But I won’t just pick on PHP. C and C++ have the “strcmp” (and related) functions that return 0 for equality – and zero equates to FALSE when used in a condition. Thus, ”if (strcmp(…))” has an exactly opposite meaning of its intuitive reading. It was designed this way because a non-zero return value for inequality allows more information to be returned: -1 if the first string is “less than” the second, and 1 for the opposite case. But in my experience, 99% of the time I use strcmp I don’t care which is lesser or greater, I’m only checking whether they match. Perhaps this should have been made into two functions: one that returns TRUE for a match, and another that returns an indicator of the collational relationship between the two strings.
Some languages just add unnecessary syntactic elements so their compilers will have something to complain about if you forget to use them. Synergy/DE used to require the command “xcall” or the prefix “%” when invoking a function. That’s a Simon Says Rule, as evidenced by their ability to remove that requirement (in most cases) with their version 9 compiler. The “$” prefixed on variable names in Perl and PHP (oops, I did it again) is another example — one which Ruby demonstrates to be dispensable in a scripting language. That “$” benefits only the parser: ”Simon says, this is a variable name.”
In end-user software, if the user can’t install and use your product out of the box, then you’ve imposed some Simon Says Rules on their experience. The default configuration should be usable in all but a small minority of cases. If the user does want or need to tweak the settings, it should be obvious how that is done — and the order of those operations should be unimportant (i.e., no Simon Says Rules there, either).
You could argue that usernames and passwords represent cases of Simon Says Rules. We’re willing to put up with those for security’s sake. But wouldn’t it be nice if our identity could be secured without resort to a technique as primitive as ancient warfare? When we humans see someone we know, we instantly recall the degree to which we believe they can be trusted. Perhaps one day computers will become capable of that level of recognition. Maybe then they too will become impatient with Simon Says Rules.