Music, code, and learning

Taimur Shah
5 min readFeb 5, 2019

--

I have terrible rote memory. I’ve always been bad at taking notes, and I’ve never excelled in subjects in school where I was being tested on memory. History and French classes were difficult — it seemed like we weren’t really being taught comprehensively. As a kid, and like most kids, I guess you can say that I loved to learn new things. I would spend hours in the library, reading (picture) books about tornadoes, dinosaurs, and galaxies. I knew a lot about these subjects as a really young kid, but I was a really terrible student in school. I got excited a lot in school, but it was quickly reinforced by teachers that my excitement would derail my success in school. Lacking much self-control, I usually just focused on the stuff that interested me, often failing to memorize the right stuff for school and getting bad grades. During high school, and certainly in college, I had lost my joy of learning. This caused lots of pain: I thought there was something wrong with me because I didn’t desire learning anymore. I did very poorly in college, as I didn’t feel like the environment was promoting passion and experimentation, which is what I thought college would be all about. But, there was once exception: music.

I got my first guitar on my thirteen birthday. I quickly took to it, and I’d regularly spend hours a day just playing. I didn’t have agendas, I wasn’t doing it because my parents told me to. It was the only thing I did for its own sake. When I discovered the Red Hot Chili Peppers’ music, I felt like I’d found my religion. I was obsessed. I’ve been playing for eleven years now, and though I was largely unconscious of it, learning music taught me how to learn new things, and it wasn’t until Flatiron School’s Software Engineering bootcamp that I became aware of how playing music has made me a stronger programmer.

I believe musicians exist on a spectrum. On one end, there are very cerebral musicians. They tend to be drawn to more complex music, and their compositions tend to reflect their interest in complexity. On the other end of the spectrum, you have musicians who are turned on more by feel. They tend to be drawn to the energy of music, and their playing is often improvisational, unplanned, and messy. I fell on the latter end of the spectrum. I spent my high school years playing in bands and improvising a ton. Over time, I became increasingly better at learning music through feeling, rather than by reading sheet music, learning from tabs, or by watching tutorials. As I would later learn, the process of learning music lay the foundation for my general approach to learning now.

How I feel playing music… and coding

I have felt lots of similarities between learning to play music and learning to program. In his awesome book The Art of Learning, author Josh Waitzkin discusses a concept called “studying form to leave form.” The concept is basically one of spending time studying the technical precursors to intuition. In the case of guitar, it could be something like a new coordination between your right and left hand. In code, it could be learning a new language or framework. The idea is, once you’ve devoted enough time to some details of a skill, the level of conscious awareness and effort you need to implement that skill will diminish as a result of the skill moving into your intuition. This happens at many levels, and happens over and over again. This has manifested in programming, as I feel more suited to understand the “feel” of a program or problem than I am able to plan a course of attack.

The most significant similarity between the two is the creativity. For me, creating music and writing code require similar internal conditions. Whether writing music or code, the best stuff comes out when my chatty, “monkey-mind” is turned off, and I’m just playing, in a state of flow. Psychologists define a flow state as an “optimal state of consciousness where we feel our best and perform our best.” Furthermore, flow states involve “being completely involved in an activity for its own sake. The ego falls away. Time flies. Every action, movement, and thought follows inevitably from the previous one, like playing jazz. Your whole being is involved, and you’re using your skills to the utmost.” The metaphor for jazz is apt; there is a complete lack of really knowing what you’re doing. When coding, I get into this zone, and I’m really just playing around with stuff, and more often than not, this is how I’ve been able to solve the harder problems. I generally believe that the ability to let go and flow that I learned from music is very useful in analytical domains.

When I solve a hard lab

Sometimes when I’m coding I have the realization that I’m actually playing guitar. This weird sensation has given me insight into my own learning process. I’ve come to see learning new things as less separate than I used to. Skills now seem to me to be like different tools to express my Creativity. In order to learn, then, I need to spend enough time in increasing my proficiency in prerequisite skills, so that I can play around with things. I have come to trust that the biggest impediment to learning for me is mental chatter, which includes self-judgment, self-criticism, and any other sort of mental reaction.

The great physicist Richard Feynman has an interesting anecdote that ties in well to what I am trying to describe. He had reached a creative block in his career, where he felt like he was incapable of producing any great work. He was very frustrated, and so he tried to adopt a new attitude. He details a thought experiment: “I got this new attitude. Now that I am burned out and I’ll never accomplish anything… . I’m going to play with physics, whenever I want to, without worrying about any importance whatsoever.” After a few weeks of “playing,” Feynman had figured out what he’d later win the Nobel prize for. He said, “It was effortless. It was easy to play with these things. It was like uncorking a bottle: Everything flowed out effortlessly. I almost tried to resist it! There was no importance to what I was doing, but ultimately there was. The diagrams and the whole business that I got the Nobel Prize for came from” playing around. This left an impression on me, and I do think that “playing” is the best way to learn and to create.

Richard Feynman, doing physics

--

--