Runestone Fall 2014

School is underway again, and now that we are a few weeks in to the semester I wanted to take a minute to talk about growth. Last year about this time things were still pretty chaotic, with the unexpected success of the books the servers were laboring intensely to keep up with all of the new users. This necessitated a weekend switch to a larger server.

Growth

This year, Google Analytics is showing that our daily traffic has doubled from last fall! Here's a comparison to a year ago, adjusting for the days of the week to be the same. Its amazing how consistent the weekly pattern is.

/images/fall2014growth.png

Code Coach

One of the new features in our 3.x release is the Code Coach. You have probably noticed that button in some exercises, or some of the examples. Code Coach is in its very early stages as a platform for providing students with intelligent automated feedback on their code. I think this has huge potential, but is going to require a lot of resources to bring to fruition. Right now there are two things going on that I think do add value:

  1. Every time the student presses the run button that version of the code is saved. Code Coach lets a student move backward and forward through their history to view the differences between one version of the code and the next. I can see this as a very valuable teaching tool for an instructor to use with the student. I've looked at a bunch of these and its amazing how often a student gets off in the weeds over a very simple project and ends up throwing away a huge amount of work, or just making random changes. I would really like to have the conversation where I can show the student, if you would have fixed this, you would not have had to delete all of this other stuff.
  2. Everytime the student runs a program, I run Pylint on it in the background. Pylint catches all sorts of "errors" that do not show up as Python runtime errors. One big one is forgetting parentheses. I've seen this so many times: myTurtle.forward this is not a runtime error because Python evaluates the statement to simply be a reference to a function. But the student can't see it. "Dr. Miller, I don't get any errors, but my turtle isn't doing anything, what am I doing wrong?" Pylint flags this for the useless statement that it is.

I'm really looking forward to applying much more advanced analysis to the code in order to provide better coaching.

Version 3.0 of Runestone Interactive released

I'm pleased to announce that over the weekend, I updated interactivepython.org to version 3.0. This release completes another summer of hacking, and integrating contributions from colleagues around the world.

My plan in this post is to briefly summarize some of the highlights of the new release and then follow up over the course of this week with posts and screencasts about specific features.

  • Progress tracking, and cohorts. This is one of the major visual changes to the books, thanks to some great work by Vipul Thackur. The "chapters" have been broken up into subchapters and you can now track your progress through each chapter/sub-chapter on the table of contents. In addition, there is now the facility to create a study group and to negotiate reading deadlines and have discussions with members of your own cohort.
  • New and improved grading and assignments interface. Thanks to Paul Resnick and his students at the University of Michigan you can now group activities into assignments. You can also provide comments to students on the programming problems.
  • Custom assignment page. As an instructor you can now easily edit an assignments page that is part of your custom course. This page will allow you to make use of all of the features of the Runestone tools and restructured text to add your own assignments. I think this feature has great potential to grow into additional custom content in the future so stay tuned.
  • Run in Codelens. Sometime earlier this summer Philip Guo added an iframe interface to the awesome Online Python Tutor. This allowed me to add a button to most of the activecode examples that allow you to also run the example in the Online Python Tutor. You can edit the examples and click the button to run another version. This feature requires that you have internet access while reading, something I have resisted in the past, but it it seems increasingly difficult to be offline now anyway, so I'm not going to resist anymore.
  • Code Coach. Last spring at SIGCSE, Paul Resnick, David Ranum and I spent an afternoon hacking. The idea was to provide an interface that would allow students to look at the history of any particular programming assignment, and see the differences from one try to the next. Our hypothesis is that this would be a good teaching tool for an instructor to use with a student to review how they developed a solution and arrived at their current state. I expanded on the concept a bit this summer by making use of pylint, which points out a number of potential problems that plague beginning programmers. For example, pointing out "useless statements" when a student forgets their parenthesis on a function call. My hope is that Code Coach will grow into a fully automated code tutor in the future.
  • Blockly directive. I think that blocks based programming languages like Blockly, and Scratch have great potential to help students develop a mental model or a picture in their mind of how various programming constructs work. So I created this new directive that will let you write blocks language examples and exercises. My hope was to write a new introduction to How to Think Like a Computer Scientist using Blockly, but there are only so many hours in the summer. Hopefully I'll make progress on this during the coming months.
  • Activecode support for Javascript and HTML. In preparation for a new course I'm teaching this fall, I wanted to be able to have students edit HTML and Javascript examples like we can do with Python. Now you can.
  • New Book: Programs, Information, People. This book is a new mashup of the How to Think book that Paul Resnick uses in his course in the School of Information by the same title. I think this is a great alternative to the How to Think book in that it avoids some of the "early math" problems and focuses on information processing using data from the internet.
  • AP Java Review: This book came on line last spring, but its worth mentioning in this summary. Barbara Ericson at Georgia Tech has put this together and although we can't run any Java examples in the browser the rest of the interactive resources are great for getting ready for the AP exam.

Well, thats the overview. I look forward to bringing you the details over the next week. In the meantime, you can see some of the features on the Overview site I'm sure we will see a few glitches as these new features move out of beta testing and into general use. Please report them on our github page or send me an email.

Iowa Startup Accelerator

It has been an exciting day! I just got back from Cedar Rapids where I attended a mixer of mentors and teams at the Iowa Startup Accelerator. The accelerator officially launched yesterday with 10 new teams. There was some good local news coverage and lots of excitement by the teams. Some of them are from Iowa and one team is from as far away as Australia.

My role, as a mentor, will be to work with one or more teams over the next few months, giving them advice and feedback, and trying to connect them with the right people to help them grow their company. Over the next few weeks I'll be spending some time meeting with each of the ten teams to get to know them better, and then we will see if there is a particular team that I can really help. I hope so, tonight was fun, and the enthusiasm is infectious.

On the Denial of Service Attack

Well its been an interesting week. My daughter is married, and I've been caught in the crossfire of a Distributed Denial of Service (DDoS) attack on Webfaction, my hosting provider. I'm quite sure the two are unrelated.

For those of you who have been frustrated in your attempts to access any of the books on interactivepython.org, I'm sorry. We were not the target of the attack, but we were in the same subdomain and got blasted. I can't believe that it took over four days to clear up the mess. But thats about what happened. This is a new one for me. I've never considered that an open source textbook project would have to worry about something like this. At one point Webfaction said they were getting 4Gbps (yes, 4 gigabits per second) of malicious traffic affecting about a dozen machines.

I've been so frustrated with Webfaction's response that I've been thinking about moving to a different hosting service. But I'm left with the following questions:

  1. Could Webfaction done better? The only thing I'm qualified to say here is that they could have done way better in communicating with those of us affected. Here was the initial response I got from tech support:
> There is no ETA as to when this issue will be fully resolved as only the attacker(s) can determine that. At times the target against a server can be large enough that our hardware mitigation system can not handle the volume. Please let us know if you need anything else.

Ok, maybe dealing with a DDoS is a really hard problem, but as a frustrated owner of the site here is what I heard. "Sorry, nothing we can do. You will just have to wait until the bad guys get tired and go away." In addition, it was maddeningly long between their status updates. You can see their updates here As a site owner, all I want to do is get my site back up and running. In order to make good decisions about what to do I need timely information, not vague intermittent messages.

  1. What are standard practices in building web applications to protect against an attack like this?

3. How do you know whether one hosting provider is going to be any better than another in dealing with an attack like this? Is paying for AWS or Google compute engine the only way to know you are getting a provider with the resources to take on a big attack? If you have answers to these questions, please leave a comment.

The Sous Vide Adventure Begins

When we were in Las Vegas last fall, I had the most delicious steak I’ve ever eaten. It was at Bobby Flay’s Mesa Grill. This blew me away. Although I love a good steak at a restaurant, usually I can do just as well at home. But this steak was amazing. This was a two inch think tenderloin that was perfectly medium rare from edge to edge! The very outside edge was seared perfectly too. Whoa, I thought at the time, how did they do that? How can you have a steak so uniformly done? The answer of course is Sous-vide.

Since then, I’ve been reading the books, like Modernist Cuisine at Home, and lots of articles on “Serious Eats”, I’ve seen it done on Chopped and Iron Chef. Then the other day I got a Kickstarter notice about the new Anova Precision Cooker. Its an immersion circulator that lets you do sous-vide cooking without one of the big fancy sous-vide appliances. This just clips on the edge of one of your big pots, and away you go. Alton Brown would love it. Unfortunately this new fancy one that even connects to your iPhone will not be available until later this year, so I decided to give the Nomiku a try. It was the highest rated of three options on Amazon, and was Prime Eligible. If I really like it I figure I can always upgrade to the Anova later. So here's my setup for an afternoon of high-tech cooking:

/images/SousVideSetup.JPG

The idea behind sous-vide cooking is that you can cook at a lower temperature for a longer period of time. bringing the water and your food into equilibrium. Whats cool about that is that you can cook a steak to exactly 132 degrees, and you can leave it go for an extra hour or two and it will remain at the perfect medium rare done-ness. You can also cook chicken. without heating it to 165 degrees!

What!? I thought? this cannot be. But then I started to do some reading and once again science rocks. http://www.seriouseats.com/2010/04/sous-vide-basics-low-temperature-chicken.html It turns out that you can kill all the nasty bacteria at 135 degrees, it just takes longer! Like 90 minutes! Heating chicken to 165 kills the bacteria too, instantly. But it also gives you dry chicken.

One other aspect of sous vide is that you use a vacuum sealer to seal your food in plastic before you immerse it in the water. This allows you to season the food and add aromatics to your bag. Yum.

Of course this also precipitated a quick trip to the hardware store to get a FoodSaver vacuum sealer. Yay more kitchen toys.

Right now, I’m trying a steak. I sealed it up and dropped it in. In a couple of hours I’ll get out the cast iron skillet and heat it up good and hot, so that I can sear the meat when it comes out. A glass of Rombaur and a baked potato and I’m all set.

Development Tips

I have been writing programs since I was in 9th grade, that would be 35 years (Yikes!)  I have more than put in my 10,000 hours to attain some level of mastery, but I like to think of it as wisdom.  Studies have shown that there can be huge differences in the ability level of even the most experienced coders.  More than a factor of 20, in some cases! I think beginning and intermediate CS students really struggle with this. They see some of their classmates streaking on ahead of them effortlessly writing lines and lines of code. But for them its a constant struggle. I've watched some of my students really struggling with the latest homework assignment, and I felt compelled to write down some "words of wisdom" to try and help them through the rest of the semester.

I have been lucky enough to work with some of the best developers in the world during my career.  Here is a summary of  some tips and things that I have observed.  I practice all of these things in my own development work, and you should too.  In my opinion there is no more valuable advice than the first section on Incremental Development. But, I would love to hear from friends, and former students. What tips would you give beginning to intermediate students on writing software?

Read more…

PyCon 2014 Keynote Shout Out

I am going to have to go to PyCon. Not next year, as I'm going to be in Malta at the time, but hopefully in 2016. I don't know how many people attend, but the number is big, and they have sold old every year for the past three years.

I just got done watching one of the Keynote presentations online from PyCon 2014 held in Montreal April 9-17. I'm linking to it below, because it goes right to the heart of most of my academic work. But, it was especially exciting at the 20:05 mark. Where she highlights interactivepython.org and the Skulpt projects!

Ipython in Nikola

Using Notebooks in your blog, and the growth of Runestone Interactive

Another great feature of Nikola is the integration of iPython and notebooks into the blog workflow. Now I can create and publish a notebook like this one.

This notebook shows a nice graph of the daily use of http://interactivepython.org and how our log info has grown over the past two years.

In [2]:
import pandas as pd
df = pd.read_csv('/Users/bmiller/Projects/eBook/dayout.txt')
df.columns=['day','actions']
df['dtime'] = pd.to_datetime(df['day'])
df['csum'] = df['actions'].cumsum()
In [3]:
from ggplot import *
ggplot(df, aes(x='dtime', y='csum')) + geom_line() + geom_point()
Out[3]:
<ggplot: (-9223372036580173757)>
In []:
 

Moving to Nikola

When I moved this blog to Octopress in January, it was inspiring in many ways. There were two things that slightly bugged me.

  • Octopress is entirely too ruby based. Rake, and all of that made me feel bad, like I was cheating on Python. Surely there must be a similar tool in the Python world I thought to myself.
  • Octopress uses markdown. I really like my restructuredText, and its just a bit irritating to have to think about the differences when I want to do a blog post.

Well, this weekend I found a couple of new static blog site generators that were python based, and after playing around with Pelican, and Nikola I settled on the move to Nikola. I really like the image galleries and slideshows that are built in, and I feel like I can jump in and start hacking if something develops that I really want to change. Plus, having already hacked a bunch of restructuredText directives, I know I can extend my blogging tool to do all kinds of fun things.

Share
Google