Best music for programming

Different activities call for different music: Think about the kind of music we use for jogging, the kind we play at funerals, the kind we hear on the elevator, and the kind we appreciate in concert halls.  But what type of music is best for putting on in the background while programming?

Personally, I often like something that is more emotionally stable than symphonic repertoire, but not as repetitive as popular music.  If I’m solving a particularly difficult problem, I might want silence to give it my full attention.  But most software development involves some amount of mundane implementation work, where you already know the outcome, it’s just a matter of making countless small decisions to get there.  For that activity, I find it is nice to have something a little cerebral and a little bit interesting to make up the difference between a partially and 100% engaged mental state.  When my brain is 100% occupied, I can achieve flow and be optimally productive.

Baroque music is great for this.  The Baroque aesthetic usually requires a single “affect”, or sentimental state, for an entire movement.  This provides stability and avoids distracting emotional dynamics.  But within a stable framework, the music moves and changes, often with a steady running or motor effect, spinning out an idea over time.

At the moment, my favorite composer for programming is Dieterich Buxtehude, the Danish / German organist who is most famous for teaching Bach.  Pandora happily churns out mellow but thoughtful organ music on “Buxtehude radio”.  Arcangelo Corelli is another favorite.  A great example of the kind of piece I mean is “La Folia”, for violin and keyboard.   The piece is a passacaglia form, based on a repeating chord progression.  Over the course of the work, Corelli explores a surprising variety of textures and figurations within a fixed harmonic language.