Music and programming are both arts with a significant technical component. Having a teacher can be a great help with those challenges.
Ultimately though, all learning is self-learning. Even the greatest teachers can only help students to teach themselves.
We often think of "teaching" as something one person does to another: the teacher opens the student's head and pours the knowledge in.
In practice, it doesn't work this way. Instead, the teacher/student relationship resembles that of a traveler and a guide. The teacher leads the student along the path that's most likely to get them where they want to go with the least cost.
But how can the teacher take the student where they want to go, if they don't yet know?
I had the great fortune of having a great teacher demonstrate this for me.
When I started the guitar at 13, my parents said I had to take lessons. I went down to the music store, and they signed me up with this crusty old fellow. He wanted me to start by learning the names of the notes in "On Top of Old Smokey". I wasn't about that. My parents said okay, but, I had to find someone else.
I went back to the music store, and this time they put me with Mike Gross. First lesson, we made some small talk, then Mike asked: what kind of music do you like? I said Guns N' Roses, Metallica. He said how about AC/DC? Hell yeah, now we're getting somewhere.
In the first lesson, Mike showed me the chords to "Back In Black", and also the hot little riffs that tie the chords together. Then he showed me guitar tablature – a notation of where to put your fingers – and how to tune.
In the first hour, he gave me everything I needed to get hooked on the instrument forever.
I kept going back to see Mike because he would transcribe songs I brought in on tape. I know metal wasn't his bag, but he'd teach me anything without comment.
One day I asked why the same pattern kept showing up in all these solos and riffs. Mike said it was the pentatonic blues scale, and showed me how to move it up and down the neck in any key.
I was hooked again. The mathematical and geometric qualities of music theory were fascinating to me in the opposite way as school math and geometry. I ate up the circle of fifths, augmented and diminished, building chords out past 9ths into 11ths and 13ths.
More importantly, I could see how to manipulate the forms, how to create. The first time Mike got me hooked on the guitar, the second time on music.
I've been inspired by Mike while designing my Intro to Programming course. Mike let me wander and stumble into music theory on my own, unlike Old Smokey, who tried to make me start there.
The current state of programming instruction seems to want to force students to learn the scientific side of programming first, when students are really motivated by the art. People get excited about programming because they want to express themselves, to communicate with others.
No doubt: theory, technique and technology are super important in both music and programming. Teaching is not the same as music and programming though. Great practitioners are not always great teachers.
Teaching is a form of service where the teacher puts the desires of the student ahead of their own.