Subjects · Computer Science & Data
Computer Science & Data: Prerequisite diagnosis
Find out that the thing blocking you is something assumed in week one and never taught.
What you'll be able to do: Find out that the thing blocking you is something assumed in week one and never taught.
The floor nobody lays
Programming courses assume a small number of things from the very beginning and teach none of them explicitly:
- What a function call actually does. Control transfers, arguments bind to parameters, a frame is created, it returns, the frame goes. Students who don't have this cannot reason about recursion, scope, or stack traces, three topics that will all be diagnosed as difficult in their own right.
- What a variable is. A name bound to a value, or a name bound to a reference to an object. Which of those your language does determines whether half your bugs make sense.
- What "evaluation" means and when it happens.
- What the computer is doing between your lines.
None of these appear on a syllabus. All of them are assumed by week two.
So a student who "can't do recursion" often has no difficulty with recursion, they have no model of a call stack, and recursion is simply the first topic where that becomes unsurvivable.
The chains that recur
| Can't do | Usually broken at |
|---|---|
| Recursion | The call stack → what a function call does → scope |
| Closures | Scope → what a variable binds to → evaluation timing |
| Debugging stack traces | What a frame is → what a call does |
| Pointers / references | What a variable holds → memory as addressable |
| Async and promises | Evaluation timing → the event loop → what "blocking" means |
| Complexity analysis | Logarithms and growth rates → the mathematics, not the code |
| SQL joins | Set operations → what a relation is |
| Neural networks | Linear algebra and the chain rule → calculus |
| Concurrency bugs | What atomicity means → what an instruction is |
| Git conflicts | What a commit is → the DAG, not the commands |
Two families jump out.
Most of the first half bottom out in "what does a function call do". That one concept underlies recursion, closures, stack traces, and most of debugging.
Most of the second half bottom out in mathematics: logarithms for complexity, linear algebra and calculus for ML. Students diagnose these as difficulty with computing and study more code, which cannot help.
How to run it
I can't do [SPECIFIC THING, the move, not the topic]. Don't teach it to me.
List what it depends on three or four levels down, and flag which links are mathematical and which are about the machine rather than the language. Then give me ONE diagnostic question per link, bottom-up, and wait for my answers.
The flag request matters here: a mathematical gap, a machine-model gap and a language-feature gap go to three different remedies, and they're indistinguishable from the symptom.
A worked diagnosis
"I don't understand closures."
Chain: closures → scope → what a variable binds to → what a function call does.
Bottom-up: 1. When you call a function, what happens to its local variables when it returns?: "They're gone." Fine. 2. Here's a function that returns another function. When the outer one returns, what happens to its locals?: "Gone too." Stall: this is it. 3. The gap isn't closures. It's that a frame can outlive its call if something still refers to it.
Ten minutes on that, and closures become obvious, because closures were never the problem. They're just the first place where "locals are destroyed on return" stops being true.
The ML-specific version
Worth calling out separately, because it's where this is most common and most denied:
Students struggling with neural networks often have no gap in machine learning at all. They have a gap in partial derivatives, or in matrix multiplication as a transformation rather than as an array operation. More tutorials on backpropagation cannot help.
Is my difficulty with [ML topic] actually a mathematical gap? Test me on the underlying maths before we touch the ML.
Pitfalls
- Assuming it's the language. Usually it's the machine model or the maths.
- Skipping the easy questions. "What happens when a function returns" feels beneath you and is where the gap is.
- Accepting a recitation. "It creates a scope" said fluently is not a model.
- Learning more syntax. The commonest wrong response to a conceptual gap.
- The tell: you've read four explanations of the same topic and none of them helped. That's the signature of a prerequisite gap, the explanations were fine and they assumed the thing you're missing.
Try this today
Name the topic you've read multiple explanations of without it landing.
Ask for its dependency chain with the mathematical and machine-model links flagged, and one diagnostic question per level, bottom-up.
Four failed explanations is not evidence that you're slow. It's evidence that all four assumed the same missing thing.