Pregunta

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.

¿Fue útil?

Solución

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.

Otros consejos

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.

Licenciado bajo: CC-BY-SA con atribución
scroll top