Sunday, July 27, 2003

New all-time best movie ever: Roger Dodger. That's right no link. Just stand up from the computer, get to the video store and rent it now.

Friday, July 25, 2003

Whenever I walk to the Movieland with my roommate Val. we pass by an apartment building on Prince Arthur with a stone wall that looks perfect for climbing. I sometimes jump up there for a minute or two just for fun but Valerie is an actual *real* outdoor climber so last night she invited her brother over, with equipment, for some urban bouldering. At about half past midnight, we all finished our beers, and headed out to the wall. I don't own climbing shoes so Val. lent me her old ones which were SO small they hurt my feet about a thousand times more than they are supposed to. (Climbing shoes are supposed to be tight so your toes stay together and can support your weight). The pain prevented me from walking but I actually did okay on the wall ... for the first 2 minutes until my hands got tired. That wall was pretty hard, and even the experts couldn't get past a certain point, so we walked back over to the hospital across from our house and gave it a shot. At about two o'clock we walked back to the house then went out to Bifteck for beer and foosball. Now we were playing the sport I am good at! I was feeling really good after winning us the table, when this guy walks up and wants to play alone against the two of us. Well, he soundly won that game, and it was a bit of an embarrassment. There's always someone better out there ...

Thursday, July 24, 2003

Fun night last night with Mira and a bunch of guys from work. After the gym, we played foosball, pool and drank beer at Mad Hatter's. Unfortunately, I guess since it was a Wednesday night, there was no real competition for the table. We easily brushed aside both challengers.

Tuesday, July 22, 2003

Here's a little tidbit from my new book (Modern C++ design, forward) that made me laugh out loud. Not a "ha ha" funny laugh, but more so a "You're not supposed to use templates like that! This author must be insane!" laugh. Template<bool> struct CTAssert; Template<> struct CTAssert<true>{}; // ex. usage foo() { // COMPILE time assertion! CTAssert<sizeof(int) == 4> foo; }

Monday, July 21, 2003

I fetched my bike from Waterloo this weekend and so I decided to take it to work this AM. I arrived in 1/4 of the time but then realized I forgot my computer power adapter at home. No problem, because I can bike back and forth once more and still have made the trip faster than walking would take. Except: back tire went flat hopping a curb on the way back. I walked my bike the rest of the way home, picked up my power brick, then walked to work as per usual. Blah ..

Sunday, July 13, 2003

Amazon.ca (now) rules! The last time I looked, when the Canadian version of the site was launched, they really didn't have any selection of techincal books and the prices were nothing special. Now it seems things are up to par with the US version. I just bought Modern C++ Design: Generic Programming and Design Patterns Applied for $46.89, (30% less than the Chapters price), with free shipping, no PST, and especially no customs bullshit.

Just as I'm hitting the end of my laundry cycle (running low on clean clothes) our washing machine breaks down, filling my room with smoke and the smell of burning rubber. These used appliances that landlords pawn off on us student tenants ... they just never last.

Friday, July 11, 2003

Over the last couple days I've been porting our networking library (WvStreams) to the Win32 platform for use in the next version of ExchangeIt!. In order to actually get work done, I've locked myself into the "quiet" room. Everyone at our office has their desk out in the open, no cubes, no nothing, but if you want to escape the office chatter we setup the one room with a door in the office as a working refuge. I feel a bit like I'm shunning everyone, but I'm getting more stuff done free from interruptions. Last night I dreamed that we moved into a new building where *everyone* had an office with a door.

Tuesday, July 08, 2003

I'm at work and havin' a beer! A Boreale Rousse to celebrate. After two days of going crazy, I've found my bug that was crashing Outlook. (Recall we're developing an Outlook COM addin that replaces MS Exchange server). My event handler callback looked like: void __stdcall InspectorCollectionMonitor::OnNewInspector(Outlook::_InspectorPtr pInspector) when it should have looked like void __stdcall InspectorCollectionMonitor::OnNewInspector(Outlook::_Inspector *pInspector) At first glance you'd think that this code would crash right away -- the caller is putting one thing on the stack and you are treating it as something else. But this code worked well in the daily builds for days and days until someone discovered that Outlook would crash when you closed those little sticky note things in the Notes folder. When I reproduced the problem in the debugger, I was unhappy to discover that the crash wasn't in our code, rather it was deep in Outlook's, making the problem not easy to fix. The reason that the code worked at all is that a COM smart pointer class (_InspectorPtr, in the first buggy declaration) is exactly the same size as a raw pointer (4 bytes). The problem is, in the stdcall calling convention, the called function, not the caller, pops the arguments off the stack. So my function was calling the smart pointer destructor for something that was never constructed as a smart pointer. Result: the reference count was incorrectly decremented (and the underlying object possibly destroyed) in my code, only to blow up outlook next time it dereferences it.

Friday, July 04, 2003

Today is my own personal tax freedom day because I can finally afford to pay my $1,422 2002 tax bill. I think it's funny that I now have an internet banking bill payment payee called "CCRA - Arrears"

Thursday, July 03, 2003

Pop quiz: What's wrong with the following line of C : // returns 0 on success, -1 on failure extern int dosomework(); int main() { ASSERT( dosomework() == 0 ); return 0; }

I just fixed a bug against my code that was caused by this type of problem.

Wednesday, July 02, 2003

Happy Canada Day (yesterday)! Yes in Montreal they do have fireworks, (but not in QC I'm told) and I went to see them at the vieux-port with housemates Hillary and Jesse. During the display, the "We are the champions" song was playing, which we all found a bit odd considering Canada's supposedly peaceful international role. Sadly, I'll also report that the childhood wonder of staying up late and walking through the crowds on Canada day-night with one's parents to see the fireworks is gone. 11:00 is no longer "late," and in Montreal crowds form on summer nights for about a million other reasons than "Le fete du Canada".