October 2008

You are currently browsing the monthly archive for October 2008.

The incomparable Douglas Adams once said “I love deadlines. I like the whooshing sound they make as they fly by.” So, indeed, as today is the election, I’ve almost run out of time to post my pre-election thoughts before they turn into post-election reactions.

Overall, I honestly don’t expect this election to change a whole lot in parliament: I predict another Conservative minority government, which leaves us with pretty much the exact same situation as before: the Conservatives form the government, and Harper remains as PM – but not having enough seats to force their own legislation through the House of Commons means that the other parties can still lambaste the Conservatives for not doing enough, while simultaneously blocking them from taking action.

I do think the Conservative party will pick up some seats though. They won 124 last time in 2006, and I’d expect that to increase to 130-something, maybe even push 140. So not enough to gain the magical 155 necessary for a majority, but at least enough to give Conservative supporters something to cheer about. And really, I expect almost all of those Conservative victories to come at the expense of the Liberals. They should almost certainly drop below 100, from their past total of 103 seats in 2006 to somewhere below 90 this time. Pretty good score for a rookie golfer, not so good for Stéphane Dion.

Read the rest of this entry »

Tags:

Twitter sidebar hack

So by default the official Twitter HTML/Javascript badge doesn’t actually let you click-through hyperlinks, they’re just displayed as normal text the same as everything else.

The main JavaScript function from that badge is:

function twitterCallback2(obj) {
	var twitters = obj;
	var statusHTML = "";
	var username = "";
	for (var i=0; i<twitters.length; i++){
		username = twitters[i].user.screen_name
		statusHTML += ('<li><span>'+twitters[i].text+'</span> <a style="font-size:85%" href="http://twitter.com/'+username+'/statuses/'+twitters[i].id+'">'+relative_time(twitters[i].created_at)+'</a></li>')
	}
	document.getElementById('twitter_update_list').innerHTML = statusHTML;
}

So basically it’s just inserting into the twitter_update_list  (the list in the sidebar)  the text of each tweet, and then a link to that particular tweet with the “relative time” as the link text, with a separate relative_time(datetime) function that just converts an actual timestamp to an ordinal name.

So because there’s no formatting inside the twitters[i].text, links are displayed in the same formatting as any other text.

So even though this is kind of a major design flaw (imho), especially coming from Twitter themselves as the official blog badge, it’s just them being simple with their function – low frills.

BUT, we can be a bit fancy with regular expressions. So, if we add another script that replaces the twitter_update_list with a formatted version (that we subject to a search-and-format for links using regexes), then we can force the Twitter sidebar to have true links.

document.getElementById('twitter_update_list').innerHTML = document.getElementById('twitter_update_list').innerHTML.replace(/https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/g,"<a href="$&">$&</a>");

Overall, this shows that regexes can indeed, save the day.

this way is a waterslide-away-from-me-to-chase-her-fuller-everyday

Tags: ,

Birthday Thoughts

I don’t really “feel” 24 years old.  Somehow that seems like a surprisingly large number.

I’m not really sure what I thought I’d accomplish by this age, back when I was like 18 or so. I’ve probably succeeded in most of my “big goal” stuff though:

  1. Got my degree – oh how far away that seemed, 6 years ago, when I was just getting into my very first semester, and the initial thrill of campus began to wear off, and the reality of life in first-year engineering began to set in. 8am statics lectures with (now retired) Dr. Brown, who remains one of the greatest teachers I’ve ever had, even though his class was a necessary wake-up call regarding the effort required in engg vs. high school.
  2. Got a good job – sometimes I really stop and think about how sweet my job is. Here I am, software developer, working from home. That’s the freakin’ dream. I realize I don’t work for Google or something, but really, I’m getting a great chance to learn, and I’m entrusted with an at-times-shockingly-large amount of responsibility, considering my experience. I’m the lead developer (ok, often the only developer, but still!) on multiple projects of significant importance – my apps need to work, or bad things happen. Sure, if I didn’t do it, somebody else would, but everybody in my group is swamped with their own projects, so they need me to take care of my stuff. I like to think I’m getting pretty good at it – meeting with people, figuring out what they need, and delivering on that.
  3. Move out – ok, ok, so I moved out, came back, moved out, came back again, and moving out again as soon as homeland security lets me. Overall though I’ve spent well over 2 years away from home, as a working professional, in cities other than my hometown, so I think that counts for something.

Ok that’s a pretty short list, but I’m not really sure what else I’d hoped to have done in 6 years. I maybe thought I’d get a Master’s degree right away (and thus be done that by now), but I’m glad I didn’t. In my profession, industry experience is more valuable in many ways, or at least the balance between industry and academia needs to be there, as formal methods proves :P

Overall though, “success” is an arbitrary measure – I definitely could have done more with my life thus far, and sometimes regret that I haven’t; I worry that I didn’t do things well enough. But really, there’s nothing I can change about that now, I can only look forward. And hey, the future looks pretty good.

And not just because I’ve accomplished things I set out to do, and because I see a lot of opportunity for myself in the years ahead. I’m legitimately happy, like really amazingly happy, and that is what really brightens my future – and each day.

I’m just thinking ’bout you on this production platform

Tags: ,