Exam craziness

December 11th, 2009, 9:32 am PST by Greg

Yesterday, I had both of my CMPT 165 exams (on-campus and distance) back to back. The exams were different enough that students talking for the few minutes between exams wouldn’t get anything useful from it, but no more than that.

Six hours is too goddamn long to be in exams. I can think of no way to describe the day other than a list of happenings:

[tl;dr Go for 2b, 3ab, 4b.]

  1. Pre exam:
    1. The first exams start at 8:30. At 7:45, not one but two of my colleagues were still trying to photocopy their exams for big sections. Office photocopier was jamming every two seconds; grad photocopier was down.
    2. Critical mobile phone usage #1: realizing Amanda would already be in her office, I phoned her and got one colleague into the photocopier in the Dean’s Office.
    3. “Wait… did I tell that student she could start a half hour early? Where was she going to meet me?” Send TA running to the room with an exam paper, just in case. (No student.)
  2. On campus section:
    1. Before the exam, a girl flagged me down and told me she “had cancer before” and had been feeling lightheaded this morning. If she had to leave during the exam, that was why. I tried to get her to Health Services right away, but she insisted on staying. At the end of the exam, I convinced her to at least go and get her blood pressure taken or something.
    2. Two minutes into the exam, after sitting there for three or four minutes before it started, looking at the exam cover sheet (which says “CMPT 165”) and me, a student put up his hand and said “this isn’t CMPT 120” and left.
    3. Freakin’ piles of questions, including “can you give me a hint” and “what time does the exam end”. Many more questions than the distance section.
  3. Distance ed section:
    1. About 10 minutes into an exam, one of the kids that had run in a few minutes late flagged a TA over and said “I feel like I might pass out.” I talked to him for a few seconds and he was not entirely conscious: able to answer yes or no questions, but that’s about it. He probably couldn’t have walked out of the room at that point.
    2. Critical mobile phone usage #2: phoned SFU security for a medical emergency. To the credit of security: they came quickly and handled it quietly and with a minimum amount to spectacle to distract everybody else. They took the student to Health Services.
    3. After all this, I start to realize that I have been getting lightheaded when standing up: I’m hungry and totally dehydrated from four hours running up and down hot lecture halls. A litre of water and snack later, I’m feeling much better.
    4. A guy came in 45 minutes late after “car problems”. A girl came in about 1:15 late after a car accident on the way from Abbotsford.
    5. With an hour left in the exam, passed-out student came back! He wanted to finish his exam and was pretty sure he could get it done. I took this as a sign of not yet being fully capable of making decisions and sent him to the distance ed office to schedule an alternate time.
    6. Critical mobile phone usage #3: phoned distance ed and told them the story so they’d deal with this kid appropriately. Apparently he wrote the exam later in the afternoon anyway (but at least he had the full three hours).
  4. After the exams:
    1. I’m barely standing at this point.
    2. I was talking to Anne, and told her the story of my day. Anne is preparing to teach a course like 165 in Uruguay (since she is currently on study leave). She was translating the course outline to Spanish and kept asking me things like “what wording do you like better?” I must have said three times: “Anne… you know I don’t speak Spanish, right?!”
    3. I might have eventually just wandered out of her office while she was still talking. I don’t really remember.

There was probably more. That’s all that’s coming to mind at the moment.

A Vegas Christmas

December 7th, 2009, 12:59 am PST by Greg

A few weeks ago, I got to thinking about our Christmas plans…

I haven’t gone back to see my family for a while: it’s much nicer to go back (and deal with flying to Ontario) in the summer. Kat’s family does Christmas eve, not Christmas day. For the last few years, we have spent Christmas day with friends, which has always been a lot of fun, but this year all of the friends are scattering to the four corners of the world.

So I thought to myself: What’s keeping us in Vancouver? After Christmas eve with Kat’s family, we’re pretty much done with the holiday. But, anywhere we could go after that would be closed for the holiday, with one exception:

Vegas.

So, on Christmas day we’re flying from YVR to Vegas and spending four days at the MGM Grand. On the menu this time:

  • We want to shoot some guns (just like Angelica did). I’ve got to shoot a Kalashnikov.
  • Fremont Street.
  • Seinfeld is in Vegas around then: that would be awesome.
  • I have wanted to see Penn & Teller for a while and they’re performing through Christmas.
  • We have never eaten the food of Thomas Keller, so Bouchon is a distinct possibility.
  • Boxing day outlet shopping.
  • I want to see if I can find somewhere to make a prop bet and bet on something crazy.

As an added bonus, our friend Suyoko (and her mom) are going to be in Vegas for Christmas. That means (among other things) that I don’t actually have to wait through the outlet shopping: they can go and leave me behind.

Spring plan: DDP projects

December 1st, 2009, 11:15 pm PST by Greg

As I said before, I’m not teaching CMPT 383 in the spring (but I will be doing it in the summer). The alternate plan involves the “capstone” project that our dual-degree students have to do.

I’m going to be supervising a group of students on the technical side of their project. Since I’m me, the plan is to do a web project. I thought about this for about 8 seconds before I realized what I must do… there’s an obvious set of web projects that I understand, students understand, and need to me done.

We have some very old and clunky web tools around the School that work, but aren’t pretty and don’t have much hope of improving in the future. Students will know our gradebook and assignment submission tools, but there are a bunch more that aren’t student-facing.

My plan: replace as much as possible with modern, integrated, functional tools. The plan goes (or at least start) like this:

  • Global: Unified CAS authentication. A useful “dashboard” for everybody displaying recent activity relevant to them (upcoming due dates, recently posted grades, recent assignment submissions, etc). Instructors should be able to copy an old offering to a new one (copying grading info, due dates, etc).
  • Gradebook: the basics as currently implemented, with calculated columns, released/unreleased columns, AJAX-y sorting and display of class lists, email notification of new grades (?).
  • Submission: Per-assignment configuration (e.g. assignment 1 requires submission of a text file for part 1, and a .java file for part 2; both are submitted as distinct files).
  • Marking: Instructor sets up a marking key for TAs; TAs give grades and comments; info returned to students and grades automatically put into gradebook.

Additional functionality suggestions welcome. I have some cool “maybe” features to throw in if things go well.

I’m going to be treating whatever group I have as a development team, not a class. So, I’ll be whipping them much more to get good-quality code, not a class project.

There’s certainly a possibility of catastrophic failure, but I’d say a reasonable chance of success. We’ll see what happens.

Mythical Programming Beasts

November 7th, 2009, 1:55 am PST by Greg

In the time I have been programming, and mostly doing web programming recently, I have learned a few things. Notably, I have learned that there are a few things that people think are simple to deal with, but aren’t. These “simple” things that people think they’re doing when programming don’t really exist. Here are three examples:

“Text”

I don’t always agree with everything Joel Spolsky says, but he’s right in his rant about Unicode:

There Ain’t No Such Thing As Plain Text.

When dealing with input and output, you never have the luxury of just having “text”. What you really have is a byte stream using a specific character encoding. If you don’t know what encoding you’re dealing with, you’ve got nothing. Every input stream has to be decoded; every output stream has to be encoded.

Even once you have encodings sorted out, there’s a lot of question about what a “string” is in your program. Consider the distinction Django makes between strings and safestrings that allows the auto escaping to work: some strings contain HTML code, and some contain text that the user should see as-is. You can’t “output a string” without knowing how (or if) it has to be processed/escaped/cleaned first.

It’s never just “plain text”.

“Time”

It’s very easy in most languages to store date and time values. Unfortunately, there’s not really any such thing as a “time” either.

As I sit here, it is about midnight (0:00) PST. It’s 8:00 in London and 16:00 in Beijing. A time is no good to anybody without a time zone to tell you how it fits into the world. This comes into much sharper focus with web applications where users are probably going to be in different time zones.

But it’s not even as easy as storing a time + timezone: one week (7 days × 24 hours/day) ago, it was 1:00 PDT, not 12:00 PST. You can’t just add n days to a time and get the same time n days later. Time zones can change, even for a particular user, even if they don’t change their location. (And if not for knowing the time zone, I would have absolutely no way to notice these gotchas.)

Suppose I was using a calendaring application and I enter a meeting at “13:00” on a particular date.

How does the program represent that? The first instinct would probably be to store “<date> 13:00 PST” (using the entered date/time and my current time zone) but that’s not right if there’s a time change before that date. I have seen calendar error announcements “all meetings after the time change will be off by an hour” because of this mistake. Should it really be stored as “<date> 13:00 PDT” depending on the date? What if the North American daylight savings rules change again before this meeting?

I don’t even want to think about two users in different time zones trying to schedule a meeting, but it should definitely be possible.

The only real thing to do is store “<date> 13:00 America/Vancouver” and hope some timezone library is smart enough to save us later. That means we need a date library with a lot of smarts, like pytz for Python.

It also means that you have to at least be very careful with any built-in date/time library (and possibly data type) your language comes with. It might mean you have to bypass them entirely.

“Appearance of a web page”

[I know it’s not really “programming”, but just move on, okay?]

This one shouldn’t be a surprise to anybody who knows anything about the web, but web pages simply don’t have a single unique appearance. The way a page looks depends on the browser, window size, available fonts, font size settings, and who knows how many other factors.

If you’re making web pages, you simply have to understand and live with this limitation. As I have said many times in lectures: if you don’t like it, don’t make web pages.

Also, what the page looks like to you has relatively little relation to the way Google or other bots “see” it, but that’s another rant.

No CMPT 383 for me

November 6th, 2009, 1:53 pm PST by Greg

I know the schedule for the spring semester was announced with me teaching CMPT 383, but that is no more. I have been moved from 383 to something else that I’m sure I will have much to say about later.

Yarolsav Litus will (likely) be taking over the spring 383 offering.

I should be teaching CMPT 383 in the summer, though.

My latest project: web lint

October 15th, 2009, 11:30 pm PDT by Greg

I have alluded to this in a status update, but I think it’s time to look more widely for feedback…

A while ago, I started thinking about all of the annoying things my CMPT 165 students do in their HTML, and then started thinking about ways to get them to stop. I started working on an automated checker to give them as much personalized feedback as possible without me actually having to talk to them.

They already use an HTML validator which checks documents against the HTML/XHTML syntax, but it’s amazing what kind of things actually pass the validator. In the list: resizing images with width/height on <img />; saving their source as UTF-16 (no idea how they do it); putting spaces in their URLs; using class names like “red” instead of “important”; not specifying the natural language/character encoding of the document; etc.

As the list became longer, the thing became sort of a general HTML lint: the thing you go to after your code is valid to check for other common problems, annoyances, and omissions. The more I look at it, the more I think it’s a useful tool for CMPT 165 students as well as a good way to make others think a little more about the code they are producing.

I’m now at the point of wanting some feedback. There are still some missing strings and help text, but hopefully you get the idea. I don’t want to guarantee that this link will exist forever, but have a look at my web lint.

As with any “lint”, the goal here probably isn’t for authors to get zero warnings, but just to think about why they are ignoring the warnings that remain. (No, I don’t need you to tell me that some of my pages produce some warnings.)

At this point, I’m most interested in:

  • Links to input that causes an exception (500 Internal Server Error) or other truly broken behaviour.
  • Feedback on the warnings presented and their “level”. I have deliberately hidden levels 4 and 5 in the default display: I’m aware that the tool is pretty anal-retentive.
  • Are there things you can thing of (that could be automatically-checkable) that should get a warning but don’t? I have a few more on my list, but the core is in there.
  • I don’t think the URL validation (for <a>, <link>, <img>) is perfect: I still need to go back to the RFC and check the details. Any cases you notice that don’t pass but should would be appreciated.
  • Any spelling/grammar errors?
  • I’m trying not to duplicate functionality of the HTML validators: they already do their job well. But, notice the links to “other checkers” on the right. Didn’t know about all of them, did you? Any others I should include?

My intention is to GPL the code and CC license the text, but let’s take one step at a time.

Manhattan Summary

October 7th, 2009, 12:12 am PDT by Greg

I’m going to update on the Manhattan part of our trip. I’ll leave it to Kat to talk about the wedding and Poughkeepsie.

Manhattan Part 1

[Manhattan Part 1 pictures] We got to New York City early on the red-eye. We managed to get early check-in to the hotel, which was awesome. After a bit of a nap, we hit the city, ready to go.

  • Our first stop was the American Museum of Natural History. This was chosen as the one big tourist stop. I spent my entire childhood being dragged around to museums and thinking “I thought they were supposed to have dinosaurs at museums.” Finally, I got to go to a museum with dinosaurs. Even though I’m not eight anymore, it was pretty aweseme.
  • We took the subway to the museum, which is right beside Central Park. Subway: check. Central Park: check.
  • We pretty much walked from Columbus Circle around Midtown for the rest of the afternoon: Radio City Music Hall, Rockefeller Center, the TV studios there, the MoMA store, the theatre district, Times Square.
  • After a little rest back at the hotel, we went out to see things at night. How bright is Times Square at night? I was shooting up to a full stop over my camera’s meter to get things to look right.
  • Somewhere in there, we found some pizza and hot dogs in the local style.

The next morning, we went out to grab a bagel, and had a leisurely walk to Penn Station to get the train to Poughkeepsie.

Manhattan Part 2

[Manhattan Part 2 pictures] On the way back, we had a nice long layover in Manhattan: our train got in at about 3:00 and our flight wasn’t until 10:30. We managed to check our bags at Penn Station and get a few more hours in the city:

  • We started at the Empire State Building. It was a clear day, so it was a nice view of the city.
  • The big reason for going back out: we went to the NY Public Library which had the original Pooh and Piglet stuffed animals. (It was closed for part 1.) Kat has always been a big Piglet fan (“He’s little, like me.”) so this was definitely a highlight.
  • On the walk back to Penn Station, we happened by a White Castle. Summary: I can’t imagine why anyone would drive overnight to get White Castle. Maybe being stoned helps.

I had my handheld GPS in my camera bag and on for most of the walking. So, I can offer our tracks in Google Earth for your viewing pleasure. Keep in mind the error inherent in the GPS, particularly when surrounded by tall buildings: we weren’t walking around as spastically as it looks.

Overall, I think we got as much as we could have done without ever entering “death march” territory. Excellent trip. Next time, we’d stay at the south end of the island: Chinatown and Little Italy.

One Last Trip

September 29th, 2009, 11:11 pm PDT by Greg

We are prepping for our final bit of travel in a travel-filled year. (I can only really travel seriously when on study leave, for reasons that should be obvious.)

Tomorrow night, Kat and I are headed to Brian and Lisa’s wedding. Here’s the plan:

Wednesday:
Four hours of lectures; Kat picks me up Daniela kindly picks me up immediately after lecture and we head to collect Kat and go to the airport. Red-eye to JFK in New York.
Thursday:
Get in to NY really early. Try to get to the hotel: hopefully check in and take a nap, at least drop off our luggage. Explore NYC for the day. Goal: limit ourselves to about two things and see them well; don’t run around like crazy people.
Friday:
Take the train to Poughkeepsie. Get rental car. Dinner at the CIA. [CMPT 165 lecture cancelled.]
Saturday:
There’s a “hike”. Comparing the elevation changes in Poughkeepsie to Vancouver, this can’t be too bad.
Sunday:
Wedded bliss.
Monday:
Train back to NYC and fly out, getting back to Vancouver super-late. [Anne covering CMPT 165 lecture.]
Tuesday:
Recovery.
Wednesday
Back to the grindstone with four hours of lecture.

With any luck there will be enough downtime around the edges to recover from the drag of overnight travel.

More DDP Fun

September 24th, 2009, 4:02 pm PDT by Greg

Partially (but not entirely) because of my my last adventure with the DDP (Chinese Dual Degree) students, I have started to feel a certain affection for the group.

Today there was a welcome reception for the ones that just got here this semester. They were a surprisingly talkative group (considering we were talking in English), and it was nice to have the chance to welcome them.

A common question from me: “What have you done in Vancouver so far?” Most are pretty new and haven’t done much. But one answer stood out:

DDP Girl: “We have gone to UBC, and we went to the beach.”
Me: “Oh, which beach?” (grabs for convenient map of Vancouver)
DDP Girl: “The one *giggle* at UBC.”
Me: “… oh!” [For those not in the know, Wreck Beach is the local clothing-optional beach.]

The implication was that they just saw a sign for “beach” and thought they’d have a look. That’d be quite a shock: five minutes off the plane from China, and being surprised by some fat naked white guy walking down the beach.

So, that was the funniest image I had had in my head for a while.

Then five minutes later:

Different DDP Girl: “Oh, I haven’t done much yet, but I want to go to UBC and the beach.”

You know that feeling when you’re trying not to laugh, but can’t even look like you’re trying not to laugh? I swear pulled a muscle in my face to keep from smiling.

Apparently Wreck Beach is the first stop for DDP students showing up in Vancouver.

I’m back, baby!

September 14th, 2009, 10:12 pm PDT by Greg

I woke up last Tuesday to the cold realization that my study leave was over: there was no choice but to admit that I was back at work. My first lectures were Wednesday: one hour of CMPT 165 and three of CMPT 470.

After the 165 lecture, Diana stuck her head into my office. She hadn’t been teaching in the summer semester, so she was also coming back to teaching. “Did you have your first lecture yet? Were you… excited?” Apparently she was so excited to get back to teaching that she was a little befuddled in her first lecture. This is why I love Diana.

I don’t know that I was particularly excited before my lectures, but now that I’ve done a full week, I’m feeling good about being back.

There’s something about being in front of a lecture room that feels right, especially with 165 and 470. Those courses are really the equivalent of comfort food for me and I think I’m going to have fun this semester.

So, I guess a year of study leave really does help one’s attitude. At least for the first week.

« Previous Entries   Next Entries »