Experiences/guidance on teaching Python as a first programming language

Oscar Benjamin oscar.j.benjamin at gmail.com
Wed Dec 11 12:46:50 CET 2013

On 11 December 2013 08:43, Chris Angelico <rosuav at gmail.com> wrote:
> On Wed, Dec 11, 2013 at 7:34 PM, Devin Jeanpierre
> <jeanpierreda at gmail.com> wrote:
> When you tell a story, it's important to engage the reader from the
> start. Sometimes that means starting the story in the middle of the
> action, and filling in the important-but-less-exciting details later,
> when they mean something. [1] Teaching a skill often hits the same
> sorts of issues. Rather than explain "This is how to manipulate
> registers in a CPU", explain "This is how to print Hello World to the
> console" and worry about what exactly the console is (and how
> redirection affects it) later. My tutorial on assembly language
> programming did the same, though it used a one-character-output
> operation so it printed a single asterisk to standard out. (Manually
> setting CPU register AX to 0200 and DX to 002A, placing an INT 21
> command in memory, and single-stepping it.) Learning how all that
> functions - or even what the INT opcode means - came later. Start with
> something visible and engaging.
> After that, learn/teach as much background as is of interest, and
> improve skills. But start with something that gets something done.

I certainly agree with this for our students. Explicit computing
courses make up about 30 credits (~16%) of the whole degree program
for the Engineering Mathematics students (if they don't take
additional optional units). They are however many units that
implicitly require computing skills, so we really need them to be able
to be productive quickly. Some of them will focus on programming and
get really good at it. Some do go on to become programmers but most do

The Electrical Engineering students will subsequently do low-level
programming with registers etc. but at the earliest stage we just want
them to think about how algorithms and programs work before going into
all the hardware specific details.

While reading around this subject I found this interesting (although
verbose) speech from Dijkstra advocating the opposite point of view:

This definitely wouldn't work for my students but a friend of mine
studied CS (at Warwick?) and his course worked as Dijkstra describes.
In the first year they don't touch a real programming language or
write any actual programs. They take exams in pseudocode and formal
proofs of correctness. Then after a year of studying algorithms,
linguistics, semantics, proof, mathematics and so on they write their
first hello world program in a real programming language. I don't
really know whether he's any good at programming but he's certainly a
good mathematician.


More information about the Python-list mailing list