We have a term for those solutions that are unexpected. The solutions that make you scratch your head and just ask “What?” Those solutions that do indeed solve the problem, but could have been done in a much simpler way. We call those solutions “clever”.
Clever
The clever solutions are the ones that do indeed solve the problem. However, they are all but incomprehensible. The problem is solved, but at what cost? And for how long? How long will another developer need to reverse engineer what you have built? What happens when load doubles?
An example of a clever solution would be something we have built years ago in the Grails framework. We had some pretty simple business requirements around a business object, and very specific transitions the object could go through. So we basically circumvented GORM, the Object Relational Mapper in Grails. We basically made the domain objects read-only, and passed every update through a database procedure.
Now that as a technique itself perhaps isn’t all that bad. It is immediately obvious what transitions this object can go through. The business logic is separate and clean. It has a certain simplicity to it. However, anybody familiar with how Grails is designed to work will really be baffled by this arrangement. It really doesn’t make any sense in that framework. We are basically taking the framework, and trying to throw away almost the entire framework, hacking around how it is designed to work. In this context, it is a “clever” solution.
Out of the Box
Now then, what is the difference between those clever solutions, and great, creative, out-of-the-box solutions? These are the solutions that too are not expected, but are more natural than the clever solutions. They make sense. They withstand the tests of time.
An example of a solution like this is perhaps something like Docker or Kubernetes. Kubernetes is complex, but not exactly unnecessarily so. It still makes sense when you look at all the pieces. Docker is based on tools that have existed for years; but abstracted away in a comprehensible way. Somewhat disparate tools were brought together in a comprehensible way.
How do you determine if a solution is clever, or creative and out of the box? Is there some kind of test around accidental and essential complexity you can run? Does something like common sense come into play?