On Its Own Terms

A while back in conservatory, I had to learn a piece of music on guitar called “El Polifemo de Oro” by Reginald Smith Brindle (here's a beastly recording of Julian Bream playing it).

What made the piece so maddeningly difficult to learn is that it eschews chords & patterns that you're used to playing. You want to play one way but the sheet music says otherwise. You feel like you're exploring another world, dealing with another world on its own terms and not yours.

I am reminded of this feeling when trying to figure out a recent pull request for WriteFreely the other day. It's solution required me to deal with the underlying web template system.

I come from the world of Python, so specifically the land of Jinja as far as web templating goes. When adding an if/or conditional statement to a template, I add something like this:

{% if this or that  %}

So when approached with Golang's templating language, I saw a nail that I thought my usual hammer could work with.

{{ if this or that }}

But that didn't work at all. Error after error popped up, I couldn't figure it out for the life of me. Then I ended up at the documentation (where I should've started in the first place) and saw that Golang implemented conditionals in a unique way. Below is how the above statement would look like with Golangs web templating:

{{ if or this that }}

From what I could understand, “or” is treated as a function with the two values being compared acting as arguments to that function. I hadn't seen anything like it before. Like with “El Polifemo de Oro”, I had to deal with Golang on its own terms, not my own Pythonic terms.

What started as frustration gave way to wonder. One reason I love playing classical guitar is the breadth of music to play — so many different genres and styles and eras and periods. One day you can play a piece from a guitarist of Chopin's time and the next you're wrestling with a thorny mess like “El Polifemo de Oro.” Each piece builds upon your current skillset but also asks of new things from you.

I feel the same with programming, especially when learning different languages and frameworks and tools. Each new thing builds upon your current skillset but also asks new things of you, new ways to approach similar problems or new problems entirely.

It's that feeling of exploring another world, dealing with another world on its own terms and not yours. That's the feeling I pursue.