DEV Community

Michael Cain
Michael Cain

Posted on

Jazz is Code: How The Jazz Band Can Make You A Better Developer

My previous career to software development was "professional musician"; which is a lot more time teaching lessons, college classes, and honking my way through the 3,397th time I've played Don't Stop Believin' in a bar or banquet hall for some drunk 20-somethings who just tied the knot than playing actual music. That said, there are some valuable lessons I learned on the bandstand that can be applied to software development.

Begin with the output: What do you want to hear?

It's easy for composers ('musical coders', if you like) to get bogged down in the notation of music, only to be frustrated and perplexed when it doesn't sound the way they envisioned. Duke Ellington had a solution for this - he wrote for his people not his musicians. His parts didn't say "Trumpet 1" or "Alto Sax 1", they said "Cootie Williams" and "Johnny Hodges". He knew his band very, very well and wrote the music he could hear being played by the musician who would be interpreting it.

In code, we can often get lost in the sauce of our favorite or familiar tools because we can write beautiful code that way. Does it perform optimally? How does your code "sound" when performed? I have gotten a lot of miles out of thinking about what I want the end result to look like, and working backwards.

Frameworks: Freedom To and Freedom From

(for an in-depth approach on the jazz band and teams, check out this video)

In jazz music, improvisation is a vital part of its performance. The "changes" (underlying harmony of the tune) are used as a common reference for the ensemble of musicians on which to "spontaneously compose". These changes provide some necessary limitations to the creative process. There are "consonant" and "dissonant" notes and phrases, depending on where you are in the framework. Dissonance is used assiduously (most of the time).

We spend years cultivating a musical language by creatively manipulating melodies and musical ideas, and often "borrow" those that have come before us. We need not re-invent the wheel. Today, modern jazz music has a musical lexicon that can be quite overwhelming to newer players. With some practice, one can stand on the shoulders of the giants of the past and create music all their own.

Software frameworks (especially for the web/mobile and soon IoT) are omnipresent in our community. OSS (open source software) revolutionized how products are built. Frameworks can be "opinionated" and have strong conventions that can feel limiting or patronizing (the Ruby/Rails community has to constantly address this critique). That said, the limitations/conventions are not meant to stifle you; they are meant to direct your creativity to the places where you can shine the brightest. Personally, I'd rather write beautiful, interactive, useful applications than re-invent the MVC of Rails. Don't even get me started on the magic of Rubygems....

Music In Real Time

The magic of jazz, to me, is that amazing music is made on the fly. Whether it's a big band or a trio, there are points in the music where everyone is "off book" and simply listening and responding to each other. I've had some truly religious experiences soloing with a band that can inspire and support me.

We, as programmers, can appreciate the majesty of meta-programming and run-time mutations. I'm doing a deep dive into React/Redux/GraphQL right now and am consistently awe-struck by the Mahler-esque symphony of rendering components, getting/setting/transforming data, and its asynchronous cooperation. If you feel the same, I encourage you to check out some bebop (small group jazz from the late 1940s - 1960s is my favorite).

TL; DR

Jazz and Code have a lot in common- they both require interpretation, involve mind-melting amounts of creativity and yield endless permutations and interpretations. My deep love of jazz informed my new love of code, and I'd wager now that you know what goes on "under the hood", you my byte-loving friend just might find some inspiration in it as well.

New to Jazz? Here are some great "intro records"

Oldest comments (3)

Collapse
 
ziongrafico profile image
Zion Gráfico

So Nice article, the last weekend i saw "Wiplash". What a magic movie, i wanna writte code linstening jazz now!

Collapse
 
jadjare profile image
jadjare

Excellent post... Love the comparisons, both musically and programming(ly) insightful.

Collapse
 
gpincheiraa profile image
Gonzalo Pincheira Arancibia

Awesome! your article it is very inspiring!