Thoughts on Simplicity
A short note that I sent to the FGNO gang, lightly edited.
I sort of despair at getting these thoughts across: I have been unsuccessful on this topic for my whole life.
The game is bowling. The scoring rules are simple. if first roll is ten, the frame score is ten plus next two rolls else if sum of two rolls is ten, the frame score is ten plus next roll, else the frame score is the sum of the two rolls. In any case, your frame is over.
Ideally, that sentence, written in Kotlin or Python or Lua or Forth, would be as visible in the code as it is up there in the preceding paragraph. If it is not that visible, then the programmer has introduced complexity into it … and that is, in some idealistic sense, undesirable. Ideally, the complexity required to make it display should be separate from that simple core. We have a well-known pattern that is supposed to do that, the “view”, which, ideally, there is that word again, looks at a model that represents “reality” and renders it in whatever fashion we want.
When, in the course of human events, the necessities of our code obfuscate the simple rules of the real thing, we should be unsatisfied. Oh, we might accept what we have as good enough: life is short. But like art, code is never finished, only abandoned, and we should abandon it still hungry, in our hearts, for a better solution than the one we have found so far.
It is interesting to think about how we [the FGNO] got the kind of code we all got, and it seems to me that starting with the UI is arguably not the thing to do. I have seen entire projects founder because someone insisted on a UI that was lovely but forced the programmers to jump through their own orifices to support it.
I do not expect to convince anyone with all this. I never have before, and probably never will.