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: ,

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: ,

Sean Galloway

So here’s a post I originally drafted back in July but neglected to publish:

I discovered the art of Sean Galloway due to his awesome Ironman piece (below), and I just thought I’d give a shout-out to the guy, and encourage you to check out his site.

I really like his style: it’s comic exaggeration mixed with accurate representation; sharp, crisp lines and subdued but well-employed use of colour; and an interestingly distinctive blend of Japanese/American influences. I think this guy could be a great webcomic artist!

These are some of my favourites.

null

I leaned on the wall, and the wall leaned away

Tags:

thingpart

It’s been too long since I’ve updated the webcomics page, but I’ve been going through the archives of thingpart by Joey Sayers, and it’s rather amusing, and definitely worth checking out. Well, if you like webcomics that is. If not – nothing to see here, please move along.

there’s a hundred hearts soar free

Tags:

Summer’s End

I love summer. Not just the season – the longer days, the warmer nights, nature in full bloom – but what summer represents, the very idea of summer. The high point of the year, the celebration of life, the adventure and enthusiasm that rejuvenates the senses for another celestial cycle. Other seasons are good too, and have their highlights (and hijinks), but I think summer will always be my among my favourite times of year.

As another summer slips away, I’m inclined to look back at summers gone by and reflect on how much I’ve enjoyed them. Many of the best times of my life happened during summer, or at least during the years that dominate my memory. I mean, I’ve always enjoyed school as much as the next nerd, but still, during university years September was a wave of rapidly-building stress, culminating in some funny-only-in-retrospect Decembers. (Not to mention that Canadian winters, despite the obvious benefits of winter sports, can be downright nasty.)

Read the rest of this entry »

Tags:

Hey, peoples who read my blog! Something I need to talk to you about!

So, I’m sure you’ve heard about Hurricane Gustav, and how the end result was that New Orleans didn’t end up in chaos like it did for Katrina. But, the hidden story here is that Baton Rouge got pummeled by the storm, and now a lot of people there are pretty screwed. We’re talking like no electricity for weeks, stand in line to get fresh water rations, you can’t go home because a tree fell on your house screwed.

For specific details, you can always check out The Advocate, Baton Rouge’s primary newspaper.

You might wonder why you should care about this. Well, I can’t answer that for you. I really care about this, because Baton Rouge has become a place of extraordinary importance to me. There are people whose well-being I care about who live there, and these people are there in the first place because they’re helping the local community.

So, anything I can do to help them means a lot to me. And thus, anything you can do to help them means a lot to me too.

If you do feel like helping, I’ve been told by expert sources that the American Red Cross is not a great place to donate, and that your money will actually be used to help people if you donate instead to the Baton Rouge Area Foundation. They have a fund for Hurricane Gustav Relief and Recovery, and that money is going directly to help people in the aftermath of this storm.

Also, a special bonus incentive! For anybody who does donate to the Gustav relief effort, if you tell me that you have (and I’ll just believe you because I’m trusting like that), I will take you out for lunch! And someplace nice too! Think of it – the satisfaction of knowing you’re helping people in need, plus a free lunch, PLUS my undivided attention for an hour or so of lunchtime conversation. Now that’s what I call an offer you can’t refuse. (If you live someplace I don’t… rain cheque!)

Seriously – I would immensely appreciate anything that any of you could do to help out Baton Rouge in this time of need. If you want more information, please feel free to contact me.

Thanks everybody!

seekin’ shelter from the storm

Tags:

« Older entries § Newer entries »