The Importance Of Intent

Posted by saurookadook on August 5, 2018

Having a background as a musician, I have found myself constantly drawing comparisons between my experience and training as a musician with learning and writing code. Lately, I’ve been increasingly contemplating the importance of detail as the demands of my projects increase. While listening to Glenn Gould’s recordings of the “Well-Tempered Clavier”, I was reminded of how transcendent music can be, but that this transcendence is not created because of some God-given/genetic-based/whatever-your-beliefs-are talent, rather a product of hard work, diligent attention to detail, and unwavering discipline in pursuit of one’s concept of perfection.

As a sort of continuation to my Composing Code post, I’d like to offer the following:


(If you enjoyed those and haven’t heard this recording or set of pieces before, do yourself a favor and listen to the whole thing. And for those who are interested about their historical background, the Wikipedia page is actually pretty thorough.)

For some who have never heard this before, this may prove a mind-blowing moment, while others may be utterly bored (which is ok! It’s certainly not everyone’s cup of tea.) Regardless of your reaction, I’d like to bring attention to intent in relation to the creation of music, how it relates to the importance of detail in that creation, and finally how both of those can be applied to coding as an art.

Every note in those pieces, and indeed in the entire set of recordings, is molded with intent: durations of notes, intensity of some notes versus others (specifically in the fugues, it is often meant to bring certain lines to the fore), quality of articulation and its relevance from note to note (used to create the singing-like quality of each individual line), and on I could continue with an almost limitless list of details. Though I often don’t listen to classical music as much as I had before I finished school, these recordings are part of a handful by which I always find myself amazed. The attention to detail and the execution of Gould’s intent provides an atmosphere with seemingly limitless possibilities, as my ears always find new things that had not been previously noticed. Even as I’m listening to this collection now, it almost feels in some ways as if listening to it for the first time, with the same sense of wonder, joy, and overwhelming awe at the way he expresses Bach’s music so beautifully.

All sappiness aside, these kinds of life-changing moments created by musicians (performers and composers alike) are fueled by intent and attention to the most minute of details. For performers, it is something which can be defined (at least with respect to their own opinions for how a piece should be performed), but because their craft is fleeting, these details must be ingrained into their being through hours of mindful practice. One day, they may be focused on making a run in a certain passage more clear, analyzing why those notes aren’t as clear as they’d like and then adjusting their approach accordingly. However the next day, they may find that an entirely different problem presents itself, but it has to be addressed with the same type of dedicated focus that enables performances like Gould’s to be possible.

Though the challenges which face composers are somewhat different in that they’re not as fleeting, the importance of intent and as it relates to details in their work is just as prominent. Part of the wonder of Bach is how his music is meticulously crafted and seemingly perfect, and on top of that, to attempt to grasp the quantity of his output and the relatively short amount of time in which it was written. Because of this looming greatness, every great composer since Bach has been inspired by his work; even the most avant-garde notice and draw inspiration from his music, largely because of this idea of intent and the attention to detail when writing a piece that is required in order to communicate that intent. From notation to result, content to interpretation by performers, a composer must ensure that their ideas are communicated with the desired intent, that what is performed is an expression of their overall vision.

Ok, enough about music. My point in emphasizing all of the above, is that I find that the same type of dedication and persistence should (and maybe already is?) applied to programming. Whether it be for the sake of the machine(s) running a program, or those that are part of the team responsible for maintaining the code base for that program, the importance of intent and attention to detail cannot be understated. As part of a team, diligence with syntax (particularly syntax which is determined and familiar within that group) can make all the difference in providing code which is easy for other members to manipulate and with which to work. Further, just as a musician is constantly striving for perfection (regardless of whether it’s attainable), it would seem that a good programmer would approach their work with a similar discipline. To be clear, I’m not advocating for the kind of destructive behaviors that can arise from this type of focus, rather for an environment in which a working product is constantly re-evaluated for improvements, those of which are openly and objectively discussed by the team, and then are implemented, arriving at another working product to undergo a similar treatment. Though this process is simplified from it’s actuality, it is one not unlike the core of a musician’s approach to creating: every detail matters, and those details, along with every other part of the whole, can always be improved. It should also be said that this process will be different for every team, just as it is for every musician. There’s no one-size-fits-all for approaching complex issues and I don’t think there ever will be; people do what works for them and what works for some people doesn’t work for others. And that’s perfectly fine.

For myself, I find that I’m constantly leaving notes in my code about things I think should or could be better, but don’t or cannot address in the moment, for any number of reasons. Additionally, I often find that getting a feature, function, etc. to work is never enough. When it is working as intended, my next thought is almost always, “Ok, now how can this be better?” Sometimes that means the piece of code in question can be condensed, at others it means a more elegant solution to the solved problem, and sometimes the solutions end up being entirely different and unexpected ways of producing the same results.

Given all that has been discussed above, I have found that this type of persistence towards a greater, the acknowledgement of that possibility, and the willingness to chase that seemingly unattainable ideal are what makes the best musicians great (personality quirks not withstanding):

Why shouldn’t the same be true for programmers?