There's Something About Bach

I've recently been looking back on my time at NIU. Very often I think about the tangible experiences like late-night studying and partying. However, something subtle that has completely changed the way I view programming came to me in the form of music, Bach's music.

Man, Myth, and Legend

Johann Sebastian Bach is the figurehead of Baroque-era music. When people say "baroque", they are in some way referring to the body of work that Bach produced. His style of writing was so quintessential to the very idea of music, that many people today say that he's the best to ever compose, even though the guidelines for being a "genius composer" are up in the air.

I was drawn to this. How is a figure so widely considered to be "the genius" in a field where the very idea of a genius is hard to pin down? I had to investigate. And so began my Bach phase.

Listening

There's a sort of smoothness that comes with listening to Bach. His music is not particularly difficult to listen to by any means, and after enough time you can almost predict the direction of a melody. Everything seems like it follows some sort of higher ruleset or grammar that only Bach knows.

This is how every artists' tastes emerge. They iterate over a defined ruleset until something new comes out. Then, they iterate on that iteration until something new is fully produced. But there's something about Bach that separates his music.

G.E.B.

I recently read Gödel, Escher, Bach: an Eternal Golden Braid by Douglas Hofstadter, which describes Bach's composition structure in unusually practical terms. Reading it, I became convinced that Bach is one of the few people to truly "build" music instead of traditionally "compose" it. The distinction is hard to explain but very real. Few can explain why his music feels the way it does, and I'm not going to pretend I can. But Hofstadter comes closer than anyone.

Bach was revered in his own time for exactly this quality:

"He [Frederick] spoke to me, among other things, of music, and of a great organist named Bach, who has been for a while in Berlin. This artist [Wilhelm Friedemann Bach] is endowed with a talent superior, in depth of harmonic knowledge and power of execution, to any I have heard or can imagine, while those who knew his father claim that he, in turn, was even greater. The King is of this opinion, and to prove it to me he sang aloud a chromatic fugue subject which he had given this old Bach, who on the spot had made of it a fugue in four parts, then in five parts, and finally in eight parts."

"…To improvise an eight-part fugue is really beyond human capability."

Hofstadter uses one of Bach's canons to show what this kind of mastery actually looks like:

These successive modulations lead the ear to increasingly remote provinces of tonality, so that after several of them, one would expect to be hopelessly far away from the starting key. And yet magically, after exactly six such modulations, the original key of C minor has been restored! All the voices are exactly one octave higher than they were at the beginning, and here the piece may be broken off in a musically agreeable way. Such, one imagines, was Bach's intention; but Bach indubitably also relished the implication that this process could go on ad infinitum, which is perhaps why he wrote in the margin "As the modulation rises, so may the King's Glory." To emphasize its potentially infinite aspect, I like to call this the "Endlessly Rising Canon". In this canon, Bach has given us our first example of the notion of Strange Loops. The "Strange Loop" phenomenon occurs whenever, by moving upwards (or downwards) through the levels of some hierarchical system, we unexpectedly find ourselves right back where we started. Sometimes I use the term Tangled Hierarchy to describe a system in which a Strange Loop occurs. "Quaerendo invenietis" is my advice to the reader.

Programming

"To improvise an eight-part fugue is really beyond human capability."

Bach was probably not supernatural. He just internalized the grammar of counterpoint so deeply and accurately that he no longer thought in individual notes. He thought in the formal system itself, and how to exploit it. Bach took the "cage of rules" that would bind any amateur up, and realized it as a prarie to do as he pleased. Such extreme ability is what draws me to his compositions, and why it feels like he was one of the first to "build" music rather than blankly compose it as his predecessors had done.

Programming works the same way at its highest level. There is a version of programming that is just syntax memorization and pattern matching, resulting in a style standard among programmers. But there is another version, rarer, where the programmer has internalized the formal system so completely that they think about how to exploit it without consequence, rather than simply write. Bach feels like a glimpse into the latter. His music stretches the rules just enough to be interesting while also sounding pleasant.

The true value of the Strange Loop is how it gives a practical roadmap for Bach's process of creating an entirely new syntax for a formal language by using its own rules as a proof. He didn't just invent an entire new rule for composition by sheer luck. No, Bach knew every speck of knowledge there was to know about his craft, and then iterated on it repeatedly until something truly novel and useful came from it. Creating new syntax is rare for programmers, and even rarer for musicians, but Bach gives a roadmap for how he did it through his compositions.

Bach showed me that true understanding is to have a deep, reinforced feeling in your bones about every potential structure, and every other modulation of that structure. This stuck with me, particularly with programming. You won't understand coding better by learning more languages. You will understand coding better when you dive deep on something and discover what your strengths, weaknesses, and capabilities are. Iterating on that is how you emulate Bach.