I've been using the analogy for 30 years now.
I've taught both programming and guitar over the years, and in the end, those that endure the frustrations and loneliness of learning, because of whatever-inner-drive, have become successful, although it would seem that in this context, the word "successful" is perhaps fairly arbitrary, which also may be at issue here.
It really isn't much more complicated then that.
I just cannot see any shortcut in learning to play guitar besides actually playing an hour a day, with very sore fingertips and sounding like crap, for months, although, of course, my encouragement and beginner-level instruction in how to play "Seven Nation Army" and "Brain Stew" is, at some level, probably sort of helpful.
Same with learning Python/C/JS/etc.
I have always loved the term grok as a wonderful descriptor of gaining these type of skills and knowledge, as it captures the essence of the idea almost perfectly.
[edits]