How Music Taught Me to Code


In the 8th grade, I began playing guitar. My choir teacher in high school offered to teach guitar in place of voice lessons due to our small class size. Not long after I began guitar lessons, my dad bought me my first electric guitar at a local pawn shop, and I was hooked. Throughout that year, I began to discover music, and it was not long until I realized my deep love for it.

Instead of sports, I spent my time learning everything I could about this amazing instrument. I Googled “guitar tips”, “how to get better at guitar”, and various guitar techniques that only the internet could show me. I began to learn from mistakes, discard bad habits and share what I learned with any friends who would listen.

In time, I began to create my own music, finding endless satisfaction in creating things that I had never heard before outside of my own imagination. I discovered reusable patterns in my music, found ways to twist one idea into something completely different and most importantly, learned to create something. I learned that for any one idea, there could be hundreds of ways to carry it out, and that realization was something I have carried with me ever since.

For developers reading this, you can probably see where this is going.

In college, I discovered programming. I had always been a geek, finding ways to tinker with my family computer and learning to solve almost any computer-related problem, but I had never written a line of code in my life. While I was terribly intimidated, the introduction to this new world reminded me of the day I was introduced to a box with six strings and told that I could create something meaningful with it.

I wrote my very first “Hello World” program in Java in 2008. I had no idea what that meant at the time. I had no idea what Strings were, and why on earth I had to type “public static void main” every single time I wanted this thing to say ‘Hello’.

Regardless my first impression, I reminded myself that I was supposed to be confused. I knew that like music, there were things about this discipline that you simply cannot know without experiencing yourself. There are things that a teacher simply can’t teach, things a book can’t explain, and most of all, I would never know all that there is to know. What I did begin to know, however, was that I loved it.

Like writing music, I discovered patterns, made and corrected mistakes, and discovered that there are thousands of ways to approach any one problem. Programming languages were my instruments, each with its own timbre, style, and masters to learn from. Programs themselves were the songs, having dynamics and built from dozens of unique parts, all working together in unison to create a core idea.

My advice to all reading is to develop your creative passions, and understand that there are few, if any, disciplines in life that can’t benefit your experience as a programmer. It worked for me.

Email me when Brian Phillips publishes or recommends stories