

Some Suggestions for Teaching Python - japhyr
http://www.curiousefficiency.org/posts/2014/08/python-teaching-suggestions.html

======
danso
As someone who's tried to teach Ruby to laypersons, this one really stuck out
to me: "Distinguishing between returning and printing values"

Teaching using the interactive REPL might possibly be an anti-pattern when it
comes to teaching a language. I mean, it's great to introduce, but walking
through concepts with it can be quite painful:

1\. When you get into unclosed brackets and quotation marks, beginners are
often confused why nothing happens even after pressing "Enter" a few times.
Yes, the prompt does signal an unclosed entity, but it's not obvious to
beginners.

2\. When you're demonstrating via projected display...it is very hard for
students to determine exactly what the hell you're typing, _especially_ if you
take advantage of history-autocomplete shortcuts. Yes, such a thing is so
mind-numbingly obvious to a moderately experienced programmer, but it is not
at all the case for newbies.

3\. If you're writing a sequence of commands...not only do you _not_ have to
make a typo, but so do your students. Try diagnosing a cry of "It didn't
work!" when there are 3 to 4 lines that could have any variety of
typographical error.

I think getting into the REPL to do "hello world" is fine...and it's probably
necessary to show some basics about variables...but afterwards, it seems much
more efficient to get into writing script files and executing them via command
line than it is to continue using the REPL.

~~~
japhyr
I also think about the fact that students want to write actual programs,
rather than just code in terminal sessions. So it's okay to show some quick
ideas in a terminal session, but my rule of thumb is that anything requiring
indentation should be demonstrated through a short program file. This makes it
easier to help students fix small errors, and it gives them practice working
with many small program files.

