Hacker News new | past | comments | ask | show | jobs | submit login

As someone who does play music, although not professionally, I don't really agree with the analogy that writing code is like playing music.

    You don’t expect to learn how to play the piano by reading a book, but you might expect to pick up a programming language or concept because you read about it. Really, it doesn’t work that way. You have to read it, and then use it and practice it and make a hundred mistakes, and then you’ll gain the skill to use that concept more correctly over time. 
I'm aware of code katas, but I bet close to 0 of the great programmers regularly spend hours a day just writing loops in C, just to REALLY make it second nature. Yet many great musicians do just that, except with exercises. I've spent months or years straight practicing an extremely easy to understand, but hard to execute riff. The dexterity and muscle memory needed for certain musical patterns on an instrument like guitar or piano can take many, many hours to develop.

I just don't know of anything even remotely similar to this in programming. Learning how to type fast is the closest analogy I can think of, but being good at typing is almost entirely unrelated to being a good programmer. It would be like a pianist not being able to play chords, yet still being considered a (technically) good pianist.

---

If one develops a good technical understanding of their programming language, and reads a lot of code, they could produce some quite good code in that language on their first try. In this case, it would help to have a very solid technical understanding of first principles as well. Asa result, I really think programmers with very strong discrete math skills, for example, can pick up any idea in programming.




If you write a lot of C code then you will write a lot of loops. It won't be deliberate practice but it will be practice.

What I find interesting is how much of this knowledge we take for granted once we have internalised it. My wife came into my study the other day and asked what I was doing so I started to explain it. After she ran away I counted up the number of concepts I needed to know to understand the twenty five lines of code I was looking at. There were nearly forty in that short piece of code.


i hear you ;)

although i'd counter with the idea that it isn't code-writing which we practice continually to master the art, but world modelling: we model the world within the constraints of code in our mind, to become experienced enough to do so reliably, then usefully within different contexts

code is the instrument, not the music


In that analogy, the programmer is more like a luthier then, not a musician. Great luthiers generally aren't also great musicians. Completely different set of skills


I've gotten into the habit of actually reading the manuals for my synths and DAW after realizing I was missing out on lots of little quality of life things. I've used enough synths--and not just subtractive!--that I can usually pick a new one up in seconds, but the people who made it and the people who know it best contribute to those manuals and the stuff they share can lead to massive leaps in proficiency.


The specific analogy with music isn't great, but it makes more sense if you step back and say that a large part of software is aesthetic rather than technical concerns.


It’s not about writing for loops, the practice is to get good at problem solving and algorithmic thinking. For loops are a means to an end, like writing letters on a page.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: