|
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. |
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.