If my last post convinced you that Python is the best first language, you’re probably looking for some great interactive teaching tools. Well, here are my three favorite interactive tools for teaching Python to students of all levels: Beginning, Intermediate, and Advanced.
And….the winners are:
- Beginner: Turtle (using Skulpt)
- Intermediate: IPython Notebooks
- Advanced: Nitrous.io cloud development environment
Interactive Python For Beginners: Skulpt and Turtle.
As I wrote in the previous post, a great first Day is crucial to successful teaching and learning experiences. There’s nothing like giving students an interactive, visual example with no installation required.
Brad Miller and the other maintainers of the skulpt open source project have given us this amazing tool. We liked it so much at trinket that we built it into our course material editor. Edit: we also released a free Python Trinket maker so you can create your own snippet like the one above.
Next Up: IPython Notebooks
After students have a great first experience with code and want to learn more, they’ll eventually have to move beyond Skulpt and Turtle. IPython notebooks are perfect for when you need students to run a full version of Python but want to give them helpful context around runnable examples.
Even better, IPython notebooks are widely used. Mozilla Software Carpentry has been a leader in using them to teach Python at scale with their excellent workshops (see all their materials here. Once you or your students have something to share, sites like nbviewer.ipython.org and trinket (which uses nbviewer’s excellent open source technology allow easy viewing of these documents by anyone with a browser.
Though I’ve labeled IPython Notebooks as intermediate tools, scientists may find them suitable for everything they need. IPython notebooks are so powerful that data analysis and visualization that doesn’t require a cluster can be kept in a notebook. Ethan White’s programmingforbiologists.org, for instance, is able to incorporate numpy, scipy, and pandas into his curriculum using them. nbviewer.ipython.org also has quite a few scientific papers on it.
Full Stack Web Development: Nitrous.io
For teaching real-world programming, though, students will need a professional development environment. While Python distributions like Anaconda and IDEs like Sublime Text can fill this role, there are often cross-platform difficulties and the installation process is never smooth. So I advocate using a cloud-based environment that is accessed through a browser.
Nitrous.io provides (in my opinion) the best cloud-based development environment for Python and they have a free tier. I’ve used them in my class at UNC Chapel Hill to get students set up and ready to code in seconds. There’s nothing like frustrating installation experiences to doom a class before it starts. With Nitrous, students can be up an building a Django, Flask or Rails application in minutes instead of hours. Students get a graphical IDE and a Ubuntu server terminal below; what else could an instructor want?
The major downsides are that Nitrous isn’t suitable for building windowed desktop apps and it demands a continuous internet connection to use. But since more and more development is moving online these are tradeoffs I’m willing to accept.
What’s your favorite tool for teaching interactive Python? Vote here!