How to Teach CS Students to Solve Problems
csclassroom.substack.com
csclassroom.substack.com
> Just as students were taught to systematically memorize and copy in their other classes, they need to be given a systematic formula by which to approach problem-solving.
When I read that, I wondered what Maria Montessori would think. The line opens with the notion of systematic memorization - copy and paste; my sense is that the lecture (memorize) and test approach to factory education is coming to be regarded as a dinosaur; the meteor has landed; we are seeing a renaissance in thinking about the education process.
I once got in trouble with the teacher's union steward at my kids' school when I said "there is no such thing as teaching, only learning and learning facilitation". The memorize and copy approach came to be known as the "just in case" epistemology. Nancy Glock Grueneich said that the proper epistemology is "just for me".
From that, while I'm not criticizing the linked piece- in fact, I'm thrilled that CS is being taught in high school - my take is that there might be a way to facilitate personal discovery of the "systematic formula" being given.
I think we try to teach computer science like a science, when it more closely mirrors writing. Science is full of memorization; almost all of my science classes focused more on memorization than extrapolation. Computer science more closely resembles English to me. Scoping of variables is similar to scoping pronouns. Functions and their signatures vaguely resemble the subject-object-predicate structure of sentences. Large works are composed out of re-using the same few constructs.
Writing is the act of taking an idea and crystallizing it in written form. Programming is the act of taking an action and crystallizing it in written form.
It’s also not only that. My own CS curriculum had a lot of “draw the rest of the f’ing owl” vibes, where the instructor provides a few bread crumbs of information but then wants you to design Beethoven’s 5th.
What’s worked for me - when I need to convey complexity to others - is investing time and energy in building intuition. Here’s the problem, here’s a metaphor describing the situation and context.
The author notes recursion, which I think is probably one of the most poorly taught concepts. Little to no intuition.
This is unfortunate, because recursive solutions neatly transform into dynamic programming solutions. An entire category of so-called "leetcode mediums", tons of interview questions, can almost always be boiled down to a recursive solution and inverting the execution order.
The problems compounds when you also try to teach induction, because it requires many of the same muscles as recursion and it is by far the easiest method to make sure your algorithm is actually correct.
A memoized solution would merely eliminate the duplicates, but a DP solution should instead have this trace: fib(0), fib(1), fib(2), fib(3), fib(4), fib(5). With the DP solution we know a priori which terms will be needed, so we visit them in an order so that every term needed any step is already computed.