The One Thing Programmers and Musicians Have In Common

I think the relationship between mathematics and computer programming (as opposed to science) and between mathematics and music is interesting and perhaps relevant in that they’re both in many ways theory vs. implementation.

You don’t need to know about time signatures and harmonics to create music that uses them, just as you don’t need to know what a bubble sort is to implement one. Knowing the theory of the craft generally improves the practice of the craft.

Jeff, maybe after you learn C you should pick up guitar.

The question to ask would be, are programmers musicians at a rate that is disproportionately higher, lower, or the same when compared to other professions?

Without an answer to that question, the discussion is just so much crap.

It’s also the practice of discipline. Latin students and piano students have better grades in school. Taking your instrument home to practice for an hour a day sets a good precedent for other learning tasks, such as programming, learning a foreign language, etc. I equate written communication in ones native language, telling a computer what to do in any programming language, and speaking a new language as different flavors of the same skill set.

Then there’s the math - music gives even its youngest students an innate understanding of fractions, relative frequencies, timing and tempo, and on and on.

Finally, being in a musical group gives people a good sense of what it takes to be on a programming (or any other) team: be individually competent at your job, while working within the group to produce something greater than the sum of its parts.

For the programmer-musician, I would recommend the book This is Your Brain on Music

http://www.yourbrainonmusic.com/

It explores musics effect on the mind and why we enjoy it so much.

I think that musical ability and programming correspond but it’s because of the ability to recognize structures and hold them in one’s head. The same thing applies to linguistics. I have a friend who is an excellent pianist and knows music theory inside and out and just finished his first semester of Greek. Having minored in Greek in my undergraduate program, I told him that he’d be absolutely fine. It’s about recognizing structure and the relationships between the parts. This applies to programming as well. When a good programmer is thinking about a problem, he or she keeps the data structure in his or her head and understands how changes to one part affect the related parts.

A simple parallel of this in music is a pianist or guitarist who knows what changing one note in a chord means. It might mean that the chord is now a different chord (If you add a low B to a D major chord, you’re actually playing Bm7 and not a D.) or it might just be a nonharmonic tone that is getting you to the next actually harmonic change.

If that doesn’t make sense, it’s OK. The point is that it’s about recognizing relationships between the parts of a larger whole. Programmers and musicians have to be able to do that in order to be good at their respective craft.

I think that you are absolutely correct when you say that programming is kind of like music.

I am a guitar player and I love music and programming. Programming is to me like writing music, just the way my music fits beautifully together to form the song, my code fits in there to make a hell of a cool program…

Music = Programming… About 99% true.

All I know is that I work in a highly technical small company (~40 devs) where probably 40-50% plays an instrument.

Show me another profession (music related ones do not count) where that percentage is this high, and I’ll stop thinking that programming and music playing are highly related…

As JamesH mentioned above, the book Gdel, Escher, Bach: an Eternal Golden Braid is a long investigation into the nature if intelligence. I am sure that SOMEONE else here has read it, since the author Douglas Hofstadter is a computer guy (so to speak LOL).

As the name implies, a part of its mechanism of meaning involves drawing parallels between Mathematics, Music and Art, and investigating the areas of the mind (as opposed to the brain) that are involved with each.

That is all that I will say about it except
a) it has a great deal to do with today’s topic
b) it is not a light read
c) I recommend it strongly for anyone who finds thought compelling

Cheers!

I like to think of myself as a rock star programmer. :slight_smile: But seriously, I recently learned drum programming which is quite easy if you read a good book on the subject. Unfortunately, most books on digital audio workstations are just software manuals and don’t bother to explain drum programming.

Wired magazine has an article on Livecoding, practitioners improvise using Perl or homemade programming architectures to build compositions from the ground up, replacing instruments and samples with raw code authoring before a live audience:

http://www.wired.com/science/discoveries/news/2006/07/71248

I think there is a correlation, having to do with both discipline and creativity.

Denny Dias was an architect for Nantucket’s Clipper 5.x xBase product, and a founding member of Steely Dan. The man has some awesome bebop chops; just listen to ‘Bodhisaatva’ off of the Countdown to Ecstacy album.

I believe I heard a long time ago that there are only 2 true geniuses in nature: musical and mathematics. Given the correlation between those 2, as well as the fact that the theoritcal side of software development, Computer Science, is a branch of mathematics, I can see there being a potential to say that people who excel at music can also excel at software development if they are interested in it.

Most people think of themselves as being defined by their job – for example, I make money programming, so I’m a programmer but I’d rather think of myself as a musician, so check out my new album right now.

http://www.throbbingmattresskitten.com/

BTW, in addition to playing all the instruments on the album, I built the Silverlight audio player on the website as well.

I think the difference between programming and music as a career is that success as a programmer is primarily based on skill, whereas success as a popular musician is primarily based on luck.

Obviously there are exceptions – studio musicians, orchestra members, etc., often have careers based on skill – but for the singer/songwriter types, I think it’s 95% luck.

In addition, functioning software is something people need, music is generally considered optional.

I’m not sure about this link between programmers and musicians, I just can’t see it. This is coming from a person who loves music, plays in a band (perhaps not that well http://www.feellikefalling.com), but I also love and write about coding. I have also never written a song about programming, thankfully! Actually, even the thought of doing it is bizarre - I’m sure someone has though. I just can’t think where I use my code writing skills as a musician, and having programming skills is not something I hear other musicians going around bragging about too often :slight_smile: It’s just not rock n’ roll.

Odd was I the only one waiting for the obvious Guitar Hero punchline?

But in all seriousness, I think the correlation has more to do with the fact that it’s about creating and manipulating patterns, and then building on that.

Different parts of your brain do different things. While I don’t know if music has any specific similarities to music in terms of actual structure or how one does it, I am fairly certain that it uses the same general brain functions to accomplish it for whatever reason.

When I was in college, I started out as a major in music and switched to a major in CS. I noticed something interesting. The chair of the music department had an identical twin brother who taught at a different school. His brother was actually a famous Computer Science professor.

Yes there are programs that sound better than others.

Forget reading your blog…

If great musicians make great programmers, that would mean Britney Spears must be a fantastic programmer.

Great post Jeff.

Two years ago when I quit being a professional guitar player to pursue my programming career finding this blog and then reading Code Complete was my programming equivalent to hearing Radiohead’s OK Computer for this first time.

I definitely think there’s a connection between programming and music–but then again, I’m a programmer and a musician, having double majored in computer science and music.

I’m a music theory geek, and I’ve always thought that music theory exercises the same parts of my brain as programming does. Both are inherently mathematical/logical, and I’m writing counterpoint is a form of problem solving just like programming is.

I eventually synthesized my music and programming backgrounds to create a fractal music generator at http://fractalcomposer.com :).

I’m a senior software engineer and a classical musician, who switched from a professional career to software. The problem with these comparisons is that I hear them everywhere. Music and math. Music and physics (famous story about the lead (french) horn player for the Boston Symphony being a former physics professor.) Music and writing (Christopher Hitchens notes that it seems like you have to be conversant in music to be a fiction writer). And so on.

I think what’s going on is that if you can perform or write music at a high level, you can do anything. One of the most enlightening experiences of my life was when learning to play the piano, I experienced my brain (to borrow a computer analogy) running out of CPU cycles. I just didn’t have enough bandwidth. It took a month for my brain to (literally I believe) grow enough capacity to handle what I was trying to do. I never experienced that in any other activity. And I’ve done a few things.

I left music to get a PhD in physics, then moved into engineering where I rose to the top. Something special about me? No, other than I can play Chopin.