Jazz, Refactoring, and the Clean Slate

Here’s an email I wrote to the cohort I’m leading right now. We’re in week 3 of Phase 1, past algorithms and OO design basics and into SQL and ORMs. It’s also the week of the phase assessment. So there’s some stress. On Day 1, we made a covenant as a cohort, and keeping a clean slate every day was part of that covenant. After a lot of test anxiety bubbled to the surface yesterday, I had an urge to share a song that has always helped me “snap out of it” when I got caught in a worry spiral.

And then I thought about how the song came to be, and I realized the process itself was another object lesson for beginning programmers…

Good morning!

Today’s work will build on what we did with SQL yesterday, and add Ruby and the sqlite gem to the mix. Basically, you’ll be writing your own Ruby methods to execute raw SQL queries and build Ruby objects from the data that comes back. You’ll also end up creating, modifying, and deleting data in the database.

The difference between a site and an app is that a site is static, while an app lets a user create, read, update, and delete data interactively. By writing methods like the ones you’ll write today, you’re taking a big step into the mindset of a web developer.

And finding the right mindset is always important. If you want more control over your mindset, being mindful and in the present moment is always a good place to start. As a reminder to keep your slate clean today, I’ll offer an optional ten-minute thought experiment. If you like music stuff, you’ll probably get a kick out of this.

Here’s What Am I Here For, by Duke Ellington (Not the Duke I’m named after, btw; Ask me later.). Try to listen closely to how the instruments pass melodies back and forth to play off the chord progression, almost as if they’re conversing.

After you’ve given that an attentive listen, reflect on the song’s title for a moment. What were you expecting to hear when you first saw it? How closely did the music match that expectation? Did hearing the song help you answer the question posed?

Cool. Now, check out your clean slate meditation for the morning: What Am I Here For, by Lambert, Hendricks, and Ross. Listen to the melodies again. And the words. Oh, the words…

Holy crap, right? Jon Hendricks and his group were among the first to put something called vocalese on the map. They became world-renowned for this and many other songs, wherein they translated entire performances of jazz standards, note for note, into versions with lyrics befitting the song’s original title.

It’s monstrous work, if you ever get the chance to try it. So much attention to detail, meticulous reworking of tiny elements to get the flow just right in each part, without sacrificing content or craft or enjoyability. All to end up with something that is only a little different from what you started with!

Yep…it’s a LOT like refactoring.

It’s also like refactoring in that the LHaR version would have been impossible to create without Ellington’s original. Not “impossible to create as fast or as well,” literally IMPOSSIBLE to create without a first draft, according to the rules of vocalese. How can you match lyrics to melodies when there are no melodies? How can you write to a theme when no title has established one?

Like Good Vocalese, Good Code also relies on a solid-but-incomplete foundation to tower sky high. If you think you’re done in one draft, you’ve missed out on all the magic. Duke Ellington and his band did fantastic work…and yet I only ever play that version as a prelude to the one I just shared with you.

Because the vocalese version is just better. At least it is to this end user. It’s like someone got into my head, peeked at all my hidden needs and worries and insecurities, anticipated the happiest path from confusion to satisfaction, and wrote something that lets me meet the finished product where I’m at and get something out of it that feels deeply personal.

You see it, don’t you?

That’s exactly what users ask web developers to do every single day.

In the mindset of a world-class beginner, there is no such thing as Bad, only Incomplete. It’s true for code. It’s true for developers.

Today, be willing to accept something about your learning that is incomplete, and do whatever it takes to refactor it into something better.

That’s what we’re here for.

That’s what we’re here for.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s