Experiences/guidance on teaching Python as a first programming language

Wolfgang Keller feliphil at gmx.net
Tue Dec 17 16:51:44 CET 2013


> I was also taught C as an undergrad but having already learned Java, C
> and C++ before arriving at University I found the C course very easy
> so my own experience is not representative. Many of the other students
> at that time found the course too hard and just cheated on all the
> assignments (I remember one students offering to fix/finish anyone's
> assignment in exchange for a bottle of cider!).

The problem with the C class wasn't that it was "hard". I had passed my
Pascal class, which taught nearly exactly the same issues with
"straight A"s before (without ever having writeen any source code ever
before). And by standard cognitive testing standards, I'm not exactly
considered to be an idiot.

The only issue for me was to figure out how to do in C what I already
knew in Pascal. And I had to waste a *lot* more time and mental effort
to mess with that language than it took for me to learn *both* the
basics of programming per se *and* Pascal in the first class at my home
university.

C is just a kafkaesque mess invented by a sadistic pervert who must
have regularly consumed illegal substances for breakfast. Its only
reason to exist seems to be that apparently it's ridiculously easy to
implement a "compiler" for it. Although, as a professional developer
once told me, most C compilers are garbage.

One student in the C class (who had been doing software development for
years before he came to university) jokingly passed around samples of
"valid" C code by email. Most of them looked like uuencoded binaries
(this was in the early-to-mid 90s), but they all compiled and produced
an output. Except that *no one* (including professors) was able to
predict the output without actually running the compiled code.

In the classroom lectures parallel to the C exercises, the professor
spent most of his time explaining what *not* to do because... Heck, why
does a language provide features resp. allow their use in ways that are
known to be bottomless cans of worms.

> These types of problems are compounded by the fact that the current C
> course uses automated marking so a program that produces the correct
> output gets full marks even if it is terribly written and the student
> entirely misses the point - another thing about this course that
> definitely needs to change.

In our classes, when a program was correct, but e.g. you used just *one*
single non-semantic identifier (such as an "i" for a loop index), you
got *automatically* zero points for that exercise. Other absolutely
mandatory requirements were about minimum commenting etc. Less comment
lines than code was very likely to yield zero points for that exercise
as well.

Sincerely,

Wolfgang



More information about the Python-list mailing list