Fwd: Re: [Edu-sig] Why is Logo popular, while Python isn't? (was "using Python for a CS 2 course" )
On Thursday 21 November 2002 05:11 am, Arthur wrote:
I do understand that it is reasonable to believe that out-of-the-box Python is more appropriate for children than out-of-the-box Lisp, for example. Or any other mainstream programming language, for that matter. But more appropriate than out-of-the box Logo? Would a language related to Python, but not quite Python - be more optimum?
I think the attraction to teaching with Python is that it is indeed a mainstream language, and not a special "teaching language". Very few real applications are written in Logo (unless I'm really out of touch). In fact, I once taught Logo turtle-graphics to 2nd graders, but I can't remember a single bit of it -- because *I* don't write programs in Logo. I remember that it was very simple -- but I don't remember how to do it. Some people are of the "more-the-merrier" school regarding languages -- especially people for whom programming is their career. But for other people, programming in their spare time, or as an additional tool for a career in another field (like science or teaching), there's a significant advantage to learning fewer languages. Having the language you teach be a language you can actually use in later life is therefore an advantage (Why don't we teach American kids the Greek alphabet (or Hiragana or Cyrillic or IPA) to prepare them for learning the Roman characters later in life? Sure, learning more languages makes each easier, but not easier than learning one.). Because it's so inclusive of different programming techniques, Python is a very good general purpose solution -- it provides good access to several types of programming technique: procedural, object-oriented, and functional. With the right modules installed, it has tremendous reach -- scientific, AI, web/CGI programming, email interaction, etc. For some people, it may be enough to know only Python. So, I think it may well be worth using Python, even if it is slightly sub-optimal for teaching. But I think it *does* have some non-intuitive features -- at least from a seven-year-old's point of view. Personally I think the most obnoxious is the lack of simple loop constructs: for i in range(10): print i is not very intuitive to kids who don't know about domains and ranges -- fairly advanced math concepts, even if they seem trivial to me now. for 1 < = i < 10: would be more intuitive and Pyrex comes very close to this, with: for i from 1 <= i < 10: which Greg Ewing (Pyrex's author) proposed adding to mainstream Python. I'm not sure why we need the "i from" cruft, but it is better. And, of course, the ever popular, but Guido-despised "do-while" construct. ;-) Not trying to start a flame war with these -- these have already been fought over for mainstream Python. I just bring them up, because they are teaching obstacles for younger kids. "Daddy, what's a range?" I've also never quite figured out the "right" way to grab a little input from the user -- there are several ways to do this in Python, not "one obvious way". This is surprisingly rarely needed in real programming applications, but in a teaching setting, it's very common. Nevertheless, I had a little success starting my (now 2nd grade) son with Python 2.2's "turtle" module. But he still has to just memorize some things: from turtle import * And why's it called a Pen? Why not Turtle? ;-) My kids would want to name a turtle, and that's where we get into object-oriented programming! For my younger child, it ought to draw a turtle, too, instead of an impersonal arrow. Maybe I'll try to improve it someday. :-) Also, I think they were a bit underimpressed with the graphics -- spoiled on computer games, I guess. They like designing game levels in Pingus or Rocks & Diamonds better. They might still be a little too young for this -- I don't want to frustrate or bore them with it. Still, for all that, I think Python is a pretty good starter language. I certainly like it better than C, fortran, lisp, basic, cobol, or perl for that purpose. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com ------------------------------------------------------- -- -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
So, I think it may well be worth using Python, even if it is slightly sub-optimal for teaching. But I think it *does* have some non-intuitive features -- at least from a seven-year-old's point of view. Personally I think the most obnoxious is the lack of simple loop constructs:
for i in range(10): print i
is not very intuitive to kids who don't know about domains and ranges -- fairly advanced math concepts, even if they seem trivial to me now.
for 1 < = i < 10:
would be more intuitive and Pyrex comes very close to this, with:
for i from 1 <= i < 10:
Sigh. Python's "for" loop is more intuitive than most because you're explicit about what you're looping through. for number in in 0,1,2,3,4,5,6,7,8,9: for color in "red", "blue", "green": etc. Of course, you can save your sequence as a "variable", colors = ("red", "blue", "green") for color in colors: for the *special case* where you want to loop through a numerical sequence you can use a helper tool named range() to generate that sequence.
I just bring them up, because they are teaching obstacles for younger kids.
Really, they're teaching obstacles for the teacher (grin). Our challenge is to not make them learning obstables for the kids... and sometimes our own programming background leads us to choose a non-optimal way to present a topic (my own first four seriously used programming languages were Fortran II, Basic, Pascal, and C ... guess what I tend to draw from?)
I thought I had posted this to the Contagious Fun site a long time ago, but apparently not: http://www.zope.org/Members/DaddyGravity/ContagiousFun/KutiaPy Kutia is my stab at a logo-like environment for Python. Still pretty rudimentary, I wanted to have a command language (logo-like or simplified python) in another window, but allow "programs" to be written by direct manipulation. Not there yet, but if there's any interest, perhaps I'll revive it as a project. Requires Tkinter. Developed on Linux, tested on Windows, looks pretty darn cool on OS X (to Tkinter's credit, not mine). --Dethe On Thursday, November 21, 2002, at 10:35 AM, Terry Hancock wrote:
On Thursday 21 November 2002 05:11 am, Arthur wrote:
I do understand that it is reasonable to believe that out-of-the-box Python is more appropriate for children than out-of-the-box Lisp, for example. Or any other mainstream programming language, for that matter. But more appropriate than out-of-the box Logo? Would a language related to Python, but not quite Python - be more optimum?
I think the attraction to teaching with Python is that it is indeed a mainstream language, and not a special "teaching language". Very few real applications are written in Logo (unless I'm really out of touch).
In fact, I once taught Logo turtle-graphics to 2nd graders, but I can't remember a single bit of it -- because *I* don't write programs in Logo. I remember that it was very simple -- but I don't remember how to do it.
Some people are of the "more-the-merrier" school regarding languages -- especially people for whom programming is their career. But for other people, programming in their spare time, or as an additional tool for a career in another field (like science or teaching), there's a significant advantage to learning fewer languages. Having the language you teach be a language you can actually use in later life is therefore an advantage (Why don't we teach American kids the Greek alphabet (or Hiragana or Cyrillic or IPA) to prepare them for learning the Roman characters later in life? Sure, learning more languages makes each easier, but not easier than learning one.).
Because it's so inclusive of different programming techniques, Python is a very good general purpose solution -- it provides good access to several types of programming technique: procedural, object-oriented, and functional. With the right modules installed, it has tremendous reach -- scientific, AI, web/CGI programming, email interaction, etc. For some people, it may be enough to know only Python.
So, I think it may well be worth using Python, even if it is slightly sub-optimal for teaching. But I think it *does* have some non-intuitive features -- at least from a seven-year-old's point of view. Personally I think the most obnoxious is the lack of simple loop constructs:
for i in range(10): print i
is not very intuitive to kids who don't know about domains and ranges -- fairly advanced math concepts, even if they seem trivial to me now.
for 1 < = i < 10:
would be more intuitive and Pyrex comes very close to this, with:
for i from 1 <= i < 10:
which Greg Ewing (Pyrex's author) proposed adding to mainstream Python. I'm not sure why we need the "i from" cruft, but it is better.
And, of course, the ever popular, but Guido-despised "do-while" construct. ;-)
Not trying to start a flame war with these -- these have already been fought over for mainstream Python. I just bring them up, because they are teaching obstacles for younger kids. "Daddy, what's a range?" I've also never quite figured out the "right" way to grab a little input from the user -- there are several ways to do this in Python, not "one obvious way". This is surprisingly rarely needed in real programming applications, but in a teaching setting, it's very common.
Nevertheless, I had a little success starting my (now 2nd grade) son with Python 2.2's "turtle" module. But he still has to just memorize some things:
from turtle import *
And why's it called a Pen? Why not Turtle? ;-) My kids would want to name a turtle, and that's where we get into object-oriented programming! For my younger child, it ought to draw a turtle, too, instead of an impersonal arrow. Maybe I'll try to improve it someday. :-)
Also, I think they were a bit underimpressed with the graphics -- spoiled on computer games, I guess. They like designing game levels in Pingus or Rocks & Diamonds better. They might still be a little too young for this -- I don't want to frustrate or bore them with it.
Still, for all that, I think Python is a pretty good starter language. I certainly like it better than C, fortran, lisp, basic, cobol, or perl for that purpose.
Cheers, Terry
-- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
-------------------------------------------------------
-- -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
At 10:35 AM 11/21/2002 -0800, Terry Hancock wrote:
Some people are of the "more-the-merrier" school regarding languages --
Yeah, that's me pretty much. A programming language is an API is an interface. A kitchen appliance is an interface (a control panel), as are desktop applications (spreadsheets). Life is packed with these gizmos we need to interact with (driving a car), and the sense should be of an endless need to tackle new interfaces. The goal for a programmer is to get familiar with key concepts (flow of control, efficiency of algorithms, data structures, layers or levels of detail...) and then look for how they're implemented in whatever languages (*if* they're implemented). I think teaching/toy languages have their place. The Lego Mindstorms thing is okeedokee. Programming is drag and drop of flow charty symbols, filling in a few properties, then sending it to the main unit (the RCX) via infrared. The language is very turtlish (forward, back, rotate) but also event oriented, in that the robots have sensors (touch, light). http://mindstorms.lego.com/eng/products/ris/rissoft.asp Kids get to build the machines as well as program them, which adds a useful dimension. I had an OK experience tutoring kids with this kit. Partly my attitude/bias is informed by wanting to teach/learn mathematics type stuff. It's easy to carve out bite sized challenges like generating the Fibonacci numbers. There's a fairly breezy, superficial "teach me what I need in 30 minutes" aspect to this. I'm not recommending that *every* language be approached in this way, but I think hasty, breezy familiarity with a language is sometimes just what the doctor ordered, and having the confidence to "speed read" language manuals is something I'd like to develop in students. Some languages don't lend themselves to this at all, but Python does (you can start using it immediately -- Logo too). Why learn Logo? Because of the literature that's grown up around it. I'd use Logo in a class *just because* that's what's featured in 'Turtle Geometry' by Harold Abelson and Andrea diSessa (MIT, 1980). Subtitle: The Computer as a Medium for Exploring Mathematics. In other words, given my motive is exploring mathematics, I'm led to Logo by the books (not vice versa). Likewise, I'm led to J because Kenneth Iverson shares my math-through- programming interest and has companion labs (in J language) for both 'Concrete Mathematics' by Knuth et al, and 'The Book of Numbers' by Conway and Guy. The literature leads me into it. Besides, not many languages give you a primitive operator to invert a matrix, or take the derivative of a polynomial (Mathematica does, but it's rather spendy and fat). And I think it's just fine to learn some of a language just to be able to appreciate a connected body of literature -- and then forget most of the details. What sticks with you are useful concepts, and the experience of learning -- hard to quantify, but valuable nonetheless. If your goal is to write large applications with fancy GUIs (e.g. games), then you need to really buckle down and learn a language *well*. I often use Xbase for this purpose. Sophisticated IDE (all the drag and drop widgets), object oriented, embedded SQL. Not very cross-platform though, and not suited to a lot of things Python would be *much* better at. My Python stuff tends to be rather short, and not GUI-intensive (I write my modules to be imported and interacted with at the command line, not run top-to- bottom as scripts, prompting for inputs). My rule of thumb is: programming is for everyone who's interested and has the necessary privileges (a certain living standard is presumed, to even have access to computers, let alone fancy toys like Mindstorms), and the goal should always be to learn a minimum of two languages fairly proficiently, never just one, plus one should cultivate the habit of tackling additional languages "just for the fun of it," even if just in a breezy, off-the-cuff kind of way (the way a lot of people have learned HTML). And when it comes to learning a minimum of two languages, I don't think you can go wrong by making one of them Python. Kirby PS: speaking of Fibonacci Numbers, there's this nascent Zope server using the Plone CMF that I'm working on with my friend Stu, that's not really open to the public yet. But here's a sneak preview, in the form of an article by myself re generating the Fibo numbers, using both Python and J. Very basic stuff.
PS: speaking of Fibonacci Numbers, there's this nascent Zope server using the Plone CMF that I'm working on with my friend Stu, that's not really open to the public yet. But here's a sneak preview, in the form of an article by myself re generating the Fibo numbers, using both Python and J. Very basic stuff.
Duh... being just a little *too* hasty/breezy. Forgot to add the URL which is: http://www.dstoys.org/Members/kirby/Folder.2002-11-20.0416/fiboprog.html/vie... (and a very zopey lookin' URL it is, too). Kirby
participants (4)
-
Dethe Elza
-
Kirby Urner
-
Mats Wichmann
-
Terry Hancock