

How IPython Notebook and Github have changed the way I teach Python - japhyr
http://peak5390.wordpress.com/2013/09/22/how-ipython-notebook-and-github-have-changed-the-way-i-teach-python/

======
ChikkaChiChi
"If a student starts to outpace me, I can steer them into something more
established such as Udacity or Coursera. These are the students who are likely
to be successful in more independent learning settings."

Everything about what you do should be commended, but I outright give you a
standing ovation for this point.

~~~
specialist
Yes.

Smartest teacher I ever had made the students grade each other's papers. Ends
up being tutoring. Hardest grade I ever earned.

------
scott_s
Great stuff. When I taught intro programming to people with no programming
background, I made a habit of doing live programming, in front of them. I let
them see my mistakes, so they could see my debugging process, and of course, I
tried to make it interactive, asking the class along the way how I should
accomplish something.

I had to upload source code to a course webpage, which wasn't _that_ onerous,
but it also meant that I was only really going to upload one source file per
lesson. I see this method of using IPython Notebook and Github as a great way
of using technology to reduce to reduce friction to the point that the amount
that is likely to be shared is much, much larger than when it all had to be
done manually.

~~~
plg
Live coding is so important especially for beginners, I think it demystifies
the whole process and shows them that there is nothing "magic" about
programming, it's simply translating an idea about how to do something from
your head into code.

I find that my students learn the most from interactive sessions where I live
code in front of them and they ask questions, we change the code, re-run, etc.

Also debugging live in front of class is SO valuable for them. It not only
shows them how to debug but it also shows them that everyone makes mistakes,
and teaches them how to spot them.

------
ptwobrussell
IPython Notebook is an incredible platform for interactive learning, and I
used it as the basis of all examples in Mining the Social Web, 2nd Edition
(O'Reilly - to go "final" tomorrow!)

My one complaint is that it's still quite a pain to get all of the necessary
dependencies installed so that both IPython Notebook and all of its 3rd party
package dependencies that might be used within the notebook "just works"
across all supported platforms. However, that's not so much an IPython
Notebook problem, per se, as it is just some of the pains in the larger Python
ecosystem.

My recommendation to overcome the hurdle is to use Vagrant to take care of
packaging IPython Notebook and all required dependencies so that you can
provide a virtual machine featuring an IPython Notebook UI that "just works"
once it boots up and you point your browser to localhost:8888.

I wrote about this at length if anyone is interested in thinking about the
Vagrant+IPython Notebook combination a little bit more -
[http://miningthesocialweb.com/2013/08/24/reflections-on-
auth...](http://miningthesocialweb.com/2013/08/24/reflections-on-authoring-a-
minimum-viable-book/) \- and there's also a screencast illustrating how easy
it can be to get it all running in the way I am describing.

In my opinion, there's no better way to reach the masses than with this
combination of technologies. I hope to see more and more tech book writers
jumping on board and treating the code as an OSS project with the book being
the "premium support" for that OSS project. It's a win-win for everyone that
way.

~~~
takluyver
Installation sucks, we know. At present, we mostly point people towards
Anaconda, or one of the other complete Python distros. That's not ideal if you
already have a Python environment partly set up, because it gives you a whole
new Python. But at the moment, it's the best of a bunch of bad options.

------
plg
One of the reasons I am hesitant (so far) to use IPython Notebook for teaching
is that I worry about the longevity of the format. Maybe I'm a worrywart but
my current preference is to use old (boring?) formats like html (via org-
mode).

~~~
japhyr
From my understanding, all IPython Notebook viewer does is convert a notebook
to html, and serve the html.

So I am comfortable investing in this format, with the notion that I can dump
to html and be no worse off than I was making blog posts or writing up
tutorials.

On the other hand, IPython is 5+ years old(?), and it has some pretty strong
backing and momentum. I have a good deal of confidence that it will be around
for a while.

Edit: If you miss the comment below, IPython is almost 12 years old!

~~~
avdempsey
You might also be pleased to know that the primary focus of the last release
is a powerful format converter, nbconvert.

It can do some simple transformation: [http://ipython.org/ipython-
doc/rel-1.1.0/interactive/nbconve...](http://ipython.org/ipython-
doc/rel-1.1.0/interactive/nbconvert.html)

Or you can build a custom transformer:
[http://nbviewer.ipython.org/urls/raw.github.com/Carreau/post...](http://nbviewer.ipython.org/urls/raw.github.com/Carreau/posts/master/06-NBconvert-
Doc-Draft.ipynb)

------
616c
If I had programming instructors like this in college, let alone high school,
I would have been a CS major full out.

------
chimeracoder
Coincidentally, I'm currently working on a project to make IPython an (even)
better tool for instruction and writing interactive 'textbooks', like what OP
has done.

If anybody on here is an instructor who has a similar workflow, or is
interested in trying something like this out, please drop me a line. We're in
the middle of researching the most important areas for improvement, and we'd
love to hear your feedback!

( __EDIT __: Email my username at Google 's email service.)

~~~
fperez_org
Please ping us on the ipython-dev mailing list; the core team is all made up
of academics and we have a strong interest in educational uses (we're using it
for our own courses), so it will be good to coordinate/share ideas on this
front.

------
infocollector
If you are planning to use python 3 for teaching, you should keep away from
IPython/this article. I just tried it with python 3.3. The readme says :

"Officially, IPython requires Python version 2.7, or 3.3 and above."

When you try to run IPython using python 3.3.0: File
".\IPython\config\application.py", line 288 print os.linesep.join(lines) ^
SyntaxError: invalid syntax

~~~
japhyr
If anyone wants, I'm happy to post a more explicit recipe for how to get
multiple versions of Python and IPython running. It's easy enough to post
right here.

~~~
stefap2
I would like to know. For Windows and Ubuntu. I was never able to properly
ipython notebook under 3.3 either.

~~~
japhyr
This worked for me on Ubuntu 12.04:

First, add a ppa that has old and new versions of Python, and use that to
install Python3.3:

    
    
        sudo apt-get install python-software-properties
        sudo add-apt-repository ppa:fkrull/deadsnakes
        sudo apt-get update
        sudo apt-get install python3.3
    

Now, install the correct versions of ipython, ipython-notebook, ipython3, and
ipython3-notebook:

    
    
        sudo apt-get install ipython=0.13.2-1~ubuntu12.04.1
        sudo apt-get install ipython-notebook=0.13.2-1~ubuntu12.04.1
        sudo apt-get install ipython3=0.13.2-1~ubuntu12.04.1
        sudo apt-get install ipython3-notebook
    

Now, the command 'ipython notebook' should run your system's default version
of Python. The command 'ipython3 notebook' should run Python3.3.

I test the current version of Python with:

    
    
        print(3/2)
    

If you're running Python 2, you'll see 1. If you're running Python 3, you'll
see 1.5.

Hope that helps, and happy to help troubleshoot if it doesn't. I'll add this
to the readme on the project page [1] when I get the chance.

[1]
[https://github.com/ehmatthes/intro_programming](https://github.com/ehmatthes/intro_programming)

~~~
stefap2
thanks. this worked for me.

