Part of the problem with all the Programmers are the same as Foo comparisons is that programming styles are so numerous that any one can find similarities between their style and some hobby, it's just that no one ever compares it to say knitting, crochet, scrap booking, gardening, etc. because those all strike people as a step down in terms of "leading a meaningful life"
The only thing I can find in common with musicians is that both are incurable gadget nerds.
Totally, for instance as a drummer and a programmer I find myself comparing "drum patterns" and riffs as procedures, but particularly with drum patterns they can be re-used across bands/styles and songs even within the same record! So being a drummer is definitely about code re-use and modular design. I could go off on my project to generate recursive music (live) but thats a whole other world. I would like to think that I drum with s-expressions.
The only thing I can find in common with musicians is that both are incurable gadget nerds.