Learning to Code is like Learning to Play an Instrument

Catherine O'Hara
The Startup
Published in
4 min readSep 16, 2019

After having some time to dive into different programming languages and building a few programs, I’ve noticed some patterns and similarities between learning to build software and learning to play an instrument. I grew up playing piano and practicing most everyday and have been experiencing much of the same processes with coding the past three or so months.

My biggest takeaway? Learning each new technology has been like learning a new song on piano. At first it’s messy and can be a lot to just jump into, but as you pick it apart to understand the pieces then put it together one bit at a time, it all starts to make sense.

Just like learning anything new! But to break down what I’m trying to say, I’ll try to hit a few points:

Theory

There is music theory and there is programming language theory. They are the concepts and principles of how each works. Sure, you might be able to play a song or code a program without having to delve into this arena, but the subtleties and depth of your medium come from understanding it. But of course, the practice and the theory should grow together. Which bring me to my next point.

Do It

You have to get your hands dirty and try it out for yourself! No matter how much you read or study your medium, there is no way to truly learn it unless you do it. Build a form, practice your chords. Whether it’s one staff or one function at a time, you need to try it out for yourself. There is no other way.

Again, this is just like learning anything else. You can read all you want about cooking or photography, which will definitely provide some good insight, but to truly learn either you have to just do it. You can always refer back to your resources when there’s something you want to know or don’t quite understand yet.

Keep doing it

So at this point, you may have tried a few things and you’re kind of getting it, maybe feeling like you can do this, wondering if you can become good at it. It’s exciting! Some things are starting to make sense, but it’s still difficult. Maybe you’re even doubting your abilities at some points. You keep getting stuck or making mistakes, but the parts you do get right feel wonderful.

This is natural. This is learning. Picking up a new skill takes practice and repetition. Every day you practice, you will learn something new, you will take another step forward and be a bit better than you were the day before. Some days will be more productive than others. Some moments you might not feel it so much and that’s alright, too. But so long as you don’t give up, you’re likely to improve.

Sometimes all you need is a break or to work on a different song/project for a bit if you’re feeling stuck. This can sometimes be a way out of a rut, to get into your flow again and remember why you love doing what you do.

A form of expression

In a sense, while coding, your computer is your instrument, and an instrument is a tool. As logical as computer programming can get while working through problems, it is also very much an expression of your solutions to these problems — both literally and figuratively. Not only are you depicting the end result of computer processes and data relationships, you are also deciding how you would like to share and display these results. Your computer is your instrument as you express the how and the why. And when you’re lucky, you get to call all the shots.

But if you’re in a situation where you’re not driving the development of the program or writing the sonata, there is still plenty of space to be able to express yourself. Whether it’s through refactoring and rearranging code to make it look beautiful, playing a song with a different set of dynamics or carefully curating the best variable names, you are still a creator, leaving your mark on the world.

Problem Solving

As I mentioned just above, programming, like playing music, takes a bit of both creativity and logic. You may lean more one way than another, but it takes both to carry out a whole project. This one probably does apply more towards being the driver of projects or the musical composer, but the process is similar when you get stuck in a certain problem area of either domain. Can’t fix a bug? Keep getting stuck in the same verse? How are you going to approach this problem from another angle if what you’re trying hasn’t been producing the results you’re trying to achieve? Here, you get to fire up your neurons and exercise your noggin.

You will get better

Lastly, if you give it some time, you will get better. Even a month in to regularly applying yourself you can already look back and see your progression. Oh, the things you will know! All the struggle along the way has suddenly become worth it. Instead of trying to wrap your head around how much you still have to learn and what you don’t know, you can look back every once in a while and see how far you’ve come! There is no need to compare yourself to others in your field and what they are doing. As long as you are doing better than you used to be, you’re in a good place and can get to where you want to be.

Music and programming can each be a lifetime of learning — a lifetime of challenge, growth and reward.

--

--