An overdue post on the latest course I taught, which ended about 2 weeks ago. I taught a group of 9 people (8 adults, 1 teenager) of various backgrounds the basics of programming, using Python. It went well overall, and the class atmosphere was enjoyable.
For...
Unfortunately I still fail to explain some concepts clearly -- namely the dreaded for loop. I kept telling myself I needed to change the way I introduce it and finally did so, and wow. It went even worse than before. I could see in my student's eyes how they were trying to understand, until eventually shrugging it off when I couldn't find any different way to explain it. It may have come across a bit better eventually when we started working with files and used for loops to go through every line, but introducing the concept went very blergh. Definitely need to do it differently next time. I think I will try to introduce the for loop over 2 sessions: one where we only see and do exercises related to "for i in range(0, x)" and separately introduce "for item in my_list".
I don't know if I just forgot before, but failing to get a concept across is really, really depressing. I was bummed out for a while afterwards, wondering if I'm just making more damage than good and messing up my goal of making programming less intimidating.
...Yet another reason to do better next time!
Exercises
I should make sure to have at least one "Fill in the blanks" and "Change this existing program so that..." type of exercises for every concept. I think they encourage students to read and try to understand existing code -- an important skill to develop, and it also makes the first attempt at using a new structure more manageable.
In general, I'd really like if I could find a neat program that could be cut down into exercises relating to each concept, that'd build up to something cool and awesome as the course goes on. It would help get across that complex programs are really made up of simpler pieces ; if you can't figure out how to do something, break it down further. I haven't really figured out a program that fits the bill yet.
Overall, material-wise I'm getting there (except for For :|), it'd be worthwhile focusing on improving the exercises for the next course.
Homework
OMG some people actually did the exercises as homework this time :O Wow. I tip my hat to them, it's great and it paid dividends for them. Unfortunately it also meant they had nothing to do while the others were catching up, so... I should probably give away only a portion of the exercises as homework, and save a few for the actual session. (The idea with the exercises is that everybody should get at least 1 done before we move on ; having many gives the faster students something to do while others don't feel too rushed.)
Duration
I taught over 5 weeks this time (2h30 in the evening with a 20-30mins break), and I will do 6 weeks next time. For real beginners it's still reasonable and it will let me take more time on concepts like For, and maybe an opportunity to show at the end what else there is to programming, and give ideas on which direction they could go on from here (GUIs, web development, robots...).
Speaking of robots
At the last session I brought a Finch, which I still haven't had much time to play with :') But with the Jython bindings it was possible to show a 5 lines Python program that has an effect in the real world. The Finch was very popular!
I want to play with the robot more, and see if perhaps it would make sense to use it to teach the whole beginner course at some point in the future (which would bring its own set of issues, $$$-wise).
Student feedback
As usual I asked if students could fill in a feedback form.
Everybody agreed they learnt a lot. "Fun" and "interesting" were in about everyone's "3 words to describe the course", with"hard" and "challenging" occasionally thrown in there :) "Useful" came up in half the forms too, which makes me happy.
The projector wasn't great with yellow which unfortunately was the default colour for strings in the IDE. It would have been worthwhile spending the time on fixing that rather than let people squint (sorry :().
A couple of requests to link more clearly exercises with the real world. So very difficult when we're still introducing new concepts! But definitely something to strive for.
Someone suggested writing a sample program where every line is explained (e.g. if x: <-- this will do...). I think it's a good idea, I will try for next time. It would be useful as a reference.
I should be teaching this course again around March. Any pointers to beginner exercises, general comments, teaching advice, teaching programming tips all very much welcome!
This is a good reminder that even seemingly simple programming concepts need some getting used to.
In the Python courses that I gave, I think I always introduced "for" in terms of "for item in list". I do introduce data types including lists and dicts first, using the interactive shell as a kind of "calculator for more than numbers". By the time I get to control structures, "for name in the_beatles" is the most natural thing to do. Even "if name == 'Ringo': continue" should feel almost like plain English at that point. At least, that's what I hope for. :-)
The Finch sounds like a great idea! (Did using Jython as opposed to plain Python present any issues?) #1. Posted by Michael Fötsch (Website) on Sat 03 Dec 2011, 14:11
The interpreter as a "calculator for more than numbers", I like that metaphor! Thanks!
I usually show some things with indexing and addressing lists, which is why I don't stick only to 'for item in list', but obviously I've been going too fast with it. Maybe more work upfront with lists on their own would help :)
I probably haven't done enough with the Finch to see if Jython brings up any issue. Besides the long import name for the Finch library, and culture shock of the Javadocs, it was seamless for a "hello, world"/"make robot move forward with a red nose" program. I only had time to play with JES for the Finch [0] which is a bit clunky but includes everything including the documentation within the IDE as well as a "Load program" button. Simple enough so far!
[0] http://www.finchrobot.com/Creating%2C%20Compiling%2C%20and%20Running%20Programs%20for%20Finch/jes-jythonpython #2. Posted by jpichon (Website) on Sat 03 Dec 2011, 18:14
> The interpreter as a "calculator for more than numbers", I like that metaphor! Thanks!
You're welcome. ;-)
> Maybe more work upfront with lists on their own would help :)
To make things useful from the start (before control structures), I introduce things like "sum([1, 4, 12, 27])" or "lst.sort()" very early, without formally discussing functions or objects. This gives me enough to build interesting examples around "if", "for", etc.
This works well with people who are fine with seeing isolated pieces of the puzzle, until eventually everything falls into place neatly. It doesn't work so well with people who need a complete picture at every step of the way. It's challenging to find a balance...
> I only had time to play with JES for the Finch [0]
Looks okay. I'll check what my company's budget for Python trainings is. ;-) #3. Posted by Michael Fötsch (Website) on Sun 04 Dec 2011, 14:27
Hi! Good to see I'm not the only Python hacker with a Finch. I've actually been to EuroPython a few times but not since it was in Vilnius I think.
Have you looked into connecting to the Finch via regular Python? It seems like it shouldn't be too hard... just bits over the wire right? But communicating with non keyboard and mouse HID devices just isn't something there are a lot of examples of.
Anyhow, have you looked into it? If I can start talking to it I'd like to make a Finch plug-in for Turtle Art. #4. Posted by Tom Hoffman (Website) on Fri 03 Aug 2012, 4:12
I haven't looked into doing anything that wasn't using the environment provided by the Finch people. And I'm afraid the Finch has been sitting up unused on my desk for a long while now. I found the Java stack traces very offputting while working with Jython, and though it wouldn't work well with the way I like to teach programming.
I hope you've had better luck! #5. Posted by jpichon (Website) on Sat 19 Jan 2013, 21:16