My kids are innumerate

I ran into an unexpected problem in the programming class: these kids can't do simple math. They couldn't figure out how to make changes (i.e. items cost 12.74, given 20.00, print the number of coins to return). They couldn't even follow an explanation of how to convert a number of the numeric keypad (on the right of your keypad) into its row and column!

Now, I'm willing to give them a pass for the "making change" problem, since that involves finding the remainder after division. I don't know why why I'm willing to forgive them for being unable to grasp a piece of grade 5 math (I think), but I am. Maybe it's just because the numbers can have four digits.

But the numeric keypad?!? Going from 7 => (0,0), 5 => (1,1), 1 => (2,0), etc?! This is math on SINGLE DIGITS.

Hey, as an exercise, stop reading the blog and try to figure out the forumlae. You need one to calculate the row number, and one to do the column number. I'm really curious about whether you find it hard.

Go on, try it. I'll wait. Here's what the keypad looks like, in case you're on a laptop and can't remember:

7 8 9
4 5 6
1 2 3











If you want a hint, try subtracting 1 from the numeric keypad numbers, so that you have numbers like this:

6 7 8
3 4 5
0 1 2











Another hint? Well, the numbers in the left-most column are 6, 3, 0. Those are all divisible by 3, giving us 2, 1, 0. In fact, if you divide any number by three and round down, you'll get 2, 1, 0 (depending on which row it's in).

But we want the reverse of those: 0, 1, 2. How can we get from 2, 1, 0 to 0, 1, 2?












Right, we just take 2-x. Putting this all together, we have:

row = 2 - (number-1)/3
(if we always round down the division by 3; the computer does that automatically when we do arithmetic on integers)

Once we have the row number, subtracting three times that value from the initial number gives us:

0 1 2
0 1 2
0 1 2

So it's trivial to figure out what the column is. On the computer, we can use the remainder ("%" -- it looks kind-of like a division slash "/") operation:

row = (number-1)%3

I really didn't think that this was hard, but the kids were watching me explain this like I was proving the central limit theorem or something. This left me quite sad -- how badly can the high school system fail students such that university-level children can't do this kind of simple math?!?!

Anybody with experience teaching first-year students, or advanced high school students: am I being unreasonable here? And do you have any tips about how to get them comfortable with such math? Unfortunately, being able to solve problems like this is rather critical to programming, but this course is already pretty full as it is. I really don't think I can afford to spend two weeks on "math thinking" exercises, even though that's what they desperately need. :(


On the plus side, giving a lecture to them was really fun. It was in one of the lecture theatres in the engineering building, which has real, honest-to-goodness blackboards. Blackboards with decades of chalk powdered onto them. I'm also not familiar with chalk (in the past, I've always lectured from pdf slides or with a whiteboard), so I kept on wiping my hands on my jeans or sweater. I was covered in chalk by the end of the hour... it was just like being a kid and playing in the mud. You know, when you get completely filthy and you know it'll take ages to clean up, but you're having too much fun getting dirty to care? Just like that, but instead of mud or snow, I was (figuratively) rolling around in chalk.

Posted at 2010-02-27 05:46 | Permanent link | Comments

Back to normal life

The massive flurry of curriculum development has died down. The course is running better now -- I still wouldn't say "smoothly", but certainly "better than before". It's time to move on.

I'm gathering an large list of items to fix in the course for next year. Some of them were predictable (I mean, I should have predicted them, and consider their unfixed states to be personal failures), but most are just conclusions from observing the exercise-experiments. Any new set of exercises are going to have weak points; finding a problem in new material isn't a failure. The only failure would be in not learning from it and not fixing it for next time.

Last weekend, I turned my attention back to my research. After a day of figuring out where I was (I was in the middle of various projects, but dropped everything in my race to fix the programming course), I got back to work. A few days later, I happened to check one of the conference websites while my computer was compiling stuff, and discovered that the deadline was less than a month away. I thought I had an extra month or two. Oops.

I think it's a good thing, though. Close deadlines have a wonderful effect of concentrating one's mind. I'm hopeful that I can send two papers. I can definitely do one of them, and I'm confident that it'll be accepted. The conference is in the Netherlands, which is quite close to Glasgow. I'd really like to go to that one.


I'm also starting to think about mundane issues: what acommodation I might have for next year, my summer plans, etc. Still nothing definite, but I'm gathering information.

Finally, I had the oddest urge a few days ago. My room was getting quite dry, so I tried putting a jar of water near the radiator (a cheap attempt at a humidifier). It occurred to me that my room would look a lot better if I had some flowers or a plant in that jar.

Plants? Flowers?!?! Is this what going old does to you?! I didn't think I'd be going senile quite yet... maybe this is a UK thing? Gardening seems to be bigger here than in North America, so maybe I'm subconsciously picking up the culture...? Whatever the reason, this was definitely an odd urge.

Posted at 2010-02-18 08:30 | Permanent link | Comments

Bach, Knitting, and Thinking

Some people say that knitting helps them think: keeping the hands busy leaves the mind free to wander. I've been doing the same thing -- but by playing Bach's second partita on the violin. I know that some classical musicians are wincing at the notion, but blasting through the piece without care has really helped me!

When I began practicing playing violin regularly last Dec, I made a conscious decision not to be picky. In the past, my violin playing kind-of trailed away after a week or two. This time, I wanted to keep on playing for months. And more than anything else, I wanted to feel natural playing the violin.

I think I've reached that stage. I can play the first four movements of the partita completely on automatic pilot (with the exception of remembering whether I"ve played a section once or twice... I don't think I've been repeating things the right number of times). By "automatic pilot", I don't just mean "memorized" (that's a trivial task) -- I mean "my conscious thoughts are entirely devoted to planning programming exercises for my course, planning research activies, or thinking about pretty girls". Some part of my brain controls my fingers and arms, another part knows how the music is supposed to go; the two combine and do their task with the same amount of conscious thought that I apply to walking.

"Unthinkingly" playing music is nothing new for me; I did it quite often on the cello when I was a kid. I don't think I started to break myself of the habit until my early 20s. I can't remember ever doing it on the viola. Oh, my mind definitely wandered from time to time, but I never romped through half a Bach unaccompanie sonata without noticing that I'd finished a movement and started the next one.


If it sounds like I'm bragging... well, yes and no. I mean, yes, it's an impressive feat of memory and mind activity. It indicates a high level of familiarity and comfort with the instrument. It means that I can concentrate on lots of other people's activities in ensembles -- I'm very good at playing in amateur chamber music groups, since I can track everybody's parts and pinpoint where problems occur. In orchestras, I make a game out of this activity: can I recognize a problem before the conductor does (or at least, before they say anything)? If I know the conductor, can I predict what they're about to say? (for two conductors, my prediction accuracy was over 50%)

But there is a downside. Not thinking about the sound you're producing means that you won't be producing the best possible sound. Now, in the context of an amateur orchestra, that's not a terrible thing. But in the context of serious music-making (especially in a small ensemble or solo), this is a terrible thing. If you want to take music seriously, and if you want to be taken as a serious musician, then playing on automatic pilot is one of the worst possible things you can do.


However, I'm not a serious violinist. I know that I could improve much faster if I carefully analyzed myself as I played. After years of "breaking the habit", I'd never play cello without such self-analysis. And I always stress the benefits of self-analysis when teaching music.

I've decided, after careful thought and self-analysis, that the best thing for me is to play violin unthinkingly. Because playing unthinkingly is still better than not playing at all.


Besides, playing on automatic pilot gives me great thinking time. It keeps the hands busy while leaving the mind free to wander. As a highly self-critical teacher and researcher, a wandering mind is the most important thing in my life. If my hobby can support my research, they both win!

Posted at 2010-02-16 04:19 | Permanent link | Comments

Academic culture shock

I think I'm suffering from academic culture shock. The two sides of the Atlantic seem to have very different views of undergraduate teaching. From my Canadian standpoint, UK universities seem to have shockingly little regard for (what I would consider to be) one's duties to one's students -- from administrative staff, as well as from teaching staff.

Before I continue, I guess I should admit that I'm only basing this on what I've seen from half a dozen courses in one department at one university in the UK, plus a few discussions with students in other departments (but at the same university). So I guess one should take it with a grain of salt.


I think the best way to sum it up came from a Discworld book. I can't remember the exact quote, but it was something like: "Professors put students in close proximity with books, in the hopes that something would flow from the latter to the former. Students placed themselves in close proxmity to the pubs, for exactly the same reason". The overall attitude seems to be that learning happens somehow, but it's not worth trying to figure out how it happens, how it could be improved, or how to ensure that it actually occurs.

For example, the class schedules are very elastic. In my department, they don't even try to start scheduling the labs until Thurs or Friday after lectures begin. For my 1st year programming class, we only have labs scheduled for the first half of term. We've repeatedly told the person responsible for lab scheduling that we have labs for the entire term, but his only comment (two weeks ago) was that it would be "tricky to fit it in". I have no clue what happens next week. Or the week after? Or hey, maybe it's this week that we lose our scheduled lab times!

From my flatmates, I hear that graduate classes might occur one day, then not for another week, and then they discover that they changed the schedule and they missed a previously-cancelled class that was un-cancelled. They're from the US, so they're also used to regular classes, and find this quite annoying.

I guess it stems from the old style of university, wherein students went to a university to "read" a subject -- meaning that they literally read books, and had lectures as special events. Now, there's nothing wrong with that if the universities are only taking the top 0.0001% of the population (or whatever it would have been in the 16th century). If somebody is truly intelligent, it's not possible to stop them from learning, so it doesn't matter if you make any attempt to teach them at all.

But as 1%, 5%, 10%, and IIRC over 20% of the population goes to universities, you're going to have students who can't teach themselves. Now, I'll be the first to state that universities shouldn't be taking that many students -- everybody would be better off if the technical colleges took the bulk of adult education. Businesses would have better-trained workers for their jobs, the vast majority of non-academic-oriented students at a university would have better skills for their careers, professors could focus more on research, academic-oriented students could get more theoretical/research-oriented instruction, governments would have less people exposed to critical thinking... everybody wins! To be fair, this shift has already started in British Columbia; I'm not claiming to have a new idea here.

But until such thinking spreads -- say, by cutting undergraduate intake by more than 50% -- then I think that universities have a duty to teach. Not just go through the motions of giving the same lectures you've given for the past 10 years and failing 40% of the students, or treating programming labs as an afterthought to the class schedule. If you're going to do it, do it right.


Part of the problem is the department-specific nature of UK universities. In Canadian universities, students take classes from many departments, and switch between majors quite easily. I recall hearing that the average is switching one's degree 4 times throughout an undergraduate degree; that sounds quite believable to me.

As a result, most academic departments in Canadian universities view their first-year classes as being partly a recruitment drive. In most first-year classes, only 10-30% of the students will be specific to your department. The other 70-90% are potential students. And since a great deal of department funding within a university comes from the number of students they have, the department really wants to recruit those students! Of course, they also want to retain their "declared" 10-30%. "Recruitment & retention" are big buzzwords.

But over here, all courses are offered by your department. There's "mathematics for electrical engineers" and "programming for electrical engineers", all taught by the department of electrical engineering, not math or computer science. Students don't have a chance to really see the other departments, so there's not much opportunity for being recruited away. And even if they did want to switch departments, it's quite hard. Oh, there are provisions for switching, but there's a lot of steps. It's almost like getting a divorce -- discuss it with your advisor to see if there's any alternatives, have a cooling-off period, etc. In some Canadian universities, it's as simple as clicking on a few buttons on the web-based administrative system.


Other differences I've noted are much more specific to my previous department and this one -- or even to the instructors of the courses I've TA'd for. For example, everybody knows that you can't learn programming a lecture; the only way to learn it is to do it. At UVic, the course instructors therefore make the lectures subservient to the labs -- they make sure they introduce material to students in the lectures, so that students will be better prepared for the labs. I remember one instructor being very apologetic because I had to teach one lab when students had only received one lecture about relational databases.

But over here, they use the reverse strategy. Students encounter material in the labs first, in the hopes that they can better understand the lecture about that material. This seems completely backwards to me... although I guess it depends on what the goal of the course is. If the goal is to prepare students to understand computer architecture (which I guess is appropriate for an electrical engineering department), then I suppose that focusing on academic knowledge and preparing students for an exam might make sense. It's absolutely terrible for their programming skills, ability to build stuff, and general enjoyment of programming, of course, but I must admit that university courses aren't supposed to be about practical skills (that's the job of technical colleges).

As a result, the lab instructor to student ratio here is half of UVic's. While I was teaching at my old university, I'd handle 28 students by myself with no difficulty. Over here, we need a ratio of 1 lab instructor to 10-14 students. Not just for programming; that's what we did for digital+analog electronics. Now, I never taught breadboards and soldering at UVic, so I can't speak to the difficulty of that... but I'm totally certain that the first-year programming labs could function with half as many demonstrators if the course was run like the UVic courses.

Granted, the problem doesn't only rest with the teaching and administrative staff here. I can't recall having students show up drunk back at UVic, but we seem to get at least one each day over here. I can't fathom the logic... "yeah, this programming class is hard. I know! I'll get smashed before the lab. That'll help!"

But still, I don't really blame the students. I mean, kids will be kids. They're a blank slate when they arrive at university. It's our job to make them less blank. If that means that we need to teach them how to read text (which seems to cause them problems!) or how to think, then that's our job. If students show up drunk, it's because we've let them know (consciously or not) that it's ok to do that. If we were clear about our expectations of them, it wouldn't happen.



All in all, I haven't been very happy with this programming course. I love programming, I love thinking logically, so I want to brainwash the fresh blank minds into loving programming. But after the first week, it was abundantly clear that they weren't "feeling the love". Lots of confusion and frustration... and when I stepped back and looked at the situation, I couldn't blame them at all. I mean, I found the lab sheets to be confusing and boring, and I've been programming for over 20 years and work on program build systems for fun. There's no way that they could work with new programmers.

So I spent the past two weeks totally rewriting and expanding the labs. It's still not ideal, but they're way better than the old ones. I did my best to include all the institutional knowledge+research about teaching introductory programming from UVic. I got my teaching award for teaching programming to economics + business students, so I'd better be able to get (presumably) technically-inclined electrical engineering students up to snuff.

Now, I've written up labs before, but this was my first time designing an entire course -- and all at once! Previously, the instructor would say "ok, we'll do if this week... I was thinking about having the students write an adventure game like Zork." Then I'd say "ok, I spend 2 hours writing up a lab and send it to you around midnight for approval" (UVic was very strict about keeping track of your time spent; the TAs were generally hired for 120 hours each term). I'd go off and do that, then the instructor would (presumably) glance at it and tell me it looked great and that I should upload the lab. A week later, he'd give me a plan for the next lab, and I'd go and do that. But in this case, the only plan I had was the final project -- I looked at each step of the end-goal, figured out what they needed to learn to do each step, and then started trying to figure out interesting+easy exercises from there.

It was a bit similar to writing documentation, which I'm an expert at. Teaching last week was a lot more fun, since I could see how students were finding the new lab sheets. I got daily feedback on my work, which was great! Normally with documentation, I only see the effects of 20 hours of doc work by noticing a reduction in a certain type of questions on the mailing list over the next 3-6 months. Having immediate feedback on my educational work is fantastic. After 2-3 iterations of the course, I'm sure that I'll have a great set of labs.


Speaking of the labs, here's the link. If any programmers want to take a glance at them and let me know about problems, that would be great. We can't change the minefield exercises this year, and it's too late to change labs 1-3. I'm keeping a list of things to change for next year, though.

new labs

Oh, and a special message for my brother: don't complain about the lack of memory and pointers. I totally agree that teaching C without doing pointers is like building a bicycle without wheels, but it's not part of the minefield exercises, and I just don't see how we can find time to cover it. We lost the first two weeks of the labs due to confusion, and since pointers aren't required for the graded labs, I dumped them. I'll be making lots of changes to the minefield exercises for next year (for mao's sake, at the very least we should malloc the game board!), but we can't change these exercises now. :(

Posted at 2010-02-08 04:19 | Permanent link | Comments

Recent posts

Monthly Archives

Yearly Archives


RSS