How IPython Notebook and Github have changed the way I teach Python
peak5390.wordpress.com
peak5390.wordpress.com
Everything about what you do should be commended, but I outright give you a standing ovation for this point.
Smartest teacher I ever had made the students grade each other's papers. Ends up being tutoring. Hardest grade I ever earned.
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.
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.
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... - 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.
We (in the IPython project) are interested in using it for capturing reproducible research workflows all the way up to the publication stage, so we're painfully aware of the importance of format stability, good conversion tools and support for early format migration forward.
We see many others investing their own time in using our tools, and we know we'd get burned at the stake if we make gratuitous changes that harm their workflows.
We do have some format changes in mind, but we've been "bunching them up" precisely so we can make format revisions only very rarely (we haven't done any in ~2 years), and with rock-solid support for conversions and migration.
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!
It can do some simple transformation: http://ipython.org/ipython-doc/rel-1.1.0/interactive/nbconve...
Or you can build a custom transformer: http://nbviewer.ipython.org/urls/raw.github.com/Carreau/post...
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.)
Architects have CAD software, programmers have dedicated text editors and IDEs. Educators need curriculum development tools that let them focus on difficult and interesting pedagogical issues, not on formatting and version control issues.
How do I get in touch?
"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
I am running Ubuntu 12.04, with several versions of Python installed including 2.7 and 3.3. I have the following packages installed: ipython, ipython-notebook, ipython3, and ipython3-notebook.
When I am developing most of these notebooks, I run 'ipython3 notebook'. When I need to make a cell using Python 2.7, I close the ipython3 server and run 'ipython notebook'.
Am I missing something?
You most likely didn't run the installer correctly, and for some reason are trying to execute the python2 sources with python3.
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.