There are something (a generalized class of algorithms) called “backtracking search”.
The main property is that an algorithm goes back onse a dead end is reached, or a certain threshold of maximum steps.
There are two “strategies” for these algorithms (of how to expand the “fringe”) - one is called “depth-first”, another – “breadth-first”.
The first one goes “fast” and “narrow” (inforamaly), where another one goes “slowly”, and “layer after layer”.
It is well-understood that the first one is “incomplete” and might miss the goal by going indefinitely “deep down into a rabbit hole”, whole another one is complete and guaranteed to eventually reach the target (the goal). The point it that it might be too late or even never happen withing a given time constraint.
Most of people advocate to stick to a single language and really push on it without any “distraction”. To them all the books which end with “in Java” are being sold.
Another way is the old MIT way, which is about teaching (and learning) the principles (and the underlying mathematics) first and use a language as just a teaching tool.
It worked remarkably well when they used Scheme as a teaching language, and we got a whole generation of exceptionally good programmers out o that. Then they switched to Python and it “won” (nowadays it is even better than the fucking Javascript).
Speaking of Python, in the 3.12 (and 3.13) it would have the Scala-like type-parameters syntax, which is somehow a milestone (for what began as a dynamically typed language).
Yeah, it is “just right” to thing that a polymorphic function is sort of partially applied to a type variable, yielding a “normal” function. Anyway.
The point is that going breadth-first pays back when started early enough. One is expected to stick to a computer since primary school and even to program since secondary school. One has to get familiar and comfortable with mathematics early, and by reaching a college to be an above average in the high-school algebra and geometry.
Then, the math-and-the-principles first approach will allow one eventually pick up particular languages easily, on the go, and to outperform these “Javascript” or “Python” guys by orders of magnitude. There won’t be even any “competition” from their side.
I started “depth-fisrst” into System administration (which is called “devops” nowadays) and then slowly and painfully backtracked all the way back to high-school algebra and did a “breadth-first” through all the underlying mathematics. Now I understand how MIT grads feel like.
By the way, everything is actually quite easy at MIT if you are already familiar with all the underlying mathematical concepts, and it is almost impossible to survive if you don’t.
This means that the ones who started early and on the right path (program and messing with maths in their teens) will eventually get so further ahead by going through a distinguished tech school like MIT, Stanford, CMU or Cornell, that it would be rediculous to even try to compare such guys with a typical /g/
dweller or a code-monkey.
The real problem, however, is that all this knowledge without being applied is useless. Knowking is not enough, we must do (apply).
So, this is the way, which is remarkably similar to the Buddha’s “Right Path”, by being “grounded in reality” and to see things as they are, for which math is the only adequate language (in which the principles themselves are properly captured).
For those of us who never had a chance to get into MIT or even to study in our teens, there are just a very few good books (wast majority of books are crap). We have to read only the top 1% of the best guys who went in the right way.
Finding these “right” books is another challenge, because going though commercial crap and graphomania of some narcissistic mediocrity burns you out.
This challenge, however, is very similar to a so-called spiritual journey, when one reaches an “enlightenment” after discarding all the socially constructed bullshit.