Not necessarily restricted to programming languages. First step would be to find out what the person knows through direct checkboxing or through test-questions. Next step is to find out what the person wants to learn. Then search for tutorials, teaching materials, analogies, stories etc. to match that specific mapping of ”already-know to want-to-learn”.
Of course such a mapping-database has to be build first. So i’d start with a large survey where people submit their mappings. Then there would come a phase of identifying people who can create (or select / adapt existing) teaching materials for all the categories. So an experienced C++ and Java programmer could sit down and think what kind of snippets, analogies or tutorials could help someone who already knows Java and wants to learn C++…
Anyone who has gone through learning material can tag it with other potentially relevant mappings (“escalate the relevancy of the content vertically and or horizontally”) a’la “i think this material could also benefit people who want to transition from a meat-based diet to a vegetarian diet” (unlikely that this example fits together with the previous C++ > Java example… but who knows).
Playlists could be assembled a’la “this really helped me to get to B based on the A that i already knew – now i can easily get from B to C and i recommend this order of learning instead of trying to get straight from A to C”.
Of course also some gamification with rewards and stuff that incentivises both the creators of teaching materials as well as the learners.
I think if you can tie the desired learning very specifically to things your student already knows you can get very efficient in building new territory in the knowledge-graph of the students mind. Somewhat like a personal master-student setup but on large internet database kind of scale?