Strategies experts use to learn programming languages
Dom Aversano
Learning a programming language – not least of all one’s first language – can feel intimidating, especially when observing others doing complex tasks with apparent ease. Furthermore, the circumstances in which one learns can vary greatly. One person might be 19 years old and entering a degree program with plenty of free time, while another is moonlighting on an old computer between childcare and other responsibilities. Regardless of our circumstances, we can adopt an attitude and approach to learning that allows us to make the best use of the time we have. What follows is some advice with tips from some leading music programmers and artists.
Enjoy learning
It might sound trite, but it is essential. It is easy to motivate ourselves to do something we love. If learning is enjoyable you will do more with greater focus and energy. Create a beautiful environment to work in, inspiring projects to develop, and desirable long-term goals that are ambitious enough to keep you practising regularly. Create the conditions in which action comes naturally, since to borrow the words of Pablo Picasso, ‘Action is the foundational key to all success.’
Some people like learning by exploring and modifying existing code written by others. I envy them because I think they move faster. However I find more pleasure in learning from the ground up so I understand every line of code in my project. My preference is to follow a tutorial (e.g. Dan Shiffman’s) and do small exercises. – Tim Murray Browne
Learn through projects
We learn by doing. Tutorials are essential, but if they are not complemented with the development of projects you might experience ‘tutorial fatigue’, losing motivation and inspiration amid a constant reel of videos. Start with simple programs you can build quickly before working up to more complex ones. Small and simple is beautiful.
I have a folder where I document and store all my ideas for projects. I write everything down in plain language describing what the program will do without any consideration for how it will work. Only after this do I give some consideration to how the program might work architecturally, before deciding if I should create it now, wait, or simply store it as an idea. Even if I never create the project, documenting my ideas demonstrates they have a value I would not entrust to just memory.
Love the one you’re with
It is better to learn one language expertly than five shallowly. Take time to decide what you want to learn rather than impulsively jumping in, after all, you might spend thousands of hours with the program so you want it to align with your character and needs. Give yourself a realistic amount of time to learn it before embarking on another language, unless you genuinely have the time to learn languages simultaneously.
I learned Pure Data partly because I was attracted to the way it looked. That might seem superficial but I know visual aesthetics affect me, and if I was going to look at a program for hundreds or thousands of hours I wanted to like its appearance. I now prefer traditional code, but my love for Pure Data and its black-and-white simplicity taught me to think as a coder.
Do not worry about being mocked for asking questions – asking others for help builds relationships, strengthens the community, and can even lead to employment. If people want to put you down for asking basic questions, it says more about them than about you, so always reach out! – Elise Plans
Build a physical library
A friend who worked as a programmer for a big technology company advised me not to read books about programming, arguing that learning to program is non-linear and therefore unsuited to books. This did not work for me. We all have the same access to digital information, but physical libraries reflect our interests, priorities, and values, and act as private mental spaces.
Although Daniel Shiffman’s books and the SuperCollider book are available for free online, I bought physical copies as I find reading from paper conducive to a quieter, less distracted, and more reflective state of mind. As it happens I often read the books in a non-linear manner, reading the chapter that seems most appealing or relevant to me at that time. My library extends out in different directions, containing musicology and biography, as well as physics and philosophy, yet all feel somehow connected.
Read other people’s code
A revelation for most people learning to code is that there is rarely a single correct way to do something. Coding is a form of self-expression that reflects our theories and models of the world, and as with all creative activities, we eventually develop a style. Reading other people’s code gives you exposure to other approaches, allowing us to understand and even empathise with their creative world. Just as when we learn a foreign language we read books to help us, reading code allows us to internalise the grammar and style of good code.
Music technology and programming may seem limitless in possibility – but you quickly find limitations if you step outside of conventional concepts of what music has been defined as before. So if you aren’t running up against limitations, it’s likely you aren’t thinking in a way which is original or ambitious enough. – Robert Thomas
Be wary of the promises of AI
Machine learning is impressive, but as Joseph Weizenbaum’s famous program ELIZA created at MIT in 1964-66 demonstrated, we have a potentially dangerous tendency to project mental capabilities onto machines that do not exist.
While learning SuperCollider I used ChatGPT to help with some problems. After the initial amazement at receiving coherent responses from a machine using natural language, a more sober realisation came to me that the code often contained basic errors, invented syntax, and impractical solutions that a beginner might not recognise as such. It was obvious to me that ChatGPT did not understand Supercollider in the meaningful sense that expert programmers did.
Machine learning is undoubtedly going to influence the world hugely, and coding not least of all, but the current models have a slick manner of offering poor code with absolute confidence.
For mistakes that I may have made – lots of them! All the time. It’s probably cliche to say, but understanding your mistakes can be the best way to learn something. Although you come to think of them less as mistakes and more as happy accidents. Sometimes typing the “wrong” value can actually give you an interesting sound or pattern that you weren’t intending but pushes you in a new creative direction. – Lizze Wilson, Digital Selves
Hopefully, some of the ideas and advice in this article have been helpful. There are of course as many ways to learn a programming language as there are people, but regardless of the path, there is always a social element to learning and collaboration. And in that spirit, if you have any advice or ideas that you would like to share, please feel free to do so in the comments below.