[IPython-dev] [Discuss] [teaching] how do you display updates to code in lessons?

Aron Ahmadia aron at ahmadia.net
Tue Sep 24 11:07:17 EDT 2013


Perhaps keep the original function in rendered Markdown, then enter/update
code cells?

You should definitely get the students used to the idea of a non-linear
notebook *early* in the lesson.  They'll be hopeless confused as soon as
they start trying to jump around otherwise.

A


On Tue, Sep 24, 2013 at 11:06 AM, Greg Wilson <
gvwilson at software-carpentry.org> wrote:

> Hi,
> When I'm teaching programming, I often want to show learners a simple or
> buggy version of a function, discuss its shortcomings, and then update it
> (often several times in succession).  Doing this is straightforward when I
> teach using Emacs (or some lesser text editor): I just keep the text file
> containing the code open and edit the function(s) in question.  The
> drawback, of course, is that learners complain about the old version
> disappearing, so they have no record of how we got to the final program.
> When I teach with the IPython Notebook, on the other hand, I just add a
> new cell and re-define the function in question.  This leaves footprints,
> but learners then complain about being confused by having several versions
> of the function in the notebook.  It becomes particularly problematic when
> I start doing things like executing cells containing test functions, which
> may come *before* the cell redefining the function, so that:
>
> [22] original definition of some_function()
> [23] tests for some_function()
> [24] discussion
> [25] redefinition of some_function()
>
> becomes:
>
> [22] original definition of some_function()
> [26] tests for some_function() # I just re-executed this!
> [24] discussion
> [25] redefinition of some_function()
>
> How do you manage this when you're teaching?  Do you:
>
> a) never re-define a function
> b) do it and not worry about it
> c) something else entirely (if so, what?)
>
> Thanks,
> Greg
>
> ______________________________**_________________
> Discuss mailing list
> Discuss at lists.software-**carpentry.org<Discuss at lists.software-carpentry.org>
> http://lists.software-**carpentry.org/mailman/**listinfo/discuss_lists.**
> software-carpentry.org<http://lists.software-carpentry.org/mailman/listinfo/discuss_lists.software-carpentry.org>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130924/e2378bf3/attachment.html>


More information about the IPython-dev mailing list