[Edu-sig] The fate of raw_input() in Python 3000

kirby urner kirby.urner at gmail.com
Sat Sep 9 01:02:37 CEST 2006


On 9/8/06, Dan Crosta <dcrosta at sccs.swarthmore.edu> wrote:

> But let's be realistic: my mom has only recently learned to understand
> email, she's not about to go out and program her own spam filter. It's
> just not in her skillset, and more importantly, her interest set. I
> think you're projecting a bit onto the entire world to think that people
> are going to program their dimmer switches.

Well, at one time the ability to type above 30 words a minute was
considered a highly specialized office skill.  Only a few people knew
how to drive cars (you had to be a pretty good mechanic, or count on
getting stranded).

Why *does* our culture assume these two classes:  those who know how
to program, and those who just use other peoples' programs?

CP4E at least raises this as a question.  To assume this dichotomy as
a given, and design curriculum around it, is to my way of thinking,
contrary to the goals of CP4E.

CP4E is not about *making* people become programmers (in the sense of
forcing), but nor is it about passively allowing Python to become the
tool of those who believe programming is only for the few.

I letting Python's good name get dragged through the mud by such "two
culture" elitists is contrary to our BDFL's fond hopes for his
language (and mine too -- really a lot of peoples').

I'd like to see basic programming and basic math taught as one and the
same subject.

I call it gnu math but others might call it something else.

If you know what F(x) means, and that F(x) = x^2, means a domain of
[1,2,3...] becomes a range of [1,4,9...] then how big a leap is it to
write:

>>> def F(x):  return x*x

>>> domain = range(10)

>>> output = [F(x) for x in domain]

etc.

It's really the same content, isn't it, just expressed in an interactive way.

Why should any 8th grader have any trouble at the above?

Why do we put up with a system that thinks this is "too hard" for
newbie X, and yet in *math class* that's precisely what newbie X is
expected to know.

We test and fail people for not getting math, not making the grade,
then we do extensive hand-holding as soon as the computer is involved.
 Why?

Seems hypocritical to me, for us to insist on math savvy as a
condition for a degree, but on computer literacy as an esoteric art
that one's mother should never have to know.

Very strange, very twisted.

> Let me draw a related example: it has recently become more or less
> impossible to own any content sold by the MPAA and television industry,
> and, less so, by the RIAA. HDMI makes it impossible to do anything other
> than watch what your cable box records on an expensive HDTV. If you were
> right, there'd be a million light switch-programming mom march on
> Washington and Hollywood protesting this insult to their rights.

Yes, a wonderful development.  I promote the future you just described.

> Now wake up: there isn't. People want their technology to do what it
> needs to do at a basic level, but aren't really out there extending it;
> whether we like it or not, we're the exception, not the rule, us people
> more comfortable at a keyboard than a mouse, more comfortable knowing
> how it works than just knowing that it *does* work.

That's precisely the "us versus them" attitude I'm fighting.  Now I
grant you:  the status quo is on your side.  But that doesn't mean I
support it.  I see Python as a *powerful* tool for making this state
of affairs go away.

Pretty much anyone can drive a car.  Maybe in a few years pretty much
anyone might import bedroom.dimmer from DwellingMachine and write a
few lines to put it on a timer.

True, not everyone will.  But if she's middle-aged and looks like a
mom, *is* a mom, yet does the, I hope you won't act surprised.

Python turned out to be that good.  They're not scared of computers
anymore, not leaving it to the guy geeks to explain it to 'em.

A Renaissance happened.

> As I said before, I think it's great that you're training the next
> generation to love the interactive interpreter rather than the monkey
> menus, if you will. I think it's great you're training people to be
> self-reliant and program for themselves first, then for others as a job
> but always still for themselves. Very Snow Crash. But not realistic, and

Thank you.  I like the "Very Snow Crash" identification.

Very science fiction.  Very futuristic.

Compare with my other thought:  Guido should be focusing on *coming
generations* with Python3000, not the needs of today's computer
illiterate, likely a dying species.

> not now. Maybe in 2036 when my generation (I'm 22) grows up and has kids
> of our own, maybe when I'm Dad, not Dan, people really will be able to
> program their light switch and microwave -- but I'm not sure what
> that'll really have gained us, my light switch and microwave work fine.
> Do yours?

Maybe not the best example, but I *do* want my DwellingMachine to have
an API.  I presumed it'd be Java a long time ago, when doing a
write-up for OMSI (our favorite science museum), but that was before
I'd discovered The Snake and its much simpler __rib__ syntax.

> > Start thinking like a professional really early.  Code for the back
> > office if it's back office (don't need no bells and whistles).
> >
> > Don't waste your life polishing API skills no job market will ever
> > need (i.e. some raw_input based dialog, menu tree, looks like a 1960s
> > mainframe).  Or rather, don't *start* with that.
>
> It's hard to claim that anything you learn in CS1 (or equivalent) is
> either polished or a skill. Instead, I think the point is to become
> familiar and comfortable with computers as more than a user, and if that
> happens to take the form of baby steps, menu monkies, GUI programming,
> or whatever, as long as it happens it's good. It's evident to all of us

But model any given school as "in competition" with other schools.

While yours trained you in raw_input menu trees, these other students
were going crazy in open range namespaces, and learning to teach their
peers the same way, even without any computer science teachers in the
room (Project Kusasa model).

I worry we're too plodding in CS0/CS1, too like the UK (dangerously
slow when it comes to change sometimes, not at all out here on the
Pacific Rim, where we compete with Singapore daily).

> that menu monkeying works, because that's how we all got trained
> programming and look where we are today. It seems fair to say that
> teaching through the interactive shell using functions and classes will
> accomplish the same goal.
>

Just why protest if raw_input, and the 1970s style of menu tree
prompting, is going away?  That was a passing phase, no?  Good thing
we're beyond it today.

> Well, first of all, you evidently don't know my mom at all. Actually,
> that's a good thing, I don't think she'd like you.
>

That's OK.  I have a 76 year old mom of my own, whom I recently taught
HTML, other webmastering.  She now is a full time webmaster with her
own site, using DreamWeaver.  She's in London right now, probably
managing her site from there.

> But more importantly, I don't think moms (at least not moms like mine)
> expect junior to learn anything career-relevant in 9th grade. I think
> the point of primary and secondary education, and to a great extent
> higher education (I went to a small liberal arts college), is to learn
> to think critically and creatively, and to problem solve primarily, and
> secondarily to gain training for a career.

> I want to apologize before this goes any further, I realize my tone is a
> aggressive, and I should acknowledge that I really don't have that much
> at stake here in this argument, I'm neither a student learning Python
> nor a teacher (nor likely to become one any time soon). I was merely
> trying to voice another kind of opinion in favor of not making
> impossible a class of programming for the sake of ... well, it really
> sounds like you've got revolution on your mind. And that's fine, it's
> important to have your voice, just try not to drown out the rest of us.

I don't believe I'm capable of drowning out others in this particular
format.  I do post frequently, but others may skip, work around me,
create and sign petitions, do whatever they like.  I develop these
strong attitudes from time to time, and act like I'm prosecuting some
major war.  Those who've been here awhile know I'm somewhat
unpredicatable.

But I have no listowner powers, don't have the power to cut anyone
off.  A real bully shoves kids around.  Here we're all safe in our
cubicles, workstations or whatever, reading some guy sound off from
Portland.  How is that really bullying?  What can I do to you, really?

Real bullies, on the other hand, have control over your grades, plus
teach you stupid math tricks you'll never need, plus don't teach you
Python, other useful skills.  Yet they have you where they want you:
depending on their school and its curriculum.

That, in my view, is where the abuse often lies.  And yet these
teachers may be the model of politeness, telling you why *these*
particular kids will never need any programming skills (like, not in
*this* neighborhood they won't need 'em).

Kirby


More information about the Edu-sig mailing list