... or you can skip talking about your favorite framework and point to theory like logic, computational complexity, data structures, lambda calculus, relational algebra, and other stuff that actually matters. He already took the first step, which is playing around with some programming.
I have a friend and previous co-worker who hoped that by learning Python he could work on a legacy system I built while we worked together. He's able to make some tweaks and get a general idea of it, but translating intention to algorithm is still mostly mystic to him. He was shocked after I showed how to simplify some 30 lines of if clauses with a dict, he learned the syntax for a dict but didn't really understood how it works, or to what it's good for. This kind of illumination, I believe, only comes after learning some theory, not syntax, or your favorite framework.
Coming from a background of not much computer science and having dropped out of college, I found learning theory to be too lengthy and dull for my novice mindset at the time I started programming (in, quite fittingly, HTML+CSS+JS+PHP on LAMP). I was in the same shoes as your friend, as whenever I would see an open-source project or library, I would be quick to modify it to suit my needs, but would end up with massive if clauses and without much modularization. Of course, after about a year or so of doing this same bad practice, I came to ask "Truly there must be a better way than this, right?" It was at that point, after already becoming completely addicted to programming (yes, in the ugly, somehow-working kind of way) that I gained enough patience and interest to learn more theoretical concepts about computer science and its applications to programming (lambda calculus and functional programming in particular). I agree with you, being that this ultimately ended up helping me greatly, but I disagree that CS theory should be the very first thing a novice programmer approaches.
> ... or you can skip talking about your favorite framework and point to theory like logic, computational complexity, data structures, lambda calculus, relational algebra, and other stuff that actually matters. He already took the first step, which is playing around with some programming.
Yes, exactly, that was my first thought too. I'd add things like microprocessor architecture (like the von Neumann architecture, the cache hierarchy and how memory is structured), Turing-completeness and Turing Machines (which probably fit into your "computational complexity category"), programming language design and implementation (including things like parsing and grammars), and concepts like object-oriented and functional programming.
For example, a lot of programmers struggle with C, until they read about computer/processor architectures and realize how the processor accesses memory.
I have a friend and previous co-worker who hoped that by learning Python he could work on a legacy system I built while we worked together. He's able to make some tweaks and get a general idea of it, but translating intention to algorithm is still mostly mystic to him. He was shocked after I showed how to simplify some 30 lines of if clauses with a dict, he learned the syntax for a dict but didn't really understood how it works, or to what it's good for. This kind of illumination, I believe, only comes after learning some theory, not syntax, or your favorite framework.