[Python-ideas] Better error messages [was: (no subject)]

Stephen J. Turnbull turnbull.stephen.fw at u.tsukuba.ac.jp
Sun Dec 4 20:40:47 EST 2016


Chris Angelico writes:
 > On Mon, Dec 5, 2016 at 10:15 AM, victor rajewski <askvictor at gmail.com> wrote:

 > > There is currently a big push towards teaching coding and
 > > computational thinking to school students, but a lack of skilled
 > > teachers to actually be able to support this, and I don't see any
 > > initiatives that will address this in a long-term, large-scale
 > > fashion (I'm speaking primarily from an Australian perspective,
 > > and might be misreading the situation in other countries). It's
 > > worth considering a classroom where the teacher has minimal
 > > experience in programming, and a portion of the students have low
 > > confidence in computing matters. Anything that will empower
 > > either the teacher or the students to get past a block will be
 > > useful here; and error messages are, in my experience as a
 > > teacher, one of more threatening parts of Python for the
 > > beginner.
 > 
 > While I fully support enhancements to error messages (and the
 > possibility of a "programming student" mode that assumes a novice and
 > tweaks the messages accordingly), I don't think it's right to aim at a
 > classroom where *the teacher* doesn't have sufficient programming
 > skills.

That's not exactly what he said.  High school teachers are likely to
be the product of education schools, and may be highly skilled in
building PowerPoint presentations, and have some experience in
programming, but not as a professional.  So I can easily imagine a
teacher responsible for several classes of 40 students for 2 hour-long
sessions a week per class, and not being able to "interpret at a
glance" many error messages produced by the Python interpreter.  This
is basically the "aim for 90%" approach you describe, and he admits
that's the best we can do.

 > IMO the right way to teach computer programming is for it to be the
 > day job for people who do all their programming in open source and/or
 > personal projects.  There are plenty of people competent enough to
 > teach programming and would benefit from a day job.

I don't know where you live, but in both of my countries there is a
teacher's union to ensure that nobody without an Ed degree gets near a
classroom.  More precisely, volunteers under the supervision of
somebody with professional teaching credentials, yes, day job, not in
this century.  And "teaching credentials" == degree from a state-
certified 4-year Ed program, not something you can get at a community
college in an adult ed program.

 > Design the error messages to minimize the load on the room's sole
 > expert, but assume that there'll always be someone around who can
 > deal with the edge cases. In other words, aim for the 90% or 95%,
 > rather than trying to explain 100% of situations.

I think we all agree on that.





More information about the Python-ideas mailing list