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

Chris Angelico rosuav at gmail.com
Sun Dec 4 18:40:21 EST 2016


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. Would you build a pocket calculator so it can be used in a
classroom where even the teacher doesn't know about division by zero?
Would you design a violin so a non-musician can teach its use?

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. 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.

ChrisA


More information about the Python-ideas mailing list