a non-rhetorical question

I've just completed my 6th semester as a teacher, teaching 2 sections per semester of a 10th grade course that includes a 4 week introduction to programming in Python. Here's a question from one of my exams: Write Python code that will ask the user how who is the best looking teacher in the school. The program must loop until the user responds either "Mrs. McGrath" or "Mr. Judkis". If the use responds "Mr. Judkis", the program must print out "Excellent choice." If the user responds "Mrs. McGrath", the program must print out "Also a fine choice." If the user responds with anything else, the program must print out "Wrong, sorry." and ask again. Rather than catalog my frustrations, let me just pose a question to you all -- how much Python exposure do you think it should take before a student should be able to answer this question? If a student can't even answer this, is it reasonable to say that they have learned any programming at all? (I know that they might have learned something -about- programming, but that is not the same thing.) Thanks, Andy Judkis (By the way, anybody out there going to be at CS4HS next week at CMU? If so I'd love to get together with you . . )

Hi, We do brief surveys with 8th and 9th graders, so I'm somewhat familiar with the age and skill level. I would say that *most* students should be able to answer this question after 4 weeks (depending on how much looping they've done, of course). By "answer" I don't mean necessarily get full credit, but at least get the basic idea right - setting up a while loop and prompting for user input. The tricky part is the compound nature of the test - if they haven't done that much with boolean expressions, it might be beyond them, while looking just for "Mr. Judkis" it wouldn't be. So if they had everything else right, but couldn't get the boolean expression right (or figure out some work-around with an extra "if" or two[1]), I wouldn't count that as a complete failure. Finally, in answer to your last question, I would say that they hadn't learned *much* programming *yet*. ;-) Seriously, that may not be a good question - presumably they've learnd to sequence instructions, to handle some expressions, basic input/output, some looping, etc, so it depends on how you set the standard. HTH, Vern Ceder [1] There will always be one wise-guy who will do an endless "while true:" loop with at least 3 "breaks", or some such... ;-) Andy Judkis wrote:
I've just completed my 6th semester as a teacher, teaching 2 sections per semester of a 10th grade course that includes a 4 week introduction to programming in Python. Here's a question from one of my exams:
Write Python code that will ask the user how who is the best looking teacher in the school. The program must loop until the user responds either "Mrs. McGrath" or "Mr. Judkis". If the use responds "Mr. Judkis", the program must print out "Excellent choice." If the user responds "Mrs. McGrath", the program must print out "Also a fine choice." If the user responds with anything else, the program must print out "Wrong, sorry." and ask again.
Rather than catalog my frustrations, let me just pose a question to you all -- how much Python exposure do you think it should take before a student should be able to answer this question? If a student can't even answer this, is it reasonable to say that they have learned any programming at all? (I know that they might have learned something -about- programming, but that is not the same thing.)
Thanks,
Andy Judkis
(By the way, anybody out there going to be at CS4HS next week at CMU? If so I'd love to get together with you . . )
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137

Vern, Richard, Your comments were very helpful -- it's sometimes hard for me to see the question as a student would. They can imitate nicely, but asking them to analyze and synthesize (as this question does, at a very superficial level) seems to be asking a lot -- yet it's the essence of programming. Reading between the lines of Vern's message, I wonder how he would want students to answer the question. What I was looking for was more or less what he considered the wise-guy answer: while True: resp = raw_input("Who is hottest teacher?") if resp == "Mr. Judkis": print "Excellent choice!" break elif resp == "Mrs. McGrath": print "Also a fine choice." break else: print "Wrong, sorry. . ." I would have expected this question to be easy after 4 weeks of this stuff. They have certainly done things a lot like it quite a few times. I had given out the questions ahead of time and encouraged the kids to work together on them, yet the day before the test, everyone seemed stumped. I went over it in class in detail, and yet when they took the test, some kids still missed critical things -- they put the raw_input outside the loop, they left out the breaks, they left out the while altogether -- suggesting to me that they're trying to use recall and imitation, and don't really "get it" in a useful way. I'm coming to the conclusion that either: 1) my expectations are unreasonable, or 2) my approach to the material is completely wrong -- at this point, after 6 laps around the track, it isn't just a matter of tweaking something. 3) or perhaps some of both. I should add that we start out with a week of RUR-PLE, learning about loops and branches and subroutines, and that seems to go quite well -- it's only when we move to IDLE that things start to go out of focus. Thanks, Andy

On 7/6/07, Andy Judkis <ajudkis@verizon.net> wrote:
Vern, Richard,
Your comments were very helpful -- it's sometimes hard for me to see the question as a student would. They can imitate nicely, but asking them to analyze and synthesize (as this question does, at a very superficial level) seems to be asking a lot -- yet it's the essence of programming.
Reading between the lines of Vern's message, I wonder how he would want students to answer the question. What I was looking for was more or less what he considered the wise-guy answer:
while True: resp = raw_input("Who is hottest teacher?") if resp == "Mr. Judkis": print "Excellent choice!" break elif resp == "Mrs. McGrath": print "Also a fine choice." break else: print "Wrong, sorry. . ."
Here's the most elegant solution I could come up with: teachers = {'Mr. Judkis':'Excellent Choice', 'Mrs. McGrath':'Also a fine choice.'} name = raw_input() while name not in teachers.keys(): print 'Wrong, sorry.' name = raw_input() print teachers[name] --Tom

Tom, Yeah, if they've got dictionaries, then your way is both elegant and "Pythonic" ;-) Cheers, Vern Tom Hoffman wrote:
On 7/6/07, Andy Judkis <ajudkis@verizon.net> wrote:
Vern, Richard,
Your comments were very helpful -- it's sometimes hard for me to see the question as a student would. They can imitate nicely, but asking them to analyze and synthesize (as this question does, at a very superficial level) seems to be asking a lot -- yet it's the essence of programming.
Reading between the lines of Vern's message, I wonder how he would want students to answer the question. What I was looking for was more or less what he considered the wise-guy answer:
while True: resp = raw_input("Who is hottest teacher?") if resp == "Mr. Judkis": print "Excellent choice!" break elif resp == "Mrs. McGrath": print "Also a fine choice." break else: print "Wrong, sorry. . ."
Here's the most elegant solution I could come up with:
teachers = {'Mr. Judkis':'Excellent Choice', 'Mrs. McGrath':'Also a fine choice.'} name = raw_input() while name not in teachers.keys(): print 'Wrong, sorry.' name = raw_input() print teachers[name]
--Tom _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137

On 7/6/07, Vern Ceder <vceder@canterburyschool.org> wrote:
Tom,
Yeah, if they've got dictionaries, then your way is both elegant and "Pythonic" ;-)
Except that ".keys()" is not needed in a truly Pythonic program ;-) But, this is straying far from the original question. These are kids that have had a few weeks of instruction (with probably less than 6 hour of class time per week). What can be reasonably expected of them? Does anyone on this list (other than Vern) who has taught high school kids an intro to programming for just a few weeks can answer Andy's question? Note that non-classroom teaching (like Kirby does for motivated kids) does not count! Where is Jeff Elkner when we need him?.... ;-) André
Cheers, Vern
Tom Hoffman wrote:
On 7/6/07, Andy Judkis <ajudkis@verizon.net> wrote:
Vern, Richard,
Your comments were very helpful -- it's sometimes hard for me to see the question as a student would. They can imitate nicely, but asking them to analyze and synthesize (as this question does, at a very superficial level) seems to be asking a lot -- yet it's the essence of programming.
Reading between the lines of Vern's message, I wonder how he would want students to answer the question. What I was looking for was more or less what he considered the wise-guy answer:
while True: resp = raw_input("Who is hottest teacher?") if resp == "Mr. Judkis": print "Excellent choice!" break elif resp == "Mrs. McGrath": print "Also a fine choice." break else: print "Wrong, sorry. . ."
Here's the most elegant solution I could come up with:
teachers = {'Mr. Judkis':'Excellent Choice', 'Mrs. McGrath':'Also a fine choice.'} name = raw_input() while name not in teachers.keys(): print 'Wrong, sorry.' name = raw_input() print teachers[name]
--Tom _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137 _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig

On 7/6/07, Andre Roberge <andre.roberge@gmail.com> wrote:
Note that non-classroom teaching (like Kirby does for motivated kids) does not count!
Where is Jeff Elkner when we need him?.... ;-)
André
Well boo hoo, why doesn't my stuff count? It's a real classroom with real computers and real middle to early high schoolers, plus I did two sets of eight weeks (once per week) with two sets of 8th graders at a public school, meaning all the 8th graders in the place, "motivated" or not. Admittedly, that's not my regular gig. Mostly my students sign up and participate voluntarily. But then, most schools teach computer programming as an elective, unlike the way I suggest, as integral with regular mathematics (teach functions interactively in the shell, later saving and importing, like Laura said, instead of using a stupid calculator). Plus some years back I was hired to teach home schoolers, average age 13, at Free Geek... As I mention in my slides for EuroPython (looking forward to meeting Laura again tomorrow), Madlibs proved appealing to most students, little stories where they have to prompt themselves (since raw_input seems to be a theme here, though interacting with the shell and having no main loop at all is just as possible, I'd say better at first...) Possible to use %s substitution but string module has these nifty Template as in: sillystory = string.Template(""" There once was a certain $persons_name from $city who had a pet $animal. One day, the $animal ate all the food in the house and $persons_name was very angry. """ # let's fill a dictionary! thedict = {"persons_name":"",

Sorry, that post got away from me when I started hitting tab keys 'n stuff. Blaming jet lag. Trying again... Saved module (sillystory.py): ====== import string def test(): thestory = string.Template( """ There once was a certain $persons_name from $city who had a pet $animal. One day, the $animal ate all the food in the house and $persons_name was very <i>angry</i>. """) # sneaking in a little HTML (looking ahead) print thestory # just an object in memory # let's fill a dictionary! thedict = {"persons_name" : "", "animal" : "", "city" : "" } for thekey in thedict: answer = raw_input("Please enter " + thekey + "> ") thedict[thekey] = answer print thestory.substitute(thedict) ======
import sillystory sillystory.test() <string.Template object at 0xb6e7faac> Please enter persons_name> Kirby Please enter city> Vilnius Please enter animal> Snake
There once was a certain Kirby from Vilnius who had a pet Snake. One day, the Snake ate all the food in the house and Kirby was very <i>angry</i>. So then they get to experiment with this framework, changing the story and the matching dictionary keys, reloading, debugging, and, we hope, getting some positive results. Many kids are familiar with the Mad Libs genre (anyway it's easy to explain). A teacher might have 'em focus on the dictionary, probably the most important data structure. More on the Mad Lib approach in my EuroPython slides: http://www.4dsolutions.net/presentations/connectingthedots.pdf Kirby

I agree with Kirby that madlibs are a fun example. On Friday 06 July 2007 2:12 pm, kirby urner wrote: ....
As I mention in my slides for EuroPython (looking forward to meeting Laura again tomorrow), Madlibs proved appealing to most students, little stories where they have to prompt themselves (since raw_input seems to be a theme here, though interacting with the shell and having no main loop at all is just as possible, I'd say better at first...)
Possible to use %s substitution but string module has these nifty Template as in:
sillystory = string.Template(""" There once was a certain $persons_name from $city who had a pet $animal. One day, the $animal ate all the food in the house and $persons_name was very angry. """
One note (I meant to post this in the discussion of string.Template before): You can do this same thing just as simply w/o using the string library. Plain old string formatting works with dictionaries as well. You can just do this: sillystory = """ There once was a certain %(persons_name)s from %(city)s who had a pet %(animal)s. One day, the %(animal)s ate all the food in the house and %(persons_name)s was very angry. """ fillins = dict(persons_name="Jack", city="Timbuktu", animal="lemur") print sillystory % fillins I also like the string library for certain pedagogical reasons, but I don't think the Templates are compelling when you can do essentially the same thing with string formatting. Is the $ notation that much of a "win?" --John -- John M. Zelle, Ph.D. Wartburg College Professor of Computer Science Waverly, IA john.zelle@wartburg.edu (319) 352-8360

I also like the string library for certain pedagogical reasons, but I don't think the Templates are compelling when you can do essentially the same thing with string formatting. Is the $ notation that much of a "win?"
--John
Yeah I've asked myself the same question. It's a little less syntax, plus I just like talking about this "Template object" as a "thing". I compare it to the legal concept of "boilerplate" and all the fill-in-the-blanks stuff they get to do in school (kids are used to boilerplates -- what most tests are no? -- certainly we adults face templates a lot, try to squeeze into 'em). Template = Form. Backend = database (more like what goes in the dictionary -- used to populate the fields/columns as rows/records). I talk a lot about real world stuff like that. The lesson is a "cave painting" i.e. a primitive yet faithful rendition of something more complicated (perhaps unnecessarily complicated for our purposes). But I could see switching to %(dict_key)s syntax somewhere along the way. I like Template though and don't think the string module should go away. Rather it should fill with non- redundant basic utilities (like Template). Kirby

On 7/6/07, John Zelle <john.zelle@wartburg.edu> wrote:
I also like the string library for certain pedagogical reasons, but I don't think the Templates are compelling when you can do essentially the same thing with string formatting. Is the $ notation that much of a "win?"
--John
Another reason to stick with string.Template for now might be that string formatting with percent syntax is going away? After all, Python 3000 is only about a year away, in alpha anyway, with Python 2.6 containing a back port of many features. Unless the whole string module is going away that is, but Guido didn't say anything about that. Googling just now leads me to think it'll stick around, but become more unicode-savvy -- like the rest of the language. Kirby

On Jul 6, 2007, at 2:29 PM, Andre Roberge wrote:
Does anyone on this list (other than Vern) who has taught high school kids an intro to programming for just a few weeks can answer Andy's question?
I'm not a teacher, but perhaps you'll indulge a slight tangent. I have taught intro CS to 8th graders for a year in the late 90s, and more recently, some pretty hardcore CS during a 10-day course (http:// www.astro.hr/s3/2005/project4.php) for advanced high schoolers who didn't come in with a strong programming background. The former course used BASIC and a couple of more obscure languages, and the latter used a specialized dialect of C. The two environments were almost incomparable, but I did walk away with one shared observation both times: trying to explain difficult CS concepts to kids without a proper math background is next to impossible. Both times, I eventually reverted to teaching the missing math before diving into the CS, and even during the CS bits liberally jumped into mathematical analogies to explain various concepts and approaches. Some of my friends expressed unease with my happiness (comfort, really) to use mathematics as a tool for teaching CS, citing math's awful reputation as something that would get in the way. Unfortunately, there's a perverse and pervasive myth today that CS *isn't* math. Incoming CS freshmen at the better universities are quickly disillusioned about this; a non-trivial proportion of them picked CS as a major since they were "pretty good with computers in high school". For these folks, algorithms and Lisp tend to cause convulsive culture shock, and they often move to less demanding majors. Some schools have responded by introducing software engineering as a separate course of study. Bottom line: terminology matters. I think it's impossible to teach CS to kids who are afraid of math. Teaching *programming* is something else entirely. I'd submit that what Andy can expect from his students depends largely on which of the two he's trying to teach. Cheers, -- Ivan Krstić <krstic@solarsail.hcs.harvard.edu> | GPG: 0x147C722D

On 7/7/07, Ivan Krstić <krstic@solarsail.hcs.harvard.edu> wrote: ...
Bottom line: terminology matters. I think it's impossible to teach CS to kids who are afraid of math. Teaching *programming* is something else entirely. I'd submit that what Andy can expect from his students depends largely on which of the two he's trying to teach.
Cheers,
-- Ivan Krstić <krstic@solarsail.hcs.harvard.edu> | GPG: 0x147C722D
You're correct that math has a terrible reputation in many corners. As mathematician Keith Devlin puts it, math is about making the invisible visible -- a meme he invented to try countering the negative perceptions people have about math. http://www.maa.org/features/invisible.html On the other hand, if you're sitting in front of a computer, connected to the Internet especially, there's a sense of possibility, as well as of community. Technology has "sex appeal" including the allure of a more positive future (a meaning captured by the South African word 'kusasa'). Bridging the digital divide is another way of saying we're working to spread analytical skills to those who could use them. So a question confronting a lot of us is how to "rescue" mathematics by means of technology, which in part means restoring a sense of fun (Papert: "hard fun") and play. In the 1980s, it seemed K-12 math curricula were on the verge of incorporating more technology in the form of BASIC and Logo, but here we are in 2007 and most high school math classes are stuck in the calculator era. What happened? I think what a lot of kids find accessible and meaningful is a "how things work" approach (which connects to Keith Devlin's meme). We want to explain real stuff in the real world, and that takes mathematical concepts, analytical thinking and the like. Little things like indexing, data structures like trees (document object model, xml) make a huge difference. Databases are behind the scenes in so many walks of life. In the traditional curriculum, that means branching off from Venn Diagrams, plus talking about data in tabular formats. When we talk about Venn Diagrams would be a good place to put some intro to SQL. A problem in the mathematics culture is there's a lot of pride at having made it through certain "filters" and a wish to impose those filters on newcomers, to see who "makes it" through these difficult obstacle courses. Whereas I recognize every profession has standards, and not everyone is cut out to be just anything, I think math's poor reputation is in many ways a result of too much pride among the math savvy. There's a lot of protectionism, not to mention overspecialization that goes on. I see the infusion of computer savvy as helping to break up some of the old patterns of specialization. Restoring the reputation of mathematics does not have to mean returning to some past status quo. Kirby

I was very happy to see this book come out recently: "Mathematics for the Digital Age" http://www.skylit.com/mathandpython.html This is still in its preliminary stages, finished version will appear in February. The preface is delightful - they explain there how Donald Knuth realized that the mathematics he needed in computer science was not quite what he had studied in the traditional math major. This led him to create "Concrete Mathematics" (CONtinous + disCRETE).
I think it's impossible to teach CS to kids who are afraid of math.
More and more I believe high school math teachers have a responsibility to emphasize to students that computers only exist BECAUSE of mathematics. What makes something a computer is not the material from which it is constructed - that material could even be plumbing - what makes something a computer is its organization. When a student asks, "When am I ever going to use this stuff?" the answer is - "Every friggin time you use your computer!" Many math students are actually surprised to hear that - it's weird, but they just do NOT realize that computers have their roots in mathematics! I really believe that has to change - the whole math curriculum needs to be upgraded for the 21st century.
here we are in 2007 and most high school math classes are stuck in the calculator era. What happened?
Marketing. Cleverly appropriating teachers to perform free advertising and sell product by calling them 'leaders'. Getting textbook publishers to feature calculator sections in each chapter, thereby creating a status quo where technological integration has "already been handled". Also, I believe part of the problem is the perceived division between CS and mathematics. CS has grown to become its own discipline and its own department at the university level, so when we talk about integrating CS into math classes, people are apprehensive, thinking we're adding some "other subject", some "additional layer", to the math curriculum. The difficulty is getting people to realize that it's really the other way around. When you introduce gadgets - calculators, software "packages", etc. that students then have to learn to use - THAT'S where you get additional layers to the already-existing curriculum. When you use a high-level computational language, like Python, to express algebraic concepts, the algebra and the technology can be presented as ONE THING. For example: >>> for x in domain: x, f(x) There's actually LESS layering going on there. There's actually an interesting contrast here between emphasizing the unity of CS/mathematics and getting kids to program in "fun" (i.e. "non-mathematical") ways. It does make sense in our math-phobic educational climate to show beginning programming students how they can do fun things without having to worry about the algebra, and quite a lot of good effort has gone into this. But simultaneously, I think it makes tremendous sense to show students how a kind of algebraic thinking is fundamental to our technology and to weave this into math classes. - Michel ================================================== "Shall I tell you what it is to know? To say you know when you know, and to say you do not when you do not, that is knowledge." - Confucius ================================================== -----Original Message----- From: edu-sig-bounces@python.org on behalf of kirby urner Sent: Sat 07/07/07 02:52 AM To: Ivan Krstic Cc: edu-sig@python.org Subject: Re: [Edu-sig] a non-rhetorical question On 7/7/07, Ivan Krstic <krstic@solarsail.hcs.harvard.edu> wrote: ...
Bottom line: terminology matters. I think it's impossible to teach CS to kids who are afraid of math. Teaching *programming* is something else entirely. I'd submit that what Andy can expect from his students depends largely on which of the two he's trying to teach.
Cheers,
-- Ivan Krstic <krstic@solarsail.hcs.harvard.edu> | GPG: 0x147C722D
You're correct that math has a terrible reputation in many corners. As mathematician Keith Devlin puts it, math is about making the invisible visible -- a meme he invented to try countering the negative perceptions people have about math. http://www.maa.org/features/invisible.html On the other hand, if you're sitting in front of a computer, connected to the Internet especially, there's a sense of possibility, as well as of community. Technology has "sex appeal" including the allure of a more positive future (a meaning captured by the South African word 'kusasa'). Bridging the digital divide is another way of saying we're working to spread analytical skills to those who could use them. So a question confronting a lot of us is how to "rescue" mathematics by means of technology, which in part means restoring a sense of fun (Papert: "hard fun") and play. In the 1980s, it seemed K-12 math curricula were on the verge of incorporating more technology in the form of BASIC and Logo, but here we are in 2007 and most high school math classes are stuck in the calculator era. What happened? I think what a lot of kids find accessible and meaningful is a "how things work" approach (which connects to Keith Devlin's meme). We want to explain real stuff in the real world, and that takes mathematical concepts, analytical thinking and the like. Little things like indexing, data structures like trees (document object model, xml) make a huge difference. Databases are behind the scenes in so many walks of life. In the traditional curriculum, that means branching off from Venn Diagrams, plus talking about data in tabular formats. When we talk about Venn Diagrams would be a good place to put some intro to SQL. A problem in the mathematics culture is there's a lot of pride at having made it through certain "filters" and a wish to impose those filters on newcomers, to see who "makes it" through these difficult obstacle courses. Whereas I recognize every profession has standards, and not everyone is cut out to be just anything, I think math's poor reputation is in many ways a result of too much pride among the math savvy. There's a lot of protectionism, not to mention overspecialization that goes on. I see the infusion of computer savvy as helping to break up some of the old patterns of specialization. Restoring the reputation of mathematics does not have to mean returning to some past status quo. Kirby _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig

On 7/7/07, Michel Paul <mpaul@bhusd.k12.ca.us> wrote:
I was very happy to see this book come out recently:
"Mathematics for the Digital Age" http://www.skylit.com/mathandpython.html
Hey thanks for sharing that. I wasn't aware of this resource. They give a succinct summation of the "math through programming" approach: """ We believe that starting in college is too late. Many concepts are completely accessible to middle and high school students. And there is also another side to the relationship: just as mathematics helps achieve a deeper understanding of computer programs, some hands-on experience with computer programming helps make mathematics more tangible, familiar, and easier to grasp. """
here we are in 2007 and most high school math classes are stuck in the calculator era. What happened?
Marketing. Cleverly appropriating teachers to perform free advertising and sell product by calling them 'leaders'. Getting textbook publishers to feature calculator sections in each chapter, thereby creating a status quo where technological integration has "already been handled".
Well, we're going to be using marketing too. I'm eager to compete, as I think math through Python has way more integrity and relevance than all this crappy TI stuff they dish out. Tiny screens, very black boxy, all the algorithms hidden from view. Programming a rational number class is way more likely to produce insights than just going (1/3) + (1/8) on a calculator (presuming it has a rational numbers feature). Plus the job-relevant skills you pick up doing real programming... CP4E is just a better way to go.
Also, I believe part of the problem is the perceived division between CS and mathematics. CS has grown to become its own discipline and its own department at the university level, so when we talk about integrating CS into math classes, people are apprehensive, thinking we're adding some "other subject", some "additional layer", to the math curriculum.
Yeah, that's the overspecialization I was talking about (Knuth talks about it too, and Bucky of course). Good thing we have the philosophy department as a kind of switchboard between these disciplines (meant semi-sarcastically with regard to most of today's academic philosophy, but earnestly too, as philosophy remains a great source of overview and perspective).
For example: >>> for x in domain: x, f(x) There's actually LESS layering going on there.
Right.
It does make sense in our math-phobic educational climate to show beginning programming students how they can do fun things without having to worry about the algebra, and quite a lot of good effort has gone into this.
But simultaneously, I think it makes tremendous sense to show students how a kind of algebraic thinking is fundamental to our technology and to weave this into math classes.
- Michel
And here is where Polyhedra come in, as mathematical, visual *and* very amenable to an OO approach. Yep, philosophy is where it's at (echoes of Plato). Kirby

On 7/6/07, Andre Roberge <andre.roberge@gmail.com> wrote:
But, this is straying far from the original question. These are kids that have had a few weeks of instruction (with probably less than 6 hour of class time per week). What can be reasonably expected of them?
High school CS teacher (at least until very recently) here! Of course, it's impossible to speculate the progress a student should make in 6 hours of class time but it is interesting to consider the vast number of approaches to teaching those first 6 hours of programming that are developing. Three years ago, I was definitely on the lexical path and would have expected students to be able to answer Andy's question after a couple class meetings. However, in my most recent course, I used PyGame and exposed students to object-oriented data structures first and logic / algorithms second. This was a sweeping change from early courses in which we talked a little about "variables", then looked at operators and control structures, before returning to more complex data structures. Especially for the student with weaknesses (or simply a lack of confidence) in mathematics, building meaningful data structures was be a great way to make them feel successful in those first few class meetings. And, finally, to reinforce this point: it is my experience that if students taste success early in a new subject, they are far more willing to take on challenging work down the line. Great thread so far! Thanks, everyone! Kevin -- http://kevindriscoll.info/

On 7/11/07, Kevin Driscoll <driscollkevin@gmail.com> wrote:
Three years ago, I was definitely on the lexical path and would have expected students to be able to answer Andy's question after a couple class meetings. However, in my most recent course, I used PyGame and exposed students to object-oriented data structures first and logic / algorithms second.
Hi Kevin -- You latter approach sounds more similar to mine. On the subject of data structures, I also recommend providing them with some large pre-populated ones to play with i.e. already filled with substantial "real world" content. One might think it makes no difference just going {'foo':'bar'} all the time i.e. using little "meaningless" constructs so we can just study the object's API. But especially for newbies we're trying to recruit for the longer haul, I think it adds another dimension to get to play with something like this: cities = { 'Albany, N.Y.': [(42, 40, 'N'), (73, 45, 'W')], 'Albuquerque, N.M.': [(35, 5, 'N'), (106, 39, 'W')], 'Amarillo, Tex.': [(35, 11, 'N'), (101, 50, 'W')], 'Anchorage, Alaska': [(61, 13, 'N'), (149, 54, 'W')], 'Atlanta, Ga.': [(33, 45, 'N'), (84, 23, 'W')], 'Austin, Tex.': [(30, 16, 'N'), (97, 44, 'W')], 'Baker, Ore.': [(44, 47, 'N'), (117, 50, 'W')], 'Baltimore, Md.': [(39, 18, 'N'), (76, 38, 'W')], 'Bangor, Maine': [(44, 48, 'N'), (68, 47, 'W')], 'Birmingham, Ala.': [(33, 30, 'N'), (86, 50, 'W')], 'Bismarck, N.D.': [(46, 48, 'N'), (100, 47, 'W')], 'Boise, Idaho': [(43, 36, 'N'), (116, 13, 'W')], 'Boston, Mass.': [(42, 21, 'N'), (71, 5, 'W')], 'Buffalo, N.Y.': [(42, 55, 'N'), (78, 50, 'W')], 'Calgary, Alba., Can.': [(51, 1, 'N'), (114, 1, 'W')], 'Carlsbad, N.M.': [(32, 26, 'N'), (104, 15, 'W')], 'Charleston, S.C.': [(32, 47, 'N'), (79, 56, 'W')], 'Charleston, W. Va.': [(38, 21, 'N'), (81, 38, 'W')], 'Charlotte, N.C.': [(35, 14, 'N'), (80, 50, 'W')], 'Cheyenne, Wyo.': [(41, 9, 'N'), (104, 52, 'W')], 'Chicago, Ill.': [(41, 50, 'N'), (87, 37, 'W')], 'Cincinnati, Ohio': [(39, 8, 'N'), (84, 30, 'W')], 'Cleveland, Ohio': [(41, 28, 'N'), (81, 37, 'W')], 'Columbia, S.C.': [(34, 0, 'N'), (81, 2, 'W')], 'Columbus, Ohio': [(40, 0, 'N'), (83, 1, 'W')], 'Dallas, Tex.': [(32, 46, 'N'), (96, 46, 'W')], 'Denver, Colo.': [(39, 45, 'N'), (105, 0, 'W')], 'Des Moines, Iowa': [(41, 35, 'N'), (93, 37, 'W')], 'Detroit, Mich.': [(42, 20, 'N'), (83, 3, 'W')], 'Dubuque, Iowa': [(42, 31, 'N'), (90, 40, 'W')], 'Duluth, Minn.': [(46, 49, 'N'), (92, 5, 'W')], 'Eastport, Maine': [(44, 54, 'N'), (67, 0, 'W')], 'Edmonton, Alb., Can.': [(53, 34, 'N'), (113, 28, 'W')], 'El Centro, Calif.': [(32, 38, 'N'), (115, 33, 'W')], 'El Paso, Tex.': [(31, 46, 'N'), (106, 29, 'W')], 'Eugene, Ore.': [(44, 3, 'N'), (123, 5, 'W')], 'Fargo, N.D.': [(46, 52, 'N'), (96, 48, 'W')], 'Flagstaff, Ariz.': [(35, 13, 'N'), (111, 41, 'W')], 'Fort Worth, Tex.': [(32, 43, 'N'), (97, 19, 'W')], 'Fresno, Calif.': [(36, 44, 'N'), (119, 48, 'W')], 'Grand Junction, Colo.': [(39, 5, 'N'), (108, 33, 'W')], 'Grand Rapids, Mich.': [(42, 58, 'N'), (85, 40, 'W')], 'Havre, Mont.': [(48, 33, 'N'), (109, 43, 'W')], 'Helena, Mont.': [(46, 35, 'N'), (112, 2, 'W')], 'Honolulu, Hawaii': [(21, 18, 'N'), (157, 50, 'W')], 'Hot Springs, Ark.': [(34, 31, 'N'), (93, 3, 'W')], 'Houston, Tex.': [(29, 45, 'N'), (95, 21, 'W')], 'Idaho Falls, Idaho': [(43, 30, 'N'), (112, 1, 'W')], 'Indianapolis, Ind.': [(39, 46, 'N'), (86, 10, 'W')], 'Jackson, Miss.': [(32, 20, 'N'), (90, 12, 'W')], 'Jacksonville, Fla.': [(30, 22, 'N'), (81, 40, 'W')], 'Juneau, Alaska': [(58, 18, 'N'), (134, 24, 'W')], 'Kansas City, Mo.': [(39, 6, 'N'), (94, 35, 'W')], 'Key West, Fla.': [(24, 33, 'N'), (81, 48, 'W')], 'Kingston, Ont., Can.': [(44, 15, 'N'), (76, 30, 'W')], 'Klamath Falls, Ore.': [(42, 10, 'N'), (121, 44, 'W')], 'Knoxville, Tenn.': [(35, 57, 'N'), (83, 56, 'W')], 'Las Vegas, Nev.': [(36, 10, 'N'), (115, 12, 'W')], 'Lewiston, Idaho': [(46, 24, 'N'), (117, 2, 'W')], 'Lincoln, Neb.': [(40, 50, 'N'), (96, 40, 'W')], 'London, Ont., Can.': [(43, 2, 'N'), (81, 34, 'W')], 'Long Beach, Calif.': [(33, 46, 'N'), (118, 11, 'W')], 'Los Angeles, Calif.': [(34, 3, 'N'), (118, 15, 'W')], 'Louisville, Ky.': [(38, 15, 'N'), (85, 46, 'W')], 'Manchester, N.H.': [(43, 0, 'N'), (71, 30, 'W')], 'Memphis, Tenn.': [(35, 9, 'N'), (90, 3, 'W')], 'Miami, Fla.': [(25, 46, 'N'), (80, 12, 'W')], 'Milwaukee, Wis.': [(43, 2, 'N'), (87, 55, 'W')], 'Minneapolis, Minn.': [(44, 59, 'N'), (93, 14, 'W')], 'Mobile, Ala.': [(30, 42, 'N'), (88, 3, 'W')], 'Montgomery, Ala.': [(32, 21, 'N'), (86, 18, 'W')], 'Montpelier, Vt.': [(44, 15, 'N'), (72, 32, 'W')], 'Montreal, Que., Can.': [(45, 30, 'N'), (73, 35, 'W')], 'Moose Jaw, Sask., Can.': [(50, 37, 'N'), (105, 31, 'W')], 'Nashville, Tenn.': [(36, 10, 'N'), (86, 47, 'W')], 'Nelson, B.C., Can.': [(49, 30, 'N'), (117, 17, 'W')], 'New Haven, Conn.': [(41, 19, 'N'), (72, 55, 'W')], 'New Orleans, La.': [(29, 57, 'N'), (90, 4, 'W')], 'New York, N.Y.': [(40, 47, 'N'), (73, 58, 'W')], 'Newark, N.J.': [(40, 44, 'N'), (74, 10, 'W')], 'Nome, Alaska': [(64, 25, 'N'), (165, 30, 'W')], 'Oakland, Calif.': [(37, 48, 'N'), (122, 16, 'W')], 'Oklahoma City, Okla.': [(35, 26, 'N'), (97, 28, 'W')], 'Omaha, Neb.': [(41, 15, 'N'), (95, 56, 'W')], 'Ottawa, Ont., Can.': [(45, 24, 'N'), (75, 43, 'W')], 'Philadelphia, Pa.': [(39, 57, 'N'), (75, 10, 'W')], 'Phoenix, Ariz.': [(33, 29, 'N'), (112, 4, 'W')], 'Pierre, S.D.': [(44, 22, 'N'), (100, 21, 'W')], 'Pittsburgh, Pa.': [(40, 27, 'N'), (79, 57, 'W')], 'Portland, Maine': [(43, 40, 'N'), (70, 15, 'W')], 'Portland, Ore.': [(45, 31, 'N'), (122, 41, 'W')], 'Providence, R.I.': [(41, 50, 'N'), (71, 24, 'W')], 'Quebec, Que., Can.': [(46, 49, 'N'), (71, 11, 'W')], 'Raleigh, N.C.': [(35, 46, 'N'), (78, 39, 'W')], 'Reno, Nev.': [(39, 30, 'N'), (119, 49, 'W')], 'Richfield, Utah': [(38, 46, 'N'), (112, 5, 'W')], 'Richmond, Va.': [(37, 33, 'N'), (77, 29, 'W')], 'Roanoke, Va.': [(37, 17, 'N'), (79, 57, 'W')], 'Sacramento, Calif.': [(38, 35, 'N'), (121, 30, 'W')], 'Salt Lake City, Utah': [(40, 46, 'N'), (111, 54, 'W')], 'San Antonio, Tex.': [(29, 23, 'N'), (98, 33, 'W')], 'San Diego, Calif.': [(32, 42, 'N'), (117, 10, 'W')], 'San Francisco, Calif.': [(37, 47, 'N'), (122, 26, 'W')], 'San Jose, Calif.': [(37, 20, 'N'), (121, 53, 'W')], 'San Juan, P.R.': [(18, 30, 'N'), (66, 10, 'W')], 'Santa Fe, N.M.': [(35, 41, 'N'), (105, 57, 'W')], 'Savannah, Ga.': [(32, 5, 'N'), (81, 5, 'W')], 'Seattle, Wash.': [(47, 37, 'N'), (122, 20, 'W')], 'Shreveport, La.': [(32, 28, 'N'), (93, 42, 'W')], 'Sioux Falls, S.D.': [(43, 33, 'N'), (96, 44, 'W')], 'Sitka, Alaska': [(57, 10, 'N'), (135, 15, 'W')], 'Spokane, Wash.': [(47, 40, 'N'), (117, 26, 'W')], 'Springfield, Ill.': [(39, 48, 'N'), (89, 38, 'W')], 'Springfield, Mass.': [(42, 6, 'N'), (72, 34, 'W')], 'Springfield, Mo.': [(37, 13, 'N'), (93, 17, 'W')], 'St. John, N.B., Can.': [(45, 18, 'N'), (66, 10, 'W')], 'St. Louis, Mo.': [(38, 35, 'N'), (90, 12, 'W')], 'Syracuse, N.Y.': [(43, 2, 'N'), (76, 8, 'W')], 'Tampa, Fla.': [(27, 57, 'N'), (82, 27, 'W')], 'Toledo, Ohio': [(41, 39, 'N'), (83, 33, 'W')], 'Toronto, Ont., Can.': [(43, 40, 'N'), (79, 24, 'W')], 'Tulsa, Okla.': [(36, 9, 'N'), (95, 59, 'W')], 'Vancouver, B.C., Can.': [(49, 13, 'N'), (123, 6, 'W')], 'Victoria, B.C., Can.': [(48, 25, 'N'), (123, 21, 'W')], 'Virginia Beach, Va.': [(36, 51, 'N'), (75, 58, 'W')], 'Washington, D.C.': [(38, 53, 'N'), (77, 2, 'W')], 'Wichita, Kan.': [(37, 43, 'N'), (97, 17, 'W')], 'Wilmington, N.C.': [(34, 14, 'N'), (77, 57, 'W')], 'Winnipeg, Man., Can.': [(49, 54, 'N'), (97, 7, 'W')]} Feel free to use it. It'd be cool to have a large repository of pre-filled data structures e.g. every bone in the body, animals paired with their latin names, whatever. Some could be simple lists, others more nested like above, which contains lists of tuples in a dictionary with strings for keys. One thing I did almost on the first day with the above structure is convert it to XML, not because I wanted them to understand the code (even though it's short) but because I wanted them to start eyeballing XML as yet another way to store structured data. Kirby

Yes! Like a rapper, you must have REALNESS to get over! A helpful recurring activity was asking kids to google image search a background for simple 2-D games and demos. This way, they get some random, yet real, data to use: the width, height, filename, URL, etc. bgsize = width, height = (800, 600) Kevin On 7/11/07, kirby urner <kirby.urner@gmail.com> wrote:
On 7/11/07, Kevin Driscoll <driscollkevin@gmail.com> wrote:
Three years ago, I was definitely on the lexical path and would have expected students to be able to answer Andy's question after a couple class meetings. However, in my most recent course, I used PyGame and exposed students to object-oriented data structures first and logic / algorithms second.
Hi Kevin --
You latter approach sounds more similar to mine.
On the subject of data structures, I also recommend providing them with some large pre-populated ones to play with i.e. already filled with substantial "real world" content.
One might think it makes no difference just going {'foo':'bar'} all the time i.e. using little "meaningless" constructs so we can just study the object's API.
But especially for newbies we're trying to recruit for the longer haul, I think it adds another dimension to get to play with something like this:
cities = { 'Albany, N.Y.': [(42, 40, 'N'), (73, 45, 'W')], 'Albuquerque, N.M.': [(35, 5, 'N'), (106, 39, 'W')], 'Amarillo, Tex.': [(35, 11, 'N'), (101, 50, 'W')], 'Anchorage, Alaska': [(61, 13, 'N'), (149, 54, 'W')], 'Atlanta, Ga.': [(33, 45, 'N'), (84, 23, 'W')], 'Austin, Tex.': [(30, 16, 'N'), (97, 44, 'W')], 'Baker, Ore.': [(44, 47, 'N'), (117, 50, 'W')], 'Baltimore, Md.': [(39, 18, 'N'), (76, 38, 'W')], 'Bangor, Maine': [(44, 48, 'N'), (68, 47, 'W')], 'Birmingham, Ala.': [(33, 30, 'N'), (86, 50, 'W')], 'Bismarck, N.D.': [(46, 48, 'N'), (100, 47, 'W')], 'Boise, Idaho': [(43, 36, 'N'), (116, 13, 'W')], 'Boston, Mass.': [(42, 21, 'N'), (71, 5, 'W')], 'Buffalo, N.Y.': [(42, 55, 'N'), (78, 50, 'W')], 'Calgary, Alba., Can.': [(51, 1, 'N'), (114, 1, 'W')], 'Carlsbad, N.M.': [(32, 26, 'N'), (104, 15, 'W')], 'Charleston, S.C.': [(32, 47, 'N'), (79, 56, 'W')], 'Charleston, W. Va.': [(38, 21, 'N'), (81, 38, 'W')], 'Charlotte, N.C.': [(35, 14, 'N'), (80, 50, 'W')], 'Cheyenne, Wyo.': [(41, 9, 'N'), (104, 52, 'W')], 'Chicago, Ill.': [(41, 50, 'N'), (87, 37, 'W')], 'Cincinnati, Ohio': [(39, 8, 'N'), (84, 30, 'W')], 'Cleveland, Ohio': [(41, 28, 'N'), (81, 37, 'W')], 'Columbia, S.C.': [(34, 0, 'N'), (81, 2, 'W')], 'Columbus, Ohio': [(40, 0, 'N'), (83, 1, 'W')], 'Dallas, Tex.': [(32, 46, 'N'), (96, 46, 'W')], 'Denver, Colo.': [(39, 45, 'N'), (105, 0, 'W')], 'Des Moines, Iowa': [(41, 35, 'N'), (93, 37, 'W')], 'Detroit, Mich.': [(42, 20, 'N'), (83, 3, 'W')], 'Dubuque, Iowa': [(42, 31, 'N'), (90, 40, 'W')], 'Duluth, Minn.': [(46, 49, 'N'), (92, 5, 'W')], 'Eastport, Maine': [(44, 54, 'N'), (67, 0, 'W')], 'Edmonton, Alb., Can.': [(53, 34, 'N'), (113, 28, 'W')], 'El Centro, Calif.': [(32, 38, 'N'), (115, 33, 'W')], 'El Paso, Tex.': [(31, 46, 'N'), (106, 29, 'W')], 'Eugene, Ore.': [(44, 3, 'N'), (123, 5, 'W')], 'Fargo, N.D.': [(46, 52, 'N'), (96, 48, 'W')], 'Flagstaff, Ariz.': [(35, 13, 'N'), (111, 41, 'W')], 'Fort Worth, Tex.': [(32, 43, 'N'), (97, 19, 'W')], 'Fresno, Calif.': [(36, 44, 'N'), (119, 48, 'W')], 'Grand Junction, Colo.': [(39, 5, 'N'), (108, 33, 'W')], 'Grand Rapids, Mich.': [(42, 58, 'N'), (85, 40, 'W')], 'Havre, Mont.': [(48, 33, 'N'), (109, 43, 'W')], 'Helena, Mont.': [(46, 35, 'N'), (112, 2, 'W')], 'Honolulu, Hawaii': [(21, 18, 'N'), (157, 50, 'W')], 'Hot Springs, Ark.': [(34, 31, 'N'), (93, 3, 'W')], 'Houston, Tex.': [(29, 45, 'N'), (95, 21, 'W')], 'Idaho Falls, Idaho': [(43, 30, 'N'), (112, 1, 'W')], 'Indianapolis, Ind.': [(39, 46, 'N'), (86, 10, 'W')], 'Jackson, Miss.': [(32, 20, 'N'), (90, 12, 'W')], 'Jacksonville, Fla.': [(30, 22, 'N'), (81, 40, 'W')], 'Juneau, Alaska': [(58, 18, 'N'), (134, 24, 'W')], 'Kansas City, Mo.': [(39, 6, 'N'), (94, 35, 'W')], 'Key West, Fla.': [(24, 33, 'N'), (81, 48, 'W')], 'Kingston, Ont., Can.': [(44, 15, 'N'), (76, 30, 'W')], 'Klamath Falls, Ore.': [(42, 10, 'N'), (121, 44, 'W')], 'Knoxville, Tenn.': [(35, 57, 'N'), (83, 56, 'W')], 'Las Vegas, Nev.': [(36, 10, 'N'), (115, 12, 'W')], 'Lewiston, Idaho': [(46, 24, 'N'), (117, 2, 'W')], 'Lincoln, Neb.': [(40, 50, 'N'), (96, 40, 'W')], 'London, Ont., Can.': [(43, 2, 'N'), (81, 34, 'W')], 'Long Beach, Calif.': [(33, 46, 'N'), (118, 11, 'W')], 'Los Angeles, Calif.': [(34, 3, 'N'), (118, 15, 'W')], 'Louisville, Ky.': [(38, 15, 'N'), (85, 46, 'W')], 'Manchester, N.H.': [(43, 0, 'N'), (71, 30, 'W')], 'Memphis, Tenn.': [(35, 9, 'N'), (90, 3, 'W')], 'Miami, Fla.': [(25, 46, 'N'), (80, 12, 'W')], 'Milwaukee, Wis.': [(43, 2, 'N'), (87, 55, 'W')], 'Minneapolis, Minn.': [(44, 59, 'N'), (93, 14, 'W')], 'Mobile, Ala.': [(30, 42, 'N'), (88, 3, 'W')], 'Montgomery, Ala.': [(32, 21, 'N'), (86, 18, 'W')], 'Montpelier, Vt.': [(44, 15, 'N'), (72, 32, 'W')], 'Montreal, Que., Can.': [(45, 30, 'N'), (73, 35, 'W')], 'Moose Jaw, Sask., Can.': [(50, 37, 'N'), (105, 31, 'W')], 'Nashville, Tenn.': [(36, 10, 'N'), (86, 47, 'W')], 'Nelson, B.C., Can.': [(49, 30, 'N'), (117, 17, 'W')], 'New Haven, Conn.': [(41, 19, 'N'), (72, 55, 'W')], 'New Orleans, La.': [(29, 57, 'N'), (90, 4, 'W')], 'New York, N.Y.': [(40, 47, 'N'), (73, 58, 'W')], 'Newark, N.J.': [(40, 44, 'N'), (74, 10, 'W')], 'Nome, Alaska': [(64, 25, 'N'), (165, 30, 'W')], 'Oakland, Calif.': [(37, 48, 'N'), (122, 16, 'W')], 'Oklahoma City, Okla.': [(35, 26, 'N'), (97, 28, 'W')], 'Omaha, Neb.': [(41, 15, 'N'), (95, 56, 'W')], 'Ottawa, Ont., Can.': [(45, 24, 'N'), (75, 43, 'W')], 'Philadelphia, Pa.': [(39, 57, 'N'), (75, 10, 'W')], 'Phoenix, Ariz.': [(33, 29, 'N'), (112, 4, 'W')], 'Pierre, S.D.': [(44, 22, 'N'), (100, 21, 'W')], 'Pittsburgh, Pa.': [(40, 27, 'N'), (79, 57, 'W')], 'Portland, Maine': [(43, 40, 'N'), (70, 15, 'W')], 'Portland, Ore.': [(45, 31, 'N'), (122, 41, 'W')], 'Providence, R.I.': [(41, 50, 'N'), (71, 24, 'W')], 'Quebec, Que., Can.': [(46, 49, 'N'), (71, 11, 'W')], 'Raleigh, N.C.': [(35, 46, 'N'), (78, 39, 'W')], 'Reno, Nev.': [(39, 30, 'N'), (119, 49, 'W')], 'Richfield, Utah': [(38, 46, 'N'), (112, 5, 'W')], 'Richmond, Va.': [(37, 33, 'N'), (77, 29, 'W')], 'Roanoke, Va.': [(37, 17, 'N'), (79, 57, 'W')], 'Sacramento, Calif.': [(38, 35, 'N'), (121, 30, 'W')], 'Salt Lake City, Utah': [(40, 46, 'N'), (111, 54, 'W')], 'San Antonio, Tex.': [(29, 23, 'N'), (98, 33, 'W')], 'San Diego, Calif.': [(32, 42, 'N'), (117, 10, 'W')], 'San Francisco, Calif.': [(37, 47, 'N'), (122, 26, 'W')], 'San Jose, Calif.': [(37, 20, 'N'), (121, 53, 'W')], 'San Juan, P.R.': [(18, 30, 'N'), (66, 10, 'W')], 'Santa Fe, N.M.': [(35, 41, 'N'), (105, 57, 'W')], 'Savannah, Ga.': [(32, 5, 'N'), (81, 5, 'W')], 'Seattle, Wash.': [(47, 37, 'N'), (122, 20, 'W')], 'Shreveport, La.': [(32, 28, 'N'), (93, 42, 'W')], 'Sioux Falls, S.D.': [(43, 33, 'N'), (96, 44, 'W')], 'Sitka, Alaska': [(57, 10, 'N'), (135, 15, 'W')], 'Spokane, Wash.': [(47, 40, 'N'), (117, 26, 'W')], 'Springfield, Ill.': [(39, 48, 'N'), (89, 38, 'W')], 'Springfield, Mass.': [(42, 6, 'N'), (72, 34, 'W')], 'Springfield, Mo.': [(37, 13, 'N'), (93, 17, 'W')], 'St. John, N.B., Can.': [(45, 18, 'N'), (66, 10, 'W')], 'St. Louis, Mo.': [(38, 35, 'N'), (90, 12, 'W')], 'Syracuse, N.Y.': [(43, 2, 'N'), (76, 8, 'W')], 'Tampa, Fla.': [(27, 57, 'N'), (82, 27, 'W')], 'Toledo, Ohio': [(41, 39, 'N'), (83, 33, 'W')], 'Toronto, Ont., Can.': [(43, 40, 'N'), (79, 24, 'W')], 'Tulsa, Okla.': [(36, 9, 'N'), (95, 59, 'W')], 'Vancouver, B.C., Can.': [(49, 13, 'N'), (123, 6, 'W')], 'Victoria, B.C., Can.': [(48, 25, 'N'), (123, 21, 'W')], 'Virginia Beach, Va.': [(36, 51, 'N'), (75, 58, 'W')], 'Washington, D.C.': [(38, 53, 'N'), (77, 2, 'W')], 'Wichita, Kan.': [(37, 43, 'N'), (97, 17, 'W')], 'Wilmington, N.C.': [(34, 14, 'N'), (77, 57, 'W')], 'Winnipeg, Man., Can.': [(49, 54, 'N'), (97, 7, 'W')]}
Feel free to use it. It'd be cool to have a large repository of pre-filled data structures e.g. every bone in the body, animals paired with their latin names, whatever.
Some could be simple lists, others more nested like above, which contains lists of tuples in a dictionary with strings for keys.
One thing I did almost on the first day with the above structure is convert it to XML, not because I wanted them to understand the code (even though it's short) but because I wanted them to start eyeballing XML as yet another way to store structured data.
Kirby _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig

Here's the most elegant solution I could come up with:
teachers = {'Mr. Judkis':'Excellent Choice', 'Mrs. McGrath':'Also a fine choice.'} name = raw_input() while name not in teachers.keys(): print 'Wrong, sorry.' name = raw_input() print teachers[name]
--Tom
Here's another solution incorporating Laura's suggestion that we introduce exception handling earlier rather than later. It also emphasizes the imprisoning nature of the while loop, plus reminds students about the continue statement: def pickone(rightanswer): inprison = True while inprison: # ask answer = raw_input("Who's the fairest of them all?: ") try: assert answer.upper() == rightanswer.upper() except AssertionError: # no good! continue # loop again inprison = False print "You got it right!"
reload(sillystory) <module 'sillystory' from '/home/kirby/sillystory.py'>
sillystory.pickone("Evil Queen") Who's the fairest of them all?: Snow White Who's the fairest of them all?: President Bush Who's the fairest of them all?: Obama? Who's the fairest of them all?: Evil Queen You got it right!
Good thing to toss in that upper() stuff so a user doesn't get penalized for capitalizing incorrectly. As far as testing goes, I think the realistic thing is to let students write and debug. Having to write out code longhand in pencil, with no ability to check the code is very *not* a simulation of real programming conditions, where we rely on the interpreter to close the feedback loop. This is akin to Laura's suggestion of focusing on unit testing, except we're just letting the interpreter play that role for these simple constructions. So a testing environment should give free reign to the docs, as well as to the interpreter. Then cut and paste the finished code to a static text box, if that's what's required. Any handwriting should count as marks off the teacher's grade. Given the above, other questions for the student might be: modify the above code to give the user a hint after 3 false tries, with the hint passed as a parameter. Now modify the code further to cause it to exit, with a failure message, after ten false guesses. Kirby

Andy, I certainly didn't mean to imply that you were a wise-guy! And if you've been teaching them that sort of structure, it would definitely NOT be the wise-guy answer. I have to admit to not particularly liking (and not teaching) the while True: approach myself, simply because it separates the conditions for ending the loop from the top of the loop where one tends to look for such things. In more complex code this can lead to bugs. Not to say it can't be made to work brilliantly, mind you, but it can also lead to spaghetti like code if you're not careful. Off the top of my head, I would be looking for something like this ... resp = raw_input("Who is hottest teacher?") while resp != "Mr. Judkis" and resp != "Mrs. McGrath": print "Wrong, sorry..." resp = raw_input("Who is hottest teacher?") # must be one of the two if you make it here if resp == "Mr. Judkis": print "Excellent choice!" else: print "Also a fine choice." I completely agree that getting them to synthesize is the hard thing, and in my experience it gets MUCH harder in a test situation. Your description of their behavior suggests to me that they had already written the problem off as "impossible" before they even got to the review session. I wouldn't pretend to guess why that is, having suffered through similar experiences myself. As I was finishing this Laura's post came in, she makes some very good points, but I want to strongly second this:
I guess the only way to find out is to ask your students.
When I started giving students little surveys to fill out at the end of each programming unit I found it very helpful in deciding what worked and why. Cheers, Vern Andy Judkis wrote:
Vern, Richard,
Your comments were very helpful -- it's sometimes hard for me to see the question as a student would. They can imitate nicely, but asking them to analyze and synthesize (as this question does, at a very superficial level) seems to be asking a lot -- yet it's the essence of programming.
Reading between the lines of Vern's message, I wonder how he would want students to answer the question. What I was looking for was more or less what he considered the wise-guy answer:
while True: resp = raw_input("Who is hottest teacher?") if resp == "Mr. Judkis": print "Excellent choice!" break elif resp == "Mrs. McGrath": print "Also a fine choice." break else: print "Wrong, sorry. . ."
I would have expected this question to be easy after 4 weeks of this stuff. They have certainly done things a lot like it quite a few times. I had given out the questions ahead of time and encouraged the kids to work together on them, yet the day before the test, everyone seemed stumped. I went over it in class in detail, and yet when they took the test, some kids still missed critical things -- they put the raw_input outside the loop, they left out the breaks, they left out the while altogether -- suggesting to me that they're trying to use recall and imitation, and don't really "get it" in a useful way. I'm coming to the conclusion that either: 1) my expectations are unreasonable, or 2) my approach to the material is completely wrong -- at this point, after 6 laps around the track, it isn't just a matter of tweaking something. 3) or perhaps some of both.
I should add that we start out with a week of RUR-PLE, learning about loops and branches and subroutines, and that seems to go quite well -- it's only when we move to IDLE that things start to go out of focus.
Thanks, Andy
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137

Andy Judkis wrote:
I've just completed my 6th semester as a teacher, teaching 2 sections per semester of a 10th grade course that includes a 4 week introduction to programming in Python. Here's a question from one of my exams:
Write Python code that will ask the user how who is the best looking teacher in the school. The program must loop until the user responds either "Mrs. McGrath" or "Mr. Judkis". If the use responds "Mr. Judkis", the program must print out "Excellent choice." If the user responds "Mrs. McGrath", the program must print out "Also a fine choice." If the user responds with anything else, the program must print out "Wrong, sorry." and ask again.
The first sentence of this question is awkwardly worded, "ask the user how who is" -- did you mean "ask the user who is"?
Rather than catalog my frustrations, let me just pose a question to you all -- how much Python exposure do you think it should take before a student should be able to answer this question? If a student can't even answer this, is it reasonable to say that they have learned any programming at all? (I know that they might have learned something -about- programming, but that is not the same thing.)
No, if they cannot answer this then they have NOT learned any programming at all. It requires them to demonstrate the four very basic programming concepts of input, output, conditional branching and operand comparison. I would expect a student to grasp those in the first afternoon of the course, or perhaps two afternoons. I would not expect them to understand formatted I/O or container types like lists/tuples or even modules, but the act of writing a string, reading a string, comparing two strings and printing a string, yes, they should have those down pat very quickly. So what were your frustrations? I'm really curious. I don't have the opportunity to ever speak with a teacher of formal education, so I don't know what their world is like. -Jeff

Rather than catalog my frustrations, let me just pose a question to you all -- how much Python exposure do you think it should take before a student should be able to answer this question? If a student can't even answer this, is it reasonable to say that they have learned any programming at all? (I know that they might have learned something -about- programming, but that is not the same thing.)
No, if they cannot answer this then they have NOT learned any programming at all. It requires them to demonstrate the four very basic programming concepts of input, output, conditional branching and operand comparison. I would expect a student to grasp those in the first afternoon of the course, or perhaps two afternoons. I would not expect them to understand formatted I/O or container types like lists/tuples or even modules, but the act of writing a string, reading a string, comparing two strings and printing a string, yes, they should have those down pat very quickly.
So what were your frustrations? I'm really curious. I don't have the opportunity to ever speak with a teacher of formal education, so I don't know what their world is like.
-Jeff
Jeff, Your thoughts are very much like mine were -- the problem is so trivial and obvious that anyone who's spent a little time with the material should see the solution immediately. But my experience shows that that's simply not true. This stuff is just hard for most kids, even bright ones. When I was in college in the late 70s, I worked as a research assistant at Pitt, working with people studying expert/novice differences in Physics problem solving. (http://www.garfield.library.upenn.edu/classics1993/A1993LZ47400001.pdf) The outcome of the study (which seemed pretty predictable to me) was that experts used concepts like momentum and energy to approach the problems, while novices used cues like "spring" and "inclined plane" to figure out what to do. I think something similar happens with programming. Most programming instruction that I've seen starts off by having the kids copy programs and make changes to them, and over time the ones that stick with it build up some conceptual understanding of what's going on. It just seems to take longer than I would expect. Thanks, Andy

Andy Judkis wrote:
Jeff,
Your thoughts are very much like mine were -- the problem is so trivial and obvious that anyone who's spent a little time with the material should see the solution immediately. But my experience shows that that's simply not true. This stuff is just hard for most kids, even bright ones.
When I was in college in the late 70s, I worked as a research assistant at Pitt, working with people studying expert/novice differences in Physics problem solving. (http://www.garfield.library.upenn.edu/classics1993/A1993LZ47400001.pdf) The outcome of the study (which seemed pretty predictable to me) was that experts used concepts like momentum and energy to approach the problems, while novices used cues like "spring" and "inclined plane" to figure out what to do. I think something similar happens with programming. Most programming instruction that I've seen starts off by having the kids copy programs and make changes to them, and over time the ones that stick with it build up some conceptual understanding of what's going on. It just seems to take longer than I would expect.
Taken for what its worth as an outsider to the educational system, I've never seen much focus on teaching people "*how* to learn" an arbitrary topic. It so often seems to be trickery (not in a malicious sense) and indirection, to reach that ah-ha moment. Learning is about recognizing patterns in the world around you and relating them to an internal map of concepts - once you get that, you can learn anything. Of course some form of guidance in adding unfamiliar concepts to your map is necessary, but by their nature those concepts are highly reusable from one field of study to another, And the so often stated idea of "you have to keep learning all your life these days" really means to actively seek out and internalize new concepts in advance so you are prepared to relate your experiences to them. The details don't matter so much as your brain will pick them up as needed. That may make no sense - it is 9am on a Saturday morning - not my usual time to be up at all (being a night person). Here in the Dallas Python usersgroup, we've been talking about running full-day classes to teach new people to program in Python. We get a mix of attendees, those who know it and want to talk about cool modules, and those who come out of curiosity and wonder if this is the place to learn programming. They don't mix well, and we lose those who are new to programming (we don't have enough people to split into two groups). So we're considering every quarter reserving one meeting for a full-day basics course. If we do this, we'll have to locate/polish up suitable courseware, and perhaps in the process we'll gain a better appreciation of the challenges people face in learning how to program. -Jeff

On 7/7/07, Jeff Rush <jeff@taupro.com> wrote:
Taken for what its worth as an outsider to the educational system, I've never seen much focus on teaching people "*how* to learn" an arbitrary topic. It so often seems to be trickery (not in a malicious sense) and indirection, to reach that ah-ha moment.
This is what I like about the O'Reilly 'Head First' series, which pays a lot of conscious attention to "metacognition". http://safari.oreilly.com/0596008678/hfobjects-preface-2-sect-4?imagepage=xx... Some of the pedagogical principles (spelled out in each book): Make it visual (words within or near graphics) Conversational and personalized style (what math books often avoid -- too proud) Keep it weird (unusual, surprising) Related: http://worldgame.blogspot.com/2005/01/brainstorming-about-pedagogy.html http://mail.python.org/pipermail/edu-sig/2003-October/003204.html http://mail.python.org/pipermail/edu-sig/2007-February/007740.html http://www.mail-archive.com/edu-sig@python.org/msg03821.html Kirby

To capitalize on the reference to the Head First series, let me add my own somewhat self-serving plug. Right now I'm laboring away on storyboards for Head First Programming with Python, which is intended for first time programmers, people who've MAYBE looked at HTML, but nothing more. Somewhat the same space as Zelle's book, but from the Head First perspective. (Should be out in about a year, give or take, all support appreciated, etc...) In going through the whole Head First process - initial interview, audition, proposal, production - I've never met a group of people quite so obsessed with the details of how people learn stuff. That's saying something, since I've spent 20 years in schools filled with great teachers. So if you find yourself looking for new approaches to your material, I would also really recommend taking some time to look at Head First Design Patterns and Head First HTML and CSS (or any of the series) to see how they work through some very tricky concepts with graphics and humor. Cheers, Vern kirby urner wrote:
On 7/7/07, Jeff Rush <jeff@taupro.com> wrote:
Taken for what its worth as an outsider to the educational system, I've never seen much focus on teaching people "*how* to learn" an arbitrary topic. It so often seems to be trickery (not in a malicious sense) and indirection, to reach that ah-ha moment.
This is what I like about the O'Reilly 'Head First' series, which pays a lot of conscious attention to "metacognition".
http://safari.oreilly.com/0596008678/hfobjects-preface-2-sect-4?imagepage=xx...
Some of the pedagogical principles (spelled out in each book):
Make it visual (words within or near graphics) Conversational and personalized style (what math books often avoid -- too proud) Keep it weird (unusual, surprising)
Related:
http://worldgame.blogspot.com/2005/01/brainstorming-about-pedagogy.html http://mail.python.org/pipermail/edu-sig/2003-October/003204.html http://mail.python.org/pipermail/edu-sig/2007-February/007740.html http://www.mail-archive.com/edu-sig@python.org/msg03821.html
Kirby _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137

Right now I'm laboring away on storyboards for Head First Programming with Python, which is intended for first time programmers, people who've MAYBE looked at HTML, but nothing more. Somewhat the same space as Zelle's book, but from the Head First perspective. (Should be out in about a year, give or take, all support appreciated, etc...)
Hey Vern, I'm glad someone's doing this! There's been some hope about getting Python into the Head First pipeline. A couple years ago O'Reilly was skeptical there was a big enough market (they track this stuff pretty closely, as we've learned at various OSCONs). So your landing this fish is also indicative of Python's continued expansion. I hope edu-sig proves a relevant source of ideas. Probably you won't be using the __ribs__ idea (snakes have lots of 'em), but if you don't know what I mean, I'll plug my Europython slides again (I'm spreading the __rib__ idea in Vilnius). http://www.4dsolutions.net/presentations/connectingthedots.pdf Wondering if you're playing up the Monty Python angle much either. I think that too is highly reflective of Python's (and Guido's) playful side.
-- This time for sure! -Bullwinkle J. Moose
So maybe this was your secret (cartoon allusions). Kirby
----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137

Thanks Kirby, Of course this is Programming *with* Python, i.e., programming is the primary focus, and we'll be staying away from purely python idioms for the most part, but I too am glad that O'Reilly's beginner's book is *not* Head First Programming with Ruby, say... ;-) As to __ribs__, I've been on edu-sig long enough to know what you mean. I haven't yet figured out what the approach will be with objects, which will be introduced toward the end. The animal idea you've mentioned is attractive, though. The rules (formal and informal) of Head First land mean that there probably won't be much direct reference to the Pythons (Monty), which I sort of regret... after all, I've spent a lifetime memorizing those skits... ;-) But yeah, I'm hopeful that a HF beginners book using Python will mean a full-blown Python book is next in the works. Cheers, Vern kirby urner wrote:
Right now I'm laboring away on storyboards for Head First Programming with Python, which is intended for first time programmers, people who've MAYBE looked at HTML, but nothing more. Somewhat the same space as Zelle's book, but from the Head First perspective. (Should be out in about a year, give or take, all support appreciated, etc...)
Hey Vern, I'm glad someone's doing this!
There's been some hope about getting Python into the Head First pipeline. A couple years ago O'Reilly was skeptical there was a big enough market (they track this stuff pretty closely, as we've learned at various OSCONs). So your landing this fish is also indicative of Python's continued expansion.
I hope edu-sig proves a relevant source of ideas. Probably you won't be using the __ribs__ idea (snakes have lots of 'em), but if you don't know what I mean, I'll plug my Europython slides again (I'm spreading the __rib__ idea in Vilnius).
http://www.4dsolutions.net/presentations/connectingthedots.pdf
Wondering if you're playing up the Monty Python angle much either. I think that too is highly reflective of Python's (and Guido's) playful side.
-- This time for sure! -Bullwinkle J. Moose
So maybe this was your secret (cartoon allusions).
Kirby
----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
-- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder@canterburyschool.org; 260-436-0746; FAX: 260-436-5137

kirby urner wrote:
I hope edu-sig proves a relevant source of ideas. Probably you won't be using the __ribs__ idea (snakes have lots of 'em), but if you don't know what I mean, I'll plug my Europython slides again (I'm spreading the __rib__ idea in Vilnius).
http://www.4dsolutions.net/presentations/connectingthedots.pdf
Kirby, those slides are interesting, but having a voiceover explaining them would be great. With the work you've put into them, you should consider screencasting -- just flip the slides and talk into a microphone for us. For how to do this, and an example, check out my screencast series on "Casting Your Knowledge, With Style" at: http://www.showmedo.com/videos/series?name=bETR23HwS Getting some of your talks into the can and onto showmedo.com would really be useful. -Jeff

Kirby, those slides are interesting, but having a voiceover explaining them would be great. With the work you've put into them, you should consider screencasting -- just flip the slides and talk into a microphone for us.
Yes, I have Camtasia Studio, did a recap of my OSCON 2005 presentation using that technique: http://worldgame.blogspot.com/2007/01/reviewing-my-oscon-2005-talk.html
For how to do this, and an example, check out my screencast series on "Casting Your Knowledge, With Style" at:
http://www.showmedo.com/videos/series?name=bETR23HwS
Getting some of your talks into the can and onto showmedo.com would really be useful.
-Jeff
Yes, I'd like to. I've been talking to Ian about getting five screencasts uploaded (doesn't include the above). He's got the videos, says they meet standards, is just waiting for me to write the descriptions -- while I wait for him to give me author status so I can do that. Showmedo uses higher resolution than Google Video, on which squinting at source code is rather painful. The five in the queue include these three: http://controlroom.blogspot.com/2007/01/python-for-math-teachers.html (the low rez versions -- require squinting). One problem of late is Camtasia doesn't work well with my integrated sound card in my main machine (especially since the last upgrade, which was supposed to *fix* sound problems but made mine more broken). They're aware of the problem and are working on it, but suggested I slip into something more Soundblaster compatible in the meantime. I haven't done that yet. http://controlroom.blogspot.com/2007/06/computer-anatomy.html Kirby

Dear Andy, I have been away and came late to this excellent discussion. I personally would have only taught the loop constructs without break at this level, and then it is true that the problem 'only' needs the basic syntactic components of loops, decisions, and compound logical expressions. I have found that students pick up ability with decisions very easily (often written in a non-optimal but successful fashion if there are multiple choices) and loops are a lot harder, even basic loops. What is left out is what is takes for the creative or logical steps to compose the pieces in previously unused ways. This is the major challenge, and I think Andy underestimated the amount of creativity required. One can scaffold, giving a student some ownership of a more complicated combination, but the scaffolding does exactly what the name suggests, providing a pre-supplied framework into which you can supply smaller pieces. It gives the illusion of completing more than you have, because a large part of the creative process is hidden in the pre-supplied framework. If you give another problem that needs the same framework, then you are fine. For instance, I have taught as a specific pattern loops with two possible end conditions, with the compound condition and decision after the loop. (Actually I taught it in the more complicated situation where the short-circuit order was important -- a linear sentinel search., where a very subtle bug is caused by the wrong order.) Without having specifically taught such a pattern before giving Andy's problem, I agree with Ivan, that a good logical/mathematical background is likely to make it much easier. Without either, it is a considerable creative process to put the syntax pieces together in the right combination. It would have been a lot easier if 'Mr. Judkis' were the only allowed answer. The idea of deferring the final response until after a conditional outside the loop is subtle for beginners. (I certainly use the scaffolding approach often, though I an still not sure how to use it most effectively to help students gain creative abilities to solve from scratch a problem with a completely *different unknown* pattern.) For me, teaching syntax is boring and straight-forward. Syntax and basic examples using one syntax element at a time do not take your students very far. It is a creative process to get a complicated problem and decide how to combine the basic syntax elements. Teaching the creative process is exciting and challenging, and often frustrating. Different students seem to need such different buildup and guidance. As far as I am concerned, teaching introductory programming is mostly about this creative process. Andy Harrington Andy Judkis wrote:
I've just completed my 6th semester as a teacher, teaching 2 sections per semester of a 10th grade course that includes a 4 week introduction to programming in Python. Here's a question from one of my exams:
Write Python code that will ask the user how who is the best looking teacher in the school. The program must loop until the user responds either "Mrs. McGrath" or "Mr. Judkis". If the use responds "Mr. Judkis", the program must print out "Excellent choice." If the user responds "Mrs. McGrath", the program must print out "Also a fine choice." If the user responds with anything else, the program must print out "Wrong, sorry." and ask again.
Rather than catalog my frustrations, let me just pose a question to you all -- how much Python exposure do you think it should take before a student should be able to answer this question? If a student can't even answer this, is it reasonable to say that they have learned any programming at all? (I know that they might have learned something -about- programming, but that is not the same thing.)
Thanks,
Andy Judkis
(By the way, anybody out there going to be at CS4HS next week at CMU? If so I'd love to get together with you . . )
-- Andrew N. Harrington Computer Science Department Director of Academic Programs Loyola University Chicago http://www.cs.luc.edu/~anh 512B Lewis Towers (office) Phone: 312-915-7999 Snail mail to Lewis Towers 416 Fax: 312-915-7998 820 North Michigan Avenue gdp@cs.luc.edu for graduate admin Chicago, Illinois 60611 upd@cs.luc.edu for undergrad admin aharrin@luc.edu as professor

I've been out painting my house, so I have some catching up to do as well. First, to respond to the post from Michael Tobis:
Sorry, but I don't think you've successfully motivated your students if that is all they can do in a month. Let me hazard a suggestion. Rather than being too mabitious you are not being ambitious enough.
I thank Andre for coming to my defense, but I think Michael's on the right track. The problem is that I haven't found something sufficiently motivating to get these kids to climb the hill. It's not that I haven't tried, but it hasn't worked out very well. I too try to get to graphics stuff as quickly as possible, but I think it isn't very meaningful without some control structure around it. I use the livewires API because it's the simplest I've found, requiring the least foundation, but it still takes a while to get to where you can do much. I've tried showing the kids VPython in the first week or two, and they think it's cool and can type stuff in but they have -no idea- what any of it means. I have not thought of a way to use it as anything other than entertainment. I would love to hear from someone who feels that they have a fairly successful high-school programming class. Specifically, I'd love to know in some detail what you cover in the first month. To respond to Vern's post about the Head First book - that is outstanding! I will be first in line to buy it. I love the idea of Head First-style books in high schools, someday I'd like to write one myself :-) To the extent that you're willing/permitted to talk about it, I'd be very interested in hearing about how you are presenting the material. And if you need a class of guinea pigs, I can probably deliver. To respond to Andrew Harrington's post: It's very humbling to me to see how much thought people put into breaking the concepts down into pieces, and thinking about how to present them. I thought I did a lot but this discussion has helped me to see how much I've overlooked. My background is in engineering, not education, and I started teaching after 20 or so years in various aspects of industry, including quite a few years programming in C and Java. Things that are intuitive are invisible -- it's hard for me to see what I'm really asking of the kids. I'm learning, but not quickly enough. To respond to John Zelle's post from a while back, about the complexity of some APIs interfering with kids learning the basics: yeah, that's the problem -- keeping kids motivated while laying the foundation. The parts that are necessary to provide the cool factor can obscure the real heart of the lesson. I'm seriously thinking about using Scratch rather than Python, for just that reason -- the cool factor is built-in, it's as accessible as "if" or "while". Thanks, Andy

I've tried showing the kids VPython in the first week or two, and they think it's cool and can type stuff in but they have -no idea- what any of it means. I have not thought of a way to use it as anything other than entertainment.
I would love to hear from someone who feels that they have a fairly successful high-school programming class. Specifically, I'd love to know in some detail what you cover in the first month.
I know some say "Kirby's stuff doesn't count" because high schoolers pay money to take my class and are hence "motivated" (not fair!), but I do consider my classes somewhat successful, in terms of high marks for the teacher (they grade me, but not vice versa, confidentially but I'm told I do well). The very day I get back from Lithuania, I start another class. 3.5 hours a day for four days. Rather intensive (especially with jet lag). Lots of VPython, POV-Ray, and maybe some X3D. I've written up my classes, blow by blow, in my blog a few times, plus have this whole CP4E page with a lot of writings. But maybe none of that counts. http://www.4dsolutions.net/ocn/pymath.html Plus I did a class for Portland Public Schools (all 8th graders @ Winterhaven). I was asked by the administration to make it more geographical in nature, and that's what I did. I'd like to explore this approach again sometime soon. http://www.4dsolutions.net/ocn/winterhaven/
I'm seriously thinking about using Scratch rather than Python, for just that reason -- the cool factor is built-in, it's as accessible as "if" or "while".
Why think either/or? Use Scratch *and* Python.
Thanks, Andy
_______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig

The very day I get back from Lithuania, I start another class. 3.5 hours a day for four days. Rather intensive (especially with jet lag). Lots of VPython, POV-Ray, and maybe some X3D.
Actually I guess it's only 2.5 hours a day, 10 hours total. Do they come out completely proficient in Python? No, of course not. Have I whet their appetites, are they more motivated than coming in? I think in most cases yes. There's no rush, in any case. Most of them are at the beginning of their high school careers. This is like previewing and overview, with a lot of encouragement to study on one's own (like we adults do). Speaking of jet lag, I've been up since 4:30 AM, after going to bet at 2 AM, after pizza with the Europython conference organizers, who flew in from Oslo late last night, after taking a train from Gothenberg. Now it's time for breakfast (yay). Hi Laura. Kirby

I know some say "Kirby's stuff doesn't count" because high schoolers pay money to take my class and are hence "motivated" (not fair!), but I do consider my classes somewhat successful, in terms of high marks for the teacher (they grade me, but not vice versa, confidentially but I'm told I do well).
Your circumstances are somewhat different but I don't feel like "your stuff doesn't count". It would be extremely interesting to hear how your kids approach the test question I presented that started this thing. You wanna pose it to them and see what happens?

I'm joining the discussion late; I'm going to respond on a couple of points that resonated with me, but forgive me for neglecting a few attributions. Also, I'm going to ramble a bit through some of the things I think about as a math educator. Hopefully I can make it work the trip for you to follow along. I don't teach programming. I teach math in a public school - algebra and geometry to 7th and 8th graders. While certainly there are differences, I think the core issues in teaching the style of analytical thinking are the same for programming and formal math. I've been teaching math for 8 years. I'm department head, National Board certified, my test scores are pretty good, the high school teachers generally say my students know their stuff. That being said, I honestly have no idea how to teach algebra. I'm not positive anyone does. I present the algorithms correctly. I give mnemonics, organizers, and shortcuts wherever I can. I show numerous examples, give the students plenty of practice, accurately diagnose (at least the proximate cause) and correct mistakes when students make them. Plenty of students are very successful. But some aren't, despite their and my (apparent) best efforts. In the more extreme of these cases, I tell the student and parents that he or she is simply not ready for algebra, that they can repeat the course next year and with a year of brain growth under their caps they will probably be very successful. And they almost always are. So at one level "not ready for algebra" is an entirely correct diagnosis. But then the question becomes: What's going on in the brain of the "ready" student that is different from the "not ready" student? Call that question A. Once we've answered questioned A, question B is obviously: Is there a different way to teach the "not ready" student so he/she can be successful earlier? Important question, but I don't think we have much chance of answering it until we make some progress on A, and from where I am in the trenches, I don't even see any work being done on it. Bit of an aside: The hip thing in education now is "brain research". Some consulting firm sells the school 200 copies of their book and charges us beaucoups of money for a three day inservice to tell us things like the average human brain can hold 3-10 "chunks" of data at a time; the amygdila is the part of the brain that controls attention and that we need to engage the amydilas of students if we wish to teach them; that students learn better when they're happy than when they are sad or mad. I'm quoting selectively only because my brain (amygdila and all) shuts down when I have to sit through this garbage. It's frustrating not because the notion of brain research in the service of is a bad idea, but because the brain research we need is the kind that answers question A, not the kind that tells us that students learn better if the walls are blue. Now, getting back to Andy's question. My first response to this was that as a teacher he should have had a pretty good idea of how students would do on this assignment because they should have been assessed informally on assignments like this one before. But as I thought about it before, I realized that there is a lot of room to debate what is meant by "assignments like this one". Does that mean an assignment with precisely the same logical structure but just different strings? Another "loop until" with slightly different conditions? Loops, input, and conditions separately? Or pairwise, but never all three? I constantly see example of students who are fluent with two skills individually but flail wildly when asked to compose them (e.g. they can do 2x+3x and 2/5+3/4 but not 2/5x+3/4x). Why some students fail at these composed tasks even when the interface between the modules is very clean is a big part of the answer to my "question A", and as I've said I don't think we're very far along in terms of answering it. As a practical matter, Andy, I think my answer to your question is that you need to give your students a lot more practice that is a lot more similar to what you plan to assess them on than your gut tells you you need. Whew. Sorry for the brain dump. My thought were a lot more focused in my head. The upshot is I don't think there is an easy answer. Programming computers is easy. Programming brains to program (or to combine like terms, or to solve systems, or whatever) is hard, particularly since a good portion of the brains at large seem to implement the algorithms according to different semantics than than the ones we intend. Hopefully one day we can reverse engineer these brains enough that we can program them effectively as well. Jay

On 7/8/07, Andy Judkis <ajudkis@verizon.net> wrote:
Your circumstances are somewhat different but I don't feel like "your stuff doesn't count". It would be extremely interesting to hear how your kids approach the test question I presented that started this thing. You wanna pose it to them and see what happens?
The question being who's the best teacher, you or that other person? ;-D I'm realizing my approach is to use a lot of scaffolding. That version of the Q&A I posted earlier in this thread, using assert/except, might figure in upcoming courses, with the challenges I mentioned. Showing multiple solutions to the same challenge, in advance of asking students to role their own, has a lot of appeal. I welcome this thread for having stimulated more than the usual number of brain cells (8? 10?). It was my good fortune to hobnob with Guido for a couple hours this evening, in this hotel lobby in Vilnius (where I am still to this late hour, jet lag be damned, chatting with my fellow geeks -- learning a lot). Hey thanks Guido, for being such a Benevolent DFL. And my thanks to Aiste, Laura et al, for putting your talents to good use in creating this Europython. Y'all're awesome. http://mybizmo.blogspot.com/2007/07/europython-hqs.html Kirby

On 7-Jul-07, at 9:04 PM, Andy Judkis wrote:
I'm seriously thinking about using Scratch rather than Python, for just that reason -- the cool factor is built-in, it's as accessible as "if" or "while".
I haven't been actively trying to teach my kids to program, but they know that's a big part of what I do (both for work and for fun), and they like computers a lot. I've attempted to put together an environment to teach them Python a few times, but got bogged down each time (too many projects). On the other hand, they both (my daughter is 10 and my son is 6) picked up Scratch right away and have been coming up with interesting ideas and uses for it ever since. They give up their (very limited, we have strict limits for all electronic media) time on the Nintendo DS in order to write Scratch code. Now my daughter is running into the limits of Scratch and her ambitions are exceeding those limits (and where she goes, my son soon tries to follow). I'm beginning to show her the ropes with PyGame and she is watching over my shoulder. When a sprite moved down instead of up when we pressed the up arrow, she said, "Let me fix it!" I handed my laptop over to her, she found the right spot, flipped the minus sign, and we tested it. So now she's fixed her first bug in Python code, I figure she's hooked. I've also got an order at Amazon for "Squeak: Learn Programming with Robots" that Ted Leung talks about (comparing Squeak to Python for his three daughters learning to use computers) here: http:// www.sauria.com/blog/education/1457. Julie Leung has her own perspective on it here: http://www.julieleung.com/archives/ 002073.html. This book has probably been mentioned here before, given that Andre has the first comment on Ted's blog. I don't yet know whether Squeak or Python will win my kids hearts and minds (maybe both?), but I do know Python and PyGame run on my new Nokia N800. All of this is anecdotal and non-academic. Just wanted to contribute my data point to the discussion. --Dethe "The good thing about reinventing the wheel is that you can get a round one." --Douglas Crockford
participants (13)
-
Andre Roberge
-
Andrew Harrington
-
Andy Judkis
-
Dethe Elza
-
Ivan Krstić
-
Jay Bloodworth
-
Jeff Rush
-
John Zelle
-
Kevin Driscoll
-
kirby urner
-
Michel Paul
-
Tom Hoffman
-
Vern Ceder