On Wed, Oct 26, 2011 at 3:36 PM, kirby urner <kirby.ur...@gmail.com> wrote:
> > PS: on a related topic, there's also a negative connotation > associated with "imperative programming". The word "imperative" gets > translated to mean "bullying". The functional programmers exploit > that connotation, and imply that functional programming is kinder to > children. > OK, this is very interesting, especially in light of the Math 2.0 thread. So 'imperative' and 'procedural' are pretty much the same thing, right? But 'procedural' doesn't tend to imply 'bullying'. It can simply mean 'orderly', spelling out a sequence of steps. I just found this procedural/functional comparison<http://en.wikipedia.org/wiki/Procedural_programming#Comparison_with_functional_programming> useful. So I started my computational class off purely functionally this year, and I really liked the results. Some kids really got it, and it shows. Others, well ... not so much. Although, it seemed to have a positive effect on all of them as to how they organize ideas. Functional thinking really is a great discipline. Simultaneously, being able to quickly set up a loop to study something is sometimes just the right tool. And then, if you can take that loop and switch it into a list comprehension, you're heading back towards functional thinking. Now that I've opened things up to pure Pythonic expression, it's interesting to see how some kids totally get both styles of thinking but others definitely gravitate towards one or the other. Being able to express things in different paradigms as you can in Python I think is a big plus. Different kids really do latch on to computational thinking in different ways. It struck me the other day how if you open up any typical algebra text, one of the very early chapters will have a section on the 'properties' of 'equality'. Well, how is it that 'equality' has 'properties'? Objects have properties. It struck me that if we think it's important in math education to make kids learn and apply the names of the 'properties of equality', then our math curriculum is already object oriented! Using Sage (Python with super powers) we can construct equation objects and demonstrate the 'properties of equality': sage: linear_eq(a,b,c,d,x) = (a*x+b == c*x+d) sage: prob1 = linear_eq(2,3,5,8) sage: prob1 2*x + 3 == 5*x + 8 sage: _ - 3 2*x == 5*x + 5 sage: _ - 5*x -3*x == 5 sage: _ / -3 x == (-5/3) sage: prob2 = linear_eq() sage: prob2 a*x + b == c*x + d sage: _-b a*x == c*x - b + d sage: _-c*x a*x - c*x == -b + d sage: _.lhs().factor() == _.rhs() (a - c)*x == -b + d sage: _/(a-c) x == -(b - d)/(a - c) Of course, you could also use Sage to just solve these outright: sage: prob1.solve(x) [x == (-5/3)] sage: sage: prob2.solve(x) [x == -(b - d)/(a - c)] but the previous let's us 'show our work'. - Michel -- ================================== "What I cannot create, I do not understand." - Richard Feynman ================================== "Computer science is the new mathematics." - Dr. Christos Papadimitriou ==================================
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig