Blog

Completed the Mississauga Marathon!

On May 16th, I ran in the 7th annual Mississauga Marathon. This was my fourth marathon, and I’d decided to run it sometime back in March, after being unhappy with my result in the Toronto Good Life Marathon in October of last year. (Which I had run only two months after the Edmonton Marathon)

Though I had qualified for Boston during the Edmonton Marathon with a time of 3:02:50, I decided not to register for Boston after my poor performance in the Toronto Good Life race. I wasn’t sure I’d be ready again for another marathon in mid-April, and the timing with my schedule wasn’t ideal either.

However, by the start of February I was feeling better and started getting back into training mode. I had a May marathon in mind, which would give me a solid three months of training – more than enough considering the base level of training I’d maintained over the winter. However, I didn’t want to push myself and commit to something I couldn’t do – so I did not register until the end of March, when my condition was more certain.

And so when May 16th came, I was feeling pretty confident. I’d run the Sporting Life 10K two weeks before, finishing in 39:38, within my target time of a sub-40 minute run. I had a target time for this marathon of anything under 3:20, not enough to qualify for Boston since I didn’t want to push myself, since this was partly the result of why I’d done poorly at the Good Life Marathon last year.

The first three-quarters of the race went well, and I was able to maintain a fairly even pace, passing the halfway point at 1:33:55. While things went smoothly for the first 30 km, at about the 35 km mark I started feeling some slight leg cramps and had to slow things down. I lost quite a bit of time in the last 7 km, and managed to finish in 3:13:06, less than three minutes away from qualifying for Boston again.

While I was disappointed at coming so close to a qualifying time, overall I was happy with the result, having met my original target and improved substantially from my previous marathon. Despite this being my fourth marathon, I still feel that I’m very much a beginner at this, as I need to work on my overall race strategy, pacing and training if I want get more consistent results. I’ve thought about doing another marathon in the fall, perhaps the Toronto Waterfront Marathon (thus completing the GTA marathon three-pack), but I don’t want to push myself. I’ll see how the summer plays out.

Continued

Opera Mini approved by Apple for the App Store

On the heels of a controversial update to the iPhone SDK’s license agreement, Apple has unexpectedly approved Opera Mini for iPhone for distribution in its App Store.

Opera had previously announced that it had submitted its browser to the App Store for approval back on March 23rd, in an effort to drum up support for its inclusion in the App Store. Back then, many suspected it would likely be rejected on the basis of it duplicating built-in functionality on the iPhone, namely the included Safari web browser. (Though some questioned this analysis)

Whatever the reason, this comes as a surprise to many, especially given Apple’s most recent behaviour towards potential competitors and development on the iPhone in general. Nonetheless, let’s give Opera Mini for iPhone a quick test drive!

Continued

Triggering links from JavaScript using jQuery

Sometimes, you may want to trigger a link (that is, an anchor element) directly from JavaScript. That is, you may want to simulate the user clicking on the link programmatically.

If you’re using jQuery, you’ll no doubt be aware of the click() method which can be used to trigger that event on an object. One would think that executing click() on an anchor element would cause the browser to navigate to the URL, but this isn’t the case. You cannot use jQuery’s click() method to fully trigger or simulate a user clicking on a link.

Instead, click(), when executed on links, only seems to trigger any event handlers attached to the DOM element rather than any default behaviour. I’m not sure if this is the case with other event methods or other DOM elements.

The solution

Instead, the solution is to directly manipulate the window.location object from JavaScript. One would think that since preventing the default action is quite simple (with jQuery’s event.preventDefault()), triggering the default action of a link click would also be. But this isn’t the case. Here’s a simple example on how to simulate a user clicking on a link.

Continued

Awesome Note for the iPhone is awesome!

I’m a bit of an information pack rat. When I have an idea or something I need to keep track of, I have an immediate need to write it down or record it. In the past this has resulted in an assortment of post-it notes, notebooks or even loose papers lying around my desk, all used to document my thoughts. Eventually, I tried to move my note-taking over to the PC in an attempt to make it easier to manage, but over time the notes became spread over a variety of formats and storage mediums, from text files on my local PC to online services such as Google Calendar and Dropbox.

This sort of digital storage Balkanization was becoming a nightmare to manage and effectively neutralizing any benefit from taking notes, since finding and keeping track of what I’d written down was becoming a chore by itself. Clearly, a unified solution was needed. Ever since I got my iPhone last year, I’d been looking for an app or service that would allow me to easily keep track of todo and shopping lists (what most of my notes amounted to), while storing the the data online so that it could be synced or updated from my PC as well.

I think I’ve finally found that with Awesome Note.

Continued

Toronto goes open… sort of

opento

Back on November 2nd, the City of Toronto launched their toronto.ca/open service – a project aimed to be the “official data set catalogue” of the city. Part of the OpenTO initiative to make various data that the city has collected available to developers in formats that make them easy to manipulate, toronto.ca/open is the first step to making the city and its services more “open and accessible”.

The hope is that if the city makes this information available in a readily-usable form, developers will take the time to create various services around them, helping citizens enjoy and take advantage of what Toronto has to offer. For example, data on garbage collection, public transit or upcoming city events could be used to create a service that would alert users through various means of communication. But at present, the amount and types of data available are fairly limited.

Continued

Google Street View finally comes to Canada

google-street-view-canada

After much delay, possibly due to government meddling, Google Street View finally went live in select Canadian cities last week! Most of the GTA is covered, along with Kitchener/Waterloo, Ottawa, Montreal, Quebec City, Halifax, Calgary and Vancouver. This likely ensures coverage for a majority of Canada’s population, if only a very small minority of its geographical area.

This is a welcome move, since street view has been available for our neighbours to the south for the past two years.

Continued

Joining the iPhone cult

iPhone 3GS vs. iPod Touch 2nd Gen.

Well, I finally gave in and joined the cult of iPhone. At the beginning of this month, I decided to splurge and get an iPhone through Fido, Rogers discount brand. Why? I suppose it had something to do with the extension of the 6GB/$30 “promotion” or the fact that I was able to find a 3GS for sale locally, but mostly it had to do with the fact that I needed a new toy. (Note that the iPhone is hardly a novelty item, with >21 million of them out there)

Keep in mind that I didn’t have a mobile phone until late 2007, and even then I decided to only go with a prepaid provider (Virgin Mobile) because I didn’t have much of a need for a phone, but really just wanted Internet access. However, this past summer my phone got more use than usual, especially with regard to Internet access. With Internet browsing being anemic on most non-smartphones, I decided it was time to upgrade.

Continued

Evaluation of boolean values in JavaScript

If you have a background in a strongly-typed language such as Java, you’ll be used to using logical operators only with boolean values/expressions. However, in most dynamically-typed languages this doesn’t have to be the case, due to the nature of dynamic typing: The type of the variable is often determined based on the context in which it is used.

With JavaScript there are actually two concepts at play when using logical operators: What is actually returned from the result of a logical operation, and how variables are converted to boolean values when the context requires it.

Continued

Separating UI from implementation

I saw this comic about usability (linked from this question at Stack Overflow) and couldn’t help but let out a distressed laugh. How often have you seen this happen at your workplace, or in an application you’ve had the “pleasure” of using? For every elegantly designed UI that exists, there seems to be a plethora of poorly designed ones that do their best to confuse users.

To me, a lot of this UI complexity stems directly from a lack of separation between the UI and business logic layers.

Continued

Determine your visitor’s location based on IP address

If you’re running a website that provides a service, it’s likely that it would be beneficial to know a user’s location (or have a rough idea) so that the content could be tailored to their specific geographic area. But how do you get their location, without having to ask them? By using their IP address, it’s possibly to determine their general area with fairly good accuracy. In this tutorial, I’ll explain how to do that using the free IP address geolocation database from IPInfoDB.

Continued

View all entries by month or by category