I've seen plenty of questions asking if listening to music boosts productivity, etc. but I haven't been able to find one about performing music. Learning to play the piano has been on my to-do list for a while, partly because I have a sneaky suspicion that learning to deal with the relationships, recursions, etc. inherent in music will make me a better programmer (plus it looks fun).

Does anyone know of any research on, or have first-hand experience with, learning a musical instrument having any sort of noticeable effect on one's programming or mathematical ability? Most of what I've been able to find seems to be interested in the effects of learning music at a very young age on boosting overall mental ability. I would also be interested in the other direction, aka learning to program improving one's ability with an instrument.

  • 7
    Learning the keyboard helped me immensely. <groan>
    – Dave Nay
    Jun 4, 2013 at 20:40
  • The people who are attracted to software development are also the same people that fancy playing a musical instrument. They both have mathematical and algorithmic underpinnings, after all. Jun 4, 2013 at 20:43
  • 1
    As someone who's never played an instrument, I speak only hot air here, but I would think programming might be more related to music composition and analysis etc than the act of playing the instrument. But I have no experience to claim such, so take that with a grain of cornfeed. Jun 4, 2013 at 21:16
  • @JimmyHoffa Good point. I suspect that might be file-able under the "learn how to walk before you try to run" category though.
    – Evicatos
    Jun 4, 2013 at 21:36
  • 2
    see also: skeptics.stackexchange.com/q/1570/96
    – Sklivvz
    Jun 4, 2013 at 22:38

2 Answers 2


I have never met Rich Hickey, but I have three things in common with him: we both like to program, we play guitar, and we have Music Composition Bachelors degrees from Berklee College of Music. Here's what Mr. Hickey has to say on the subject:

Software design and composition have a lot of similarities. Both involve manipulating and coordinating abstractions, and envisioning their realization, in the case of programs that are processes, in and over time. I’ve certainly found software design satisfies the creative urge I intended to pursue in composition, and has completely displaced it.

Source: http://codequarterly.com/2011/rich-hickey/

A retired MIT graduate and programmer friend of mine remembers the days when there weren't enough math majors to draft into programming and companies actively recruited music majors (probably composition, but I can't remember) as a second choice.

Berklee is accredited and the music courses count for the math credits toward that accreditation.

Learning a musical instrument and learning to read music is a great way to keep your mind agile in general. Most programmers don't need to know base-2 fractions, but IEEE floating point is base 2 fractions. Most written music uses base 2 fractions to notate rhythm: a half-note, quarter-note, sixteenth-note, etc., though triplets are common too. So that one little small cross-over point is there. I suppose that finger dexterity can help you type, but typing helps that more, so I don't think that counts. Basically, I agree with @JimmyHoffa that instrumental ability is just not particularly related to programming.

On the other hand, I feel that my study of music composition has improved my ability to construct programs. Both involve creative manipulation of abstract concepts with regard to certain mathematical rules. Whether I'm writing music or designing a system, days/weeks/months of mental energy is spent conceptualizing things that don't exist, that I can neither touch, nor adequately draw a picture of, or build a physical model of. Each design needs to be tested inside my head and compared to other design alternatives. When difficulties arise, I need to creatively imagine new solutions or modify parts of the existing solution until things work out. This has proved to be a valuable skill for me in my career.

Also, a sensitivity to how your work will be received is a factor. Even if you are just writing code to be read, or creating an API for other programmers to use, a sense of craft and style can go a long way toward making it usable. Do you just name your methods willy-nilly, or do you try to find the most sensible and appropriate names? Obviously this is especially important in UI design. So that's another partial cross-over.

Composing music, especially serial or 12-tone music uses modulo arithmetic (modulo 12 for 12-tone equal temperament) which sometimes comes up in programming. But now I'm grasping at straws again.

Music improvisation is interesting because it combines instrumental ability with spontaneous composition. Many improvisers have a few "licks" that they vary the way a painter might mix a little yellow with his favorite red. The ability to truly compose on-the-spot is a rare gift and even for those who have it. But it's the composition aspect, not the instrumental aspect that's really related to program design.

The collaboration aspect of performing music (whether as an instrumentalist, conductor, or composer) translates directly to software or corporate projects. Amateur music relies heavily on volunteer support and most performers are passionate about what they are doing. If you don't keep people motivated, they just quit. Often they tell you frankly and directly what they are feeling in a way that never happens when their performance review or pension is at stake. Experiencing the NSFW version of these conflicts often provides insights into the cloak-and-dagger version that happens in boardrooms and design meetings. Good money gives activities a priority that participant's families can support, but at the end of the day, most people are motivated primarily by doing something they can be proud of. Harnessing creative energy for productive purposes is pretty much front and center in a band or with a development team.

So I would have to conclude that learning an instrument (or several) hasn't helped me much at all with programming. Learning to compose classical orchestral compositions and fugues has helped me a great deal. Certainly a CS degree from almost any university is a better way to learn to design computer programs, a math degree is probably a good second choice, but a music composition degree is more related than it might at first seem.

Ultimately, the best way to learn something is to do it - all the time! Check out How to Really Master a Programming Language

Still diversity is valuable. I suppose my composition degree gives me an edge in certain program-design circumstances, but people with a CS degree definitely have an edge in others, just as math or physics majors might have an edge in other circumstances. At this point, I'd say that all the experience I've had and all the CS studying that I've done outside of school have done my programming more good than my Composition degree, but it does still help with abstract design.

P.S. I don't write music any more. I pluck out a few songs for fun sometimes, but that's about it. Like Mr. Hickey, programming satisfies my creative urges in a way that music never did.

  • Wow, very interesting answer. I didn't know that about Rich Hickey. I can definitely see the parallels with composition but am I not correct in thinking that actually learning to play an instrument is a somewhat necessary first step to that? Regardless, you've given me a lot to think about. Thanks for your insights.
    – Evicatos
    Jun 4, 2013 at 22:49
  • Before music notation software programs like Finale or Sibelius you had to be a proficient performer before you could compose. It's still better if you play an instrument, but maybe not essential. Jun 5, 2013 at 12:38
  • Notations like "Update," "End Update," "Edit" and the like are unnecessary clutter. Stack Exchange provides a complete edit history for your question; see here: programmers.stackexchange.com/posts/200489/revisions Jun 5, 2013 at 14:47

Personally, at a certain level of abstraction, I see little difference between Symphony No.9 and say, for example, Boost.

Fundamentally, music and code are both entirely based on patterns. This is why music translates so effectively into digital performance - the patterns can be turned into numbers.

Ergo, learning to play music effectively isn't so much about the tool you do it with; the instrument. It's more about the ability to discover and exploit patterns. That's what makes a sound good or bad. There are instruments that have naturally better and worse sounds (obviously), but this shouldn't be confused with the essence of music.

Similarly, programming isn't so much about the language you do it with, it's more about the ability to discover and exploit meaningful and effective abstractions.. or patterns. That's what makes code good or bad.

So I don't really see much of a distinction between the two and feel like anything you can do to improve your ability to spot, interpret, and synthesize patterns is going to improve your code.

The only experience I have with instruments was far before I started programming, so it would be difficult for me to convey firsthand experience. There are, however, resources about this kind of thing. I'm also aware of at least one author that was a musician before getting into programming and he discusses this a little in his book.

  • 1
    Rod "Spring Framework" Johnson "...holds a Ph.D. in music history, as well as a B.A. in... musicology. He even spent time as an instructor at the Sydney Conservatorium of Music while writing software on the side in his homeland of Australia."
    – gnat
    Jun 4, 2013 at 21:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.