One of the underlying problems with the way we teach coding etc. is we don't actually need lots of mediocre programmers. What we actually need is a small number of excellent ones.
Achieving this in a large scale education system is very difficult for any subject. The counterpoint to this is we do need a large chunk of the population to be able to ask the right questions and understand the underlying logic.
I'm the latter never programmed past 'IF' functions in Excel but speak the language sufficiently well to get the most out of those who can.