Over the years I’ve come across various blog posts and articles stating that creating music is very similar to writing software. They describe the creative process that fuels both fields. They point to the number of musicians that have functioned successfully as software engineers. This is all true, but there is one fundamental difference that separates music from programming …

Once you play a note … it’s gone. [1]

Another way to put it is that since music performance is in real-time, once someone plays a note, it can’t be taken back, altered or fixed. Simple, yes. But this one fact is what separates performance based fields (such as music, sports, dance, theater, etc.) from other fields. This is what drives musicians to repeatedly practice scales and exercises they way they do. It’s what drives a basketball player to practice countless jump shots. In the moment of performance, competition, etc. you must be able to execute exactly what you want to express.

Programming is different … we have a delete key.

You named a “routine” [2] in your program and realize that there is a much better name … Delete and rename!

You are singing your nation’s anthem and are unable to hit the notes of the most memorable section … Hope your audience is kind!

Change is so ingrained in the process of programming that even our IDEs supply us with tools to automate refactoring. When performing music, you just don’t have that luxury. There is no going back to change what you just played.

Music is beautiful. Code and programs can be beautiful … and that is good enough for me.


[1] I learned this lesson from Dr. Kyle Coughlin.

[2] I was going to use the term function or method but wondered if I should use a more general term. I decided to try “routine” and read through this stackoverflow answer on it.