The relationship between programming and music

On one of our previous posts we received a comment from Lu Hongyang that briefly stated that “Playing instruments is a kind of skill, like programming skills for electronics engineering students”, mentioning that they have something in common: introduction comes from teachers, but practice is up to the students. This made me wonder if there is more to this comparison between programming and playing an instrument. Do musicians make good programmers? Are programmers more likely to be musicians than non-programmers?


Although I couldn’t find a lot of evidence for it, it seems to make sense: for example, abstract thinking is involved in both situations. The topic is discussed in this Rail Spikes interview: Music and programming: interviews with Chad Fowler and Dave Thomas. In the interview they discuss the thoughts of two people who are both programmers and musicians.

I’m not sure, but I think it might be something to do with the discovery of patterns. Both music and code consist of nested sets of variations and repetitions. There’s a rhythm to executing code, in the same way there’s a rhythm to music. It is never exact, but it’s there.

– Dave Thomas, programmer and musician.

I agree that both music and programming have a dynamic structure that is based on the combinations of small elements into a greater whole.

We can find lots of other ways that the two are similar, related to practicing, getting better, mentality etc. However, this doesn’t provide real evidence, and I see differences too: an individual’s programming style can be very personal, but the goal is to get a result that works; it’s about getting to a certain goal, where the path to reach that goal is the freedom of the programmer, whereas for music I feel like there isn’t directly a goal in the first place, since it’s more about the emotions evoked and those are less absolute and more the result of the interpretations of the individual listeners.

Most websites where I looked for information didn’t include direct evidence for programmers being good musicians or the other way around. I found lots of anecdotes and speculations, but often they were followed by something along the lines of “further research is needed”. Nevertheless, I think the comparison of musicians and programmers contains interesting analogies.

What are your thoughts on this?

This entry was posted in Uncategorized. Bookmark the permalink.

One Response to The relationship between programming and music

  1. Lu Hongyang says:

    Composition is like programming sometimes. Composers use different notes and rhythm to make songs, while programmers use programming languages and logic calculation to make software. A good-listening song and a ease-of-use software can both give the audience and the users a comfortable feelings.

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s