Mark Guzdial is one of the most active researchers in Computer Science Education. Anyone interested can see his blog at: https://computinged.wordpress.com/
My counterargument here is that programming can be closer to learning a language than solving and algebra problem.
I think it’s all but proven that listening to a language being spoke and reading it (reading code), engaging in conversation and writing (writing code) and trying to navigate the world using said language (solving problems by using a programming language), is the best way to teach a human language.
So, unless we want to drop the “language” part of programming, which, I would claim, is the most relevant bit. I think it might make more sense to compare learning programming to language learning.
There’s little “theory” behind concepts like what constitutes a good name for a thing, or what level of delegation makes code to fractured to be easily readable. But they are very important concepts nonetheless.
Even when it comes to the more “mathematical” parts of programming, there’s still a lot of subconscious thought going on.
I think most programmers have a “hunch” when they can optimize a O(n^2) loop to be O(n) or O(n log n), for example. This “hunch” has it’s roots in understanding how various algorithms work (e.g. knowing how complex a search or sort algorithm should be on a given data structure) and knowing how various data structures look and behave. But, at the end of the day, it’s still a “hunch”.
Maybe that’s a bit of a trivial example, but a lot of complex problems, I find, are partially solved subconsciously. By recognizing and thinking about some patterns that can be hard to reason about using words, but, once our mind have somehow integrated their detection into our subconsciousness, become really easy to pick up on.