JupyterHub for Teaching gives users access to Jupyter Notebook environments (computational environments and resources) without the hassle of installation and maintenance tasks. Instructors can make individual workspaces available via JupyterHub to students using shared resources.
JupyterHub makes computational tools such as Python and R more easily available to students. Such tools can bring subjects to life for students, extending inquiry beyond the theoretical with results that can be manipulated live. Traditionally, however, getting these tools set up on a computer has been daunting, and understanding how a program’s code produced its output could be prohibitively difficult. The three following examples show how UW professors — in disciplines as varied as French, informatics and computer software engineering — have cleared these barriers by using JupyterHub in the classroom.
Literate programming
Jupyter notebooks, as an implementation of “literate programming,” illustrate how program code produces its results by interleaving code snippets with their output and richly formatted expository text that describes the intention behind these operations. Notebooks create a happy medium between traditional user-friendly graphical tools and the power of computer programming. Professor Geoffrey Turnovsky’s text analysis notebooks show students how to analyze human language using the turn-key tools at Voyant, and further shows how to replicate that analysis in Python and extend it beyond what the web tools allow.
Turnovsky created two Jupyter Notebooks for FREN 379. “The Intro to Python is what it sounds like, — a very basic intro, which is pretty much at the limits of what I can do with Python — and was required of all the students in the class as a lesson in what it means to use computational techniques to study text. The “Voyant_Summary” was an optional exercise, to get the results one gets from the text analysis toolkit Voyant (https://voyant-tools.org) — at least from the summary it offers by default of whatever text you upload — using Python.”
First impressions
The other point of friction, setting up these programming tools, is smoothed by UW-IT running Jupyter (instead of putting Jupyter on students’ computers). With this arrangement, instructors know that all of their students are working from the same environment, and students avoid the gauntlet of a programming software installation process that is not geared toward newcomers (and can discourage people from the tools before they’ve even started using them). For professors like Melanie Walsh, streamlining this step is crucial and allows her to introduce students to the basics of computer programming without having to dedicate a large chunk of class time to it installation and configuration. For professors from departments not traditionally focused on computation, this first impression is critical to their students.
Walsh shared “a couple of basic notebooks that I have used in the past and plan to use again in my INFO498A/TXTDS403A course. “Here’s a workbook on Python string methods. Here’s a workbook on network analysis and Game of Thrones characters with Python as well as solutions.”
Accessibility at scale
Professor Hunter Schafer’s work showcases how, when you solve these problems, the tools an be made accessible at scale. In his case, the tools find success translating complex technical subjects for the high school level.
Schafer shared the following examples of his work with JupyterHub:
Live coding demo
Here is a sample notebook we use as a demo in my course CSE 163: Intermediate Data Programming. For context, this notebook is used as a live-coding demo. We start with rather little text and code in the notebook and I add code cells as we go through the demo. I go back through the notebook after class and add text explaining more or less what I was saying in class. This is a good way of making sort of interactive lecture notes with students!
Flipped classroom
More recently, I’ve taught this class as a flipped classroom where all of the text/code of the notebook is presented to the students before class. Sometimes we ask them to fill in cells here and there, but the majority of the work is pre-written. I’m currently working on making these lesson materials more open-access since we are launching the course at the high school level this fall. You can find an example of one of these notebook readings here and a practice problem here; to download the notebook, you can use the download button at the top and the data files can be downloaded by clicking the link in the note box near the top of the notebook. Note we are still doing some last-minute edits to some of the lesson content to make it make sense outside of our course at the high school level, but a lot of the lesson content is set at this point.
Using visualizations during lecture
Here is one pretty involved notebook I use in CSE/STAT 416: Introduction to Machine Learning to demonstrate points about model complexity, overfitting, and Ridge regression. In this course, I use these as visualizations while I’m talking and do not do any live coding with students since the code to make the demos is far more complex than what they would need to do. I do share the notebooks with them though so they can play with the interactive widgets on their own time.