The Quest For Perfect Proportions In Your SoftwareFiled Under Architecture, Thought Stuff
Without saying, I am impressed how intelligent geniuses such as Leonardo Da Vinci and Beethoven were; however, I am much more impressed how clever they were in applying it to their respective crafts.
One of the most prevalent examples of this is the underlying introduction of the Golden Ratio into art, architecture, and music.
Beethoven’s Fifth is found with numerous instances of the golden ratio, as is Mozart’s sonatas. In fact, there is another whole discipline with the Fibonacci series called the Golden String which scrutinizes many violin constructions.
Before any of this – The Parthenon is filled with instances of the golden ratio and other mathematical wonders including optical modifiers.
For almost a year now, I have wanted to write about how software is much like the elegance of music. Both artistic from one perspective yet scientific and mathematical from another. So I continue by pondering the question – what would the Truvian Man or Parthenon look like if it were a MVC application stack?
With a quick introduction to the Golden Ratio maybe we can hypothesize. If the golden ratio equals:
The only positive solution to this quadratic equation is:
OK, now that we have that out of the way, normally we tend to draw a simple 3-tier architecture with 3 equal layers like this:
But what would happen if we apply the golden ratio to this architecture stack? Here are a few permutations:
The one that I hope represents reality the most would be this permutation:
So all of this brings up interesting questions, and lets assume you have your domain model layer completed.
First up, what is the optimal amount of software to support X number of entities?
This question completely depends on the application. Is it a simplistic data in / data out application? Then maybe your ratio of View to Model is closer to 1:1. Does your application have a ton of business logic? Maybe your ratio of View-Controller-Model is closer to 1.6:1.6:1.
Second, how does this change testing?
In the ROI of Testing I speculated at some values at the ROI of unit testing, business logic testing, and automated UI testing. How would that exercise change if your application demanded that you build the very top heavy permutation above (View layer is ~1.6 x bigger)?
In the end, does any of this matter? Being agile means only building the amount of software you need to do the job. If underlying patterns emerged – then neat, but not at all necessary to view the project a success.
500 years from now, I can only hope that someone goes through the hassle of dissecting my code and finding the mathematical brilliance of Beethoven’s Fifth…but in the end it will probably be more like Brittney Spears pop rock…