Hi all,

having seen the discussion I feel obliged to add my own experience and
perspective, and - maybe more importantly - some moderating comments.


To set the scene, I have taught C, Matlab and Python since 2002 to a
variety of undergrad and postgraduate students at a university, but
always to scientist and engineers (and more importantly: not to
computer scientists), often in their first year of studies [1, 2]. Thus,
I consider this experience relevant for the (software) carpentry
mission.

I think it is also important to note that teaching is not an exact science:
In addition to experience, the exchange of anecdotal evidence and
subjective impressions is often all we can use; so this exchange is useful.


Regarding the question of how to teach Python to beginners (i.e. with
or without notebooks etc): I mostly use Spyder to have an editor and
(python) shell. Notebooks I generally introduce a little later (maybe after
half of the course), when students are somewhat confident with the
basic execution of scripts, and using a REPL.

Why do I start with Spyder (without notebooks)? Because there is an
additional overhead of jumping straight into notebooks, and I believe
that it is important to understand the conventional python file that
can be executed.

Why do I introduce the notebooks later? Because they are incredibly
useful for a number of purposes. In teaching, I like them to (i)
document an interactive python session [where I start from an empty
notebook and force myself not to go up to previous cells when I enter
commands] so that the notebook can be given to students to play around
with the taught material and exactly reply what was done in the lecture,
(ii) to demonstrate something complicated
where there is not enough time to show the details, but a prepared
notebook can be used to show the outcome, while containing the details so
that students can work through this conveniently just using the notebook.
Going beyond notebooks as a tool in a teaching context,  there are clearly
very many applications of the notebook in academia and industry, and
thus students should learn about it (at some point).

Having said, that the world is complicated, and the problem of 'hidden
state' discussed in this thread also hits students using Spyder. I
wrote a tutorial for Spyder to help the students, and this tutorial has a
dedicated section explaining
issues of hidden state because I saw beginners running into this
problem again and gain [3]; maybe less often than would happen using
the notebook (I have not taken statistics on this).

Why do I use Spyder and not just an editor and a bash shell in which we
call “python myfile.py”? Because the ability to execute the code within a
Python interpreter session (a la IPython %run) is a powerful tool (and also
Spyder is an attractive environment to engineers, who are likely to see
Matlab in their studies).


My overwhelming impression from the discussion in this thread is that
there are different use cases for all the tools discussed (jupyter,
spyder, conda, ...), and how appropriate they are depends on the context
and the skill set of the learners.

The particular capability of the notebook, and the IPython shell in
Spyder, that is discussed here (i.e. execute code from the editor or a
cell within a given Python context and state) is actually an advanced
tool. An advanced tool which is easier to understand and better to
exploit by advanced users. But for the advanced users it would be wrong
not to show them tool.

Here is an analogy: to move from location A to location B, a bicycle is
a pretty good choice. But it takes some learning to master it (even though this 
is
easily forgotten). In particular, we generally teach small children to
walk before they learn to ride a bicycle. But that does not mean that a
bicycle is something that must be kept away from children - it is just
more useful at a later stage.


In how far my observations from teaching at a university - typically a few
hours every week, coupled with weekly practical exercises,
over 12 weeks, say - are transferrable to intense 2-day carpentry teaching
is not clear, as learners at workshops have much less time to digest the
information and concepts they are exposed to.


Best wishes,

Hans







[1] https://link.springer.com/chapter/10.1007/978-3-540-25944-2_157
[2] https://fangohr.github.io/teaching.html
[3]
https://fangohr.github.io/blog/spyder-the-scientific-python-development-environment.html#run-configuration



Professor of Computational Modelling
University of Southampton
Southampton, SO17 1BJ
United Kingdom
fang...@soton.ac.uk<mailto:fang...@soton.ac.uk>

www:  https://fangohr.github.io
blog: https://fangohr.github.io/blog/
@ProfCompMod: https://twitter.com/profcompmod








------------------------------------------
The Carpentries: discuss
Permalink: 
https://carpentries.topicbox.com/groups/discuss/T1505f74d7f6e32f8-Mb6691a208a5d32f071d06b27
Delivery options: https://carpentries.topicbox.com/groups/discuss/subscription

Reply via email to