Sunday, August 31, 2003

After retrieving by bike from the clutches of Via Rail on Saturday, Jen and I spend the next 24 hours lazing around watching movies and having "quality time." That was nice, but by Sunday afternoon she was leaving for the cottage and I was starting to crave activity! Unfortunately, my climbing gym and usual partner were both far far away in Montreal and I was stuck in a pretty vacant house in a pretty vacant town. Fortunately, one person who was around was Lauren, who several weeks earlier Matt mentioned was "all into climbing." I called her up and she was as psyched as I was to hit the gym ASAP. The only place to climb indoors around KW (not counting Guelph) seems to be Sports World, which is like an amusement park: video games, rides, mini-golf, etc. including climbing gym.

I'd give the climbing experience at Sports World a grade of "C-". The routes are not great -- they are unrated and mostly really easy or really hard. At the gyms I've been to, the staff/members design the routes, give them a name and a rating, and write this on a little card at the starting point. This is a little hint at the gym culture. At Sports World, there doesn't seem to be any culture because most of the climbers are people who just wander in from the amusement park and pay $7 to have someone belay them while they scramble up the easiest route in sneakers. So, even though it is fairly close, I hope we don't have to go back there often. Next, I'd like to try the Guelph Grotto

It really was a fun time anyways. Lauren bought a sweet harness and new shoes for the occasion, and I got to use my birthday presents: harness and ATC from MEC.

Lately, many people are linking to these pictures of a Windows error dialog in a highly visible location. Of course this is nothing new but here are a few of my thoughts on the subject:

Just because Windows crashes are frequently observed in highly visible locations doesn't necessarily mean it is less reliable than other operating systems. Suppose operating system A runs on 90% of computers and crashes 1% of the time, and O/S B runs on only 10% of the computers but crashes twice as often. If you observe computers at random, you will notice more 'A' crashes than 'B' crashes even though 'A' is in fact more reliable.

Not every highly visible error message can be blamed on the operating system. Looking closely at the pictures, we see that the actual message is "Your system is low on virtual memory. Windows is increasing the size of your virtual memory paging file. During this process, memory requests for some applications may be denied." The most likely cause of this message is an application program leaking memory, not a problem with the operating system. Even the smallest memory leak in an application that runs continuously, like the one displaying whatever should have been on the Macy's sign, will gradually add up. But the operating system cannot distinguish memory that a process has leaked from storage that it just hasn't used in a long time and so it must continue to keep track of it. When the size of the leaking process exceeds the space available for paging, the operating system must handle the condition in some way. Linux, for example, uses a heuristic to select a process to terminate with the intention of freeing up the most virtual memory. The designers of Windows, as explained in the error message above, decided to increase the size of the paging file while dening further allocation requests in the meantime. In both cases, the operating system is doing it's best to continue despite an error in the running application. Programmers: Be careful about resource management when writing long lived applications, like servers or embedded systems. Little mistakes add up over time.

One mistake that the designers of Windows did make however, is to assume that system errors should always be reported via a graphical dialog on the system console. In many computer applications, either there is no console, or, as in the case observed by New Yorkers on the corner of 34th and 7th in Manhattan, the users "at" the console are not the ones best equipped to handle the problem. I'm sure important system messages also end up in the Windows Event Log, but the lesson here is that popping up a dialog is not always appropriate. Programmers: Do not assume that the software you write will be run in an interactive environment.

After a move I would categorize as "small ordeal," I'm back in Waterloo at 161 Erb. It was raining like crazy as I walked from my house on St. Urbain to the train station Friday afternoon. I had an umbrella and a garbage bag taped to my backpack to keep out the torrent, but my right arm got soaked from reaching out from the umbrella to push my bike (It was impossible to ride with that much stuff). I bought a ticket (at pretty much the last minute) for the fast 4 hour train from Montreal to Toronto, BUT I didn't realize that it doesn't have a baggage car, so as I sped west at 5pm, my bike, in a box, minus pedals and wheels, stayed behind at the baggage counter. I arrived in Toronto on time but Jen wasn't able to pick me up so I got on the late Greyhound to Waterloo because even though I had to come back into the city the next day for my bike, I didn't feel like sleeping in the train station. The next day (Saturday) we drove back in and spent the day at the AGO and MEC because my bike didn't actually make it on the next train, in fact it was on the next, next train at 4pm. It really goes to show that having more stuff than you can carry on your back makes life difficult, even if it is my beloved bike.

Friday, August 29, 2003

Climbing again last night. I managed to do a bunch of 5.6s and a 5.6+ without cheating (using other nearby holds that are not part of the route)! Yes this is a small accomplishment (the ratings go up to 5.12 or something) but I was pretty psyched about it at the time. Unfortch, Mira hurt her ankle so she didn't get as much wall time as I did. I don't think the UW bouldering wall is going to keep satisfied me next term, but this means driving all the way to Sports World.

Tuesday, August 26, 2003

Climbing yesterday with Mira was fun as hell! The place "Allez-up" is way bigger than Vertical Adventures in Winnipeg, but by bigger I mean higher. The routes are at least twice as long (vertically) as what I've done before. Also we learned to belay with just the block thingy instead of the automatic belay device, and the rope isn't attached to the floor, so if the person who falls is heavier than the belayer ... up you go! We went on "ladies night" so the place was super busy.

Monday, August 25, 2003

Ah .. Friday evening I left the office feeling pretty burnt out about work. That's a signal that the term is almost over. Good thing my life comes in 4 month bite size chunks, otherwise I would get bored pretty quick. So I decided not to think about work all weekend and didn't, but I'm back at my desk now and am not feeling any more motivated. Over the weekend, I hung around with some "friends of the house" up from America, went for dinner and beers with Alisa and boyfriend, and watched a movie with Mira.

Monday, August 18, 2003

Weekend fun: Saturday I played pool with, and saw "Pirates ..." with Mira. ' An excellent movie -- esp. if you think Johnny Depp's crazy mannerisms from "Fear and Loathing in Las Vegas" are funny. I do -- just ask Mira, she almost disowned me in the theater for laughing at moments that other's didn't find so "ha ha" funny. After that I wandered around until 3am then went to bed. Today we headed up (way up, out of my urban womb, past the 40 expresswsay, and into the suburbs) to M.E.C. (pronounced 'meck', apparently, and in Montreal located in the same mini-mall as a Krispy Kreme(R) ... funny) for the purpose of buying these babies(rock climbing shoes) that I will use tomorrow at the climbing gym. Next term, I also intend to use them at the campus bouldering wall in between classes.

Wednesday, August 13, 2003

You don't really understand a process until you try to automate it (or, program a computer to do it).

Tuesday, August 12, 2003

Programming quiz #2 What's wrong with this constructor?
class Buggy : public Base
{
private:
    Object mymember;
public:
    Buggy() : Base(&mymember)
    {
    }
};
Today, a change I made to a base class constructor exposed a bug like this in a derived class. Why is the above constructor just begging for a SIGSEGV?

Monday, August 11, 2003

Coolest activity that wasn't possible five years ago: Staying up REALLY late with a bunch (or a few) people, a computer, a broadband connection (just wait for it, this isn't something geeky) and good speakers. Just go person by person around the room having everyone request a song, download it on demand and queue it up in winamp. Stay a few songs ahead of requests in case of slow downloads to avoid "dead air" time. Of course, one person is busy as the DJ but the rest of the group will be chatting about the music, i.e. first time they heard this song, associated memories, etc. etc. Bonus: the lucky person with the laptop takes away from the evening a list of everybodies favorites and probably learns to like something new. No one else but me seems to be amazed that this instant world-wide access to virtually any song that was ever popular actually possible.

Monday, August 04, 2003

Don't you hate it when you cvs up, pull in someone (who ought to know what they're doing)'s innocent looking change, and it ends up breaking your stuff for the next three hours?
Real programmers don't use debuggers, but working in Visual Studio .NET 2003 all term has spoiled me. I'm becoming a worse programmer because instead of *thinking* about the code you just wrote, it's seems easier just to set a breakpoint and try it out! Plus with the "Edit & Continue" feature you can actually apply code changes to a running program. These things encourage programming by experiment instead of by design. This evening I was supposed to meet someone at the gym at eight, but I was still at my desk at 7:58 because I didn't want to leave until this stupid thing I was working on actually ran without crashing. But instead of taking the time to actually think the thing through and plan it out, I just kept tweaking things as I single stepped through problematic section of code. Of course this actually took longer and was more frustrating than doing it right because I never actually fixed the problem and left for the gym an hour later aggrivated but having accomplished nothing. Here's what a real programmer, Linus Torvalds, has to say about debuggers w.r.t. Linux kernel development. Nice.