Profound science isn’t merely useful, fundamental, accurate, or informative. Science that isn’t profound is still great and necessary, but profound science is a term I would reserve for science that has a high explanatory power with only a small number of postulates. Forceful examples include, say, Evolution, or Germ Theory. Such theories tend to be elegant and to some degree rely on emergence to account for a wide range of nature’s facts. They are simple and cut to the heart of the matter, but to take the example of evolution, allow a layman to understand the development of something as complex as the human brain.
So what *does* it mean to explain something, and what’s a postulate? How is it possible to compare scientific theory to something as different as software engineering using those terms?
Something About Abstractions
It’s ok to share abstractions because science already does this, using a common language and set of problem solving strategies despite the vast differences between bodies of science and their practices. And unlike fields which misappropriate the mantel of science, software engineering is actually a good candidate for the analytical power of scientific method no less than it is at demonstrating the more aesthetic, ineffable, and universal value which the most profound science carries.
The leaky abstraction pours from the fact that one discipline is observing the world while the other is creating it. Yet because science is a creative endeavor whose models will always be approximations put into play to some extent by way of someone’s chosen metaphors, there is important overlap with what’s done to create software systems that are modeling facts and processes with an attendant and vigorous disdain for falsehood and unpredictability.
The Sign of Few Postulates
Preamble aside, first consider profound science as a model of simplicity, holding few postulates in return for powerful explanatory power. Postulates can stand at different levels of abstraction depending on the problem they address. The postulates for describing the theory of evolution are categorically different than Koch’s postulates about bacteria, but they both serve the function of describing and testing a range of natural phenomenon in a very fundamental way, and only a handful of such postulates are needed to drive the ideas behind them.
In software engineering, this means no code duplication, the implicit or explicit presence of design patterns appropriate to the problem at hand, possibly but certainly not necessarily metaprogramming, self-documenting code, high expressiveness, loose coupling, emergent design and friendliness to the inclusion of new features (good theories will underpin others), and a strong emphasis on testability on a code level and falsifiability on a user experience level. All recognized signs of code quality, and what they tend to have in common is the reduction and simplification of complexity. And this is why I compare it to “a small number of postulates”: because software that manages tremendous complexity with minimal code is profound.
It’s probably not possible and certainly not necessary to achieve this level of profundity for most software, just as most science is predicated on dense silos of knowledge or seems hackish and incomplete despite its utility. But since we’re talking about how truly profound and elegant scientific theory relates to ideals of code quality, these rare insights into the universe are an appropriate analogous goal.
The Sign of Explanatory Power
The second requirement of scientific profundity is high explanatory power. In software engineering, this doesn’t become a matter of features but rather how well the code explains itself both to humans and machines. It’s hard not to equivocate here a little for the sake of comparison, but I imagine that for the machine side of the picture explanation means bug free code, impeccably balanced responsibilities throughout the codebase, defensively programmed, transactional and robust, and enough flexibility to permit feature growth and further layering as necessary.
What this really comes down to is internal coherence, stability, and interoperability. These are the qualities which allow software to, essentially, compute effectively. The TeX typesetting system is an example of software that “explains itself” extremely well on these counts, and I’m sure you can think of others yourself closer to your own work.
In addition, I think there’s also an element of ambition or grandiosity that factors into view; because science is describing the world its products already have a high minimum utility, and its biggest ideas reverberate down through the many different branches. Software development is less likely to produce, say, memcached, as it is to produce yet another CMS, and no matter how elegant that CMS it still probably won’t strike many as profound because the problems it solves are comparatively trivial. This isn’t to prefer software that’s more ambitious, however that which *is* has greater opportunity to aspire and reach the ubiquity and elegance found in striking scientific theories. In other words, the larger the problem, the greater the range of solutions that address themselves to it, and the greater the potential (or sometimes even necessity) for genius on the elegant end of things. Indeed, code we admire is rarely a WordPress clone.
The Sign of Human Understanding
For high quality code to explain itself to humans, we require that it be maintainable, and as self-explanatory and approachable as possible, that it be intelligently-structured and organized with an almost alarming insight into how humans read codebases. This level of clarity comes from recognized best practices including self-documenting code, test driven development, strict separation of concerns, descriptive naming, DRY code, convention over configuration, and unswerving consistency in style, idioms, and design. These are the features of code that make it real and appreciable, not just a platonic exercise in machine efficiency.
The most profound science seems to rest on only a few premises around a key insight which seems obvious only in hindsight. Most science, however, is intricate and specialist, built up through operational, real-world practice and cumulative improvements to the central postulates. To understand the beauty behind such complex systems obliges a deep study of the material, and when understanding does come it is more by tenacity and mental fortitude that from the lucidity of the system design. High quality code and profound science provide answers to intricate problems with minimum dependency on related knowledge. Technical sophistication is often helpful and frequently necessary, but if humanity cannot efficiently put it to use then it remains a theoretical curiosity, waiting for the day when human minds and tools catch up to the appropriate level of abstraction.
Code that communicates effectively with machines but leaves most humans perplexed and unproductive reminds me of nothing so much as String Theory, packed with information and ideas and explanations but ultimately unsuitable for the environment in which we practice science today and the tools by which we do it. Also remarkable is that while the idea behind String Theory presents itself as simple enough, it turns out to be a useless metaphor when it comes to making predictions or manipulating physics somehow. Contrast this to scientific theories which seem simple, like Evolution, and actually are! Complexity often tries to hide behind the guise of simplicity, which is why profound science is so rare, or for instance, why so many APIs only seem to add another layer of sediment to dig through instead of lightening the load.
This also provides a clue as to why we’re not all programming in OCaml and Haskell despite their expressive power, or Fortran for that matter with a rich history of academia, but why something like Rails (almost a grand unified theory of web development) feels revolutionary and intuitive. To an extent, high quality code is like a domain specific language in the way that science builds itself through terminology and idiom. With the most profound science, these affordances become undeniable facets of the science and it becomes impossible to imagine understanding the problem domain without their linguistic and conceptual buttressing.
Information Itself
In the end, I’m not just arguing for the virtues of, say, simplicity or explanatory power, or really arguing much at all. I think what’s at discussion here is a set of heuristics for describing high quality code and the dramatic-sounding profound science, and whether these heuristics stretch from applied, natural science to computer science, or whether they are different things entirely. Sometimes these heuristics are virtues on a conditional basis, and some are sufficient but not necessary for excellence and profundity. Much science is done with impartial understanding and many codebases are good enough. Trying to consider only the truly exemplary cases, it is easier to focus on a set of best practices for either describing a world or building one yourself.
