D520 Week One

As promised, here’s my material from the first week of “D520: Programming” (in IronPython).  I gave the students a set of revision exercises [PDF] (and example answers [zip]), a course outline [PDF], and some brief notes [PDF].  The notes have four sections (this pattern will continue): which chapters of the textbook are covered this week (and a couple of sentences that summarise them or point out which parts are important to us), the tools that are required this week (since this is the first week, this section is large, covering installation of Adobe Reader, IronPython itself (including putting it on the PATH), and several IDEs (as previously covered), including configuration), key points, and example code (the examples that I plan to use in class).  For anyone interested (chiefly: me in about nine months time, when I’m planning the 2010 course), here’s a summary of the first week.  It’s rather long (2100+ words) – the summaries of future weeks should be shorter. Continue reading “D520 Week One”

IronPython Course Notes – The Plan

Since I decided to use IronPython as the programming language for teaching D520 at Northtec, I’ve planned on putting my course material online so that anyone else planning on using IronPython in teaching can make whatever use of it they can.  There won’t be a huge amount of material, especially in this first year, and especially since I managed to find an excellent textbook to use, but there will be some exercises, assignments, an exam, and so forth.  Each year I teach a course I add new material, and while some material is replaced or removed, usually the old material stays, so the amount of material gradually increases.

What I haven’t been able to decide is how to put this material online (the students have access to it via a Moodle installation, but I don’t want to make that publicly available).  I toyed with the idea of putting it up in wiki format (but that seemed like a reasonable amount of work and I doubt there will be contributions from other people), with using iWeb to create a small dedicated site (mostly to play around with iWeb, which I have never really used, but that seemed like a lot of unnecessary work), or with putting it on Google Docs and sharing it that way (but I write the material in Pages and publish as PDF, so that doesn’t suit well, since I’d have to convert to Word then to Google Docs).

What I’ve finally decided is that I’ll just put it up here.  It’s already setup, I’m a bit busy to put much else up at the moment so it won’t be crowded, and it’s very simple for me to do.  I’ve further decided that it would be best to publish it bit-by-bit (since no-one else needs it at the moment anyway – if I’m wrong about that, please contact me).  Each week, after the class has finished, I’ll post all the material I used that week, and some commentary about how well it went.  I think this commentary will provide added value (including for me, when I’m revising the material next year), and it means that it’s easier for me to update the material as I go (although I’ve prepared the whole course, I expect that there will be changes since it’s so different than last year’s course).

I expect that as I continue to use IronPython in a teaching context, I might have additional comments that I feel like posting, so those will be nicely interspersed with the teaching material.

I’ll put everything in the “Teaching” and “Python” categories, so it’ll be easy to ignore everything else here if anyone is interested in using this material.  I’m making it available under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 New Zealand License (I include using it in a similar course as non-commercial).

IronPython editor postscript

I earlier tried various editors I was considering using to teach IronPython.  One of the glaring omissions was Eclipse/PyDev, which has built-in support and is a very well-known IDE (particularly in the Java community).  The main reason that I skipped Eclipse was that when I was searching for an IDE to use professionally about five years ago I tried Eclipse (for Python, C, and C++ development) and I really hated it – the IDE was very slow (especially to launch), it was very Java-centric, and just didn’t suit me at all.  I’d briefly tried Eclipse before that as well, with similar results.

Over the last few days, I decided that I was probably being unfair, and since this was a choice for my students rather than for me personally, I really ought to try Eclipse (with the PyDev extensions).  I also noticed recently a post about using IronPython with NetBeans – I’d heard of NetBeans before, but only in a Java development context, and since I stay as far away from Java development as I can, I had no experience with NetBeans at all.

Eclipse/PyDev

I was right to re-examine Eclipse.  The things that I remember bothering me so much five years ago (speed, the interface) seem to have been completely addressed, and it looks like a quite usable product.  When adding PyDev (which was quite simple), there’s support for IronPython that appears completely built-in (although it’s still obvious that Java is the #1 choice).  It seemed like a quite reasonable contender, unlike I tried to actually configure it to use the IronPython interpreter (which has to be done manually).  I was using a completely standard, fresh, installation of IronPython 2.0.1 (from the .msi) installed in the default location (here ‘C:\Programs\Iron Python 2.0.1’) with ‘Eclipse Classic 3.5’ and version 6u14 of the Java Runtime.

I believe that, in theory, you can click the automatic configuration button, or manually locate the IronPython interpreter, and it’ll just work.  Unfortunately, for me nothing seemed to work.  The error message indicated that having spaces on the Eclipse path could be a problem (which seems pretty shocking in 2009), so I tried moving Eclipse to C:\, which didn’t help.  I tried moving IronPython to C:\ (and renaming the folder to have no spaces), and that didn’t help.  I imagine that someone more familiar with Eclipse, or with PyDev with CPython/Jython, might have been able to solve this easily.  However, if I can’t figure it out in 10 minutes, then I am not at all comfortable with telling my first-year students to use it (even though we walk through the installation together, some of them will need to do that by themselves as well).

NetBeans

It wasn’t entirely clear which version of NetBeans to use, but I presumed that the most appropriate was NetBeans 6.7 “Python EA2”.  Although the post I saw indicated that you needed to rename ipy.exe and ipyw.exe, I found that just selecting ipy.exe worked fine.  I quite liked this IDE, and it appeared (although I didn’t use it for long) that using IronPython worked fine.   There’s no graphical form designer, so NetBeans is in the same category as Komodo Edit (which I discussed previously).  In many ways, it’s probably a better choice than Komodo Edit (in that the IronPython integration is simpler to do, although it does require that Java is installed), although I don’t know if there is any way to provide .NET auto-complete.  It’s a fairly full-featured IDE, like Komodo and unlike DIE, which would normally be a positive, but in this specific case (first-year programming students) is actually a negative, since they need to ignore all the ‘team’ functionality, and you have to work within projects (which is true of Visual Studio as well).  This is an “early access” version – since I’m not familiar with NetBeans I don’t know how unreliable that makes it – it makes me a little nervous about suggesting it to students, but I certainly didn’t have any trouble with it myself.

Conclusion

If you’re able to get Eclipse/PyDev installed, then I suspect it might slightly beat out my previous recommendations of Komodo Edit and DIE; since I didn’t get it working, I can’t recommend it to the students.  NetBeans, however, will get added to the list of suggested tools (alongside Komodo Edit and DIE).  If I wasn’t so familiar with Komodo Edit, I’d probably use NetBeans as the editor I use to demonstrate, but it didn’t wow me so much that it overcomes the familiarity.

Choosing an IronPython editor for teaching

The Northtec D520 “Programming” course is changing to IronPython (from Visual Basic) this year, so I have to figure out what editor/IDE the students should use.  In some ways, Visual Studio would be ideal, since they need to get exposed to that during the course (and it’s an excellent IDE, with a really great form designer), but since there isn’t any real IronPython support in Visual Studio (hopefully coming in 2010), it’s not really a viable option.  Instead, they’ll start with a simpler editor, and then briefly learn how to use Visual Studio’s form designer and subclass the forms in IronPython (as described in IronPython in Action).

The requirements here are a bit different than when selecting an editor/IDE for actual development work.  Firstly, it needs to be free (at least for educational use), and it needs to be reasonably simple to use the basic functionality (since these are first-year students).  Code-completion isn’t necessary (on the one hand, it helps them out while they are learning – on the other, they rely a little too much on it), nor is a built-in debugger, or support for complex projects.

I considered seven different editors/IDEs – there are a couple of others, but they either seemed too young (e.g. IronPython IDE, IronEditor), or inappropriate for other reasons (e.g. ZeusEdit is not free, I can’t stand Eclipse.  UPDATE: I decided to try Eclipse and Netbeans after all).

Continue reading “Choosing an IronPython editor for teaching”

Useful / cute googling

Inspired by a Coding Horror post.  Things that I would demo to an “Intro to IT” class if I teach one again.

I don’t think you can get directly to NZE listings (i.e. “NZE:AIR” doesn’t work like “GOOG”) – you have to go via google.com/finance.  I don’t think UPC codes are used here, either.  Looking up a VIN number would be great, but I’m guessing that doesn’t work, and can’t be bothered going and reading my VIN at the moment).

“Santiago” (Mike Resnick)

This was in the collection of second-hand books that I bought a few years back, and which form the bulk of my unread stack.  To be honest, I wasn’t really expecting much, judging by the age and the cover (yes, I know the cliché, but without the cover, what’s left to judge by?).

However, I really enjoyed this novel, and thoroughly recommend it.  It’s a fairly typical setting, but there are interesting characters, especially the central character and the title character.  I quite enjoyed the way that the focus changes from section to section.  I also felt that it ended reasonably well – it wasn’t a super obvious ending, although it wasn’t a surprise either.

“The Return of Santiago” (Mike Resnick)

I really enjoyed “Santiago: A Myth of the Far Future”, so I was quite hopeful about this sequel.  However, while this was a good story, this wasn’t great.  It was pretty obvious how it would turn out all along, and the characters weren’t as interesting as in the original Santiago story.

I would still recommend reading it, but definitely check out the previous Santiago book first (especially since the sequel has spoilers for the first book).

Back to the short reviews/comments: that’s it!

“The Science of Discworld III: Darwin’s Watch” (Pratchett, Stewart & Cohen)

I really liked the first Science of Discworld, and enjoyed the second as well.  I’ve always liked the idea of mashing up educational material and fiction – here it’s loosely interspersed (odd chapters are lightly educational, even chapters are a related Discworld story), and I thought these were fairly well done.

This one, however, wasn’t that interesting.  I chose to read it now because of the Darwin anniversary stuff that was hot recently, so it seemed somewhat relevant.  The history was interesting, but the science wasn’t really.  The Discworld story was ok, but that part of the Science books has never been stellar (certainly not as good as a regular Discworld novel).

It was good enough that I’d still check out a Science of Discworld IV, but I’m not hanging out for it or anything.

ta-meyer@ihug.co.nz, t-meyer@ihug.co.nz, tameyer@ihug.co.nz

I was ihug customer #377024, and signed up 20 Aug 1997.  However, as of a couple of years ago, I wasn’t actively using my account (they finally made me angry enough to switch to someone else).  I kept the account alive to keep these email addresses – in particular ta-meyer@ihug.co.nz had been active since 1997, which was when I really started using the wider Internet (access from Mum and Dad’s in Whangarei previously was extremely expensive, so I didn’t really do that much).  It wasn’t my first email address, but it was the one I had for the longest time, and so was spread about all over the place.

I occasionally used the Ihug (now Vodafone) account as an emergency backup, but the cost didn’t really justify that.  I’ve monitored the email coming in for a while, and have moved/unsubscribed most of it.  Some of the rest I can’t unsubscribe to (or can’t easily), so will just have to bounce, because as of today, I’m killing these accounts.

As an aside: I would happily pay something less than $5 a month to keep these accounts indefinitely, with some sort of low bandwidth cap (e.g. 50MB/month), which would easily cover the negligible expenses that Vodafone incurs for hosting them.  I just don’t want a full account.  However, they don’t offer that, so I’ll never use an ISP’s email account again (I haven’t since these).

For now, if you need me and found this page, please use tony.meyer@gmail.com (using an ESP address is only a bit better than an ISP’s, but gmail is likely to be around for a while IMO).  You could use tony@tangomu.com or tony@badtomatoes.org if you’d prefer something that was wholly mine (but I don’t get a lot of mail there, so check them less often).

Goodbye ihug.