This is honestly not my experience with self taught programmers. They can produce excellent code in a vacuum but they often lack a ton of foundational stuff
In a past job, I had to untangle a massive nested loop structure written by a self taught dev, which did work but ran extremely slowly
He was very confused and asked me to explain why my code ran fast, his ran slow, because "it was the same number of loops"
I tried to explain Big O, linear versus exponential complexity, etc, but he really didn't get it
But the company was very impressed by him and considered him our "rockstar" because he produced high volumes of code very quickly