Coding and The Piano
I’m sure you have heard that there are links to computer science and music. As a programmer and a pianist I hear this all the time. The topic comes up in conversations as easily as the weather. The reality is that you can often draw links between two seemingly unrelated areas. For example, it can be said that coffee lovers are programmers since most programmers drink coffee. Better still, it can be said that science fiction lovers are programmers since programmers tend to flock towards such futuristic concepts. In this article I will discuss how computer science and music are related.
Being a good coder and a good musician requires concentration. Loads and loads of concentration. Let’s say you are practicing one of Beethoven’s piano works- Rage Over A Lost Penny because, well, who doesn’t get infuriated over losing a penny and it’s a fun, whimsical tune. Besides being able to interpret all of those crazy looking symbols, which I will come to later, you’re going to have to focus very hard on this single piece of music for an extended period of time. This type of focus isn’t the same focus applied to watching a television program or even reading a book. You are focused on the time, the rhythm, the sound of the music, the sound of the music in the room, and how to tie all of that together.
Programming requires a similar type of concentration. Let’s say you are responsible for coding up a CRUD application. Just like the musician who is focussed on a few bars of music, the developer will be focused on CRUD operations. She will need to access a database, manipulate data in various ways, and present the data to the end user. All of this requires lots of concentration for an extended period of time.
Speaking of symbols, music and software are chocked full of strange symbols that a normal person would never come into contact with. Let’s look at a few.
Deciphering these symbols is beyond the scope of this article, but it’s fair to say that the average person would not be able to interpret either of these. However, a programmer or a musician would understand these passages and do something with them.
As strange as this may sound, piano lessons and code reviews are quite similar as well. During a piano lesson you demonstrate what you have practiced. Even seasoned musicians are a bit nervous when it comes time to demonstrate. The demonstration will not be perfect, but that is the point. The point is to expose weak spots and work towards improvement.
A code review is quite similar in some regards. Developers will agree that code reviews can be daunting. There are nerves and second thoughts. You know that you will be judged and you hate the thought of it. Like the piano lesson, the point is to expose imperfections and make corrections. Success depends on correcting those mistakes, learning from those mistakes, and applying those lessons in the future.
Time management is an important concept common to both disciplines. Learning a new tune takes time, of course. But, the key is how you spend your time. There will be certain measures and phrases in the musical score that require more attention than others. The key is to find the weak spots and focus on those effectively. You will never get the piece up to performance level if you waste time on the wrong areas. Also, you will have to devise a way to practice those weak spots. The ability to find and improve weak spots improves as you progress to an advanced pianist. Over time, your piano lessons will teach you how to teach yourself tricky passages.
Time management is a lot more obvious with software engineering because of business deadlines. But, within those business deadlines are mini deadlines that the developer must make. A developer can spend too much time on the wrong component and completely miss something important. Feedback comes in a few forms, but the aforementioned code review is important because it will teach you what to focus on. Just like the piano lesson, the code review is an opportunity to learn how to manage your time to focus on the critical areas and not waste time.
From concentration to time management there are many correlations between the practice of coding and the practice of the piano. You may not be a pianist, but the same concepts apply to many areas. It all boils down to discipline. In order to succeed you must have discipline and grit.