Sunday, November 29, 2015

If Richard Wagner Were a Web Framework

There are many great web frameworks. There are many great classical music composers. If F represents the universe of great web frameworks, and C represents the universe of great classical composers, there exists a simplified mapping of F to C under the constraint that each web framework selected must be around for at least 10 years, and the flamewar index must be at least or equal to 50%. For those quantitatively minded:

Under this constraint, we examine Mozart, Beethoven, and Bach in order to understand the web framework that most exemplifies their character, and then use this model to approach the title question: "If Richard Wagner were a web framework, which would he be?"


First, Mozart. While his compositions are great for beginners, they are often so algorithmically linear and predictable that they rarely sustain the interests of great professional musicians. As a person, Mozart is often associated with juvenile simplicity and braggadocious, and shallow behavior. Naturally, the web framework most closely associated with this mindset is Python's Django. A favorite of web framework beginners, Django offers excellent and predictable modules to expand the toolkit. But, like Mozart, few professionals take it seriously, and it's hard to make any serious applications with such simplistic platform primitives and constructors.

Then comes Beethoven, arguably the greatest composer of all time (debatable), who has caused by some accounts more debate than the rest of the field of classical music combined. His works are a masterpiece of self consistency; if not so elegant that they can sometimes be viewed as repetitive. Initially hated, then loved, then hated, and now loved again, Beethoven inspires debate, questions of longevity, appreciation for brilliance, and endless discourse. Just like Ruby on Rails. Almost inseparable, Ruby and it's Rails web framework inspire countless hours of debate over enterprise robustness vs. agile web development.

Bach. A bit much for some, he is the bread and butter of professional musicians. His works are easily accepted by institutional music halls and orchestral presentations. Although easy to appreciate, the emotions expressed can be somewhat simplistic at times, and he takes forever to build to any reasonable musical peak. Bach can be pleasant to perform as a professional musician, but exhausting to listen to for extended periods of time. Just like .NET and ASP MVC web applications. While professional and enterprise grade, .NET and ASP are sometimes considered the "professional programmer's" technologies - although they take a lot longer to build anything meaningful compared to other web frameworks.

Which brings us at last to Wagner. Extremely polarizing, he is associated with short, highly punctuated expressions of intense emotion ... that can sometimes fall in love with themselves and recur and repeat endlessly. The concept of "unending melody" is sometimes used to refer to 8+ hour long Wagner Opera in both a musically congratulatory and a simultaneously condescending tone. You are either lost in Wagner's compositions, or counting the minutes until it ends. Elegant simplicity and terrifyingly expressive power are easily associated with Wagner's Die Gotterdammerung. And with Clojure and Luminus. Though closely associated with the sometimes zealous and biased enthusiasm of the Lisp community, Clojure shows it's strength when used to glue together modules from disparate worlds of the programming universe, under the unifying API of Java.

And, like Wagner, Clojure and Luminus make you endure a steep, arduous, and long learning curve. But in exchange for this torturous process, you are rewarded with elegant, beautiful, cohesive, expressive moments of simplicity, like the last 2:30 minutes of Die Gotterdammerung, or this snippet of code:
For the uninitiated, this simple two lines of code expresses a parallel mapping from Clojure down to Mathematica, in two ways; through syntactical parallelization of a Mathematica function within Clojure using the apply function, or multicore parallelization of a Clojure function across multiple Mathematica Kernels. Like Wagner, the simplicity and raw emotional power of this may not be apparent to the uninitiated beginner programmer. Nor will everyone appreciate the syntactical density and subtlety inherent in what can at first just appear to be a different sequence of parentheses and words like map, math, apply, Plus. But to a trained ear, with years of experience in programming, these lines of code represent a masterpiece.

Nuance. Subtlety. Polarizing. Art.


Wagner would be proud of Clojure and Luminus.