Brad Miller and the search for interactive teaching tools

Luther College computer science professor Brad Miller is a true innovator and one of our inspirations here at Trinket.  He’s the core maintainer for the Skulpt project, which we use in our Python trinkets, and has built one of the best free online computer science textbook collections around at interactivepython.org.  

In this interview, we hear about how he got into teaching, his search for better, more interactive resources, and how he uses interactive tools (many of which he created!) in his own classroom.  One of the themes that comes through is how his projects, like all software projects, are embedded within communities of contributors working to solve shared problems.  We’re excited and honored to be a part of some of the exciting work he’s doing!

This talk with Brad is one of a series of periodic interviews we do of educational innovators.  Other interviews in the series can be found here.

Prof. Brad Miller

Elliott: You’re doing some awesome things in the classroom, and I’m looking forward to learning more about that. But let’s start with how you got here. Can you give us a sense of your teaching history? How were your first classes different from what you’re doing now?

Brad: I feel sorry for my first students. I had spent 18 years in industry as a programmer and entrepreneur, so when I returned to academia and started teaching I recall that I had to make a lot of adjustments in terms of my own expectations about what students knew and didn’t know and what they were capable of doing. Aside from gradually making my classes easier I have moved from a lecture centric style of teaching to an active style of teaching. I find that I’m much more effective when I can be coaching the students through activities rather than lecturing. Now I rarely lecture for more than a few minutes before I have them working on something.

 I rarely lecture for more than a few minutes before I have students working on something

Elliott:  How did you first come across Skulpt? You’re now one of the primary contributors to the project, and it’s something we use extensively here at Trinket. What made you think it’d be useful in the classroom?

Brad: I was on sabbatical in 2010/2011 and my sabbatical proposal said that I was going to use my time to produce a second edition of the data structures textbook Problem Solving with Algorithms and Data Structures using Python and the CS1 textbook Python Programming in Context. I was also going to design a new course on iOS programming. The problem was that as I was updating these texts I kept thinking about how cool it would be if they were not on paper, but were interactive and on the iPad. This led me down a path to thinking about running Python in the browser, rather than on some sandboxed server. I wanted to make an interactive book that was fully usable even when the iPad was in airplane mode. It made sense to prototype this for a browser environment first, and that led me to Skulpt.

I wanted to make an interactive book that was fully usable even when the iPad was in airplane mode

Scott Graham had built this amazing Python interpreter all in Javascript. There was 0 documentation for how to actually use it, so the first thing I did was figure out how to use it on a simple web page, and then I wrote up a blog post that documented how to get started using Skulpt. From there I figured out how to extend Skulpt by adding modules. I wasn’t a very good Javascript programmer, but I knew that if I was going to use this in a book I needed a turtle graphics module, and so I spent a good chunk of time developing that. At about this same time Scott was in the middle of changing jobs, and I think he had more or less lost interest in moving the project forward, so I asked him if I could move the code over to github. He was very nice about relinquishing the maintainer role to me, and I’ve been lucky in that we now have a nice core of people working on Skulpt. There are some really amazing things, including some awesome work on pygal from your own Ben Wheeler, and there is another guy working on a port of parts of numpy and matplotlib! Scott Rixner from Rice University and his grad students have done great work as well. I think skulpt has come a long ways in the last few years, and although there are other ports of Python to Javscript Skulpt is doing a great job of serving the educational niche.

The thing that I quickly realized was that it was an incredible amount of work for each example. Which led me to creating some authoring tools to make it easy. This was the birth of the Runestone Interactive project. This is an open source project that builds off of Sphinx, and restructuredText to make it easy to create interactive textbooks, or even shorter teaching materials like labs, or tutorials. They key is that it brings together a bunch of different open source projects to make writing easy. For example, to write a hello world program that you can run in the text is easy you just write:

::

    .. activecode:: myuniqueid

       print("Hello World!")

Now the system generates a bunch of ugly Javascript, which includes all the scaffolding for Skulpt, along with some css to make it look nice on the page. In this respect we have very similar goals to what you are doing with trinket.io.

Editor’s Note: Here’s that simple hello world program in a trinket, using Brad’s Skulpt project, so you can see the interactivity the project provides:

Elliott: Speaking of the classroom, what’s your teaching style? Can you walk us through a typical class and what materials and tools you use?

Brad: The first thing I will note is that I teach all of my classes in a lab, so each student is sitting in front of a computer. Some may use their own laptops, but the majority log in to their account on one of the lab machines. For CS1/CS2 I make heavy use of the books at interactivepython.org. I can refer to the figures in the books or walk students through a “codelens” example (see Philip Guo‘s pythontutor.com). But, really, I try to start each day with a problem we are going to solve, and then as a class we’ll solve it. I may have the students write some code for a few minutes, and then we will do it together. Or, I may start by doing a little coding and then have them build on it. I’m always trying to model the coding and problem solving styles I want them to adopt. Start small! Get something working, then keep it working and build on it piece by piece. For me, language features like loops and conditionals, and data structures are just tools we use to solve cool problems.

Start small! Get something working, then keep it working and build on it piece by piece.

Now here’s the funny story related to this style of teaching. David Ranum and I wrote a CS1 book called Python Programming in Context. I love this book, because it mirrors the way I teach (funny how that works when you’re an author.) But, I don’t make my students buy it. After the Runestone Tools were developed I approached the publisher and said look at what I’ve got, this is the future. I would like like to publish my book online using these tools. They said, “well, how about if we make a PDF version available?” We had the same conversation with the publisher of our data structures book, Jim Leisy, at Franklin Beedle. Jim said, “I’ve always wanted to change the world, lets do it.” So, the data structures book is available online, but we had to go a different direction with the CS1 book. The irony is, I got my biggest royalty check ever from Franklin Beedle this last year!

The CS1 book is a great book, with its own long history. After being thwarted by Jones & Bartlett for putting our Python Programming in Context book online as an interactive book I ran across How to Think like a Computer Scientist in Python by Allen Downey, Jeff Elkner, and others. This book does a great job of covering all the language features, which is all the stuff that I find really boring to write about. But, this book was open source and so we took it and made the “Interactive Edition” of this book. Basically we took Skulpt, and made all the examples interactive and runnable. Then I took Philip Guo’s PythonTutor project and worked with Philip to make a version of the tool that would work in a book environment. Then I collaborated with Mark Guzdial and Barbara Ericson at Georgia Tech to add a bunch of self check questions with interactive feedback, along with the really cool drag and drop programming exercises called Parson’s Problems, and we there you have it. In two years we have gone from zero to about 6,000 unique visitors a day. I would estimate we have about 100 colleges and universities using the interactive books for their courses, and about 30 high schools! All of this, I might add, is just by word of mouth. No advertising campaigns or anything.

Elliott:  Last time we talked you were in California with students, visiting Silicon Valley Tech companies. How were you able to use these experiences as teaching opportunities?

Brad: The beauty of that course is that I don’t have to do much teaching. The people we visit just tell us stories about their careers, and the students soak up the culture of each company we visit. They learn so much it is really amazing. For me whats cool is that I can come back and in my internet programming class say, ok we are going to build this app, and at the end we are going to host it on Heroku. Why? Because that how the real companies do it now. When we were in Silicon Valley we didn’t talk to a single startup that was doing their own server hosting, everybody is using Amazon AWS or some service like it. Theres a level of credibility that I get after just getting back from silicon valley that I wouldn’t necessarily have otherwise.

Brad’s students visiting Amazon’s offices

Elliott:  Are there teachers you admire or that have inspired you? Who do you know who’s doing innovative things in the classroom?

Brad: Whenever someone asks me this I always think of two people. The first was my high school teacher Charlie Weinman. He actually taught typing and some business classes in our high school, but when he saw how enthusiastic my friends and I were about the Apple II computers our school had, he decided we should get credit for all the learning we were doing, so he started a computer science class. He knew nothing about programming when he did this, but he sensed that it was important. Our agreement was that he would teach the class, and I think 30 students took it that first year, but we had to sit in the back and keep quiet. “You already know way more than I do, so just do your own thing.” He encouraged us, drove us to programming contests, and helped us get the resources we needed to continue to learn. The world needs more teachers like him. One of my biggest frustrations is that there are fewer students learning real computer science in high school in 2014 than there were in 1986. That is one reason I’m thrilled to see that the interactive book is getting adopted by high schools. For them its ideal, its free, and it only requires a modern browser so you don’t have to install anything special.

The other is my Ph.D. advisor and Net Perceptions cofounder, John Riedl. John unfortunately died from Melanoma at the young age of 51 last summer, but he constantly inspires me even to this day. John took care of his students and always put them first. He loved learning, had a great sense of humor, and was generally just a lot calmer than me. I often try to ask myself “what would John do in this situation?” That’s because he was an inspiring teacher, and a great role model.

What we really need, more than technology, are teachers who are passionate about teaching!

Elliott: Teachers have so many potential resources for teaching it can be overwhelming. That said, do you think there’s anything that’s glaringly missing for giving CS students a great experience in class?

Brad: There are so many great tools and resources available now. I think what we really need, more than technology, are teachers who are passionate about teaching! On the one hand as an author, I get discouraged sometimes because I get so many emails from instructors who want answer keys and exams and quizzes and more homework problems, and I think to myself, “really!?” You are a teacher, if you are going to inspire your students, you need to teach about stuff that you care about. How can you care about my examples or my homework problems? You need to instill in your students the joy of learning and applying problem solving techniques to solve problems that are real to them. Then make up homework problems and exams that go along with that. Now I’m not trying to disrespect all of these people, I know that some of them are from institutions where they have a ridiculous load, and work huge hours just to stay ahead of the game — which is a different problem. On the other hand, I go to SIGCSE every year and hear other professors talk who I know are way more inspiring than I am. So that gives me something to aspire to.

Editor’s note: We encourage you to support Brad’s awesome projects!  You can contribute code to Skulpt or Runestone at their respective github pages.  You can find Brad on twitter at @bnmnetp.