D520 Week One – 2010

There are not too many changes from last year, and those are mostly for the better.  The overall format for the course is the same – 4 hours a week (all in the lab) for 15 weeks, with a two-week break about two-thirds of the way through.

I did make a slight change to how I’ll use the 4 hours – the course used to be 6 hours per week, which was roughly divided into two hours of lectures, two hours of tutorials (i.e. going over code as a class), and two hours of lab exercises (i.e. students working on code alone, with one-on-one help from me).  With the change to four hours, my plan was to keep the two hours of labs, and work the tutorial content (considerably reduced) into the lecture hours.  This didn’t work particularly well – it took the students longer than I anticipated to grasp the new material and IronPython in general, and so we spent a lot of time working through the lab exercises together (either the week after they attempted it alone, or as the first attempt) – essentially the lab hours were reduced (nearly eliminated, although they still worked on the projects alone) and replaced by tutorial time.

For 2010, I’m keeping it this way: around 2 hours of lecture-style delivery, followed by around 2 hours of tutorials (e.g. we’ll walk through building MultiDoc from IronPython in Action together).  The students still have weekly lab exercises, but they will need to complete these in their own time (an added benefit is that this forces them to spend time out of class on IronPython, rather than hoping they would work through the textbook alone).  I expect we’ll spend 20 or 30 minutes at the start of several classes going over the previous week’s lab exercises.

I again gave the students a set of revision exercises [PDF] (example answers next week), a course outline [PDF], and some brief notes [PDF].  The revision exercises are pure Python, and there are some additional ones from last year – I hope that all the students can complete the first 6 or so fairly easily, the next 3 or 4 with some effort, and will probably find the final two somewhat tricky.  The notes have only three sections this year: which chapters of the textbook (again the excellent IronPython in Action) are covered (and a couple of sentences that summarise them or point out which parts are important to us), key points, and example code.  Last year the notes had a “Tools” section each week as well – as outlined below, this is simpler this year, and so I walked everyone through the first install, and will make a one-file summary of tools available in the next couple of weeks (e.g. including alternative editors).  Just as with last year, none of the students had obtained a copy of the textbook in advance, so we started completely fresh.

I’m still providing recommended reading (two links each week – a lot of changed material from last year – particularly shorter content, and I’ve tried to group it together in logical sections more this year).  This week it was “How I Hire Programmers” (Aaron Swartz) and “Hardware is Cheap, Programmers are Expensive” (Jeff Atwood).

The first part of the lesson was, as always, the mandatory-but-dull course introduction, which isn’t important here.  In the second part, I briefly covered what IronPython is (particularly how it differs from CPython), what .NET is, and why we would want to use IronPython.  I again improvised this (ensuring that the key points were hit), although it is loosely based on the material from the first chapter.  I hope that the students will at least skim the first chapter and so get this material in two styles.

Last year, IronPython 2.0.2 was released the day before the first class and 2.6b2 was released the day after class.  This year, IronPython 2.7a1 was released about a week before the first class – this still required some last-minute changes to the provided material, but was considerably more time!  I had planned on only using IPy 2.6, but the 2.7a1 installer includes the Visual Studio integration (more below), so I’ve switched to that.

Installation was much simpler this year.  In the last year, the IronPython team have produced IronPython tools for Visual Studio.  This fills one of the biggest gaps in the IronPython world – good integration with Visual Studio.  Although there is appeal in starting in a plain editor (e.g. Komodo Edit or Davy’s IronPython Editor), it’s much simpler for the students to just move to Visual Studio (even without using the form designer at first), or stick with Notepad++ (which they use in the earlier CPython course).  Last year I walked through installing Komodo Edit and IronPython, and outlined other editors that they could use.  This year, I simply walked through installing IronPython 2.7 and the Visual Studio Integrated shell (there was one additional install – .NET 4 is required first and wasn’t installed already).  For most students this was only three installs, which were generally smooth (except where the virtual machine was already in a bad state).  They generally already had a PDF reader installed (or used the host for that), so I skipped over installing Adobe Reader as well.

I prepared better this year as well (knowing what went badly last year), and had the standalone (i.e. no network access required) installers for .NET4, the 2010 Visual Studio Integrated Shell, and IronPython 2.7a1 on a USB drive, so the students simply copied the installers from there, rather than download them all (IPy 2.7a1 is only around 10 MB, but VS is about 180 MB and .NET 4 around 35 MB).

The students are able to use one of two prepared virtual machine images (last year’s notes have details about the lab setup, which hasn’t changed since then) – “Fat Server” and “Thin Server”.  These are basically the same, but “Fat Server” has a lot more pre-installed (in particular, many Microsoft tools like Visual Studio 2005, Visual Studio 2008, and some web development tools).  In previous years, the students had generally been using “Fat Server”, but this year they were only using “Thin Server” (i.e. no existing Visual Studio install).  Last year, late in the course, we used the Visual Studio forms designer to create C#/Visual Basic forms that we subclassed in IronPython.  Since we can use IronPython in Visual Studio this year, I may skip over that (perhaps demonstrating it, but not requiring the students to do it).  Since they only have VS 2005 or 2008 available, and IronPython tools needs 2010, there isn’t really any need for the “Fat Server” image, so they generally continued with “Thin Server”.

We will have to do a couple of other installs later (Silverlight, PowerShell), but those can be done at the time, and I expect they’ll be fairly straightforward as well.

My hope is that next year I can completely remove the need to install anything.  I expect that I’ll be able to get the version of Visual Studio that’s pre-installed on the images to be updated to 2010 (which means that the .NET 4 and integrated shell installs can be skipped).  Since 2.7 is the last in the Python 2.x line, there won’t be a new major version, so we should be able to continue with using 2.7 (at some point IronPython 3 will be released, but changing to Python 3 will require more work – in particular the earlier CPython course should change in the same year).  Although it’s likely that there’ll be minor updates between January and July 2011, those may not include anything significant with respect to the course.  As such, I’ll probably have IronPython 2.7 pre-installed for the students – we can always update it if necessary (even then, it should be a single install).

Once the installs were done, going through the simple IronPython examples was very smooth (none of the hiccups from last year, thankfully).

The second half (actually less than half once all the installation was done) of the class was again about Python revision.  The students worked through the lab exercises, which we’ll go over next week.

Advertisements

One response to this post.

  1. […] Python, teaching. Leave a Comment No radical changes from either last year’s week two or last week.  In a way, this is the real first week – in the previous week we learn about the course and […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: