Music and Programming are both just Balls-In-The-Air
-
I had a former supervisor equate programming to juggling - many balls in the air at a given time. I know that's nothing new, but it fits. You tear into a problem, unwire the code, then string it back together. We all know the pain of distractions while the code is unwired, while many balls are in the air. OK, what got me thinking this morning was [Christian Graus's New Guitar post](https://www.codeproject.com/Messages/5971605/New-guitar). I was wondering if a collection of programmers is more likely to relate to a new guitar post than other communities. I relate. I'm not an accomplished musician, but I play. My guitar sits right next to my computer. I often back away from the keyboard and strum/pick a tune to work my way out of a rut. Is there something that might make a musician more likely to be a computer person, or visa-versa. Of course we know music is mathematical and programming certainly has a mathematical component, but I don't think that's it. For me it's the balls-in-the-air aspect. Fun music for me is playing my banjo or guitar in a jam session with other players. When I don't know the song, I'll look at a guitar player's hands to see what chords they are making, then play the same chord structure on my Banjo. So see a guitar G, play a banjo G is the first translation. Sometimes the banjo is tuned in C and capoed to a D, which requires another translation. So, the guitar player is playing a G, I need to be playing around G, I'm tuned in C, but capoed to D, better play an F shape. That's going on at the speed of the music. That's music's balls-in-the-air situation. So there's my thesis. Music and programming both involve trying to hang on to several things at once, and that's why you find so many programmers are also musicians.
I think there's a similarity, but a lot of it may be related to balancing choices rather than a fixed arithmetical one. There are a lot of ways to structure a program- favoring clarity or modularity over speed, etc, and you make choices balancing things out. Same with phrasing, harmonization, tempo, microtuning- whatever. Choices you make lead to different results. If you're playing with other people you need to adjust so things work together. Jam sessions are fun. I've been a substitute string bass player at contradances where I don't know half their tunes. Just tell me the key and I'll watch the guitar player's left hand. Even stranger has been playing 1-key wood flute in Celtic jams. I found I was watching the fiddle player's left hand. 2nd finger -there- on the A string means it's a C, so I put down the middle and ring fingers on my left hand. I wasn't thinking of how to do this, then realized that I was translating from a 4-string instrument tuned in 5ths to a woodwind instrument that overblows at the octave, where different combinations of 7 fingers give you all the notes. (and in some cases an a-flat has a different fingering than g-sharp!, etc)
-
I think there's a similarity, but a lot of it may be related to balancing choices rather than a fixed arithmetical one. There are a lot of ways to structure a program- favoring clarity or modularity over speed, etc, and you make choices balancing things out. Same with phrasing, harmonization, tempo, microtuning- whatever. Choices you make lead to different results. If you're playing with other people you need to adjust so things work together. Jam sessions are fun. I've been a substitute string bass player at contradances where I don't know half their tunes. Just tell me the key and I'll watch the guitar player's left hand. Even stranger has been playing 1-key wood flute in Celtic jams. I found I was watching the fiddle player's left hand. 2nd finger -there- on the A string means it's a C, so I put down the middle and ring fingers on my left hand. I wasn't thinking of how to do this, then realized that I was translating from a 4-string instrument tuned in 5ths to a woodwind instrument that overblows at the octave, where different combinations of 7 fingers give you all the notes. (and in some cases an a-flat has a different fingering than g-sharp!, etc)