A response to https://dzone.com/articles/is-your-code-too-concrete, where Edmund Kirwan hypothesizes that using interfaces delays the onset of Mud.
A few observations:
* Any well-factored system will have more direct dependencies than methods. More methods than direct dependencies indicates that code re-use is very low.
* For any well-structured system, the relationship between direct dependencies and indirect dependencies will be linear, not exponential. The buttons and string experimental result is not surprising, but would only apply to software systems where people really do create interconnections at random. The whole purpose of modular program structure is explicitly to prevent this.
* Abstract interfaces are in no way a necessary condition for modular programming.
* Finally, the notion that interfaces act as a termination point for dependencies seems a little odd. An interface merely represents a point at which a dependency chain becomes potentially undiscoverable by static analysis. Unquestionably the dependencies are still there, otherwise your call to that method at runtime wouldn’t do anything.
So I suspect that what Edmund has discovered is a correlation between the use of interfaces and modular program structure. But that is just a correlation. A few years back there was an unfortunate vogue for creating an interface for each and every class, a practice which turned out to be entirely compatible with a Big Ball of Mud architecture. The button and string experiment provides an interesting support for modular programming, but I don’t know that it says much about interfaces.