Olympic Summary

March 1st, 2010, 3:24 pm UTC by Greg

I have avoided blogging throughout the Olympics because I just couldn’t figure out what to say. I still don’t know, but feel like I should write something. I have collected my Olympic pictures and will link as appropriate. (I have some pictures from last night that aren’t in there yet: give me a few hours.)

Here are my highlights…

Things we did

  • On the 16th, I slept in and Kat got up early to do the zipline. I wandered downtown at my leisure and sat down to watch the curling game (Martin v Norway) in Robson Square, right under the zipline tower. In the span of three minutes, Kelly zipped, Martin won the game, and Kat and Pam zipped.

    There are pictures from the zipline. Be sure to notice the movies Kat took.

  • Later that day, we went to the Mint pavilion. As much as I can’t believe I’m saying it, it was totally worth waiting for three hours.

    The Olympic medals are fundamentally just a pound of metal, but they just feel different: special and important. We don’t have many pictures from that because I mostly spent my time rolling the thing around in my hand and staring at it.

  • On the second day of the Colbert report, we went around behind the stage (based on Kat’s discovery the day before). Everybody who went on or off the stage walked within 10 feet of where we were. Pam got a signed picture.
  • Nico and Allison came to visit for a couple of days, which was great. We ran into Meredith Vieira from the View. That was exciting once Kat and Allison explained to Nico and I who that was. Also, we made pretzels.
  • We saw two women’s curling matches: the semi-finals (Canada over Switzerland and China over Sweden) and the bronze medal match (China over Switzerland). So, we saw the Chinese women win the bronze: they were obviously very excited and I got some good pictures of them celebrating (thanks to the Chinese photographer who called them over to our side of of the rink).

The Games

  • Jon Montgomery’s triumphant march through Whistler. I think this is my favourite moment of the games because it’s obvious to me that he would have done the same thing if he had come in 2nd or 6th. There might not have been a camera crew, and one of his friends would have gotten him a beer instead of some random girl handing him a pitcher, but he would have been there either way.
  • Marianne St-Gelais’ reaction to Charles Hamelin’s 500m gold. I particularly like it when she lost the coordination to jump up and down and switched to running in place.
  • Scott Moir: “We’re second… no just kidding: first!”
  • Kevin Martin’s curling gold and Cheryl Bernard’s ulcer-inducing silver.

    Kevin Martin’s dominance in this sport really cannot be overstated. If we count the biggest competitions in the sport in the last year (Brier, Canadian Olympic qualifiers, World Championships, and Olympics), Martin has lost 3 games out of 40. In a sport where a couple of missed shots can swing the game in your opponent’s favour, that’s stunning.

  • William-goddamn-Shatner in the closing ceremonies. “I’m Bill and I’m proud to be Canadian”. Really, is there anyone more full of awesome than Shatner?

I will point out that my top two there (Montgomery and St-Gelais) were the result of CTV putting a camera pointing in just the right (non-obvious) direction at the right moment. Kudos to them on solidly good coverage.

My Minimal Setup

January 6th, 2010, 9:37 pm UTC by Greg

I just got a new netbook: an Asus Eee 1005HA.

As my old tablet got slowly older, I realized that I don’t really have heavy laptop demands: most of my use is a text editor and “hey look at this web page” in lectures. Even when away from the lecture hall, I tend to work primarily in a text editor (for LaTeX, HTML, Python, etc.), Thunderbird, and Firefox. I’m not exactly putting a big strain on the system, and can trade off power for small and light.

As always, there’s a big difference between the average stock setup and what I need to get some work done. Bridging this gap is a hassle, so I’m going to finally record what I need so I can look it up next time.

The new Eee is dual-booting Windows 7 and Ubuntu (Karmic netbook remix). Yay to Asus for shipping with a second “data” partition on the drive that was dead-easy to put Ubuntu on.

I’m open to must-have software suggestions that I missed. I’ll probably add more below as I find stuff I missed.

In Windows

In Ubuntu

  • rsync (As far as I’m concerned it’s negligent to have an operating system install without rsync.)
  • subversion
  • sshfs
  • ntp
  • thunderbird (and thunderbird-gnome-support)
  • If I’m going to be downloading pictures from a camera: mmv, jhead, exif, gphoto2, python-pyexiv2, gpsbabel
  • ddclient (with a config file like this)

In Firefox

I Have The Best Job In The World

January 4th, 2010, 3:55 pm UTC by Greg

… and it’s days like today that I have to say that out loud to remind myself. I am not mentally or physically prepared to be done my Christmas break or resume teaching.

I have posted some pics from Vegas. The trip was good: to give you an idea, we gambled a total of $100 between us because there was too much other stuff to do.

A warning: when going to Vegas, plan to spend $100–200 per person per day on miscellaneous stuff. By the time you have a nice dinner and go to a show, $100 is gone, and that only entertains you for the evening.

The highlight for me was probably the Gun Store (not-even-subtly-racist targets aside). When else am I going to shoot an assault rifle? I should have upgraded the package to shoot a handgun too.

Other than that, we had a good set of the standard holiday stuff (including our open house, which I haven’t done the time lapse video for yet). All of that went well, but all happened much too fast.

Exam craziness

December 11th, 2009, 9:32 am UTC 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 UTC 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 UTC 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 UTC 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 UTC 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 UTC 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 UTC 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.

« Previous Entries