
Re: Structured Programming
Posted:
Mar 6, 2014 11:22 PM



On Thu, Mar 6, 2014 at 10:10 PM, Robert Hansen <bob@rsccore.com> wrote:
> On Mar 6, 2014, at 5:40 PM, kirby urner <kirby.urner@gmail.com> wrote: > > > Yes, you two have been having an irrelevant side conversation that has > very little to do with anything mathteachy. Big yawn. It's what's called > a "pissing contest" nothing more, > > Actually, and I realize this after reviewing all those past exchanges with > Joe that I referenced, Joe was going to turn it into a pissing contest > right out of the gate. Now that I am more aware of what is going on I am > better prepared to deal with it. > > Excepting the pissing contest, It does appear that some viewers got > something out of all this. I am not sure what you mean by anything > mathteachy. You are the one that keeps insisting on teaching students > programming in math class. That is why this conversation happened here at > all. My original point was how different these two domains can be. They may > attract similar minds but combining them in one class as early as you > propose is not pedagogically sound.
Joe is the one who seems more focused on younger kids.
I'm happy to wait until after Algebra 1.
And even then, these formathcredit courses are optional / elective.
> I think we can go on empirical evidence here and it seems to suggest that > students don't acquire the necessary mental maturity to start mixing things > up till 16 years of age or so. You even seemed to agree with that > sentiment.
That's right. High school does not end at 16 years of age. I'm not focused on 11 year olds. Nor will you be, when your son is 17.
You'll probably be teaching him programming (will have been doing so).
Geeks teach their baby geeks how to swim, throw a frisbee, and to code.
Not having our notations, e.g. dot notation, taught in schools, is a kind of bigotry against our geek ethnicity. I protest on civil rights grounds.
> Yet here you are back to teaching students that f(x) means something like... > > int factorial(int n) { > if (n == 1) return n; > return n * factorial(n  1); > } > > Isn't it a lot easier, in math class, to get the point across by saying n! > = 1 * 2 * 3 * ... * n? > > They'll probably use a calculator rather than something they wrote in code. They won't use pencil and paper much.
Factorial is used in probabilities / combinatorics, so we would be adding more functions to this one soon, making use of factorial().
No need for recursion BTW:
def factorial(n): result = 1 for m in range(n,1,1): # step down from n to 2 result = result * m return result
print(factorial(5)) print(5*4*3*2)
[ indentation viewable in plaintext mode ]
> You really need to go through all of that first, and in mathematical > contexts, like combinatorics and probability, before you lay another layer > of abstraction on their young minds. >
The above is all I need and I can use it interactively, like a calculator, importing from my own work:
>>> from my_own_work import factorial >>> factorial(5) 120
Just knowing Algebra was enough to follow the logic.
> I suggest that you are still seeing this from the eyes of a middle aged > python programmer. Not those of a 14 year old. I suspect that lies at the > heart of many failed reforms. What makes sense to older people doesn't make > pedagogical sense. > > Bob Hansen
I suggest I've already taught this stuff to quite a few 16+ year olds who already knew algebra and the typical reaction is "why don't they always teach math like this? i.e. I'm learning so much more, it's more fun, and I can see the jobrelevance easily."
You're coming at this from the perspective of a middle aged programmer who was never a full time high school math teacher and who has not taught Python to 16+ year olds in math class.
But these pilots I ran, since moving back to Cascadia, were "math classes" only in the sense of covering lots of math in an interactive manner. They were not for math credit. Some were for home schoolers.
To have classes such as I've already taught, count towards the three years of high school math you need for a diploma, is the next puzzle piece we need. A green light from the legislature.
But the onesizefitsall mass publishing lobby is likely not happy with this idea. What are the politicians hearing from Pearson I'm wondering?
Kirby

